lastPlayed date is filled in database table files even when video is not yet finished
#1
When I start a video in Kodi 18.6 or any version and stop that video after 0.1 seconds the lastPlayed is registered in the database. This will have videos with playCount [NULL] and a valid lastPlayed

Image

This results in weird behaviour when you are creating a Smart Playlist for instance, to only include shows you are currently watching in the last x days.
Smart Playlist like this:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>TV Shows In Progress</name>
    <match>all</match>
    <rule field="playlist" operator="is">
        <value>TV Shows</value>
    </rule>
    <rule field="inprogress" operator="true" />
    <rule field="lastplayed" operator="inthelast">
        <value>45</value>
    </rule>
</smartplaylist>

Shows that you accidentally have started and stopped within a second will be counted for lastPlayed

It would make much more sense to register a lastPlayed when an episode is counted as finished and the playCount is incremented since there is not LastWatched in the database

Already created a bug report but it was not deemed a bug but a feature request.
https://github.com/xbmc/xbmc/issues/17717
Reply
#2
Did you try adding <ignoresecondsatstart>180</ignoresecondsatstart> to advancedsettings.xml ? Might be worth a try.
Reply
#3
(2020-04-24, 20:11)FXB78 Wrote: Did you try adding <ignoresecondsatstart>180</ignoresecondsatstart> to advancedsettings.xml ? Might be worth a try.

Did not know about that one, will give it a try. Thank you!
Reply
#4
(2020-04-24, 20:11)FXB78 Wrote: Did you try adding <ignoresecondsatstart>180</ignoresecondsatstart> to advancedsettings.xml ? Might be worth a try.

Unfortunately this is already enabled by default to 180 seconds and does not work.

I did find another workaround that is to add the rule to only include episodes with a playcount that is 0
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>TV Shows In Progress</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>45</value>
    </rule>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
</smartplaylist>
Reply
#5
lastPlayed is the last time you played it - doesn't matter if it's a second or 20 minutes you still played that video.

Here's what I use for my In Progress TV Shows -

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>In Progress TV Shows</name>
    <match>all</match>
    <rule field="inprogress" operator="true" />
    <limit>25</limit>
    <order direction="descending">lastplayed</order>
</smartplaylist>
Reply
#6
(2020-04-25, 08:57)Hitcher Wrote: lastPlayed is the last time you played it - doesn't matter if it's a second or 20 minutes you still played that video.

Here's what I use for my In Progress TV Shows -

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>In Progress TV Shows</name>
    <match>all</match>
    <rule field="inprogress" operator="true" />
    <limit>25</limit>
    <order direction="descending">lastplayed</order>
</smartplaylist>

I understand how it currently works, in my mind I can't find an use case for the current implementation Smile

How is the rule inprogress determined?
Reply
#7
One episode of the show is watched or partly watched.
Reply
#8
(2020-05-09, 18:42)Hitcher Wrote: One episode of the show is watched or partly watched.

The whole show in general or per season?
I'm trying to create a smart Playlist to only show me shows with seasons that I'm currently watching, so the first episode of a season is watched.
But it should not be included if the entire first season is watched but I haven't started yet on the second season.
Reply

Logout Mark Read Team Forum Stats Members Help
lastPlayed date is filled in database table files even when video is not yet finished1