mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Fix DatePlayed
DatePlayed should be empty when unwatched. And other minor fixes.
This commit is contained in:
parent
aac8229f9b
commit
9005ad84be
3 changed files with 8 additions and 4 deletions
|
@ -667,7 +667,7 @@ msgid "Add server"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#33135"
|
msgctxt "#33135"
|
||||||
msgid "Kodi will now restart to apply a small patch for your database version."
|
msgid "Kodi will now restart to apply a small patch for your Kodi version."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#33136"
|
msgctxt "#33136"
|
||||||
|
|
|
@ -197,7 +197,6 @@ class Connect(object):
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("No server selected")
|
raise RuntimeError("No server selected")
|
||||||
|
|
||||||
LOG.info(self.client.get_credentials())
|
|
||||||
return self.select_servers()
|
return self.select_servers()
|
||||||
|
|
||||||
def setup_manual_server(self):
|
def setup_manual_server(self):
|
||||||
|
|
|
@ -276,7 +276,10 @@ class Actions(object):
|
||||||
if obj['Premiere']:
|
if obj['Premiere']:
|
||||||
obj['Premiere'] = obj['Premiere'].split('T')[0]
|
obj['Premiere'] = obj['Premiere'].split('T')[0]
|
||||||
|
|
||||||
if obj['DatePlayed']:
|
if not obj['Played']:
|
||||||
|
obj['DatePlayed'] = None
|
||||||
|
|
||||||
|
elif obj['DatePlayed']:
|
||||||
obj['DatePlayed'] = obj['DatePlayed'].split('.')[0].replace('T', " ")
|
obj['DatePlayed'] = obj['DatePlayed'].split('.')[0].replace('T', " ")
|
||||||
|
|
||||||
metadata = {
|
metadata = {
|
||||||
|
@ -420,7 +423,9 @@ class Actions(object):
|
||||||
obj['PlayCount'] = API.get_playcount(obj['Played'], obj['PlayCount']) or 0
|
obj['PlayCount'] = API.get_playcount(obj['Played'], obj['PlayCount']) or 0
|
||||||
obj['Rating'] = obj['Rating'] or 0
|
obj['Rating'] = obj['Rating'] or 0
|
||||||
|
|
||||||
if obj['FileDate'] or obj['DatePlayed']:
|
if not obj['Played']:
|
||||||
|
obj['DatePlayed'] = None
|
||||||
|
elif obj['FileDate'] or obj['DatePlayed']:
|
||||||
obj['DatePlayed'] = (obj['DatePlayed'] or obj['FileDate']).split('.')[0].replace('T', " ")
|
obj['DatePlayed'] = (obj['DatePlayed'] or obj['FileDate']).split('.')[0].replace('T', " ")
|
||||||
|
|
||||||
obj['FileDate'] = "%s.%s.%s" % tuple(reversed(obj['FileDate'].split('T')[0].split('-')))
|
obj['FileDate'] = "%s.%s.%s" % tuple(reversed(obj['FileDate'].split('T')[0].split('-')))
|
||||||
|
|
Loading…
Reference in a new issue