Homebrew RELEASE Switch library manager - easily manage your switch game backups

UnT7oh

Well-Known Member
Newcomer
Joined
Mar 18, 2017
Messages
88
Trophies
0
XP
377
Country
United States
Done, will be part of next release.

Excellent! However after organization checking for updates fails on the new version:

Checking for missing updates
panic: runtime error: slice bounds out of range [:4] with length 1

goroutine 1 [running]:
github.com/giwty/switch-library-manager/process.ScanForMissingUpdates(0xc008f0a150, 0xc008771ce0, 0x0)
C:/Users/User1/go/src/github.com/giwty/switch-library-manager/process/incompleteTitleProcessor.go:86 +0xb72
github.com/giwty/switch-library-manager/ui.processMissingUpdates(0xc000bc62b0, 0xc000006078)
C:/Users/User1/go/src/github.com/giwty/switch-library-manager/ui/console.go:152 +0x5d
github.com/giwty/switch-library-manager/ui.(*Console).Start(0xc000253ef0)
C:/Users/User1/go/src/github.com/giwty/switch-library-manager/ui/console.go:137 +0xb51
main.main()
C:/Users/User1/go/src/github.com/giwty/switch-library-manager/main.go:54 +0x430

Romaji conversion didn't seem to work on everything by the way, I've snipped the filenames here to make this legible and the path is long:
ERROR process/organizefolderStructure.go:139 Failed to move file [rename Japanese.nsz English.nsz: The filename, directory name, or volume label syntax is incorrect.]
 
Last edited by UnT7oh,

Chaos_Therum

Active Member
Newcomer
Joined
Apr 13, 2016
Messages
40
Trophies
0
Age
29
XP
196
Country
United States
Also hate to keep asking for features but would there be a possibility of having an add folder? So instead of dropping everything in the library folder then sorting we could have basically a tosort folder point it at that and it imports it into the library.
 

DarkerGBA

Active Member
Newcomer
Joined
Nov 25, 2018
Messages
26
Trophies
0
Age
45
XP
210
Country
United Kingdom
I ran the tool a few days ago, all good. Ran again today, it wiped the whole folder on load (it renamed all the files in a single ".nsp" and a single ".nsz" file)

Thank the lord I had a backup on an external drive.

My last settings, for your debug:
{
"versions_etag": "W/\"bdbe5061472d61:0\"",
"titles_etag": "W/\"4b403a0b72d61:0\"",
"folder": "a path on my drive",
"gui": true,
"debug": false,
"check_for_missing_updates": true,
"check_for_missing_dlc": true,
"organize_options": {
"create_folder_per_game": true,
"rename_files": true,
"delete_empty_folders": true,
"delete_old_update_files": false,
"folder_name_template": "",
"file_name_template": ""
},
"scan_recursively": true,
"gui_page_size": 0
}

The idea is nice, but the software doesn't seem to be quite ready to be used to edit real data. It might be fine for reading operation, but I would advise against using the write operatiions.

Edit:
I also checked the logs, and I can only see errors related to the an handful of files that the software couldn't identity. Those were the only files that the tool didn't attempt to rename, and therefore the only one that didn't get lost.
 
Last edited by DarkerGBA,

giwty

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2019
Messages
79
Trophies
0
Age
48
XP
924
Country
United States
I ran the tool a few days ago, all good. Ran again today, it wiped the whole folder on load (it renamed all the files in a single ".nsp" and a single ".nsz" file)

Thank the lord I had a backup on an external drive.

My last settings, for your debug:
{
"versions_etag": "W/\"bdbe5061472d61:0\"",
"titles_etag": "W/\"4b403a0b72d61:0\"",
"folder": "a path on my drive",
"gui": true,
"debug": false,
"check_for_missing_updates": true,
"check_for_missing_dlc": true,
"organize_options": {
"create_folder_per_game": true,
"rename_files": true,
"delete_empty_folders": true,
"delete_old_update_files": false,
"folder_name_template": "",
"file_name_template": ""
},
"scan_recursively": true,
"gui_page_size": 0
}

The idea is nice, but the software doesn't seem to be quite ready to be used to edit real data. It might be fine for reading operation, but I would advise against using the write operatiions.

Edit:
I also checked the logs, and I can only see errors related to the an handful of files that the software couldn't identity. Those were the only files that the tool didn't attempt to rename, and therefore the only one that didn't get lost.
Thanks, and sorry about that, this should definitely not happen, and would love to better understand what happened.
Can you give me an example of a before and after? like how the files were structured before the change, and what happened after the change?
The tool shouldn't delete any files at all, just rename as needed.
 

Chaos_Therum

Active Member
Newcomer
Joined
Apr 13, 2016
Messages
40
Trophies
0
Age
29
XP
196
Country
United States
I ran the tool a few days ago, all good. Ran again today, it wiped the whole folder on load (it renamed all the files in a single ".nsp" and a single ".nsz" file)

Thank the lord I had a backup on an external drive.

My last settings, for your debug:
{
"versions_etag": "W/\"bdbe5061472d61:0\"",
"titles_etag": "W/\"4b403a0b72d61:0\"",
"folder": "a path on my drive",
"gui": true,
"debug": false,
"check_for_missing_updates": true,
"check_for_missing_dlc": true,
"organize_options": {
"create_folder_per_game": true,
"rename_files": true,
"delete_empty_folders": true,
"delete_old_update_files": false,
"folder_name_template": "",
"file_name_template": ""
},
"scan_recursively": true,
"gui_page_size": 0
}

The idea is nice, but the software doesn't seem to be quite ready to be used to edit real data. It might be fine for reading operation, but I would advise against using the write operatiions.

Edit:
I also checked the logs, and I can only see errors related to the an handful of files that the software couldn't identity. Those were the only files that the tool didn't attempt to rename, and therefore the only one that didn't get lost.

