Coder Social home page Coder Social logo

jellyfin-plugin-trakt's Introduction

Trakt for Jellyfin Plugin

Part of the Jellyfin Project

Plugin Banner

GitHub Workflow Status MIT License Current Release

About

Available for install through the plugin catalog, Trakt for Jellyfin allows you to synchronize your watch states with ease.

Installation

See the official documentation for install instructions.

Build

  1. To build this plugin you will need .Net 6.x.

  2. Build plugin with following command

dotnet publish --configuration Release --output bin
  1. Place the dll-file in the plugins/trakt folder (you might need to create the folders) of your JF install

Releasing

To release the plugin we recommend JPRM that will build and package the plugin. For additional context and for how to add the packaged plugin zip to a plugin manifest see the JPRM documentation for more info.

Contributing

We welcome all contributions and pull requests! If you have a larger feature in mind please open an issue so we can discuss the implementation before you start. In general refer to our contributing guidelines for further information.

Licence

This plugins code and packages are distributed under the MIT License. See LICENSE for more information.

jellyfin-plugin-trakt's People

Contributors

addamanth avatar anthonylavado avatar blackwind avatar bond-009 avatar buthed010203 avatar crobibero avatar cvium avatar daullmer avatar dependabot[bot] avatar dkanada avatar dulli avatar grafixeyehero avatar h1dden-da3m0n avatar h3llrais3r avatar hhergeth avatar j2ghz avatar jellyfin-bot avatar joshuaboniface avatar justaman avatar lukepulverenti avatar matthew-jones-uk avatar methbkts avatar netpok avatar oddstr13 avatar renovate[bot] avatar sambartik avatar senorsmartypants avatar shadowghost avatar vagab0nd avatar veloute 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jellyfin-plugin-trakt's Issues

500 on Authorize device - 10.4.0 nightly 2019-09-19

Jellyfin: 10.4.0 nightly 2019-09-19
Trakt plugin: 5.0.0.0

[2019-09-19 20:04:42.489 +02:00] [INF] DeviceAuthorization request received
[2019-09-19 20:04:42.491 +02:00] [ERR] Error processing request
System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_LogRequest(Boolean)'.
   at Trakt.Api.TraktApi.GetHttpRequestOptions()
   at Trakt.Api.TraktApi.PostToTrakt(String url, Object data, CancellationToken cancellationToken, TraktUser traktUser)

Watched status being set when new items in excluded folders are imported

I am having an issue with (I believe) the Trakt plugin setting the watched status on newly detected TV shows in folders that are marked as excluded. These are shows that I have watched in Trakt, but I am adding reaction videos to a separate library which I do not want marked as watched on import. This is occurring under the following conditions (using an episode of BtVS as an example):

TV Shows Library - E:\Media\TV Shows
E:\Media\TV Shows\DVDs\Buffy the Vampire Slayer\S02E09 - What's My Line (1).mkv - Marked as watched in Trakt, and status imported into Jellyfin

Example Reactor Library - E:\Media\TV Shows\Reactions\Example Reactor
E:\Media\TV Shows\Reactions\Example Reactor\Buffy the Vampire Slayer\S02E09 - What's My Line (1) - Example Reactor Reaction.mp4

What happens: S02E09 - What's My Line (1) - Example Reactor Reaction.mp4 is marked as watched on import
What should happen: S02E09 - What's My Line (1) - Example Reactor Reaction.mp4 should not be marked as watched

In the Trakt plugin settings, the E:\Media\TV Shows\Reactions_Example Reactor_ folder is marked as excluded. Skip watched import from Trakt is not set.

I have verified that the status is not being taken from the TV Shows Library by using another user which is not configured with a Trakt account - that user does not exhibit the same behaviour.

Jellyfin Server: 10.5.5 (Windows)
Trakt Plugin: 9.0.0.0

Trakt plugin don't sync with trakt DB

Hi, I use Jellyfin Version : 10.7.5 with trakt plugin V12.0.0.0. I decide to re install my jellyfin with the pluginn on onother machine.
Now the state of the show in my collection on jellyfin don't synchronise with trakt. When I watch an episode on jellyfin, jellyfin tell it to trakt BUT trakt don't tell what I already watched to jeelyfin.

Any idees ?

THX

Plugin removed "watched" on trakt website

Installed the plug-in v3.0.0 and ran the scheduled task.
After a few minutes I noticed that almost all of my watch history was deleted from the trakt website.
Jellyfin pushed the watched states (all unwatched) to trakt it seems, instead of the other way around. (Don't think this is supposed to happen?)
Any way to revert this?

Sync library to trakt.tv failed

Server:
Version: 10.5.5
Operating System: Linux
Architecture: X64

Plugin: 9.0.0.0

Log:

The UTC time represented when the offset is applied must be between year 0 and 10,000. (Parameter 'offset') at System.DateTimeOffset.ValidateDate(DateTime dateTime, TimeSpan offset) at System.DateTimeOffset..ctor(DateTime dateTime) at System.DateTimeOffset.op_Implicit(DateTime dateTime) at Trakt.Api.TraktApi.SetRequestHeaders(HttpRequestOptions options, TraktUser traktUser) at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Sync library to trakt.tv - Error

Hello,
In Jellyfin - nightly - 20200605 - 10.6.0 , Sync library to trakt.tv is constantly failing
The problem was not present in version 10.5.5.

Plugin: 9.0.0.0

Import playstates from Trakt.tv - Okay
Sync library to trakt.tv - Error

[2020-06-06 00:29:06.579 +02:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: "IntervalTrigger" fired for task: "Import playstates from Trakt.tv"
[2020-06-06 00:29:06.579 +02:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queueing task "SyncFromTraktTask"
[2020-06-06 00:29:06.579 +02:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Import playstates from Trakt.tv"
[2020-06-06 00:29:06.579 +02:00] [ERR] [59] Trakt: Exception handled
System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_DecompressionMethod(MediaBrowser.Common.Net.CompressionMethod)'.
at Trakt.Api.TraktApi.GetHttpRequestOptions()
at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser)
at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser)
at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, CancellationToken cancellationToken, IProgress1 progress, Double percentPerUser) [2020-06-06 00:29:06.579 +02:00] [ERR] [59] Trakt: Error syncing trakt data for user "Evoluzione" System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_DecompressionMethod(MediaBrowser.Common.Net.CompressionMethod)'. at Trakt.Api.TraktApi.GetHttpRequestOptions() at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, CancellationToken cancellationToken, IProgress1 progress, Double percentPerUser)
at Trakt.ScheduledTasks.SyncFromTraktTask.Execute(CancellationToken cancellationToken, IProgress1 progress) [2020-06-06 00:29:06.580 +02:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import playstates from Trakt.tv" Completed after 0 minute(s) and 0 seconds [2020-06-06 00:29:06.580 +02:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks [2020-06-06 00:29:06.610 +02:00] [INF] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: "IntervalTrigger" fired for task: "Sync library to trakt.tv" [2020-06-06 00:29:06.610 +02:00] [INF] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queueing task "SyncLibraryTask" [2020-06-06 00:29:06.610 +02:00] [INF] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Sync library to trakt.tv" [2020-06-06 00:29:06.610 +02:00] [ERR] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error System.MissingMethodException: Method not found: 'Void MediaBrowser.Common.Net.HttpRequestOptions.set_DecompressionMethod(MediaBrowser.Common.Net.CompressionMethod)'. at Trakt.Api.TraktApi.GetHttpRequestOptions() at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser) at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser) at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress1 progress, CancellationToken cancellationToken)
at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress1 progress, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2020-06-06 00:29:06.611 +02:00] [INF] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Sync library to trakt.tv" Failed after 0 minute(s) and 0 seconds
[2020-06-06 00:29:06.627 +02:00] [INF] [38] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

Sync to Trakt fails after 1000~ episodes.

[2021-03-25 13:12:32.026 +00:00] [INF] Episodes to set watched: 0
[2021-03-25 13:12:32.026 +00:00] [INF] Episodes to set unwatched: 0
[2021-03-25 13:12:32.026 +00:00] [INF] "Sync library to trakt.tv" Completed after 1 minute(s) and 56 seconds
[2021-03-25 13:12:32.026 +00:00] [INF] ExecuteQueuedTasks
[2021-03-25 13:27:37.370 +00:00] [INF] Executing "Sync library to trakt.tv"
[2021-03-25 13:27:39.203 +00:00] [INF] Movies to add to Collection: 3
[2021-03-25 13:27:39.512 +00:00] [INF] Movies to set watched: 0
[2021-03-25 13:27:39.513 +00:00] [INF] Movies to set unwatched: 0
[2021-03-25 13:27:53.098 +00:00] [INF] WS "10.10.1.104" closed
[2021-03-25 13:28:28.764 +00:00] [INF] Episodes to add to Collection: 16407
[2021-03-25 13:28:29.230 +00:00] [ERR] Exception handled sending episodes to trakt.tv
System.Runtime.Serialization.SerializationException: Type definitions should start with a '{', expecting serialized type 'TraktSyncResponse', got string starting with: AUTHED_API_POST_LIMIT rate limit exceeded. Please
at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(ReadOnlySpan1 strType, TypeConfig typeConfig, EmptyCtorDelegate ctorFn, KeyValuePair2[] typeAccessors) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\DeserializeTypeRefJson.cs:line 172
at ServiceStack.Text.JsonSerializer.DeserializeFromSpan(Type type, ReadOnlySpan1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 62 at ServiceStack.Memory.NetCoreMemory.Deserialize(MemoryStream memoryStream, Boolean fromPool, Type type, DeserializeStringSpanDelegate deserializer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\NetCoreMemory.cs:line 189 at ServiceStack.Text.JsonSerializer.DeserializeFromStream[T](Stream stream) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 190 at Trakt.Api.TraktApi.SendLibraryUpdateInternalAsync(IEnumerable1 episodes, TraktUser traktUser, CancellationToken cancellationToken, EventType eventType)
at Trakt.Api.TraktApi.SendLibraryUpdateAsync(IReadOnlyList1 episodes, TraktUser traktUser, CancellationToken cancellationToken, EventType eventType) at Trakt.ScheduledTasks.SyncLibraryTask.SendEpisodeCollectionUpdates(Boolean collected, TraktUser traktUser, List1 collectedEpisodes, ISplittableProgress`1 progress, CancellationToken cancellationToken)

issue when trying to sync library to trakt.tv.. (it was working before)

hello i have not change anything but i am now getting an error when doing a sync library to trakt.tv.. here is the logs:

Internal Server Error at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options) 
at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod) 
at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod) 
at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options) at Trakt.Api.TraktApi.<>c__DisplayClass30_0.<b__0>d.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- at Trakt.Api.TraktApi.Retry[T](Func`1 function) 
at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser) 
at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser) 
at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) 
at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken) 
at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) 
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Cannot authorize device on Jellyfin 10.5.0 with plugin version 8

Authorizing jellyfin for a user fails with following error:

[2020-03-13 07:07:51.432 +00:00] [INF] [6] App: DeviceAuthorization request received
[2020-03-13 07:07:51.445 +00:00] [ERR] [6] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request
System.InvalidOperationException: There was an error reflecting type 'Trakt.Configuration.PluginConfiguration'.
 ---> System.InvalidOperationException: There was an error reflecting property 'TraktUsers'.
 ---> System.InvalidOperationException: There was an error reflecting type 'Trakt.Model.TraktUser'.
 ---> System.InvalidOperationException: Cannot serialize member 'Trakt.Model.TraktUser.LocationsExcluded' of type 'System.Collections.Generic.IReadOnlyList`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]', see inner exception for more details.
 ---> System.NotSupportedException: Cannot serialize member Trakt.Model.TraktUser.LocationsExcluded of type System.Collections.Generic.IReadOnlyList`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] because it is an interface.
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.StructModel.CheckSupportedMember(TypeDesc typeDesc, MemberInfo member, Type type)
   at System.Xml.Serialization.StructModel.GetPropertyModel(PropertyInfo propertyInfo)
   at System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo memberInfo)
   at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.CreateArrayElementsFromAttributes(ArrayMapping arrayMapping, XmlArrayItemAttributes attributes, Type arrayElementType, String arrayElementNs, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportArrayLikeMapping(ArrayModel model, String ns, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter)
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type)
   at Emby.Server.Implementations.Serialization.MyXmlSerializer.<>c__DisplayClass1_0.<GetSerializer>b__0(String _)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Emby.Server.Implementations.Serialization.MyXmlSerializer.GetSerializer(Type type)
   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToWriter(Object obj, XmlWriter writer)
   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToStream(Object obj, Stream stream)
   at Emby.Server.Implementations.Serialization.MyXmlSerializer.SerializeToFile(Object obj, String file)
   at MediaBrowser.Common.Plugins.BasePlugin`1.SaveConfiguration()
   at Trakt.Api.TraktUriService.Post(DeviceAuthorization deviceAuthorizationRequest)
   at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName)
   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost httpHost, Object requestDto, IRequest req)
   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IRequest httpReq, HttpResponse httpRes, ILogger logger, CancellationToken cancellationToken)
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)

Jellyfin 10.5.0 official Docker image on Arch Linux with Plugin Version 8.0

Syncing collection not working (10.7.5)

While scrobbling is working the plugin fails to synchronize the collection to trakt:

[2021-05-23 17:23:45.510 +02:00] [ERR] Tried to reauthenticate with Trakt, but no refreshToken was available
[2021-05-23 17:23:45.670 +02:00] [ERR] Tried to reauthenticate with Trakt, but no refreshToken was available
[2021-05-23 17:23:45.844 +02:00] [ERR] Error
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at Trakt.ScheduledTasks.SyncFromTraktTask.FindMatch(BaseItem item, IEnumerable`1 results)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2021-05-23 17:23:45.844 +02:00] [INF] "Sync library to trakt.tv" Failed after 0 minute(s) and 0 seconds

Unable to "Authorize device"

System:

Jellyfin 10.3.0 with version 2.0 of the trakt plugin (deleted plugins folder before installing). Jellyfin is running inside the official docker container on debian.

Error:

Error when trying to "Authorize device".

Alert
An error occurred when trying to authorize device: 404 - Not Found

Logs:

(note: I've replaced the username with [USER] and the unique user-id with [USERID])

[2019-04-20 08:05:11.970 +00:00] [WRN] HTTP Response 200 to "172.18.0.11". Time (slow): 0:00:00.5299204. "http://jellyfin:8096/emby/users/[USERID]/items?Recursive=True&IncludeItemTypes=Movie&Fields=ProviderIds,Overview&startIndex=0&limit=200&IsVirtualItem=False"
[2019-04-20 08:05:22.886 +00:00] [INF] Authentication request for "[USER]" "has succeeded".
[2019-04-20 08:05:22.887 +00:00] [INF] Creating new access token for user [USERID]
[2019-04-20 08:05:23.001 +00:00] [ERR] Could not find handler for "/embywebsocket"
[2019-04-20 08:05:24.903 +00:00] [ERR] Could not find handler for "/embywebsocket"
[2019-04-20 08:05:57.230 +00:00] [ERR] Could not find handler for "/embywebsocket"
[2019-04-20 08:05:59.229 +00:00] [ERR] Could not find handler for "/embywebsocket"
[2019-04-20 08:06:03.494 +00:00] [ERR] Could not find handler for "/emby/Trakt/Users/[USERID]/Authorize"
[2019-04-20 08:06:11.250 +00:00] [ERR] Could not find handler for "/emby/Trakt/Users/[USERID]/Authorize"

Further up in the logs, this error also pops up

[2019-04-20 08:01:56.287 +00:00] [ERR] Error creating "Trakt.Api.TraktUriService"
System.InvalidOperationException: Unable to resolve service for type 'Trakt.Api.TraktApi' while attempting to activate 'Trakt.Api.TraktUriService'.
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
at Emby.Server.Implementations.ApplicationHost.CreateInstanceSafe(Type type)

Removed collections not synced to Trakt

When a movie or TV episode is added to my Jellyfin library, the Trakt plugin marks it as collected in Trakt when syncing. However, when the media file is removed, the plugin won't mark it as uncollected in Trakt. I understand that some people may have more than one media libraries so this may not be a desired feature, but would it be possible to add an option that enables this?

traktresponse not found error

i am getting this when trying to sync to trakt, there is 2 tv shows that needs to sync as watched but it is not working
image

Sync with Trakt not play

Hello,
i'm updrading to Jellyfin 10.6.0 et Trakt 10.0.0.0
I thought it worked, but it doesn't! I regularly have errors

In log :

Sync library to trakt.tv failed
Import playstates from Trakt.tv failed

Could not load type 'MediaBrowser.Controller.Entities.User' from assembly 'MediaBrowser.Controller, Version=10.6.0.0, Culture=neutral, PublicKeyToken=null'. at Trakt.ScheduledTasks.SyncFromTraktTask.Execute(CancellationToken cancellationToken, IProgress1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)`

Resume Time Import

According to a user on Chat, the Trakt plug-in/Jellyfin appears to export current play progress, but does not import it.

Consider this scenario:

  • There is a media library, imported to Plex and Jellyfin
  • Both servers are connected to Trakt
  1. Watch movie to 50% in Jellyfin, synchronize to Trakt. Upon starting playback in Plex, you will resume at 50%.

  2. Watch movie to 50% in Plex. Synchronize with Trakt. Upon launching in Jellyfin, it will start at the beginning.

The user would like Jellyfin to resume just as Plex does.

Trakt is replacing TvDb with Tmdb and begins starting to delete tvdb ids on episodes

Hi,

trakt is moving from Tvdb to Tmdb and has begun to remove tvdb ids from episodes where information are matching between tmdb and tvdb.
This results in the trakt plugin no longer being able to sync episodes to the collection since the episodes with the tvdb id cannot be found.

Could you please take a look into it.

Best regards
miracle152005

Sync Collections doesn't remove from Trakt collections when its deleted from library

currently when we remove item from library ( from jellyfin itself) it doesn't get removed from trakt collections. Can a option be given to remove from trakt collection too if its deleted from jellyfin library ( or from os folder).

It can be implement during scan also:

  1. after trakt sync collection is done
  2. remove from trakt collections if it isn't in jellyfin

Does not sync anything on Jellyfin 10.5.0

I upgraded to latest JF nightly in order to get proper hw accelleration and noticed that the trakt.tv import just writes to the log that it finished running after 0 seconds. Checking back in my library no watched states were synced at all.

[2020-01-16 08:46:54.993 +01:00] [INF] Executing "Import playstates from Trakt.tv"
[2020-01-16 08:46:55.030 +01:00] [INF] "Import playstates from Trakt.tv" Completed after 0 minute(s) and 0 seconds
[2020-01-16 08:46:55.031 +01:00] [INF] ExecuteQueuedTasks

If I can debug this further it would be nice if someone could tell me how. I already enabled the logging feature in the plugin but actually there isn't anything additional being logged.

[Feature] Manage Trakt `reset-progress`

Reset progress is used to re-watch a show, ie marking it unwatched, but not removing previous plays.

It would be great to have that feature in the plugin!

Scrobble progress is incorrect when resuming a show/movie

When resuming a show/movie (ie, not starting from the beginning), the scrobble value will be incorrect, end offested by the time at which we started (for example, starting a movie at 60 minutes, when reaching 65 minutes the scrobble value will be 5 minutes on plex).

This is problematic when using the scrobble position to sync between players.

Trakt plugin 11.0.0.0 + Jellyfin 10.7 not giving authroization code for user

Just updated to 10.7 on Windows, which updated Trakt to 11.0.0.0, Was troubleshooting a trakt issue and wanted to re-authorize my user, however when I hit re-authroize, it isn't generating a code.

It just says "Please visit https://trakt.tv/activate and authorize Jellyfin to access your account.
Your device code is ." and where the code should be is blank.

Not sure what, if any, log files might be useful here. Please advise.

Intermittent scrobble failures

JF 10.7.0
plugin 11

Sometimes plugin will no scrobble to trakt. I notice this after the fact. I'll look at my previous night of watching tv episodes and maybe half were scrobbled to trakt.

Trakt.tv plugin failure while Sync

Describe the bug
The sync from Jellyfin to Trakt is failing

System (please complete the following information):

  • OS: Linux Synology
  • Virtualization: Docker
  • Clients: KODI addon / Web
  • Jellyfin Version: 10.6.4
  • Installed Plugins: Trakt
  • Reverse Proxy: none
  • Base URL: none

To Reproduce

  1. Go to Scheduled Tasks
  2. Click on Sync Library To Trakt

Expected behavior
Finish with success and trakt is up to date

Logs

 Internal Server Error
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options)
   at Trakt.Api.TraktApi.<>c__DisplayClass30_0.<<GetFromTrakt>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Trakt.Api.TraktApi.Retry[T](Func`1 function)
   at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser)
   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncMovies(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.SyncUserLibrary(User user, TraktUser traktUser, ISplittableProgress`1 progress, CancellationToken cancellationToken)
   at Trakt.ScheduledTasks.SyncLibraryTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)``` `


Plugin doesn't work with 10.7

Installed trakt v11 with jellyfin/jellyfin-unstable docker and it's not working.

When trying to authorize I get:

Alarm
An error occurred when trying to authorize device: 500 - Internal Server Error

And the logs show:

[15:39:53] [ERR] [51] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /Trakt/Users/665c084a71f54088a04333e5e7754bc0/Authorize.
System.TypeLoadException: Could not load type 'MediaBrowser.Model.Serialization.IJsonSerializer' from assembly 'MediaBrowser.Model, Version=10.7.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
   at System.Reflection.RuntimeConstructorInfo.get_Signature()
   at System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
   at System.Reflection.RuntimeConstructorInfo.GetParameters()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
   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|24_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.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, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   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.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[15:39:53] [WRN] [32] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://192.168.5.13:8096/Users/665c084a71f54088a04333e5e7754bc0/Items?Recursive=true&Limit=3&Filters=IsNotFolder&SortBy=DateCreated&SortOrder=Descending&Ids=68096cfa7400d9f99ec417c473e009bf%2C1870cf8aaaa171b6dfa16fa3cee90fd5%2Cc8be25f7a18c4bba5c270f61026d4d41%2C4a3b2e6768422bb8e17e0bd1ba336990%2C85cd12f743186166c6d656982eb810aa%2Ced79368adcfd7df4eaf53a3f63a741fd%2C455c9676c445ac39f014c66d3b0dcc31%2C93119ba9ca721b40e44a93f0750ff7e5%2C9bc83692148f351846f9f61152c833f6%2Cae3e8cc4225cad67fbd5a2fdc7dae5d3%2Cc5c5c97eb3ccfd28e07ad04e7a53aa1d%2C6ac45d2741ce192d5add6bdd9ca501de&MediaTypes=Audio%2CVideo&EnableTotalRecordCount=false to 192.168.5.215 in 0:00:00.5329628 with Status Code 200

A docker logs -f jellyfin | grep -i trakt gives:

[15:34:06] [INF] [27] Emby.Server.Implementations.Updates.InstallationManager: New plugin installed: Trakt 11.0.0.0
[15:34:06] [WRN] [27] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://192.168.5.13:8096/Packages/Installed/Trakt?AssemblyGuid=4fe3201e-d6ae-4f2e-8917-e12bda571281&version=11.0.0.0 to 192.168.5.215 in 0:00:00.8759662 with Status Code 204
[15:34:24] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly Trakt, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null from /config/plugins/Trakt_11.0.0.0/Trakt.dll
[15:34:39] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Trakt 11.0.0.0
[15:34:39] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating Trakt.ScheduledTasks.SyncFromTraktTask
[15:34:39] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating Trakt.ScheduledTasks.SyncLibraryTask
[15:34:40] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error creating Trakt.ServerMediator
[15:36:36] [ERR] [60] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /Trakt/Users/665c084a71f54088a04333e5e7754bc0/Authorize.
[15:36:59] [ERR] [11] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /Trakt/Users/665c084a71f54088a04333e5e7754bc0/Authorize.
[15:39:53] [ERR] [51] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL POST /Trakt/Users/665c084a71f54088a04333e5e7754bc0/Authorize.

Sync/Import not working on 10.6.2

I get this every time any of the two scheduled task are ran:

[2020-08-18 03:05:16.298 -05:00] [ERR] [30] Trakt.ScheduledTasks.SyncFromTraktTask: Exception handled
MediaBrowser.Model.Net.HttpException: Service Unavailable
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options)
   at Trakt.Api.TraktApi.<>c__DisplayClass30_0.<<GetFromTrakt>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Trakt.Api.TraktApi.Retry[T](Func`1 function)
   at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser)
   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser)
   at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, CancellationToken cancellationToken, IProgress`1 progress, Double percentPerUser)
[2020-08-18 03:05:16.307 -05:00] [ERR] [30] Trakt.ScheduledTasks.SyncFromTraktTask: Error syncing trakt data for user "USERA"
MediaBrowser.Model.Net.HttpException: Service Unavailable
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.Get(HttpRequestOptions options)
   at Trakt.Api.TraktApi.<>c__DisplayClass30_0.<<GetFromTrakt>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Trakt.Api.TraktApi.Retry[T](Func`1 function)
   at Trakt.Api.TraktApi.GetFromTrakt(String url, CancellationToken cancellationToken, TraktUser traktUser)
   at Trakt.Api.TraktApi.SendGetAllWatchedMoviesRequest(TraktUser traktUser)
   at Trakt.ScheduledTasks.SyncFromTraktTask.SyncTraktDataForUser(User user, Double currentProgress, CancellationToken cancellationToken, IProgress`1 progress, Double percentPerUser)
   at Trakt.ScheduledTasks.SyncFromTraktTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)

I'm using Trakt plugin 10.0.0 and Jellyfin 10.6.2 stable.

Trakt error seems to stop episode playback.

Trakt is making playback stop. When it fails the episode fails to load and I just get the background of the movie (probabil the frame extracted by jellyfin). This is on the tizen app.

[ERR] Exception handled sending status update
System.Runtime.Serialization.SerializationException: Type definitions should start with a '{', expecting serialized type 'TraktScrobbleResponse', got string starting with: AUTHED_API_POST_LIMIT rate limit exceeded. Please
at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(ReadOnlySpan`1 strType, TypeConfig typeConfig, EmptyCtorDelegate ctorFn, KeyValuePair`2[] typeAccessors) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\DeserializeTypeRefJson.cs:line 172
at ServiceStack.Text.JsonSerializer.DeserializeFromSpan(Type type, ReadOnlySpan`1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 62
at ServiceStack.Memory.NetCoreMemory.Deserialize(MemoryStream memoryStream, Boolean fromPool, Type type, DeserializeStringSpanDelegate deserializer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\NetCoreMemory.cs:line 189
at ServiceStack.Text.JsonSerializer.DeserializeFromStream[T](Stream stream) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 190
at Trakt.Api.TraktApi.SendEpisodeStatusUpdateAsync(Episode episode, MediaStatus status, TraktUser traktUser, Single progressPercent)
at Trakt.ServerMediator.KernelPlaybackStart(Object sender, PlaybackProgressEventArgs e)

Version: 11.0.0
Jellyfin version: 10.7.5 x64 on Linux

Can't sync to trakt anymore

After the update to 10.3.6 and the respective trakt plugin upgrade syncing from trakt to jellyfin works again. Syncing from jellyfin to trakt still doesn't work. It definitely worked until 10.3.6. It also seems unclear to me what the following option actually does:

Update Trakt watched history during Scheduled Task
If checked, Jellyfin will only sync from Trakt during the Trakt scheduled tasks.

From the first sentence i get the impression that I have to tick it to sync to trakt but the second sentence basically tells the opposite. Anyways I tried both ticked and unticked with a restart in between and didn't work.

plugin work half way on v10.7

if i set the episode or movie to watched it works but if i just watched it normally and jellyfin set it to watched it is not working.. looking at the logs this is what i get
[2021-02-06 11:18:17.785 +00:00] [INF] [16] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Sync library to trakt.tv" [2021-02-06 11:18:18.793 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Movies to add to Collection: 0 [2021-02-06 11:18:18.795 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Movies to set watched: 0 [2021-02-06 11:18:18.795 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Movies to set unwatched: 0 [2021-02-06 11:18:19.777 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Episodes to add to Collection: 10 [2021-02-06 11:18:20.086 +00:00] [ERR] [13] Trakt.ScheduledTasks.SyncLibraryTask: TraktResponse not Found: "{}" [2021-02-06 11:18:20.088 +00:00] [ERR] [13] Trakt.ScheduledTasks.SyncLibraryTask: TraktResponse not Found: "{}" [2021-02-06 11:18:20.089 +00:00] [ERR] [13] Trakt.ScheduledTasks.SyncLibraryTask: TraktResponse not Found: "{}" [2021-02-06 11:18:20.091 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Episodes to set watched: 4 [2021-02-06 11:18:20.234 +00:00] [ERR] [13] Trakt.ScheduledTasks.SyncLibraryTask: Error updating episode play states System.Runtime.Serialization.SerializationException: Type definitions should start with a '{', expecting serialized type 'TraktSyncResponse', got string starting with: AUTHED_API_POST_LIMIT rate limit exceeded. Please at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(ReadOnlySpan1 strType, TypeConfig typeConfig, EmptyCtorDelegate ctorFn, KeyValuePair2[] typeAccessors) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Common\DeserializeTypeRefJson.cs:line 172 at ServiceStack.Text.Json.JsonReader.<>c__DisplayClass3_0.<GetParseSpanFn>b__0(ReadOnlySpan1 v) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Json\JsonReader.Generic.cs:line 20
at ServiceStack.Text.JsonSerializer.DeserializeFromSpan(Type type, ReadOnlySpan1 value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 62 at ServiceStack.Memory.NetCoreMemory.Deserialize(MemoryStream memoryStream, Boolean fromPool, Type type, DeserializeStringSpanDelegate deserializer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\NetCoreMemory.cs:line 179 at ServiceStack.Memory.NetCoreMemory.Deserialize(Stream stream, Type type, DeserializeStringSpanDelegate deserializer) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\NetCoreMemory.cs:line 151 at ServiceStack.Text.JsonSerializer.DeserializeFromStream[T](Stream stream) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsonSerializer.cs:line 190 at Emby.Server.Implementations.Serialization.JsonSerializer.DeserializeFromStream[T](Stream stream) at Trakt.Api.TraktApi.SendEpisodePlaystateUpdatesInternalAsync(IEnumerable1 episodeChunk, TraktUser traktUser, Boolean seen, CancellationToken cancellationToken)
at Trakt.Api.TraktApi.SendEpisodePlaystateUpdates(List1 episodes, TraktUser traktUser, Boolean seen, CancellationToken cancellationToken) at Trakt.ScheduledTasks.SyncLibraryTask.SendEpisodePlaystateUpdates(Boolean seen, TraktUser traktUser, List1 playedEpisodes, ISplittableProgress1 progress, CancellationToken cancellationToken) [2021-02-06 11:18:20.258 +00:00] [INF] [13] Trakt.ScheduledTasks.SyncLibraryTask: Episodes to set unwatched: 0 [2021-02-06 11:18:20.259 +00:00] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Sync library to trakt.tv" Completed after 0 minute(s) and 2 seconds [2021-02-06 11:18:20.264 +00:00] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks [2021-02-06 11:18:52.481 +00:00] [INF] [20] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2021-02-06 11:19:04.500 +00:00] [INF] [15] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets. [2021-02-06 11:19:11.191 +00:00] [INF] [27] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" closed [2021-02-06 11:20:09.351 +00:00] [INF] [33] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "127.0.0.1" request

Trakt Plugin Not Syncing Playstates Correctly

Syncing playstates from Trakt using the scheduled task is leaving episodes that are marked as played in Trakt as unplayed in the Jellyfin database. Cannot see anything in the log that stands out as being a cause:

Initial run:

[2021-02-25 03:18:31.601 +00:00] [INF] [79] Trakt.ScheduledTasks.SyncFromTraktTask: Trakt.tv watched Movies count = 381
[2021-02-25 03:18:31.601 +00:00] [INF] [79] Trakt.ScheduledTasks.SyncFromTraktTask: Trakt.tv watched Shows count = 270
[2021-02-25 03:18:49.909 +00:00] [INF] [79] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import playstates from Trakt.tv" Completed after 0 minute(s) and 20 seconds

Re-run:

[2021-02-25 03:25:03.753 +00:00] [INF] [15] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Import playstates from Trakt.tv"
[2021-02-25 03:25:04.566 +00:00] [INF] [77] Trakt.ScheduledTasks.SyncFromTraktTask: Trakt.tv watched Movies count = 381
[2021-02-25 03:25:04.567 +00:00] [INF] [77] Trakt.ScheduledTasks.SyncFromTraktTask: Trakt.tv watched Shows count = 270
[2021-02-25 03:25:04.863 +00:00] [INF] [77] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Import playstates from Trakt.tv" Completed after 0 minute(s) and 1 seconds

Any suggestions?

Installation

Is there a guide to follow to implement this plugin for a jellyfin container install?

Matching episodes by SxE and not TVDBid

I have some series that I watch that are DVD ordered. I watched an episode outside of JF and my video player marked it watched on trakt correctly.

local file - named to match DVD order
Veronica Mars 1x10 - Silence of the Lamb

Trakt history shows this episode watched (trakt displays aired order)
Veronica Mars 1x11 - Silence of the Lamb

That is correct.

However, when JF did it's sync it marked the wrong episode watched. local file =
Veronica Mars 1x11 - An Echolls Family Christmas

Sync appears to match episodes only using season and episode number. Not TVDBid if present (which they are in my JF metadata)

Please sync via TVDBid to support DVD and absolute ordered shows.

Removed Plays

I've been having problems where my plays (scrobbles) have been removed from my history, even old ones that had nothing to do with jellyfin. I emailed support at trakt and seemed like the app removing those playthroughs is Jellyfin.

I will be having a look at this, see if I can fix it, but I wanted to open the discussion to see if anyone else was having a look at this or if there were any pointers, as it's my first time with this project, will take me a while to wrap my head around the main project and the plugins.

Seems to be related to #15 and fixed by #17, but this happened to me during Christmas and January. So I will be having a look anyway.

Plugin reporting plays for both "is playing" and "has finished playing"

Any time I play a show and it's the end of a playlist (nothing plays after), I get two plays on trakt, one from when I started playing and one when finished. This doesn't happen if there's a file played after, as in for every episode before the last.

Steps to reproduce:

  1. Play the last file of a show or play a movie
  2. Let play to 100%

Expected outcome:

Episode/movie has 1 play reported

Actual outcome:

Episode has two plays as if watched twice.

Here's an excerpt of my log that I hope contains relevant information. I can't post the whole thing because it's too big.

It seems to report

[INF] [13] Trakt.ServerMediator: Playback Started

every time a file is played, and then

[INF] [61] Trakt.ServerMediator: Playback Stopped
[INF] [61] Trakt.ServerMediator: Item is played. Scrobble

only when a file is 100% played and stops.

Trakt plugin not installing on latest Nightly

OS: Ubuntu 20.04.1 LTS
Virtualization: Docker
Jellyfin Version: 20200915.18-unstable (nightly) (linuxserver image)

[10:20:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies,
[10:20:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loaded assembly Trakt, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null from /config/data/plugins/Trakt/Trakt.dll,
[10:20:40] [ERR] [1] Emby.Server.Implementations.ApplicationHost: Error loading types from Trakt, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null.,
System.TypeLoadException: Could not load type 'MediaBrowser.Model.Services.IService' from assembly 'MediaBrowser.Model, Version=10.7.0.0, Culture=neutral, PublicKeyToken=null'.,
   at System.Reflection.RuntimeAssembly.GetExportedTypes(),
   at Emby.Server.Implementations.ApplicationHost.GetTypes(IEnumerable`1 assemblies)+MoveNext()

Does not sync AdditionalUsers from play session

I am using a custom JF client that supports AdditionalUsers in a Session. Some relevant code.

https://github.com/jellyfin/jellyfin/blob/5ce008e02f0500c5d0298067fa401a740742e3f0/MediaBrowser.Controller/Session/SessionInfo.cs#L42
https://github.com/jellyfin/jellyfin/blob/00073c162a33672e64b2abcf6c561174acfab183/MediaBrowser.Api/UserLibrary/PlaystateService.cs#L264

I create a Session with a primary user and an addition user. (There are two of us IRL watching a show together). Start watching a video, I can see the primary user is scrobbling to trakt, but the additional is not. When the video is finished, the primary user has the video marked as watched in JF and trakt. The additional user has the video marked as watched in JF, but not in trakt. I also ran the scheduled trakt import, but that did not make a difference. And I waited 12+ hours on the off chance anything might change. But video play is still not in additional users trakt history.

Scrobble and watched status for additional users in a session should sync to trakt.

Thanks.

Import playstates from Trakt.tv failed

Jellyfin 10.6.0
Trakt.tv 9.0.0.0
with docker jellyfin/jellyfin
[2020-07-21 16:27:10.736 +00:00] [INF] Executing "Import playstates from Trakt.tv" [2020-07-21 16:27:10.772 +00:00] [ERR] Error System.TypeLoadException: Could not load type 'MediaBrowser.Controller.Entities.User' from assembly 'MediaBrowser.Controller, Version=10.6.0.0, Culture=neutral, PublicKeyToken=null'. at Trakt.ScheduledTasks.SyncFromTraktTask.Execute(CancellationToken cancellationToken, IProgress1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2020-07-21 16:27:10.772 +00:00] [INF] "Import playstates from Trakt.tv" Failed after 0 minute(s) and 0 seconds`

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.