trembon / switch-library-manager

Complete solution to manage, organize and keep your local switch backup game library up to date . Cross platform, supports all game formats.
MIT License
79 stars 5 forks source link

Doesn't show new missing updates in "missing updates" tab, except for old ones. #34

Closed larg000 closed 2 months ago

larg000 commented 4 months ago

Doesn't show new missing updates in "missing updates" tab, except for old ones.

is it cause of blawar's titledb not updated or a bug ?

trembon commented 4 months ago

i havent seen this problem before, but it sound that the titles.json and versions.json are not updated as they are the source for this information. what you can do is check when those files where updated on your computer, they shouldnt be more then a few days old at maximum.

if you want to troubleshoot you can see if your computer can reach the files and manually downloading them by looking at the url for them, currently they are in this file https://github.com/trembon/switch-library-manager/blob/master/src/settings/settings.go as DEFAULT_TITLES_JSON_URL and DEFAULT_VERSIONS_JSON_URL

harvestry-of-ghosts commented 4 months ago

Confirm I do not have this problem on my end. Possibly make sure Switch Library Manager isn't being blocked by firewall. You can also try deleting titles.json and versions.json and letting the app re-download them.

larg000 commented 4 months ago

last update seems 08/06/2024 (dd/mm/yyyy) so i deleted titles.json and versions.json to check if it will download new ones it start create titles.json but then i got an error : ""failed to download switch titles [reason: unable to download switch titles db ] so i checked settings.json and it seems DEFAULT_TITLES_JSON_URL and DEFAULT_VERSIONS_JSON_URL were empty i dont know why so i tried to add manually original url but it didnt really worked so i deleted it to generate a new one and now everything is ok

i guess the problem could be that i used an old setting.json file from giwty version when i switched to this one but am not really sure.

thanks for help and reactivity

harvestry-of-ghosts commented 4 months ago

last update seems 08/06/2024 (dd/mm/yyyy) so i deleted titles.json and versions.json to check if it will download new ones it start create titles.json but then i got an error : ""failed to download switch titles [reason: unable to download switch titles db ] so i checked settings.json and it seems DEFAULT_TITLES_JSON_URL and DEFAULT_VERSIONS_JSON_URL were empty i dont know why so i tried to add manually original url but it didnt really worked so i deleted it to have a new one and now everything is ok

i guess the problem could be that i used an old setting.json file from giwty version when i switched to this one.

thanks for help and reactivity

I noticed that too after I replied to your report, and then made a new issue for it here: https://github.com/trembon/switch-library-manager/issues/35

I then did the same as you and tried with a fresh empty folder and then it worked just like you said. So it appears there is some kind of bug going on if you delete the two json files but don't use a clean folder. I did check the settings file and the urls were still there and correct. So not sure what's happening that requires a clean folder to be used if those files are deleted.

I originally closed the issue after I got it working with the clean folder, but reopened it after seeing your comment.

trembon commented 4 months ago

noticed that if you use an old version of SLM and then upgrade to the latest where the title/version urls are present in the settings.json file they can be empty and if that happens it will fail to download the files will see if I can improve the handling for this

together with this, just deleting those files might also get an invalid state with the etag values in the settings.json as they are the "version state" of the file, as that one is checked if it needs to be downloaded again or not

mspykerez commented 4 months ago

I then did the same as you and tried with a fresh empty folder and then it worked just like you said. So it appears there is some kind of bug going on if you delete the two json files but don't use a clean folder. I did check the settings file and the urls were still there and correct. So not sure what's happening that requires a clean folder to be used if those files are deleted.

In Windows SLM automatically creates a folder with some settings at the hidden location C:\Users\you\AppData\Roaming so even if you delete stuff from the 'normal' SLM folder it could be that SLM is still reading from the hidden folder containing old stuff.

Also sometimes titles.json & versions.json get outdated because tinfoil.io takes a while to update. To make sure that SLM is updated according to the latest titledb, titles.json can be generated with NUT https://github.com/blawar/nut and versions.json manually downloaded from the source https://github.com/blawar/titledb Of course the source itself can get stuck too.

IMPORTANT: if you download versions.json manually from github dont just right-click it and select 'save link as..' ! this method will not download the correct file. Instead you have to left-click versions.json to enter and click the icon that says 'download raw file'

PS. is your PROD KEYS are not from the latest firmware, SLM may also not recognize new games and updates even if titles.json & versions.json are up to date.

trembon commented 3 months ago

i did some updates when reading the settings file regarding verifying that urls and files exists correctly and try to correct them if the settings are in a bad state, hopefully this will resolve some of these errors