chapmanjacobd / library

80+ CLI tools to build, browse, and blend your media library: an index for your archive.
BSD 3-Clause "New" or "Revised" License
355 stars 9 forks source link

wt: non-mpv recently played #12

Closed chapmanjacobd closed 1 year ago

chapmanjacobd commented 1 year ago

It might be nice to allow people to know if something was recently played. This won't be 100% overlapping with the existing mpv watch_log functionality because things are only marked watched when post_actions are ran while mpv saves timestamp data at a more configurable basis. Still, it might be useful for some:

SELECT * FROM media 
WHERE time_created > cast(STRFTIME('%s', datetime( time_played, 'unixepoch', '-1 month', '-3 hours' )) as int)  
AND play_count > 0
chapmanjacobd commented 1 year ago

There might still be a few bugs but I feel like this is adequately handled now in library history and saving playhead information.