Git Product home page Git Product logo

jellyfin-ani-sync's People

Contributors

andy2244 avatar hitsounds avatar pecomare avatar tj09 avatar vosmiic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jellyfin-ani-sync's Issues

"Provider" dropdown menu empty in Jellyfin 10.8.1

When setting up the plugin (version 2.1) in Jellyfin version 10.8.1, the provider dropdown menu comes up empty. This leaves me unable to further set up my settings.

In the log I saw this:

[2022-06-28 03:34:38.574 +08:00] [ERR] [14] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/AniSync/parameters".
System.MissingMethodException: Method not found: 'System.String MediaBrowser.Controller.IServerApplicationHost.GetApiUrlForLocalAccess(Boolean)'.
   at jellyfin_ani_sync.Api.AniSyncController.GetFrontendParameters()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

Tested on both my main unraid install and a fresh install on windows. Same error pops up in the log.

Update playback status for previously watched items

Just a quick question, will this scan for already watched anime and update their playback status on MAL, or will it only work for anime that I watch from now on? That would be a real bummer, because most of my stuff has already been watched back when this nice plugin wasn't yet around... :)

Not correctly detecting/updating the second cour

@reitenth
Bringing this discussion over to GitHub, I find it a bit easier to have a discussion here.
So it seems that AniSync cannot differentiate between different cours of a show; it thinks they are all part of the same season/AniList or MAL show.
At the moment I am working on the Kitsu implementation, but I am nearing the end of the development for it. After I have pushed that out, I will visit this issue and see what can be done.
I am thinking that it will require checking if the episode count in Jellyfin has gone past the detected AniList/MAL shows episode count, and if so checking to see if a separate second cour entry exists in AniList/MAL.
I will keep you updated here on how that goes, but I probably won't be able to visit this until the weekend (at the earliest) unfortunately.

Doesn't work behind tunnel

I'm unsure what exactly is causing it, but the way you fetch the parameters and potentially more parts of the plugin don't work when using a tunnel like what Cloudflare offers. None of the parameters are fetched properly and it results in the config page being unresponsive and missing data.

日本語

Hey currently it only syncs anime with English titles, if you could integrate it to work with the original Japanese Title that would be awesome. MyAnimeList & Anilist both have the native title stored somewhere.

This plugin is amazing, thanks so much for making it. If this is not possible I'll gladly change the anime names back to English to keep using it.

Manual sync to AniList not working

I recently created an account on AniList and was really glad to see this feature in jellyfin-ani-sync so that I could populate it. At the moment it doesn't seem to work though, so let's figure out what's wrong 🙂

I select the action "update provider with jellyfin progress" and press run. My anilist is not updated, and in the logs I see this:

[2022-07-22 09:00:27.790 +02:00] [INF] [53] jellyfin_ani_sync.SyncProviderFromLocal: (Sync) Starting sync to provider from local process
[2022-07-22 09:00:27.791 +02:00] [INF] [53] jellyfin_ani_sync.SyncProviderFromLocal: (Sync) Retrieved Black Bullet's seasons latest watched episode and when it was watched...
<a few hundred more series>
[2022-07-22 09:00:29.271 +02:00] [INF] [53] jellyfin_ani_sync.SyncProviderFromLocal: (Sync) Retrieved Mushishi Zoku Shou's seasons latest watched episode and when it was watched...

After that nothing else relevant appears in the log.

Plugin configuration

I've only configured AniList sync (for one account), and it seems to work fine (the list is updated when I play stuff). Other than the account these settings may be relevant:

  • "Ticking watched updates providers?" is set
  • "Only change anime in Plan To Watch?" is not set
  • "Automatically set completed shows as rewatching?" is set
  • plugin is configured to only sync from two libraries (one with movies and one with shows; both only contains anime)

Set a sane default for the list save location

jellyfin_ani_sync.TaskUpdateAnimeList: User has not set anime list save location; skipping

There should be a safe location we can use as default save location, which is also pre-filled in the settings field. A normal user may not understand how crucial this list is.

