2017-10-11, 14:22
Hello! Recently I've noticed an issue in the master of Kodi when running the latest LibreELEC nightlies on my various RPI2/RPI3 units in the house. Milhouse suggested I post here since it looks to be outside of LibreELEC and it could be a Kodi issue/qurik.
Here is my setup:
When I watch a show, lets say it is 41 minutes with the commercials removed, and stop at 10 minutes in I noticed Kodi increments the playcount from 0 to 1. This change in playcount causes the episode to not show up in the "UnWatched" filtering on the default Estuary skin and can only be visible in "All Videos or Watched". This skin quirk is how I figured it out the issue since the shows were getting removed prematurely when I purged my watched shows when I know I had not finished them personally.
In my testing I completely DROPPED my Kodi database and started a brand new one and then rescanned my media once again.
I've gone back and forth in my testing and started with a clean Kodi directory with the following augmentations so I can test the experience. Below are the files I modified to provide the basis for testing.
advancedsettings - https://www.dropbox.com/s/jah0qfapg0vjme...s.xml?dl=0
sources - https://www.dropbox.com/s/q3a9whn0e7biif...s.xml?dl=0
keymap - https://www.dropbox.com/s/surab7amxp5m8j...d.xml?dl=0
Here is a DEBUG Log from the main RPI I am using for validation but the issue exists on all the others as well.
Debug Log - https://www.dropbox.com/s/td3t01nrmy33ptq/kodi.log?dl=0 (Sorry pastebinit is giving 500 errors)
When I use the texture cache utility Milhouse wrote I can see that the episode I was playing with has a playcount of 1 but you can clearly see the runtime is correct in all places and the resume point time is well below the default 90% threshold in Kodi to mark the episode as watched. To reproduce this I can watch a show like normal and stop it anytime prior to the 90% threshold by simply stopping the video normally in Kodi.
I am honestly at the end of my rope and willing to work to see what is going on since I am not sure why this is occurring with just normal playing.
Here is my setup:
- Various RPI2/RPI3 running same versions of LibreELEC nightlies, as of this writing it was #1010
- MySQL Remote DB hosted on a Ubuntu 16.04 LTS box with MySQL version 5.7.19 (Ubuntu DEB)
- NFS Storage hosted on a Ubuntu box as well
- Using SickRage to generate .nfo files for JUST the TV show, other data comes from the Kodi scraper for the episodes
- I remove my watched media every few days using a script I wrote to query Kodi and find all episodes with playcount NOT NULL and then perform a Library Clean via Kodi's JSON calls
When I watch a show, lets say it is 41 minutes with the commercials removed, and stop at 10 minutes in I noticed Kodi increments the playcount from 0 to 1. This change in playcount causes the episode to not show up in the "UnWatched" filtering on the default Estuary skin and can only be visible in "All Videos or Watched". This skin quirk is how I figured it out the issue since the shows were getting removed prematurely when I purged my watched shows when I know I had not finished them personally.
In my testing I completely DROPPED my Kodi database and started a brand new one and then rescanned my media once again.
I've gone back and forth in my testing and started with a clean Kodi directory with the following augmentations so I can test the experience. Below are the files I modified to provide the basis for testing.
advancedsettings - https://www.dropbox.com/s/jah0qfapg0vjme...s.xml?dl=0
sources - https://www.dropbox.com/s/q3a9whn0e7biif...s.xml?dl=0
keymap - https://www.dropbox.com/s/surab7amxp5m8j...d.xml?dl=0
Here is a DEBUG Log from the main RPI I am using for validation but the issue exists on all the others as well.
Debug Log - https://www.dropbox.com/s/td3t01nrmy33ptq/kodi.log?dl=0 (Sorry pastebinit is giving 500 errors)
When I use the texture cache utility Milhouse wrote I can see that the episode I was playing with has a playcount of 1 but you can clearly see the runtime is correct in all places and the resume point time is well below the default 90% threshold in Kodi to mark the episode as watched. To reproduce this I can watch a show like normal and stop it anytime prior to the 90% threshold by simply stopping the video normally in Kodi.
Code:
[
{
"art": {
"banner": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/banner.jpg/",
"fanart": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/fanart.jpg/",
"poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/poster.jpg/"
},
"file": "nfs://192.168.14.32/storage/media/tv/Z Nation/",
"label": "Z Nation",
"seasons": [
{
"art": {
"poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/season04-poster.jpg/",
"season.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/season04-poster.jpg/",
"tvshow.banner": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/banner.jpg/",
"tvshow.fanart": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/fanart.jpg/",
"tvshow.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/poster.jpg/"
},
"episodes": [
{
"art": {
"season.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/season04-poster.jpg/",
"thumb": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/Z.Nation.S04E01.Black.Rainbow.1080p-thumb.jpg/",
"tvshow.banner": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/banner.jpg/",
"tvshow.fanart": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/fanart.jpg/",
"tvshow.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/poster.jpg/"
},
"episodeid": 41,
"file": "nfs://192.168.14.32/storage/media/tv/Z Nation/Z.Nation.S04E01.Black.Rainbow.1080p.mkv",
"label": "4x01. Warren's Dream",
"playcount": 2,
"resume": {
"position": 0.0,
"total": 0.0
},
"runtime": 2589,
"streamdetails": {
"audio": [
{
"channels": 6,
"codec": "eac3",
"language": "eng"
}
],
"subtitle": [
{
"language": "eng"
}
],
"video": [
{
"aspect": 1.7777800559997559,
"codec": "h264",
"duration": 2589,
"height": 1080,
"language": "",
"stereomode": "",
"width": 1920
}
]
}
},
{
"art": {
"season.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/season04-poster.jpg/",
"thumb": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/Z.Nation.S04E02.Escape.from.Zona.1080p-thumb.jpg/",
"tvshow.banner": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/banner.jpg/",
"tvshow.fanart": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/fanart.jpg/",
"tvshow.poster": "image://nfs://192.168.14.32/storage/media/tv/Z Nation/poster.jpg/"
},
"episodeid": 42,
"file": "nfs://192.168.14.32/storage/media/tv/Z Nation/Z.Nation.S04E02.Escape.from.Zona.1080p.mkv",
"label": "4x02. Escape from Zona",
"playcount": 1,
"resume": {
"position": 1807.0,
"total": 2559.0
},
"runtime": 2559,
"streamdetails": {
"audio": [
{
"channels": 6,
"codec": "eac3",
"language": "eng"
}
],
"subtitle": [
{
"language": "eng"
}
],
"video": [
{
"aspect": 1.7777800559997559,
"codec": "h264",
"duration": 2559,
"height": 1080,
"language": "",
"stereomode": "",
"width": 1920
}
]
}
}
],
"label": "Season 4",
"season": 4,
"seasonid": 418
}
],
"title": "Z Nation",
"tvshowid": 75
}
]
I am honestly at the end of my rope and willing to work to see what is going on since I am not sure why this is occurring with just normal playing.