The problem is that your folder name template and file name template are empty not sure how that happened this is what they should be.


"folder_name_template": "{TITLE_NAME}",
"file_name_template": "{TITLE_NAME} [{DLC_NAME}][{TITLE_ID}][{VERSION}]"
 
  • Like
Reactions: giwty

DarkerGBA

Active Member
Newcomer
Joined
Nov 25, 2018
Messages
26
Trophies
0
Age
45
XP
210
Country
United Kingdom
Thanks, and sorry about that, this should definitely not happen, and would love to better understand what happened.
Can you give me an example of a before and after? like how the files were structured before the change, and what happened after the change?
The tool shouldn't delete any files at all, just rename as needed.

Oh please don't apologise, I'm just trying to provide some useful feedback :)

I ran the tool a few days ago and the file were all in a folder that the tool created (game name) and, in ther folder, the nap/nsz.

What happened after the change is no folders and two files in the root with only the extension
 

giwty

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2019
Messages
79
Trophies
0
Age
48
XP
924
Country
United States
Oh please don't apologise, I'm just trying to provide some useful feedback :)

I ran the tool a few days ago and the file were all in a folder that the tool created (game name) and, in ther folder, the nap/nsz.

What happened after the change is no folders and two files in the root with only the extension
I think @Chaos_Therum nailed it, and somehow the lack of file/folder template caused all files to be with the same name which is empty string.
I will add guards against that, and additional check to prevent such behavior, thanks for the feedback!
 
  • Like
Reactions: DarkerGBA

DarkerGBA

Active Member
Newcomer
Joined
Nov 25, 2018
Messages
26
Trophies
0
Age
45
XP
210
Country
United Kingdom
The problem is that your folder name template and file name template are empty not sure how that happened this is what they should be.


"folder_name_template": "{TITLE_NAME}",
"file_name_template": "{TITLE_NAME} [{DLC_NAME}][{TITLE_ID}][{VERSION}]"

That a very good guess actually, I'll try to replicate tomorrow (in another folder, ofc!) - but I think that you are right.

Worth mentioning though that I haven't amended the patterns, so something else caused the settings to get overridden.

I do remembered that the software hanged on initial white page when I ran it today for the first time - I didn't think much of if, so I restarted and this second time it loaded just fine.

I had a look at the code and I can see that in GUI.go there are a couple of calls to "settings.SaveSettings". Maybe the one in buildSwitchDb() in an edge case wipes the tokens?

As a temp measure I would suggest to avoid running any write operation unless both patterns are not null or empty and populated with valid tokens.

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

I think @Chaos_Therum nailed it, and somehow the lack of file/folder template caused all files to be with the same name which is empty string.
I will add guards against that, and additional check to prevent such behavior, thanks for the feedback!

You anticipated me by a sec! :D

Pleasure, and thank you!
 
Last edited by DarkerGBA,

samuzomoxo

Well-Known Member
Newcomer
Joined
Dec 16, 2018
Messages
72
Trophies
0
Age
123
XP
179
Country
United States
depends on tinfoil data base
some {DLC_NAME} seems to include {TITLE_NAME}
this may result on very long character string

did you test that ?
 

giwty

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2019
Messages
79
Trophies
0
Age
48
XP
924
Country
United States
New version is out, grab it on Github!

- Added support for multiple scan folders
- Improve DLC naming (remove redundant title name from dlc name) (fyi @samuzomoxo)
- Added validation to ensure local files are not deleted because of empty template (thx @DarkerGBA)
- Additional bug fixes and improvements

Like my work? please start on Github, and provide your valuable feedback
 

giwty

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2019
Messages
79
Trophies
0
Age
48
XP
924
Country
United States
running 1.1.9, first time user
get a command window that flashes new version available and then closes.

windows 10
Please download the latest version (now live), and try again, if it's still the case, then look at slm.log and pate it here
 

giwty

Well-Known Member
OP
Newcomer
Joined
Sep 8, 2019
Messages
79
Trophies
0
Age
48
XP
924
Country
United States
only finds NSP and NSZ.. not seeing any of my XCI files?
Do you have prod.keys file? (you should see a warning if the prod.keys file was not detected)
If you do not have it, then the library scan is based on file tags, and if there are no tags, these file will not be part of the library.

You can also set debug to true on the settings.json file, re-run and look at slm.log to see what happened.
 

Crazywhitie

Well-Known Member
Newcomer
Joined
Sep 5, 2007
Messages
78
Trophies
0
XP
917
Country
United States
Do you have prod.keys file? (you should see a warning if the prod.keys file was not detected)
If you do not have it, then the library scan is based on file tags, and if there are no tags, these file will not be part of the library.

You can also set debug to true on the settings.json file, re-run and look at slm.log to see what happened.


I did add the prod.keys to the Root of the Folder but it didn't detect it.. I'll try the Debug now

EDIT::: Got it working with the Keys now.. hidden Extensions was messing it up.. Thanks for the Help
 
Last edited by Crazywhitie,

Vanyle

Member
Newcomer
Joined
Oct 6, 2018
Messages
12
Trophies
0
Age
53
XP
554
Country
Germany
"Prod.keys" only working with a capital "P" over here. And updates with japanese chars don´t get detected (old ones not being deleted).
 

scroeffie1984

Well-Known Member
Member
Joined
Jan 17, 2019
Messages
501
Trophies
0
Age
40
XP
1,779
Country
Netherlands
i got the program working i have prod keys and it sees 883 games but i have 859 on my hdd
and also the renaming does not work or am i missing something
i have games like this gant-rcc2 < wich i downloaded from the net like that ,does the program know the correct name >?
 
Last edited by scroeffie1984,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr