Jump to content

Watched status always sync'ing as fully watched


afflon

Recommended Posts

afflon

Hi all,

 

I've got a setup at home with a central Ubuntu server with all my media and Emby on top of that.

 

root@tali:/var/lib/emby-server/logs$ dpkg -l | grep emby
ii  emby-server                                                 3.0.5882.2-1                                        all          Emby Server is a home media server.
ii  libembymagickcore-6.q8-2:amd64                              8:6.9.2-8                                           amd64        low-level image manipulation library -- quantum depth Q8
ii  libembymagickwand-6.q8-2:amd64                              8:6.9.2-8                                           amd64        image manipulation library

 

 

The server exposes my media to other devices in my house using a samba share. (So I'm using path substitution to play on other devices).

 

When I play a file (preview, partially play the first 5mins, skip to the middle, or completely watch) and playback stops, the file is always regarded as fully watched. I've searched for hours on the internet and this forum but didn't find the answer.

 

Attached is the logfile of an Alias episode that I start and stop after a few seconds:

 

2016-03-25 16:28:28.3733 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items/fd0260fbebdfde72ef67f55343c379d0?format=json. UserAgent:
2016-03-25 16:28:28.3796 Info HttpServer: HTTP Response 200 to 192.168.1.7. Time: 6ms. http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items/fd0260fbebdfde72ef67f55343c379d0?format=json
2016-03-25 16:28:28.5387 Info HttpServer: HTTP POST http://192.168.1.2:8096/emby/Sessions/Playing. UserAgent:
2016-03-25 16:28:28.5593 Info HttpServer: HTTP Response 204 to 192.168.1.7. Time: 21ms. http://192.168.1.2:8096/emby/Sessions/Playing
2016-03-25 16:28:29.0580 Info App: Emby.Kodi.SyncQueue: Starting User Changes Sync...
2016-03-25 16:28:29.2736 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0. UserAgent:
2016-03-25 16:28:29.2963 Info HttpServer: HTTP Response 200 to 192.168.1.2. Time: 23ms. http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0
2016-03-25 16:28:29.4358 Info App: Emby.Kodi.SyncQueue: "USERSYNC" User 0314cb8629374ff7a51d84e8c12f6df9(Vincent) posted 2 Updates:  fd0260fbebdfde72ef67f55343c379d0(Alias, Season 05, The Shed),69a0c3d8d9a397cf23f15c5feb8c56ca(Alias, Season 05)
2016-03-25 16:28:29.4358 Info App: Emby.Kodi.SyncQueue: User Changes Sync Finished Taking 00:00:00.3778110
2016-03-25 16:28:29.5290 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json. UserAgent:
2016-03-25 16:28:29.5293 Info App: Emby.Kodi.SyncQueue: Server Time Requested...
2016-03-25 16:28:29.5293 Info HttpServer: HTTP Response 200 to 192.168.1.2. Time: 1ms. http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json
2016-03-25 16:28:29.9405 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0. UserAgent:
2016-03-25 16:28:29.9621 Info HttpServer: HTTP Response 200 to 192.168.1.7. Time: 22ms. http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0
2016-03-25 16:28:29.9729 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json. UserAgent:
2016-03-25 16:28:29.9733 Info App: Emby.Kodi.SyncQueue: Server Time Requested...
2016-03-25 16:28:29.9733 Info HttpServer: HTTP Response 200 to 192.168.1.7. Time: 1ms. http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json
2016-03-25 16:28:46.0971 Info HttpServer: HTTP POST http://192.168.1.2:8096/emby/Sessions/Playing/Stopped. UserAgent:
2016-03-25 16:28:46.1541 Info HttpServer: HTTP Response 204 to 192.168.1.7. Time: 57ms. http://192.168.1.2:8096/emby/Sessions/Playing/Stopped
2016-03-25 16:28:46.6013 Info App: Emby.Kodi.SyncQueue: Starting User Changes Sync...
2016-03-25 16:28:46.7545 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0. UserAgent:
2016-03-25 16:28:46.7746 Info HttpServer: HTTP Response 200 to 192.168.1.2. Time: 20ms. http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0
2016-03-25 16:28:46.9339 Info App: Emby.Kodi.SyncQueue: "USERSYNC" User 0314cb8629374ff7a51d84e8c12f6df9(Vincent) posted 2 Updates:  fd0260fbebdfde72ef67f55343c379d0(Alias, Season 05, The Shed),69a0c3d8d9a397cf23f15c5feb8c56ca(Alias, Season 05)
2016-03-25 16:28:46.9339 Info App: Emby.Kodi.SyncQueue: User Changes Sync Finished Taking 00:00:00.3326560
2016-03-25 16:28:46.9941 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json. UserAgent:
2016-03-25 16:28:46.9946 Info App: Emby.Kodi.SyncQueue: Server Time Requested...
2016-03-25 16:28:46.9954 Info HttpServer: HTTP Response 200 to 192.168.1.2. Time: 1ms. http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json
2016-03-25 16:28:47.3028 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0. UserAgent:
2016-03-25 16:28:47.3209 Info HttpServer: HTTP Response 200 to 192.168.1.7. Time: 18ms. http://192.168.1.2:8096/emby/Users/0314cb8629374ff7a51d84e8c12f6df9/Items?format=json&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CProductionYear%2CTaglines%2CCommunityRating%2COfficialRating%2CCumulativeRunTimeTicks%2CMetascore%2CAirTime%2CDateCreated%2CMediaStreams%2CPeople%2COverview%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CMediaSources&Ids=fd0260fbebdfde72ef67f55343c379d0
2016-03-25 16:28:47.3306 Info HttpServer: HTTP GET http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json. UserAgent:
2016-03-25 16:28:47.3306 Info App: Emby.Kodi.SyncQueue: Server Time Requested...
2016-03-25 16:28:47.3314 Info HttpServer: HTTP Response 200 to 192.168.1.7. Time: 1ms. http://192.168.1.2:8096/emby/Emby.Kodi.SyncQueue/GetServerDateTime?format=json

 

 

I've also set to store the data in nfo files, the NFO file for the episode:

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<episodedetails>
  <plot>Sydney is forced to partner on a mission with new APO agent Thomas Grace. They discover that Rachel Gibson -- a spy suspected of being involved in activities against the U.S. -- has something shockingly in common with Sydney.</plot>
  <outline />
  <lockdata>false</lockdata>
  <dateadded>2011-03-16 14:39:09</dateadded>
  <title>The Shed</title>
  <originaltitle>The Shed</originaltitle>
  <rating>7.5</rating>
  <year>2005</year>
  <tvdbid>299598</tvdbid>
  <art>
    <poster>\\tali\series\Alias\Season 05\Alias.S05E03.The.Shed.SD.TV-SiCKBEARD-thumb.jpg</poster>
  </art>
  <isuserfavorite>false</isuserfavorite>
  <playcount>1</playcount>
  <watched>true</watched>
  <lastplayed>2016-03-25 16:28:28</lastplayed>
  <resume>
    <position>0</position>
    <total>0</total>
  </resume>
  <episode>3</episode>
  <season>5</season>
  <aired>2005-10-13</aired>
  <fileinfo>
    <streamdetails />
  </fileinfo>
  <displayseason />
  <displayepisode />
  <thumb>http://thetvdb.com/banners/episodes/75930/299598.jpg</thumb>
</episodedetails>

 

Notice the total resume time is 0. I've tried removing the file and let Emby recreate, but it stays 0.

I use Sonarr but there the nfo writing is disabled.

 

What am I missing? :)

Edited by afflon
Link to comment
Share on other sites

does the web interface display a runtime? this would happen if we don't know the runtime of the content.

Link to comment
Share on other sites

afflon

does the web interface display a runtime? this would happen if we don't know the runtime of the content.

 

There is indeed no field "runtime" in the metadata (but XMBC does know this, probably via the video file itself?).

How do I get that field in there, for all episodes in my lib?

Link to comment
Share on other sites

  • 2 weeks later...
afflon

On a final note: Indeed it was because of the runtime metadata that was missing. I've tried advanced refresh before (in metadata manager) but with no result.

I started digging into the logs and I found that ffmpeg was crashing on me

 

2016-04-05 20:27:00.2801 Debug MediaEncoder: /usr/bin/ffprobe -i file:"/media/series/24/Season 1/24 - 1x01 - 12 PM.avi" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format
2016-04-05 20:27:00.3279 Info MediaEncoder: Killing ffmpeg process
2016-04-05 20:27:00.3279 Error MediaEncoder: Error sending q command to process
2016-04-05 20:27:00.3289 Error App: Error in ffprobe
        *** Error Report ***
        Version: 3.0.5912.0
        Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh
        Operating system: Unix 3.13.0.43
        Processor count: 4
        64-Bit OS: True
        64-Bit Process: True
        Program data path: /var/lib/emby-server
        Mono: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 09:52:44 UTC 2015)
        Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
        Object reference not set to an instance of an object
        System.NullReferenceException
          at MediaBrowser.MediaEncoding.Encoder.MediaEncoder+<GetMediaInfoInternal>c__async0.MoveNext () <0x41c685d0 + 0x0098f> in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f5d129026d0 + 0x00029> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f5d129006b0 + 0x000a7> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f5d12900630 + 0x0006b> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f5d129005e0 + 0x0003a> in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x7f5d12900d10 + 0x00017> in <filename unknown>:0
          at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo+<GetMediaInfo>c__async1.MoveNext () <0x41c67350 + 0x006b1> in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f5d129026d0 + 0x00029> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f5d129006b0 + 0x000a7> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f5d12900630 + 0x0006b> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f5d129005e0 + 0x0003a> in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x7f5d12900d10 + 0x00017> in <filename unknown>:0
          at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo+<ProbeVideo>c__async0`1[T].MoveNext () <0x41c65da0 + 0x00a24> in <filename unknown>:0
        --- End of stack trace from previous location where exception was thrown ---
          at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7f5d129026d0 + 0x00029> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7f5d129006b0 + 0x000a7> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7f5d12900630 + 0x0006b> in <filename unknown>:0
          at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7f5d129005e0 + 0x0003a> in <filename unknown>:0
          at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x41b0e650 + 0x0001a> in <filename unknown>:0
          at MediaBrowser.Providers.Manager.MetadataService`2+<RunCustomProvider>c__async7[TItemType,TIdType].MoveNext () <0x41c64ae0 + 0x00343> in <filename unknown>:0

 

When I ran the line manually:

 

@tali:/var/lib/emby-server/logs$ /usr/bin/ffprobe -i file:"/media/series/24/Season 1 brnd/24 - 1x01 - 12 PM.avi" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format
ffprobe version 1.2.6-7:1.2.6-1~trusty1 Copyright © 2007-2014 the FFmpeg developers
  built on Apr 26 2014 18:52:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --arch=amd64 --disable-stripping --enable-avresample --enable-pthreads --enable-runtime-cpudetect --extra-version='7:1.2.6-1~trusty1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    53.  5.103 / 53.  5.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Failed to set value '-show_format' for option 'show_chapters'

 

So my ffprobe wasn't working properly.

I ditched my current libav-tools lib and replaced it with a static library for ubuntu 14.04 from https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media

 

Hope that helps others with the same issue.
 

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...