I also was under the assumption that via default/empty setting the plugin would actually use the plugin folder or some default Jellyfin temp/lib folder to store this list.

I would rephrase this This is not necessary, but will make anime detection much more reliable, to reflect that only with AniList as metadata provider the list is not needed, otherwise this should be mandatory given all the lookup issues.

There should also be a hint/advise to only use one metadata provider per anime library, based on what folder/file naming is used, otherwise just stacking multiple AniList/AniDB/TvDB/TMDB will lead to mixed results. I would assume most users are not aware of the issue that "normal" Anime has no official seasons and the TvDB/TMDB season ordering/numbering is kinda arbitrary and manually maintained.

Main point is a normal user may not check the server logs and just assumes this plugin works like trakt with 100% accuracy, without understanding the inherent problems regarding finding the correct Anime/season/episode, depending on the metadata source.

annict support

Please support annict.
There is also a tool to synchronize viewing history from annict to anlist, but there is a problem with accuracy. Additionally, you have to sync manually.

2-way sync maybe possible now?

With the higher accuracy, maybe a 2-way sync like the trakt plugin is now possible?

Maybe there is a somewhat reasonable way to-do this now, its just super convienent to have all your watched status in trakt and simply do a sync on a fresh install, so everything is back where you left.

So for normal shows/movies using the trakt plugin i dont have to care about any backup or library state, i can just reinstall the server point it to my libs and via a trakt resync all watched states are set to where i left off.

Would be super cool to have this also for Anime, but i understand that this can be more complex to get right.

Unable to Authenticate MyAnimeList

I followed all the steps specified in the guide. But after allowing and approving API access from MAL, a token is generated but the response says "Error processing request."

I'm pasting the relevant bits from the logs here.:

[2023-03-06 22:37:35.600 +05:30] [ERR] [91] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: "Could not retrieve Mal token: Unauthorized - Unauthorized". URL "GET" "/AniSync/authCallback".

[2023-03-06 22:37:35.603 +05:30] [WRN] [91] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.0.7:8096/AniSync/authCallback?code={my personal token was here}" to "192.168.0.7" in 0:00:00.9502327 with Status Code 401
[2023-03-06 22:37:43.797 +05:30] [ERR] [91] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/AniSync/user".
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Func2 predicate, Boolean& found)
at jellyfin_ani_sync.Api.AuthApiCall.AuthenticatedApiCall(ApiName provider, CallType callType, String url, FormUrlEncodedContent formUrlEncodedContent, StringContent stringContent)
at jellyfin_ani_sync.Api.MalApiCalls.GetUserInformation()
at jellyfin_ani_sync.Api.AniSyncController.GetUser(ApiName apiName, String userId)
at lambda_method1643(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2023-03-06 22:37:46.067 +05:30] [WRN] [91] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://127.0.0.1:8096/AniSync/user?apiName=Mal&userId={myUserID}" to "127.0.0.1" in 0:00:02.6527403 with Status Code 400

Anilist error

Hi,

when i try to use anilist i have this error in the jellyfin log :

[2022-03-28 16:01:19.460 +02:00] [WRN] [125] jellyfin_ani_sync.ServerEntry: The user e9f95f59-553a-4a02-8bd8-ba26528145f5 does not have an access or refresh token for AniList. Skipping
[2022-03-28 16:01:19.461 +02:00] [INF] [125] jellyfin_ani_sync.ServerEntry: Using provider AniList...
[2022-03-28 16:01:19.583 +02:00] [WRN] [125] jellyfin_ani_sync.ServerEntry: (AniList) Series not found
[2022-03-28 16:01:19.623 +02:00] [WRN] [88] jellyfin_ani_sync.ServerEntry: (AniList) Series not found

I have setup the app following the installation guide and when i go into the plugin settings and test authentification i got the message saying it's working

Thank you for authenticating *****.

I wiped the config file and switched back to MAL and it's working with MAL which is almost the same setup.

