Homebrew WIP NSP Organizer and mass downloader

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
This looks very promising! Thank you. I will be testing it later.

The readme states the following:

It saves the games in the following dir structure: titles/{name}/{name}[{title_id}].nsp
DLC are saved to: titles/{name}/DLC/{name}[{title_id}].nsp
Updates are saved to: titles/{name}/updates/{name}[{title_id}].nsp


If I do not want folders created for each NSP and instead, want all NSPs in one folder with the naming scheme shown below, what would need to be done to make this happen?

Game Name [TitleID] [BASE] [v].nsp
Game Name [TitleID] [UPD] [v].nsp
Game Name [TitleID] [DLC] [v].nsp
Game Name [TitleID] [DEMO] [v].nsp


Also #1, How does the renaming handle invalid characters such as ":" for example? Can it be specified to replace ":" with "-"?
Also #2, Once a title is blacklisted, can it still be set to download updates only for that title when available? (Updates share the same TitleID as the Base Title, so I'm not sure how this would work.)

This is an excellent project that has come to life and is very much needed! Thank you for doing this! A+

I am about to push an update that lets you specify the format in a config file.

Updates have their own unique title id's for blacklist. This currently does not download updates or DLC, but will organize them if you have them. I will add the ability to download updates and DLC later.
 
Last edited by blawar,
  • Like
Reactions: morrison22

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
I am about to push an update that lets you specify the format in a config file.

Updates have their own unique title id's for blacklist. This currently does not download updates or DLC, but will organize them if you have them. I will add the ability to download updates and DLC later.

Understood. First of all I want to say:

Amazing job! Please keep up the great work! I have been searching for something like this for a while now, and alas, it now exists thanks to you.

Question: Is the renamer capable of detecting if a title has been renamed in the titlekeys and adjust the corresponding nsp filename accordingly?

Also, pardon my ignorance as I do not know how difficult this would be... Does the possibility exists to implement a toggle in the config where one can choose whether or not they want the Base, Updates, DLC, and/or Demos to download when the script is ran? Is this something that can be physically coded with the knowledge on how to do it, or is this impossible to do?
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
This looks very promising! Thank you. I will be testing it later.

The readme states the following:

It saves the games in the following dir structure: titles/{name}/{name}[{title_id}].nsp
DLC are saved to: titles/{name}/DLC/{name}[{title_id}].nsp
Updates are saved to: titles/{name}/updates/{name}[{title_id}].nsp


If I do not want folders created for each NSP and instead, want all NSPs in one folder with the naming scheme shown below, what would need to be done to make this happen?

Game Name [TitleID] [BASE] [v].nsp
Game Name [TitleID] [UPD] [v].nsp
Game Name [TitleID] [DLC] [v].nsp
Game Name [TitleID] [DEMO] [v].nsp


Also #1, How does the renaming handle invalid characters such as ":" for example? Can it be specified to replace ":" with "-"?
Also #2, Once a title is blacklisted, can it still be set to download updates only for that title when available? (Updates share the same TitleID as the Base Title, so I'm not sure how this would work.)

This is an excellent project that has come to life and is very much needed! Thank you for doing this! A+

I just committed the update. There is a nut.conf file that you can edit to change the file structure. It also now removes empty directories.

--------------------- MERGED ---------------------------

Understood. First of all I want to say:

Amazing job! Please keep up the great work! I have been searching for something like this for a while now, and alas, it now exists thanks to you.

Question: Is the renamer capable of detecting if a title has been renamed in the titlekeys and adjust the corresponding nsp filename accordingly?

Also, pardon my ignorance as I do not know how difficult this would be... Does the possibility exists to implement a toggle in the config where one can choose whether or not they want the Base, Updates, DLC, and/or Demos to download when the script is ran? Is this something that can be physically coded with the knowledge on how to do it, or is this impossible to do?

Yes, it will rename the the NSP file if the name changes in the titlekeys.txt

Yes, it is possible to add an option to the config to specify whether to download base, update, and/or DLC. It is on my todo list.

--------------------- MERGED ---------------------------

This looks very promising! Thank you. I will be testing it later.

The readme states the following:

It saves the games in the following dir structure: titles/{name}/{name}[{title_id}].nsp
DLC are saved to: titles/{name}/DLC/{name}[{title_id}].nsp
Updates are saved to: titles/{name}/updates/{name}[{title_id}].nsp


