Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Switch Library Manager

From GameBrew
Revision as of 14:39, 19 October 2024 by HydeWing (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Switch Library Manager
Switchlibrarymanager.png
General
Authorgiwty, trembon
TypeGame Management
Version1.9.0
LicenseMixed
Last Updated2024/10/16
Links
Download
Website
Source

An application that manages your Switch games backups. It scans your local files, and provides insights, like missing update and DLC files.

It can automatically rename and organize games and update to folders with standard naming format.

Note: This app doesn't support scanning your Switch SD card, only your local game files on your computer.

Features

  • Cross platform, works on Windows / Mac / Linux.
  • GUI and command line interfaces.
  • Scan your local switch backup library (NSP/NSZ/XCI).
  • Read titleId/version by decrypting NSP/XCI/NSZ (requires prod.keys).
  • If no prod.keys present, fallback to read titleId/version by parsing file name (example: Super Mario Odyssey [0100000000010000][v0].nsp).
  • Lists missing update files (for games and DLC).
  • Lists missing DLCs.
  • Automatically organize games per folder.
  • Rename files based on metadata read from NSP.
  • Delete old update files (in case you have multiple update files for the same game, only the latest will remain).
  • Delete empty folders.
  • Zero dependencies, all crypto operations implemented in Go.

User guide

Keys (optional)

Having a prod.keys file will allow you to ensure the files you have a correctly classified. The app will look for the "prod.keys" file in the app folder or under ${HOME}/.switch/ You can also specify a custom location in the settings.json (see below)

Note: Only the header_key, and the key_area_key_application_XX keys are required.

Settings

During the App first launch a "settings.json" file will be created, that allows for granular control over the Apps execution.

You can customize the folder/file re-naming, as well as turn on/off features, and set specific title ids of DLC or updates to ignore.

{
 "versions_json_url": "https://raw.githubusercontent.com/blawar/titledb/master/versions.json",
 "versions_etag": "W/\"c3f5ecb3392d61:0\"",
 "titles_json_url": "https://tinfoil.media/repo/db/titles.json",
 "titles_etag": "W/\"4a4fcc163a92d61:0\"",
 "prod_keys": "",
 "folder": "",
 "scan_folders": [],
 "gui": false,
 "debug": false, # Deprecated, no longer works
 "check_for_missing_updates": true,
 "check_for_missing_dlc": true,
 "hide_missing_games": false, # hides the missing games tab
 "hide_demo_games": false, # hide demo games from the list on the missing games tab
 "organize_options": {
  "create_folder_per_game": false,
  "dlc_folder": "", # ex change to DLC to place DLC files in a separate folder
  "updates_folder": "", # ex change to Updates to place update folder in a separate folder
  "rename_files": false,
  "delete_empty_folders": false,
  "delete_old_update_files": false,
  "folder_name_template": "{TITLE_NAME}",
  "switch_safe_file_names": true,
  "file_name_template": "{TITLE_NAME} ({DLC_NAME})[{TITLE_ID}][v{VERSION}]",
  "process_when_missing_base_game": false # if you want to organize updates and dlcs without having the base game present
 },
 "scan_recursively": true,
 "gui_page_size": 100,
 "ignore_dlc_updates": false,
 "ignore_dlc_title_ids": [], # Enter as a list of string, e.g. ["1234567890ABCDEF", "1234567890ABCDEE", "1234567890ABCDFF"]
 "ignore_update_title_ids": [] # Enter as a list of string, e.g. ["1234567890ABCDEF", "1234567890ABCDEE", "1234567890ABCDFF"]
 "ignore_file_types": [] # List of file types that should ignore the 'file type is not supported message', e.g. ["txt"]
}

Naming template

The following template elements are supported:

  • {TITLE_NAME} - game name
  • {TITLE_ID} - title id
  • {VERSION} - version id (only applicable to files)
  • {VERSION_TXT} - version number (like 1.0.0) (only applicable to files)
  • {REGION} - region
  • {TYPE} - impacts DLCs/updates, will appear as ["UPD","DLC"]
  • {DLC_NAME} - DLC name (only applicable to DLCs)

How to use

Windows:

  • Extract the zip file.
  • Double click the Exe file.
  • If you want to use command line mode, update the settings.json with 'GUI':false.
    • Open cmd.
    • Run switch-library-manager.exe.
    • Optionally -f X:\folder\containing\nsp\files".
    • Optionally add -r to recursively scan for nested folders.
    • Edit the settings.json file for additional options.

macOS or Linux:

  • Extract the zip file.
  • Double click the App file.
  • If you want to use command line mode, update the settings.json with 'GUI':false.
    • Open your Terminal.
    • cd to the folder containing switch-library-manager.
    • chmod +x switch-library-manager to make it executable.
    • Run `./switch-library-manager'.
    • Optionally -f X:\folder\containing\nsp\files".
    • Optionally add -r to recursively scan for nested folders.
    • Edit the settings.json file for additional options.

Screenshots

switchlibrarymanager.png switchlibrarymanager2.png switchlibrarymanager3.png

Known issues

Export to CSV will hang for a while in big tables (>1000 entries), the app has not crashed, it will just take 1-2min to prepare the CSV.

Changelog

v1.9.0 2024/10/16 (trembon)

  • Features:
    • Enable organizing dlc/updates to separate folder #64.
    • Show path to both files on duplicate error and old/new items #69.
  • Bugs:
    • Show title id in uppercase in library #72.
    • Set up way to handle replacement of specific characters for filenames #62.
    • Restore homebrew support (fixes crash when organizing) #70.
    • Ignore organizing updates/dlcs if multipart with main file #66.

v1.8.0 2024/09/07 (trembon)

  • Features:
    • Add config flag "hide_demo_games" to hide demo games from the missing games tab #48.
    • Support organizing dlc/update files without base being present with the option "process_when_missing_base_game" #30.
    • Support for organizing dlc/updates files in separate sub folders of the base game file with the options "dlc_folder" and "updates_folder" #55.
    • Possible to suppress the "file type is not supported" error message for specified file types with the option "ignore_file_types" #42.
  • Bugs:
    • Rework how prod.keys file is loaded from settings to make it easier to understand and try to fix settings.json reverting problem #36.

v1.7.0 2024/08/16 (trembon)

  • Features:
    • Added setting to ignore specific updates ids #49.
  • Bugfixes:
    • Removed errors when starting the app without an internet connection #27.
    • Fix release dates on missing games tab correctly #46.
    • Improved error handling on startup regarding titles/version urls and downloaded files #34 #35.
    • Bring app to front on start #28.
    • Fix sorting on release date on missing updates tab #29.

v1.6.0 2024/04/30 (trembon)

  • Features:
    • Possible to set titles/versions url in settings #23.
    • Rework console parameters and add export to csv option (see readme for options) #26.
  • Bugs:
    • Enable output from console mode on windows #24.
    • Remove extra spaces from incorrect cleanup #22.
    • Move to correct tab after rescan #18.
    • Read ids correct #18.
    • Allow dot in names #19.
    • Add case to handle different DLCs generating same file name #20.

v1.5.0 2024/02/20 (trembon)

  • Features:
    • Added option to ignore dlc updates in the "Missing updates" tab.
    • Added option to hide the "Missing games" tab.
  • Fixed bugs:
    • Removed forced GUI flag from the code to have settings.json gui setting work properly when built from repo.
    • Renamed scv button to the correct csv.
    • Fixed prod.keys padding to correctly read newer game files.
    • Fix urls used for versions.json and titles.json.
    • Fixed bug where all rows where not exported to csv.
  • Technical dept:
    • Updated go and some dependencies.
    • Cleaned up the repo file structure.

v1.4.0 2021/02/22

  • Added new tab "missing games" - shows all the games that are not in your local library.
  • Ignore missing DLC - added new setting option "ignore_dlc_title_ids" (in settings.json) to specify title ids that you do not wont to appear in the missing DLC tab.
  • Export to CSV - all tables now support exporting to CSV.
  • Support for offline storage location - app no longer scans drives on load, this will allow for quick loading, and when drive locations are offline. You can use the re-scan option (Cmd/Ctr+R) to scan for any new changes.
  • Bug fixes.

v1.3.7 2020/10/06

  • Added support for region info.
  • Fixed default table sort in GUI.
  • Fixed split file handling during library organization.
  • Support for older OSX versions (>10.11).
  • Additional renaming refinements.

v1.3.5 2020/09/29

  • Support added for split files (NSP/NSX/XCI/XCZ).
  • Improved viability and readability of skipped files.
  • Fixed regression with XCI scanning.
  • Added default sort to all tables.
  • Added version number to window title.
  • Additional bug fixes.

v1.3.0 2020/09/25

  • New features:
    • Added support for version number! Deep scan now reads the human readable version number, extracted from base and update file (requires prod.keys).
    • The version number is available in the library view table, and in the file template ("{VERSION_TXT}")(#34).
    • Added support for custom path for prod.keys (via settings.json - "prod_keys") (#41).
    • Added a "rescan" and "hard rescan" options to the app menu.
    • Hard rescan will re-read all your local files, while rescan will discover new and deleted/moved files (#40).
  • Bug Fixes:
    • Fixed Copy/Paste not working.
    • Fixed recursive mode not working (#39).
    • Fixed unicode removal bug (#35).

v1.2.5 2020/09/14

  • General:
    • Added handling of unicode chars.
    • Added 'SwitchSafeFileNames' option in settings.json to control the handling of unicode/Romaji.
    • Changed the way files are scanned to add better control, and better error handeling.
    • Fixed issues that caused invalid folder/file names.
  • GUI:
    • All files are now bundled as part of the binary, this should fix many issues people had with the vendor folder.
    • Added an issues tab to detail files that were skipped during scan.
    • Deletion of old updates now part of the library organization (if enabled through settings.json).
  • Console:
    • Added issues sections to detail any skipped files.
    • Improved progress bar.

v1.2.0 2020/08/18

  • Add support for multiple scan folders.
  • Improve DLC naming (remove redundant title name from dlc name).
  • Add validation to ensure local files are not deleted because of empty template.
  • Additional bug fixes and improvements.

v1.1.9 2020/08/07

  • New updates to switch titles/versions were not saved properly, and therefore new updates were not accounted for.
  • This fixes this issue, and should properly report the latest updates/dlcs.
  • Also for the console users, i've removed the need to have the web folder, so you can just delete it.

v1.1.8 2020/08/06

  • Added support for multi content files (NSP/XCI/NSZ/XCZ).
  • Hugh performance improvement - added deep scan persistency.
  • Show version and multi content info in library view.
  • Additional improvements.

v1.1.6 2020/08/04

  • Bug: fixed performance issue with XCI scanning.
  • Bug: improved progress bar for library organization.
  • Bug: fixed nil pointer panic on some files.
  • Feature: transliteration hiragana and katakana (Japanese) into romaji.
  • Feature: support XCZ.

v1.1.5 2020/07/29

  • Added XCI deep scan support (beta).
  • Added NSZ deep scan support (beta).
  • Added centralized log (slm.log), with ability to set debug flag for easier troubleshooting.
  • Added new release detection & notification.
  • Fixed UI issues, date parsing and sorting.
  • Fixed issue with non standard NSP files (like SM64).
  • Added option to set table pagination size.
  • Added open game folder in Finder/Explorer from table.
  • Added notification if prod.keys is missing.
  • Bug fixes.

v1.1.1 2020/07/14

  • This release is focused on stability and user experience improvements.

v1.1 2020/07/04

  • You can now choose if you want to use GUI or command line interface. (by default for new users it will be GUI).
  • Please provide feedback, this was done quick & dirty to see if there is interest.

v1.0 2020/06/29

  • Read titleId/version by decrypting NSPs (requires prod.keys).
  • Rename files based on metadata read from NSP.
  • Naming template - choose your own folder/file naming convention.
  • Delete empty folders.

v0.5 2020/06/20

  • Changes:
    • Complete code refactor, it will be much easier to add features now.
    • Better handling when no internet / corrupted json - will try to re-use local json file.
  • New capabilities:
    • Added new command line option - "m" (stands for mode), will use this to add new capabilities.
  • Currently supported capabilities:
    • Add -m u to show missing updates (default).
    • Add -m dlc to show missing dlc's.
    • (new) Add -m o to organize the files in a folder per game structure, where the folder will contains base/updates/dlc files in a flat structure. All folders will be created in the base NSP folder that was provided as the command line argumet.
    • (new) Add -m d to delete outdated local update files.

v0.4 2020/01/18

  • Added supports nested folders.
  • Please add "-r" to the program arguments to scan your nested folders.

v0.3.2 2019/12/30

  • Don't fail if local files doesn't exist.

v0.3.1 2019/12/29

  • No new features, just url update.
  • I should really make these configurable.

v0.3 2019/12/26

  • Fixed broken url due to blawar's github account freeze.
  • Added support for DLC's - any missing DLC's will be part of the output.

v0.2 2019/10/09

  • Updated to use the new Blawar repo (titledb).
  • Added config file that keeps the etag versions of the titles/versions json file.

v0.1 2019/09/08

  • Initial release of this simple tool.
  • Available for Mac and Windows.

Credits

This program relies on blawar's titledb, to get the latest titles and versions.

External links

Advertising: