gibaBR / Switch-Backup-Manager

Complete Switch Backups management tool
375 stars 54 forks source link

Allow multiple TitleID for different versions for NSP files #28

Closed garoxas closed 6 years ago

garoxas commented 6 years ago

lots of changes on different places, but mostly it's just because I changed all dictionaries from using TitleID as key to a pair (tuple) of TitleID and version as key, and unfortunately there's no simpler way to do this besides replacing all dictionary logic

other than that I've also:

as always if you need more just hit me here on on temp ✌️

garoxas commented 6 years ago

I forgot to mention, I'll need to do this for XCI as well because there are some games with several versions (Zelda BOTW to name one), but it'll need to wait until at least this weekend so I can spare some time to do it

gibaBR commented 6 years ago

Hey, thank you! I'll nerd some time to proccess all those changes. I'm working on getting extra info for titles from N's homepage. It Will be optional as it will be slow because has to go to web for every title.

Em seg, 6 de ago de 2018 13:13, Garoxas notifications@github.com escreveu:

@garoxas commented on this pull request.

In Switch Backup Manager/Form1.cs https://github.com/gibaBR/Switch-Backup-Manager/pull/28#discussion_r207948732 :

@@ -1235,14 +1236,14 @@ private void toolStripMenuItem16_Click(object sender, EventArgs e) { if (cbxRemoveableDrives.Items.Count > 0 && cbxRemoveableDrives.SelectedIndex > -1) {

  • Dictionary<Tuple<string, string>, FileData> list = DiffLists(SceneReleasesList, SDCardList);
  • Dictionary<Tuple<string, string>, FileData> list = DiffLists(SDCardList, SceneReleasesList);

yes this is important 😁

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gibaBR/Switch-Backup-Manager/pull/28#pullrequestreview-143662368, or mute the thread https://github.com/notifications/unsubscribe-auth/AVRl6gGUmnoXgwbVChnvqE0fHjssFn30ks5uOGs9gaJpZM4Vwo_v .

garoxas commented 6 years ago

Sure, take your time :+1:

garoxas commented 6 years ago

So I have taken a quick look on how to implement the same thing but for XCIs, unfortunately it'll not be easy

I initially thought that newer revision for cartridges will have different version number, but apparently that's not the case. You can see below when I was trying to compare control.nacp for 1. The Legend of Zelda: Breath of the Wild and 215. The Legend of Zelda: Breath of the Wild (rev002), they are exactly the same (both also use version number 1.0.0)

sbm

So the only way for me to be able to figure out cart revision from XCI file is by comparing CRC, however this will be slow and it definitely won't work with trimmed XCI
What do you think about this?

gibaBR commented 6 years ago

I was thinking of something simplier, like we add a "_number" after the title ID (when more than one). Than, we could put that option to get the exact revison when scrapping as an option to the user, using a parameter on config form. And something else that I've been thinking is to allow user to edit data, so they could put manually set whatever they want. That would be done with a new form and user should right click the game they want to edit. What do you think?

garoxas commented 6 years ago

No, I mean like for example I have these 2 Zelda XCI down here sbm for now it's easy to figure out which one is the 1st revision and which is the latest revision because I still use the original scene release names. but if I rename them then there's no way for me to know which one is which

If it's okay with you maybe I can post this on the temp so it's open to other members as well for them to share ideas
for the mean time I'll try to find more ideas and if I can solve it then I'll make another PR separated from this one

as for the second one, well for sure user will be happier with more options right? 😄

gibaBR commented 6 years ago

Ok, got it. Nice idea to ask for help, maybe somebody can have a good idea to solve it. I'll start to work on your PR this week. Meanwhile, please take a look at this pre-release:

https://mega.nz/#!GepS3QZT!dcg55msFfGjj3XFXp-WYu2GMopG2yHSyZc3tGQHKsbE

Don't forget to check "scrap extra info from web" on config form. Say what do you think of that. It can scrap info from e-shop for almost all NSP files. For XCI is not that good but I'm working on that.

garoxas commented 6 years ago

This is nice. Not as slow as I initially expected, tested with some XCIs and it works great, and on top of that this feature is optional so I'd say go for it

gibaBR commented 6 years ago

Just merged your commit and it breakes the NSP list... :) On UpdateLocalNSPGamesList(), where you add a tag to the item. It seems to get the wrong version to the TitleID and then, on DisplayGameInfo() it cant find the object and we gert nullPointerException. I'm trying to fix that but maybe you could do it faster. Thanks!

I think it's because you are relying that ListViewItem item in OLVEshop.Items is on the same order of List<Tuple<string, string>> keys but maybe its not.

TO reproduce: Clear your list of nsp titles; Add those: 0100CB2001DB8000, 0100CB2001DB8800, 0100EE6002B48000 on this order; Click on 0100CB2001DB8800

garoxas commented 6 years ago

sorry for that 😁 I've created another PR because I don't think I can modify this one anymore, so please check that one thank you