ShokoAnime / ShokoServer

Repository for Shoko Server.
http://shokoanime.com/shoko-server/
MIT License
389 stars 75 forks source link

Sync AniDB MyList Action Not Working #942

Closed ElementalCrisis closed 8 months ago

ElementalCrisis commented 2 years ago

VERSION INFORMATION

Server Version: 4.1.2 Desktop Version: 4.1.2

DESCRIPTION

There seems to be a bug where the "Sync AniDB MyList" action is not syncing the data at all. Can replicate by marking something as watched on AniDB, having the option to "Read Watched" or "Read Unwatched" checked and then running the command. Same behavior if the "Set Watched" and "Set Unwatched" options are unchecked, but the file is marked as watched in Shoko. Either this is by design, and anything marked as watched while those options are unchecked will not get updated even when running the action or it's a bug.

It should be noted that if "Set Watched" or "Set Unwatched" are checked, the watched states are updated on AniDB when making a change to watched states in Shoko. Additionally, watched state are properly imported if the series already exists on AniDB and you add it to your collection.

STEPS TO REPRODUCE

AniDB to Shoko

  1. Mark episode as watched on AniDB.
  2. Make sure "Read Watched" is checked.
  3. Run "Sync AniDB MyList" action.
  4. Episode is not marked as watched in Shoko.

Shoko to AniDB

  1. Maker sure "Set Watched" is unchecked.
  2. Mark episode as watched on Shoko.
  3. Make sure "Set Watched" is checked.
  4. Run "Sync AniDB MyList" action.
  5. Episode is not marked as watched on AniDB.
revam commented 2 years ago

If there is an error the it is likely in this range somewhere.

https://github.com/ShokoAnime/ShokoServer/blob/fe9ea5ae2e64aaf357c76c62132097c1cb67a1ff/Shoko.Server/Commands/Import/CommandRequest_ProcessFile.cs#L184-L226

revam commented 2 years ago

Or in the sync commands

revam commented 2 years ago

Alternate solution; remove the options and make the mylist sync action and commands conditionally sync between shoko and anidb depending on which side was last updated.

This would depend on #937 landing (since it adds a last updated field to the local file user data) and also some additional work to expose the last updated timestamp for the mylist responses and checking said responses against the local data about the file it syncs.

ElementalCrisis commented 2 years ago

It should just be a single option if we go that route, simply "Sync Watched States Between Shoko and AniDB."

krbrs commented 2 years ago

I had trouble with AniDB MyList not syncing because my password contained special characters >.> Chosing another password did the trick.

(might not completely resolve the issue but may help while troubleshooting)

herki84 commented 2 years ago

I seem to have a similar or maybe related issue with shoko pulling the correct "last watched" date from anidb, but not marking the corresponding episode watched: shoko bug

The log doesn't look particularly helpful to me, but here it is anyway:

[2022-07-16 09:30:42:314] Info|BackgroundWorker.WorkerThreadStart => CommandProcessorGeneral.WorkerCommands_DoWork => CommandRequest_DownloadAniDBImages.ProcessCommand Processing CommandRequest_DownloadAniDBImages: 15806
[2022-07-16 09:30:43:219] Info|AniDBHelper.GetAnimeInfoHTTP => AniDBHelper.SaveResultsForAnimeXML => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:44:474] Info|AniDBHelper.SaveResultsForAnimeXML => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:44:475] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:45:060] Info|BackgroundWorker.WorkerThreadStart => CommandProcessorGeneral.WorkerCommands_DoWork => CommandRequest_GetReleaseGroupStatus.ProcessCommand Processing CommandRequest_GetReleaseGroupStatus: 15806
[2022-07-16 09:30:45:816] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:45:997] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:45:997] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:46:745] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:46:908] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:46:908] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:47:677] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:47:811] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:47:811] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:48:512] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:48:680] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:48:680] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:49:556] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:49:868] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:49:868] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:50:644] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:50:865] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:50:865] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:51:621] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:51:793] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:51:793] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:52:583] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:52:765] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:52:765] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:53:552] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:53:818] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:53:818] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:54:718] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:55:055] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:55:055] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:55:786] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:55:935] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:55:935] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:56:716] Info|BaseDirectRepository`2.Delete => <>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:56:884] Info|<>c.<.ctor>b__1_0 => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
[2022-07-16 09:30:56:884] Info|SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel => SVR_AnimeGroup.UpdateStats Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True
[2022-07-16 09:30:59:095] Info|BackgroundWorker.WorkerThreadStart => CommandProcessorGeneral.WorkerCommands_DoWork => SVR_AnimeSeries.UpdateStats Starting Updating STATS for SERIES Kaguya-sama wa Kokurasetai: Ultra Romantic - Watched Stats: True, Missing Episodes: True, Update Group Stats: True
[2022-07-16 09:30:59:532] Info|CommandProcessorGeneral.WorkerCommands_DoWork => SVR_AnimeSeries.UpdateStats => SVR_AnimeGroup.UpdateStatsFromTopLevel Starting Updating STATS for GROUP Kaguya-sama wa Kokurasetai: Ultra Romantic from Top Level (recursively) - Watched Stats: True, Missing Episodes: True, Groups Only: True
revam commented 1 year ago

@da3dsoul was this fixed?

da3dsoul commented 1 year ago

Should be