Plugin fails to recognize correct anime using TheTVDB ID/AniDB and `anime-list-full.xml`

According to the anime-list README the defaulttvdbseason attribute can be 0, 1 or a meaning that this line will fail to recognize certain shows such as One Piece.

int.TryParse(anime.Defaulttvdbseason, out int xmlSeason) && xmlSeason == seasonNumber)).ToList();

  <anime anidbid="69" tvdbid="81797" defaulttvdbseason="a">
    <name>One Piece</name>
    <mapping-list>
      <mapping anidbseason="0" tvdbseason="0">;1-27;2-3;3-9;4-10;5-14;6-0;7-0;8-0;9-0;10-0;11-0;12-0;13-0;14-0;15-0;16-31;17-23;18-24;19-28;20-29;21-30;22-0;23-32;24-34;25-0;26-36;27-37;28-40;29-41;30-42;</mapping>
    </mapping-list>
  </anime>

List save location not working?

I can not get the save path location to work?

If i try cache\ani-sync via settings, i get:
Error: Could not find a part of the path 'D:\jellyfin\cache\ani-sync\eyjak5cp.3ua' ?

The issue seems to-be because i started jellyfin-server with the datadir option: jellyfin.exe --datadir d:\_configs\jellyfin\
Is there a way to respect this datadir, so i don't have to fully specify the absolute path?

Status: NotSupported (Maybe it's me who doesn't understand)

Disclaimer: I don't know how to use this plugin even after reading the documentation several times.

The issue

Hi, I'm trying to setup jellyfin-ani-sync, so I add your repo and install the plugin. I restarted several times but I still have the same problem.
Status: NotSupported
image

I'm a bit lost. Also, when I click on the plugin to configure it, I get this error.
image

I don't know if it's related

I'm using a Raspberry Pi 4, I don't know if it's an architecture problem, or something else.

Thanks in advance if anyone knows what I am doing wrong.

Plugin seems to change "Ticking" functionality in Jellyfin

When I have this plugin installed ticking a show in Jellyfin regardless of where I tick it only seems to "tick off" a single episode, default Jellyfin behavior is to tick off the entire show unless you are ticking an episode specifically rather than using the show heading or jellyfin homepage. My use case is that I'm importing hundreds of shows (thousands of episodes) into Jellyfin and clicking the watched "tick" to mark them as watched, ideally that would mark the entire show as completed on my MAL too using this plugin with the option "Ticking watched updates providers?" selected in plugin settings.

Doesn't sync on Android TV.

I've noticed that this plugin will not update an anime if I watch it on the Jellyfin Android TV app. It will update if I watch it on my PC using the Jellyfin MPV Shim though. Same user.

[Kitsu Auth Issue] Failing to Authenicate when # inluded in Password

Hi Vosmiic,

I've done some testing and it looks like there something going on with how password are parsed when authenticating for the Kitsu Provider.

It looks like if you have a # or some other special characters in your password it will just off in the URL.

In the below example the log showed my password only before the # and nothing after.

[2023-01-25 02:09:05.891 +00:00] [ERR] Error processing request: "Could not retrieve Kitsu token: BadRequest - Bad Request". URL "GET" "/AniSync/passwordGrant".
[2023-01-25 02:09:05.891 +00:00] [WRN] Slow HTTP Response from "http://**IP ADDRESS**/AniSync/passwordGrant?provider=Kitsu&userId=**USERID**&username=**USERNAME**&password=**PASSWORD**" to "**IP ADDRESS**" in 0:00:05.2603923 with Status Code 401

After changing my password to remove # it now allows authentication.

Made in Abyss: The Golden City of the Scorching Sun not tracking

The plugin is not updating this on Anilist whenever I finish an episode for some reason and I have to manually do it. This is the Anilist id: 114745. Here is a ss of my Jellyfin library. Might be because it has a unique title compared to just "Made in Abyss." Thanks!

image

System.ArgumentNullException: Value cannot be null. (Parameter 'source')

Crash due to an ArgumentNullException when sending an update to my lists.

This is using 2.7.1.0 on Jellyfin 1.0.9.8.

The logs from the event:

2023-03-05T15:31:18.410404722Z | stderr | at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
2023-03-05T15:31:18.410362608Z | stderr | at System.Threading.ThreadPoolWorkQueue.Dispatch()
2023-03-05T15:31:18.410316111Z | stderr | at System.Threading.QueueUserWorkItemCallback.Execute()
2023-03-05T15:31:18.410259655Z | stderr | at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
2023-03-05T15:31:18.410105261Z | stderr | at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
2023-03-05T15:31:18.410057104Z | stderr | at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
2023-03-05T15:31:18.410007079Z | stderr | at jellyfin_ani_sync.SessionServerEntry.PlaybackStopped(Object sender, PlaybackStopEventArgs e)
2023-03-05T15:31:18.409958100Z | stderr | at jellyfin_ani_sync.UpdateProviderStatus.Update(BaseItem e, Guid userId, Boolean playedToCompletion)
2023-03-05T15:31:18.409901990Z | stderr | at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
2023-03-05T15:31:18.409828021Z | stderr | at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
2023-03-05T15:31:18.409195905Z | stderr | Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'source')
2023-03-05T15:31:18.409659656Z | stdout | at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
2023-03-05T15:31:18.409597772Z | stdout | at System.Threading.ThreadPoolWorkQueue.Dispatch()
2023-03-05T15:31:18.409542187Z | stdout | at System.Threading.QueueUserWorkItemCallback.Execute()
2023-03-05T15:31:18.409486172Z | stdout | at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
2023-03-05T15:31:18.409429758Z | stdout | at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
2023-03-05T15:31:18.409369888Z | stdout | at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
2023-03-05T15:31:18.409302150Z | stdout | at jellyfin_ani_sync.SessionServerEntry.PlaybackStopped(Object sender, PlaybackStopEventArgs e)
2023-03-05T15:31:18.409217512Z | stdout | at jellyfin_ani_sync.UpdateProviderStatus.Update(BaseItem e, Guid userId, Boolean playedToCompletion)
2023-03-05T15:31:18.409034573Z | stdout | at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
2023-03-05T15:31:18.408934830Z | stdout | at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
2023-03-05T15:31:18.408838661Z | stdout | System.ArgumentNullException: Value cannot be null. (Parameter 'source')

[Feature Request] Configuration through environment

Make possible to setup plugin and providers through environment variables.

This is need for docker jellyfin distributions easier setup.

Example env layout. ${PROVIDER} any of supported providers e.g. AniList or MyAnimeList
env value
ANI_SYNC_API_ENDPOINT http://127.0.0.1:8096
ANI_SYNC_${PROVIDER}_CLIENT_ID 10899
ANI_SYNC_${PROVIDER}_CLIENT_SECRET axtZXzid6XGjl4pgpG62CoWLcJPLwh2QnItFb5dj
ANI_SYNC_LIST_SAVE_LOACTION /list
ANI_SYNC_UPDATE_ONLY_PLANNED true
ANI_SYNC_COMPLEATED_AS_REWATCHING true
ANI_SYNC_LIBRARIES Anime,OVA,MV

AniList to TvDB or TheXem DB support

Any plans to add support to map tvdb to Anilist/AniDB, this way we can keep the tvdb meta's + season view and let the scrobbler handle the mappings?

Examples on how others do this:
custom_mappings.yaml
https://github.com/RickDB/PlexAniSync
and user maintained list
https://github.com/mizz141/PlexAniSync-Mappings

If you adapt the yaml 1:1 we could use the same maintained lists for both plugins?

More complex is use those translation lists or https://thexem.info api
https://github.com/Anime-Lists/anime-lists

Failing to sync (Request processing error)

I followed the instructions in the wiki and successfully authenticated my user but when I try to sync the progress in Jellyfin to match AniList it starts the scan and fetches the data then fails? I don't know why this is happening, here's the log (the fetch ends at line 2972) because i really can't pinpoint the error that's happening.

Manually setting show/episode to finished in jellyfin doesn't update watch status on providers.

Hey there,
firstly, thank you for the plugin. However I have an issue and I am unsure if it's the intended behavior of the plugin or a limit of jellyfin itself.

If I watch an epsiode normally then syncing progress works just fine, however if I manually set an epsiode to finished within Jellyfin it doesn't syncronize its watched status on Anilist or Myanimelist.

Now, the problem is, that I use jellyfin on my ShieldTV with an external player (If you don't own a ShieldTV: You can basically use the Jellyfin interface but use other players, VLC in my Case, for playback instead of the native Android Exoplayer) because Jellyfin in itself is only capable of downmuxing 5.1 content to stereo but not transcoding 5.1 DTS/DD to a simple 5.1 PCM signal like VLC can. Jellyfin however can not automatically detect the progress of the episode if you use an external player and thus you have to manually set the episode to "finished/watched" after each episode.

Works fine for jellyfin but as described above Anilist/MAL doesn't pick up the watch status then.

Is this something that can be added/fixed?

If not, a simple task scheduler to add the "manually sync progress from jellyfin to the provider" option would be another alternative if this feature can't be implemented easily otherwise. I tried the manual syncing feature and then the correct progress shows up on the providers but obviously an automatic task scheduler would be much preferred in that case.

Thank you very much.

"Could not update anime list" error?

Seeing this on windows? Check the creation flags to allow overrides or maybe use a rename, create logic?

IntervalTrigger fired for task: AniSync Update Anime List
[INF] [124] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queuing task TaskUpdateAnimeList
[INF] [124] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing AniSync Update Anime List
[ERR] [128] jellyfin_ani_sync.TaskUpdateAnimeList: Could not update anime list; Cannot create 'd:\_configs\jellyfin\cache\ani-sync\anime-list-full.xml' because a file or directory with the same name already exists.
[INF] [128] Emby.Server.Implementations.ScheduledTasks.TaskManager: AniSync Update Anime List Completed after 0 minute(s) and 0 seconds

Unable to track Detective Conan series

Plugin is not updating myanimelist when I finish an episode for Detective Conan anime. I have the metadata of TvDB linked. For all the other anime, it seems to be good.

Am I missing something? Any suggestions to fix it? I was not able to find any errors logged.

image

invalid client, cant authenticate

i made two api clients in anilist. both redirect urls say this is the correct url but when i try authorizing it always says invalid client. i copy and pasted the client id and secret and both should be correct. my jellyfin server is on my synology if that makes a difference, don't see why it would. maybe it takes some time for anilist to make the api or should it be instant? thanks for your help.

Can't save settings

Thanks for adding support for annict.
However, if I select annict as my provider, I cannot save the settings.

With other providers I can save the settings, but when I select Annict, I cannot save the settings even if I enter my Personal Access Token.

I have rebooted and reinstalled the plugin to no avail.

Cannot select provider

Jellyfin Version: 10.7.7
Plugin version: 1.6.0.0
Browser tested: Firefox, and Chrome

Issue: When trying to select provider, the drop-down menu is not showing any options.

image

And hence cannot proceed with authorization.

Anilist

Please also consider adding anilist.co support.

Thanks

[Feature Request] Per user sync & authentication

This will be ideal for independent configuration #53 and multi user jellyfin setup.

Also imagine how cool be when you watching anime with syncplay feature and it will update progress for all participants.

Jellyfin docker crashing after exiting live tv.

Installed plugin and confirmed it worked properly. When watching live tv from the account configured in the plugin to sync to MyAniList Jellyfin will crash after existing live tv. I've looked through the logs but can't find anything that stands out besides this Unhandled Exception from right before it crashes. This is me hitting the back button to exist live tv, this also does not happen on any other user that is not configured to use the plugin.

[17:09:39] [INF] [27] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Copying of SharedHttpStream to /transcode/e925f8a2fec343b3a56c8a7c531b4b75.ts was canceled [17:09:39] [INF] [27] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Deleting temp file /transcode/e925f8a2fec343b3a56c8a7c531b4b75.ts [17:09:39] [WRN] [28] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://10.0.0.7:8096/Sessions/Playing/Stopped to 10.0.0.151 in 0:00:01.7494628 with Status Code 204 [17:09:39] [INF] [25] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop tracker found, processing stop : TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNjA1LjEuMTUgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzE2LjIgU2FmYXJpLzYwNS4xLjE1fDE2NzIzNjQ2MzMwMjM1-41e7f311fe944026b4e80dacbcb61a07-cda10c0a8b5c53725d0bb3aa3716cb2f [17:09:39] [INF] [25] Jellyfin.Plugin.PlaybackReporting.Data.PlaybackTracker: PlaybackTracker : Adding Stop Event : 12/31/2022 17:09:39 [17:09:39] [INF] [25] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Playback stop but TrackedPlaybackInfo not found! not storing activity in DB [17:09:39] [FTL] [27] Main: Unhandled Exception System.ArgumentNullException: Value cannot be null. (Parameter 'path') at Emby.Server.Implementations.IO.ManagedFileSystem.ContainsSubPath(String parentPath, String path) at jellyfin_ani_sync.UpdateProviderStatus.LibraryCheck(BaseItem item) at jellyfin_ani_sync.UpdateProviderStatus.Update(BaseItem e, Guid userId, Boolean playedToCompletion) at jellyfin_ani_sync.SessionServerEntry.PlaybackStopped(Object sender, PlaybackStopEventArgs e) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action1 callback, TState& state)
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
`

I'm not sure what I'm missing here and any help would be greatly appreciated.

AniDB Support

please add the ability to login to anidb and track to mylist directly from the plugin. Its annoying to have to manually update mylist on anidb.
And provide options to do the following

features

  • Scrobble newly added anime (anime imported into jf, is added into anidbs mylist. Ignore if already present on mylist)
  • default import status (when added in above, set status to defaultm for example set to unwatched by default, then when the user watches 1 episode it can change to watched)
  • track watched and completed episodes
  • check status of already watched anime on jf (series says you completed it on jellyfin, but is set as not completed on anidb? have it mark it as complete)
  • an option to don't unwatch stuff" on mylist if its marked as unwatched after previously being watched in jellyfin
  • scan for subgroups on files and mark it in mylist
  • see user ratings
  • add start/end watching dates to mylist

failsafes

  • ignore entires that dont have an anidb page number (if you have an anime in your library, and it couldnt find the anidb id for metadata, completely ignore it so it doesnt mess up mylist)

  • a history feature with ability to revert recent changes (failsafe in case it adds an anime with wrong metadata, accidentally marks the wrong anime/bunch of episodes as watched, etc.)

https://wiki.anidb.net/API
https://anidb.net/software

Relevant: jellyfin/jellyfin-plugin-anidb#46

Getting Unauthorized URL GET /AniSync/authCallback error

I've been trying to set this up. I've checked test url and got confirmation. I've tried using local IP and my DNS setup. I believe I have my api setup correctly on MAL. I get the following error when trying.

[12:07:43] [ERR] [98] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request: Could not retrieve Mal token: Unauthorized - Unauthorized. URL GET /AniSync/authCallback.

When I hit allow on MAL i get a blank page that says "Error processing request."

Any ideas?

jellyfin-ani-sync.xml <callbackUrl> with an unwanted space ?

Edit:
I reinstalled the plugin and the space issue was gone, so I guess I was doing something wrong.
The 'Error processing request' was a problem with my Browser (Firefox Nightly) using Edge fixed the issue.


So when you try to configure the plugin, after you add all the API info (client ID / secret). You click on the 'Authorize User' and it generates a URL like:
https://anilist.co/api/v2/oauth/authorize?response_type=code&client_id=XXXX&redirect_uri= https://mypage.dns.net/AniSync/authCallback
Note the space after the &redirect_uri=

So that obviously won't work once you paste that on your browser, after removing that space the page loads, I click the Authorize button and I get a:
Error processing request.

in the browser console, I see some information and:
Status 401 Unauthorized

The URL change to something like:
https://mypage.dns.net/AniSync/authCallback?code=LongCodeHere

Also, it actually adds that space in the jellyfin-ani-sync.xml (C:\Users\USERNAME\AppData\Local\jellyfin\plugins\configurations)
<callbackUrl> https://mypage.dns.net</callbackUrl>
So I removed that extra space too


Thanks for the plugin!

(Windows 10)

AniList: Season one updated despite watching later season

When an anime has multiple seasons, watching an episode of a later season updates the first season in AniList.

For example, Love Live! Nijigasaki Gakuen School Idol Doukoukai
Here's an excerpt of a log line I added:

season: 2, episode: 11, providers: 'Tvdb': '388317', 'AniList': '113970', 'AniDB': '15313', 'Tmdb': '103511', 'Imdb': 'tt12792684'

We can see AniSync knows it's the second season, but the ProviderIds point to the first season. Since the values are in the list, AniSync will update the first season instead of looking up for the second, disregarding the season number.

If we look in anime-list-full.xml, we can see this:

<anime anidbid="15313" tvdbid="388317" defaulttvdbseason="1">
  <name>Love Live! Nijigasaki Gakuen School Idol Doukoukai</name>
</anime>
...
<anime anidbid="16310" tvdbid="388317" defaulttvdbseason="2">
  <name>Love Live! Nijigasaki Gakuen School Idol Doukoukai (2022)</name>
</anime>

I feel like there is an error in the XML data lookup, as there are 2 entries for the series, one for each season, but it seems like we don't pick the second one.

For information, series in my Jellyfin instance are in the following format:

Series
    Love Live! Nijigasaki Gakuen School Idol Doukoukai
        Season 01
            Love Live! Nijigasaki Gakuen School Idol Doukoukai - S01E01 - episode_title.mkv
        Season 02
            Love Live! Nijigasaki Gakuen School Idol Doukoukai - S02E01 - episode_title.mkv

Jellyfin Server: 10.8
AniSync: 2.0.1 (also present in latest commit)

Running manual sync works but scheduled task doesn't

Hello, I'm running into this issue in which if I run the manual sync the plugin works, both from and to AniList; but the scheduled task, either waiting for it to happen or running it by clicking the play button, doesn't do anything at all, the log just says:

[2023-02-01 01:54:08.092 +01:00] [INF] [26] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "AniSync Update Anime List"
[2023-02-01 01:54:08.355 +01:00] [INF] [20] Emby.Server.Implementations.ScheduledTasks.TaskManager: "AniSync Update Anime List" Completed after 0 minute(s) and 0 seconds
[2023-02-01 01:54:08.357 +01:00] [INF] [20] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

I do wonder if it's something I've done wrong or not, but considering that the manual sync does work I don't get what else I can do.

Thanks in advanced.

Anilist Authentication Fails

When authenticating I see the following error:

{"error":"invalid_client","message":"Client authentication failed"}

I'm using a subdirectory as the baseURL but the test url still returns the correct verbiage. I'm running Jellyfin in docker so I can't easily see the logs and whatnot, so I have no idea what the cause of this error is. The API secrets and ID's all check out on the website but this could be similar to #25 where the xml doesn't have the correct values. Do you know if I could try inspecting the website and see if the values are stored in a place that is easier to access?

image

Doesn't detect if using display order DVD

There are certain series like Monogatari, where display order "aired" only shows 5 seasons and has the rest of the episodes under "Specials." Using display order "DVD" it list the proper 10 seasons with all the episodes under the correct seasons.

This is an issue because ani-sync only uses the default display order, which is "aired." It doesn't know if something is under display order "DVD." This leads to the wrong season episode being synced (ex. s05e01 is being marked read, but s07e01 gets synced in mal/anilist). I am using the TVDB plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.