If I do not want folders created for each NSP and instead, want all NSPs in one folder with the naming scheme shown below, what would need to be done to make this happen?

Game Name [TitleID] [BASE] [v].nsp
Game Name [TitleID] [UPD] [v].nsp
Game Name [TitleID] [DLC] [v].nsp
Game Name [TitleID] [DEMO] [v].nsp


Also #1, How does the renaming handle invalid characters such as ":" for example? Can it be specified to replace ":" with "-"?
Also #2, Once a title is blacklisted, can it still be set to download updates only for that title when available? (Updates share the same TitleID as the Base Title, so I'm not sure how this would work.)

This is an excellent project that has come to life and is very much needed! Thank you for doing this! A+

1) It removed invalid characters and replacing them with a space.

2) currently this will not download updates or DLC so it is a moot point. Updates do not share the same TitleID, the share the same base id which can be found by applying the following bit mask 0xFFFFFFFFFFFFFE00 to the title id.

--------------------- MERGED ---------------------------

Mind posting a Screenshot? Also can you have it so it scans the SD card for installed tittles?

What would I do with the knowledge of installed titles on the SD? The main purpose of this program is to archive NSP's.
 
  • Like
Reactions: morrison22

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
This would cause double spaces in the file name. Can you make it so invalid characters like : become a dash - instead so it looks nicer?

It wont cause double spaces. I used a regex to limit spaces to a single space.

here is the regex used to clean the file names:

re.sub('[\/\\\:\*\?\"\<\>\|\.\s]+', ' ', s).strip()
 
Last edited by blawar,
  • Like
Reactions: morrison22

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
This would cause double spaces in the file name. Can you make it so invalid characters like : become a dash - instead so it looks nicer?

I committed an update that supports downloading the DLC's. there is a flag for it in nut.json. Updates do not download yet, those are a tad more complicated and its not a high priority.
 
  • Like
Reactions: morrison22

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
What do I need to change in this config file to have it rename and keep all the files in the same folder? Also, I want it to indicate in the file name [DLC] or [UPD].

Example:
The Legend of Zelda Breath of the Wild [01007ef00011e000] [v0].nsp
The Legend of Zelda Breath of the Wild [UPD] [01007ef00011e800] [v720896].nsp
The Legend of Zelda Breath of the Wild DLC Pack 1 [DLC] [01007ef00011f001] [v0].nsp

I tried this and it does not work:

Code:
{
    "paths": {
        "titleBase": "{name}[{id}][v{version}].nsp",
        "titleDLC": "{name}[DLC][{id}][v{version}].nsp",
        "titleUpdate": "{name}[UPD][{id}][v{version}].nsp",
        "scan": "."
    },
    "download": {
        "base": true,
        "update": false,
        "dlc": true
    }
}
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
This would cause double spaces in the file name. Can you make it so invalid characters like : become a dash - instead so it looks nicer?

I committed an update that supports downloading the DLC's. there is a flag for it in nut.json. Updates do not download yet, those are a bit more complicated and its not a high
What do I need to change in this config file to have it rename and keep all the files in the same folder? Also, I want it to indicate in the file name [DLC] or [UPD].

Example:
The Legend of Zelda Breath of the Wild [01007ef00011e000] [v0].nsp
The Legend of Zelda Breath of the Wild [UPD] [01007ef00011e800] [v720896].nsp
The Legend of Zelda Breath of the Wild DLC Pack 1 [DLC] [01007ef00011f001] [v0].nsp

I tried this and it does not work:

Code:
{
    "paths": {
        "titleBase": "{name}[{id}][v{version}].nsp",
        "titleDLC": "{name}[DLC][{id}][v{version}].nsp",
        "titleUpdate": "{name}[UPD][{id}][v{version}].nsp",
        "scan": "."
    },
    "download": {
        "base": true,
        "update": false,
        "dlc": true
    }
}

By same folder, do you mean move them to the same folder as nut.py?

edit: if you want them all moved to the root directory, prefix the filenames with ./ like "titleBase": "./{name}[{id}][v{version}].nsp",
 
Last edited by blawar,

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
Yes, I put nut.py in the folder with the nsps. so I just want it to rename them in place.

add the ./ prefix and it will work. Your other changes with [DLC] and [UPD] in the name work as well, i just tested them.

Make sure you also updated nut.py and didnt just download the nut.conf file.
 
Last edited by blawar,

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
add the ./ prefix and it will work. Your other changes with [DLC] and [UPD] in the name work as well, i just tested them.

