Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Handle Switch "Update" and "DLC" files #554

Closed
Djiit opened this issue Jan 2, 2024 · 6 comments · Fixed by #582
Closed

[Feature] Handle Switch "Update" and "DLC" files #554

Djiit opened this issue Jan 2, 2024 · 6 comments · Fixed by #582
Assignees
Labels
feature New feature or request

Comments

@Djiit
Copy link

Djiit commented Jan 2, 2024

Is your feature request related to a problem? Please describe.
My Switch roms folder contain both main titles and updates (NSPs).

Describe the solution you'd like
When scanning a swich platform folder, I would expect romm to ignore updates titles (not main games) -- or flag them as such.
is it possible when fetching data from titleDB to flag some files as "updates" or "DLC" only ?

Describe alternatives you've considered
Renaming my updates using a pattern (e.g. update.nsp) and ignoring them via the configuration.

@Djiit Djiit added the feature New feature or request label Jan 2, 2024
@Djiit
Copy link
Author

Djiit commented Jan 2, 2024

was looking at #404
it seems my game+updates+dlc were not found as being part of the same group. Do you expect the naming differences to be all between parenthesis or square brackets?

edit: adding a space between the title id and the rest of the file name worked.. e.g. Hammerwatch v65536[01003B9007E86800].nsp => Hammerwatch v65536 [01003B9007E86800].nsp.

Should we document such constraint somewhere ?

@gantoine gantoine self-assigned this Jan 2, 2024
@gantoine
Copy link
Member

gantoine commented Jan 2, 2024

When scanning a swich platform folder, I would expect romm to ignore updates titles

this is not something romm does at the moment, and i don't know enough about titleDB to know (off the top of my head) if that's possible. i also don't own a switch so i'm not aware of the file structure.

Do you expect the naming differences to be all between parenthesis or square brackets?

we don't currently support that strutcture, you'll need to wait until we build sync-with-device to support other folder structures

adding a space between the title id and the rest of the file name worked

that might be a bug with the regex that parses titleID, we'll have a look

@Djiit
Copy link
Author

Djiit commented Jan 2, 2024

Thanks for the quick and detailed answer.

that might be a bug with the regex that parses titleID, we'll have a look

If you can point me to the corresponding regexp and associated test, I could have a look at it.

@gantoine
Copy link
Member

gantoine commented Jan 2, 2024

Here's the entry for Hammerwatch, you'll notice the key is 70010000003234 and the id is 01003B9007E86000, which differs from your filename. That being said we don't use the id field to lookup games, just the key. The relevant code is in igdb_handler.py if you wanna have a look.

"70010000003234": {
        "bannerUrl": "https://img-eshop.cdn.nintendo.net/i/74ebd7c1f6898ff8470587eeb387e726fbc0c62d8a45b575967fe62279a2b6c1.jpg",
        "category": [
            "Action",
            "Adventure",
            "RPG",
            "Other"
        ],
        "description": "The highly acclaimed hack and slash action adventure Hammerwatch is finally here on Nintendo Switch!\n \nBe prepared to kill hordes of enemies with varied looks and features through unique environments with traps, hidden secrets and lots of puzzles. \n\nMaster each of 7 different classes, including The Sorcerer, a new class coming first to consoles. Unlock and upgrade the unique abilities of each class as you progress through the game.\n\nPlay solo or co-op from bottom to top of Castle Hammerwatch in the beautiful fantasy pixel art environment. Then crawl around the desert in the Temple of the Sun Expansion or try to survive in the hero defense and survival modes.\n\nGather your friends and unleash your powers in a memorable couch-play session!\n\nKEY FEATURES\n7 different classes, with unique features and skills\nCharacter development through unlocks and upgrades\n2 campaigns (Castle Hammerwatch, Temple of the Sun)\n2 extra modes (Hero defense, Survival)\nHard, medium and easy of course\nCustomize difficulty with several different modifiers\nOnline & local multiplayer co-op, for up to four players\n\nCOMING FIRST TO CONSOLES:\nBrand new class: The Sorcerer\nTons of balance changes to classes\nImproved character art",
        "developer": null,
        "frontBoxArt": null,
        "iconUrl": "https://img-eshop.cdn.nintendo.net/i/b09eb437a15d4821edfe47fea7e8310a5a9db18ce58b3b49202e61c60ed86164.jpg",
        "id": "01003B9007E86000",
        "intro": null,
        "isDemo": false,
        "key": null,
        "languages": [
            "en"
        ],
        "name": "Hammerwatch",
        "nsuId": 70010000003234,
        "numberOfPlayers": 4,
        "publisher": "BlitWorks",
        "rating": 13,
        "ratingContent": [
            "Blood",
            "Fantasy Violence",
            "Mild Language"
        ],
        "region": null,
        "releaseDate": 20171214,
        "rightsId": "01003B9007E860000000000000000003",
        "screenshots": [
            "https://img-eshop.cdn.nintendo.net/i/4cf9541ae5dd64d592373ebe232fba3a698d394c2233ad6dedc03476e1e70e0c.jpg",
            "https://img-eshop.cdn.nintendo.net/i/5e6c99e315967cc058dfdabcb77ed0a052f22f2087b09d98a5f14783a2e04801.jpg",
            "https://img-eshop.cdn.nintendo.net/i/1126c03ffde13c0bab16875559bde01e52ecd40654a223a747ca52b0be27b2c1.jpg",
            "https://img-eshop.cdn.nintendo.net/i/3a54f8c7e9302b648ff1deb3f4ffd6e59b2f021b9e75923bd5efe51251b97659.jpg",
            "https://img-eshop.cdn.nintendo.net/i/4955ef896a9ca33da2f0e1ffdb670005a33e35384dec406c98df1cd0eefb3919.jpg",
            "https://img-eshop.cdn.nintendo.net/i/e26f63cfb0727a015069dbd1610fcbee88688213e3c39bc37307631ee1315b9b.jpg"
        ],
        "size": 315621376,
        "version": null
    },

@Djiit
Copy link
Author

Djiit commented Jan 2, 2024

Indeed, the "update" id differs a bit from the game id. FWIW, according to https://switchbrew.org/w/index.php?title=Title_list/Games&mobileaction=toggle_view_desktop :

Note: Game updates have the same ProgramId as the main application, except with bitmask 0x800 set.

Could we use this to group titles together?

@gantoine
Copy link
Member

gantoine commented Jan 2, 2024

Could we use this to group titles together?

I think so yes! Let me see what I can whip up really quick...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants