Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to update file states #634

Closed
Mik1ll opened this issue Jun 26, 2017 · 6 comments
Closed

Ability to update file states #634

Mik1ll opened this issue Jun 26, 2017 · 6 comments

Comments

@Mik1ll
Copy link
Contributor

Mik1ll commented Jun 26, 2017

Feature improvement request :

Ability to update the file state of files in the DB.

Files that are imported but are already in the AniDB MyList do not get their file state updated, if their file state is marked 'Deleted' in MyList when the file is added, it will not be changed to the correct storage state.

Another reason to add this : Over time, the states of files in the MyList can become unsynced, E.g. some files may have the storage state of 'Internal(HDD)', when they should be marked 'Deleted'. This could be fixed by this feature by setting the file state of all files to 'Deleted' in AniDB, then going to Shoko and updating the file state of all files in the DB.

@ElementalCrisis
Copy link
Member

This sounds like a bug, @japanesemediamanager/developers can one of you take a look?

@ElementalCrisis ElementalCrisis added this to the Release 3.7.5.0 milestone Jun 28, 2017
@Jimmyson
Copy link
Contributor

Jimmyson commented Aug 6, 2017

https://github.com/ShokoAnime/ShokoServer/blob/master/Shoko.Server/Commands/AniDB/CommandRequest_SyncMyList.cs
From my observation:

  • If a file already exists on MyList, process of that file is skipped
  • Files are ignored when marked as deleted
  • Only processes Deleted and Watched states

@da3dsoul
Copy link
Member

da3dsoul commented Aug 6, 2017

I literally just rewrote that. The first one shouldn't be the case, the other two are plausible

@Jimmyson
Copy link
Contributor

Jimmyson commented Aug 6, 2017

if (onlineFiles.ContainsKey(fileID)) continue;?

It's that a good opportunity to check the file medium state?

@da3dsoul
Copy link
Member

da3dsoul commented Aug 6, 2017

That would be the case. That'd be where we should check if it's marked as deleted

@da3dsoul
Copy link
Member

I'll look at this again

@Mik1ll Mik1ll closed this as completed Oct 21, 2017
Cazzar pushed a commit to maxpiva/ShokoServer that referenced this issue Feb 7, 2018
* I think I can update?

* DAMN IT!!!

* And the SQL to this Commit to yet unknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants