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
  • Julie_Pilgrim @ Julie_Pilgrim:
    im sure half the responses won't be literal racial slurs or "drop table" jokes
  • Veho @ Veho:
    Look, it's China. They know what it's like when you give a poll to half a billion trolls.
    +1
  • K3Nv2 @ K3Nv2:
    How much dollar do you think it is?
  • Veho @ Veho:
    ONE MILLION DOLLA
    +1
  • Veho @ Veho:
    I know the pricing of electronics nowadays isn't "how much it actually costs" but "how much we can get away with", but putting up a poll is just cynical.
    +1
  • K3Nv2 @ K3Nv2:
    Probably $150 someone said Anbernic said around the same price as rg556
  • Julie_Pilgrim @ Julie_Pilgrim:
    you know which game i wish they would rerelease
  • Julie_Pilgrim @ Julie_Pilgrim:
    sonic unleashed
  • K3Nv2 @ K3Nv2:
    Make it a happy meal toy
  • Julie_Pilgrim @ Julie_Pilgrim:
    that game's engine is really fucking intensive so it runs like literal shit on xbox 360 and ps3
  • Veho @ Veho:
    Nah I'm getting value creep again. I look at a $50 console "but for just a few more dollars you could get XYZ" and I end up considering the Steam Deck.
    +1
  • Julie_Pilgrim @ Julie_Pilgrim:
    like the lighting in that game was genuinely so good
  • Veho @ Veho:
    Not getting dragged into that again.
  • Julie_Pilgrim @ Julie_Pilgrim:
    i dont get why they didn't port the one game that ran the worst on consoles, to pc
  • Julie_Pilgrim @ Julie_Pilgrim:
    like you port everything to pc except the one game where it would make the most sense. why. what do you gain from this
  • Julie_Pilgrim @ Julie_Pilgrim:
    is sega just personally fucking with me? are they laughing while watching me through my kinect camera as i get up to restart my xbox for the third time because the game froze again
  • K3Nv2 @ K3Nv2:
    Buy handhelds from five below better quality
  • K3Nv2 @ K3Nv2:
    Valve probably going to do another refresh of the deck this fall with rog ally like specs tbh
    +1
  • Veho @ Veho:
    A smaller form factor would be nice too.
    +1
  • K3Nv2 @ K3Nv2:
    A shield portable 2 would be nice aye Nvidia
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    The big leap in all things tech is when carbon based chips start hitting.
  • Psionic Roshambo @ Psionic Roshambo:
    Longer battery life cooler temps and faster! What's not to like lol (probably expensive as hell)
  • AncientBoi @ AncientBoi:
    [checks my dildo(s) batteries, coolant and lube] :O [promptly replaces them] :D
    AncientBoi @ AncientBoi: [checks my batteries, coolant and lube] :O [promptly replaces them] :D