Make sure you also updated nut.py and didnt just download the nut.conf file.

Excellent. Thank you. Now, is there any way to identify DEMOS so I can use a [DEMO] indicator in the file name for titles that are DEMOS?

I am guessing there would have to be a way to recognize the word DEMO in the titlekeys.txt file to make this possible?

End Result would rename a DEMO like this:

Code:
"titleDEMO": "./{name} [DEMO] [{id}] [v{version}].nsp"
 
Last edited by morrison22,

Troy896

Active Member
Newcomer
Joined
May 15, 2018
Messages
25
Trophies
0
XP
498
Country
United States
So if I use this now to dll all current games, once you release an update to dl all dlc and updates, it wouldn't redownload all the games it's dling now correct?
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
So if I use this now to dll all current games, once you release an update to dl all dlc and updates, it wouldn't redownload all the games it's dling now correct?

I updated it to download DLC now. But correct, it wont redownload any games you already have downloaded. I have a cron job that runs mine every hour (also updating ticketkeys.txt) so it automatically gets new games as they come out.

--------------------- MERGED ---------------------------

Excellent. Thank you. Now, is there any way to identify DEMOS so I can use a [DEMO] indicator in the file name for titles that are DEMOS?

I am guessing there would have to be a way to recognize the word DEMO in the titlekeys.txt file to make this possible?

End Result would rename a DEMO like this:

Code:
"titleDEMO": "./[DEMO] {name}[{id}][v{version}].nsp"

That is next on my list, but mostly so I can add an option to not download demo's.
 
  • Like
Reactions: morrison22

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
snip

--------------------- MERGED ---------------------------

I updated it to download DLC now. But correct, it wont redownload any games you already have downloaded. I have a cron job that runs mine every hour (also updating ticketkeys.txt) so it automatically gets new games as they come out.

--------------------- MERGED ---------------------------



That is next on my list, but mostly so I can add an option to not download demo's.

How easy would it be to add an option to just rename DEMOS accordingly? for those that want DEMOS.
This should also be a flag in the options that can be true or false as far as DEMO downloading goes.
 

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
snip

--------------------- MERGED ---------------------------



How easy would it be to add an option to just rename DEMOS accordingly? for those that want DEMOS.
This should also be a flag in the options that can be true or false as far as DEMO downloading goes.

I plan to do both: offer filtering, and custom name / path.
 

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
I plan to do both: offer filtering, and custom name / path.


Ok, if you have a TODO list, and feel like it, feel free to post it here. So we can comment on it. This will be a nice project to see grow.

Note: For the DLC naming, since the ideal naming scheme would be this:

Name of Game [BASE] [TITLEID] [V].nsp
Name of Game [UPD] [TITLEID] [V].nsp
Name of Game [DLC] [TITLEID] [V].nsp
Name of Game [DEMO] [TITLEID] [V].nsp

It's important to note that the titlekeys.txt file contains "[DLC]" in front of titles that are DLC. So, to avoid having this show up twice in the filename when renaming files using the naming scheme above, would there be a way to process the titlekeys.txt file to remove all instances of "[DLC] " prior to renaming? For now I just use Find and Replace to manually remove "DLC_", but if it can be incorporated into the code, that would be most efficient. Perhaps a command called "-cleandlc" could automate the find and replace process on the titlekeys.txt file, then we can run nut.py afterwards to do the renaming.

The same goes for titles that are DEMOS as they say Demo at the end of the title's name in the titlekeys.txt file. So perhaps another command, "-cleandemo" can remove the "_Demo" text and place it after the title so it reflects the naming scheme above.
 
Last edited by morrison22,

blawar

Developer
OP
Developer
Joined
Nov 21, 2016
Messages
1,708
Trophies
1
Age
40
XP
4,311
Country
United States
Ok, if you have a TODO list, and feel like it, feel free to post it here. So we can comment on it. This will be a nice project to see grow.

Note: For the DLC naming, since the ideal naming scheme would be this:

Name of Game [BASE] [TITLEID] [V].nsp
Name of Game [UPD] [TITLEID] [V].nsp
Name of Game [DLC] [TITLEID] [V].nsp
Name of Game [DEMO] [TITLEID] [V].nsp

