Advertisement
fwarren

Jellyfin Time Watched

May 16th, 2024 (edited)
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.53 KB | Source Code | 0 0
  1. -- display time as h:MM:SS or mm:SS
  2. -- sqlite uses || instead of + or CONCAT() and FORMAT() is the same as PRINTF()
  3. SELECT ROWID, SUBSTRING(DateCreated, 1,16) AS DATE, ItemType, ItemName,
  4.        IIF(PlayDuration > 3599,  
  5.           (PlayDuration/3600) || ':' || FORMAT('%02d', (PlayDuration % 3600 / 60)) || ':' || FORMAT('%02d', (PlayDuration % 3600 % 60)),
  6.           (PlayDuration / 60) || ':' || FORMAT('%02d', (PlayDuration % 60))) AS TIME
  7. FROM PlaybackActivity
  8. WHERE UserId = 'edd3338a60a240549f0fb296c8bab625'
  9. ORDER BY rowid DESC
  10.  
Tags: jellyfin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement