Jump to content

Long lasting Trakt Plug-in Issue


tr0nllam

Recommended Posts

tr0nllam

Ever since using Emby, I've had a problem with the Trakt Plug-in properly reporting when something is watched on their site. I have never had an issue with Emby itself marking something watched, but frequently it will miss sending it to Trakt.

 

I've looked in the logs when this happens and all it will say is "Info Trakt: Item Not fully played. Tell trakt.tv we are no longer watching but don't scrobble."

 

Any ideas?

Link to comment
Share on other sites

Hi there, welcome. I'm not quite sure. We'd have to look into a specific example in detail.

 

While I'm here I'd like to point out that the trakt plugin is a community addition and contributions are welcome. The source code for it can be found here:

 

https://github.com/MediaBrowser/trakt

 

Thanks.

  • Like 1
Link to comment
Share on other sites

From looking at the code, this is going to happen if the message we got from the system reported that the item was not fully played.  That would occur if it didn't meet the requirements set in the resume settings on the server.

Link to comment
Share on other sites

Is there a reason why Emby would mark something watched without marking it watched on Trakt?

 

It gets marked watched in Emby first and then there was probably an error in the trakt plugin sending that data over to trakt.

Link to comment
Share on other sites

It gets marked watched in Emby first and then there was probably an error in the trakt plugin sending that data over to trakt.

 

Based on the message he posted that doesn't look like the case.  The plug-in made the decision not to tell Trakt it was watched because e.PlayedToCompletion was not true.

Link to comment
Share on other sites

Based on the message he posted that doesn't look like the case.  The plug-in made the decision not to tell Trakt it was watched because e.PlayedToCompletion was not true.

I've seen this when on the rare occasion I'll watch something live on cable. After the fact, instead of playing it through to completion on Emby I'll just hop on and click the checkbox to mark as watched. The trakt plugin does not update trakt because the episode was never actually played through Emby.

Link to comment
Share on other sites

tr0nllam

Based on the message he posted that doesn't look like the case.  The plug-in made the decision not to tell Trakt it was watched because e.PlayedToCompletion was not true.

 

This is correct. After this happens, I look at the log and it tells me that the item was not fully played even though Emby has marked it as completed. I've tried to pinpoint why this happens, but I can't figure out the common denominator. For example, I will watch multiple tv episodes in a row and 1 of them will just randomly not be marked watched on Trakt.

Link to comment
Share on other sites

That might be true. It's very possible that the code in the Trakt plugin needs to be reviewed for possible defects.

Link to comment
Share on other sites

tr0nllam

I think I may have found the issue. I recently had an example of a success and a failure and the one key difference seems to be in the Kodi log. Here are the two examples:

 

07:15:06.576 T:11932  NOTICE: EMBY.player -> Played_information: {'smb://KODI/TV Shows 2/The Good Place/Season 02/The.Good.Place.S02E04.Existential.Crisis.720p.WEB-DL.AC3.5.1.h264-PODO.mkv': {'paused': False, 'refresh_id': '2ebff7c8cf21f25e0f86f30a43f578e8', 'AudioStreamIndex': 1, 'SubtitleStreamIndex': '', 'currentPosition': 1288.2620849609375, 'item_id': '5f525c0b377288955353bda90b0b17d7', 'currentfile': 'smb://KODI/TV Shows 2/The Good Place/Season 02/The.Good.Place.S02E04.Existential.Crisis.720p.WEB-DL.AC3.5.1.h264-PODO.mkv', 'runtime': 12951040000L, 'Type': 'Episode', 'playmethod': 'DirectPlay'}}

 

11:28:24.883 T:11932  NOTICE: EMBY.player -> Played_information: {"smb://KODI/TV Shows 2/DC's Legends of Tomorrow/Season 03/DC's.Legends.of.Tomorrow.S03E01.Aruba-Con.720p.WEB-DL.EAC3.5.1.h264-QOQ.mkv": {'paused': False, 'refresh_id': 'f861060253063327723ab6c92b4e8cb9', 'AudioStreamIndex': 1, 'SubtitleStreamIndex': '', 'currentPosition': 0.0, 'item_id': 'fc86d9fb3b207d3497ff054ed99c82a3', 'currentfile': "smb://KODI/TV Shows 2/DC's Legends of Tomorrow/Season 03/DC's.Legends.of.Tomorrow.S03E01.Aruba-Con.720p.WEB-DL.EAC3.5.1.h264-QOQ.mkv", 'runtime': 25425400000L, 'Type': 'Episode', 'playmethod': 'DirectPlay'}}

 

In the second example, which was the failure, the currentPosition is reported at "0.0," while the successful example reported a numerical value. I stopped each episode during the end credits, so they both should have recorded a a position before exiting. Both were marked watched in Emby, but only the first episode was sent to Trakt. Could this be the root of the problem and if so, any ideas on how to solve it?

  • Like 1
Link to comment
Share on other sites

Good find. Are you sure you stopped during credits or did you let it play until the end? 

 

If the stop position is reported at 0, the server will trigger it's core event with PlayedToCompletion=false.

 

The PlayedToCompletion flag is examined in Trakt and that affects the behavior:

https://github.com/MediaBrowser/trakt/blob/73544a4d7299bac0837d82439cf7a92edcdbfd7e/Trakt/ServerMediator.cs#L238

 

Unfortunately I don't know Trakt well enough to determine if the plugin should be changed or not, but it's possible the time reporting from the Emby for Kodi add-on needs to be looked at. Thanks.

Link to comment
Share on other sites

tr0nllam

Good find. Are you sure you stopped during credits or did you let it play until the end? 

 

If the stop position is reported at 0, the server will trigger it's core event with PlayedToCompletion=false.

 

The PlayedToCompletion flag is examined in Trakt and that affects the behavior:

https://github.com/MediaBrowser/trakt/blob/73544a4d7299bac0837d82439cf7a92edcdbfd7e/Trakt/ServerMediator.cs#L238

 

Unfortunately I don't know Trakt well enough to determine if the plugin should be changed or not, but it's possible the time reporting from the Emby for Kodi add-on needs to be looked at. Thanks.

 

I definitely stopped it during the credits. I'll keep checking the log when this happens in the future to confirm that this is the root of the problem @@Angelblue05.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Not sure if I can piggy-back on this issue or not, but I have an issue where emby doesn't send trakt watched information if I watch multiple episodes in a row on kodi without stopping.

I assume this is because a stop command is never sent to emby?

Edited by Quiks
Link to comment
Share on other sites

Not sure if I can piggy-back on this issue or not, but I have an issue where emby doesn't send trakt watched information if I watch multiple episodes in a row on kodi without stopping.

I assume this is because a stop command is never sent to emby?

 

You're right, best not to piggyback. Please see how to report a problem. thanks !

Link to comment
Share on other sites

Angelblue05

@Angelblue05

 

Sorry for not seeing this until recently. I have attached a partial log with my most recent occurrence of the current position 0.0 issue.

I've checked your log. Do you have another log where it captures the proper positiontick at the end of playback to compare? Your current log shows as if the video player disappeared at the end of playback hence the position was detected as 0.0. Let me know.

Link to comment
Share on other sites

Angelblue05

Thank you for this. Funny enough, it's working in this log because an error happened. ;)

 

01:09:20.890 T:17572  NOTICE: CDSPlayer::~CDSPlayer DSPlayer is now closed
01:09:20.897 T:7688   ERROR: EXCEPTION: XBMC is not playing any file <------ This right here is what allowed current position to not get wiped.
01:09:21.745 T:7688  NOTICE: EMBY.player -> DEBUG:: ONPLAYBACK_STOPPED

 

It's a timing issue. Will work on a solution and let you know when ready for testing.

Link to comment
Share on other sites

tr0nllam

Thank you for this. Funny enough, it's working in this log because an error happened. ;)

 

01:09:20.890 T:17572  NOTICE: CDSPlayer::~CDSPlayer DSPlayer is now closed
01:09:20.897 T:7688   ERROR: EXCEPTION: XBMC is not playing any file <------ This right here is what allowed current position to not get wiped.
01:09:21.745 T:7688  NOTICE: EMBY.player -> DEBUG:: ONPLAYBACK_STOPPED

 

It's a timing issue. Will work on a solution and let you know when ready for testing.

 

Sounds great.

 

Thanks for your help.

Link to comment
Share on other sites

tr0nllam

@@Angelblue05

 

Nope, still the same issue. The first episode I watched was sent to trakt, but the second wasn't. Still the same currentposition 0.0 problem.

Edited by tr0nllam
Link to comment
Share on other sites

Angelblue05

Ok. I will try to think of something. Technically, external players are not supported by the addon. The problem is that content is stopped before the playback stopped event is triggered.

 

Give me a bit.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...