It's important to note that the titlekeys.txt file contains "[DLC]" in front of titles that are DLC. So, to avoid having this show up twice in the filename when renaming files using the naming scheme above, would there be a way to process the titlekeys.txt file to remove all instances of "[DLC] " prior to renaming? For now I just use Find and Replace to manually remove "DLC_", but if it can be incorporated into the code, that would be most efficient. Perhaps a command called "-cleandlc" could automate the find and replace process on the titlekeys.txt file, then we can run nut.py afterwards to do the renaming.

The same goes for titles that are DEMOS as they say Demo at the end of the title's name in the titlekeys.txt file. So perhaps another command, "-cleandemo" can remove the "_Demo" text and place it after the title so it reflects the naming scheme above.

I just committed an update for filtering demos, and also for renaming demos.

About removing the tags like as [DLC] that are part of the name, that is part of your titlekeys.txt. you will need to remove the tags from there. I can do a string replace to remove them as a dirty hack, or just fork CDNSP.

--------------------- MERGED ---------------------------

i am not banned... should i use it?

The CDNSP GUI version floating around comes with a public cert, your console cant be banned for downloading using that public cert.
 
  • Like
Reactions: morrison22

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
Amazing Progress! You are the best! I will test it out now.
And if you can do a string to replace, make sure you include the _ space indicated, or however you want to have it done...

The spaces to remove are shown here:

"DLC_"
"_Demo"
 

morrison22

Well-Known Member
Member
Joined
Nov 26, 2005
Messages
618
Trophies
0
XP
1,948
Country
United States
I am trying to rename this and get this error.

could not find baseId for ./[DLC] WWE 2K18 [010009800203f001][v0].nsp

This happens to 35 DLC NSP's I have.

What does this mean?

This is my config

Code:
{
    "paths": {
        "titleBase": "./{name} [BASE] [{id}] [v{version}].nsp",
        "titleDLC": "./{name} [DLC] [{id}] [v{version}].nsp",
        "titleUpdate": "./{name} [UPD] [{id}] [v{version}].nsp",
    "titleDemo": "./{name} [DEMO] [{id}] [v{version}].nsp",
        "scan": "."
    },
    "download": {
        "base": true,
        "update": false,
        "demo": false,
        "dlc": true
    }
}
 
Last edited by morrison22,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    Thanks for signing up at LinusTechTips
  • QuarterCut @ QuarterCut:
    holey shmoley!
  • BigOnYa @ BigOnYa:
    Your credit card has been charged. Thank you.
  • K3Nv2 @ K3Nv2:
    Your screwdriverPlus will arrive in three weeks
    +1
  • QuarterCut @ QuarterCut:
    K64_Waddle_Dee_Artwork_1.jpg

    my reaction to such information
    +2
  • BigOnYa @ BigOnYa:
    Press 1 for English. Press 2 for Pig Latin. Or press 3 to speak to a representative.
  • BakerMan @ BakerMan:
    guys, i need help, i got into an argument about what genre radioactive is, and i forgot who made it
  • Sicklyboy @ Sicklyboy:
    @BakerMan, Imagine Dragons
  • Sicklyboy @ Sicklyboy:
    Dragon deez nuts across yo face GOTEEM
  • Sicklyboy @ Sicklyboy:
    lmao now I realize that was probably the joke in the first place
    +1
  • BakerMan @ BakerMan:
    IMAGINE DRAGON DEEZ NUTS ACROSS YO- FUCK HE BEAT ME TO IT
  • BigOnYa @ BigOnYa:
    You have selected 4 - Death by Snu Snu, please stand by...
    +1
  • BakerMan @ BakerMan:
    lucky bastard
    +1
  • Sicklyboy @ Sicklyboy:
    hahahaha I'm half way through a bag off my Volcano and my tolerance is way down because I haven't been smoking much lately, so I was a little slow to catch that that was what your angle was 🤣🤣
    +1
  • Sicklyboy @ Sicklyboy:
    Also I was just excited to know a music reference for once (I am the LAST person in the world that you want on your trivia team)
    +2
  • K3Nv2 @ K3Nv2:
    Bummer webos 7.4 isnt working with dejavuln-autoroot
  • Sicklyboy @ Sicklyboy:
    PS4 right? I think that's what mine's on. Or 5.6, maybe.
  • K3Nv2 @ K3Nv2:
    [!] Installation failed (devmode_enabled not recognized)
  • K3Nv2 @ K3Nv2:
    0.5 seemed to work whatever lol i wont bitch
  • Alysh_Graham @ Alysh_Graham:
    Hehehe
    Alysh_Graham @ Alysh_Graham: Hehehe