mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-17 13:46:14 +00:00
added lastplayed field to sync
This commit is contained in:
parent
7a905d4ec2
commit
95a3e76671
5 changed files with 35 additions and 13 deletions
|
@ -139,6 +139,14 @@ class API():
|
|||
UnplayedItemCount = userData.get('UnplayedItemCount')
|
||||
else:
|
||||
UnplayedItemCount = "0"
|
||||
if userData.get('LastPlayedDate') != None:
|
||||
#TODO--> is there some other way to do this ?
|
||||
datestring = userData.get('LastPlayedDate').split('T')[0]
|
||||
timestring = userData.get('LastPlayedDate').split('T')[1]
|
||||
timestring = timestring.split('.')[0]
|
||||
LastPlayedDate = datestring + " " + timestring
|
||||
else:
|
||||
LastPlayedDate = None
|
||||
if userData.get('PlaybackPositionTicks') != None:
|
||||
PlaybackPositionTicks = userData.get('PlaybackPositionTicks')
|
||||
else:
|
||||
|
@ -146,6 +154,7 @@ class API():
|
|||
return {'Watched' : watched,
|
||||
'Favorite' : favorite,
|
||||
'PlayCount': playcount,
|
||||
'LastPlayedDate': LastPlayedDate,
|
||||
'UnplayedItemCount' : UnplayedItemCount,
|
||||
'PlaybackPositionTicks' : str(PlaybackPositionTicks)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue