From 2b79b471f00ddefce19e3a7ba04288e7268b5e17 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 27 Jul 2015 17:58:43 -0500 Subject: [PATCH] Quick follow up music video section Playcount returns an integer or None, using dateadded/created method in API() --- resources/lib/WriteKodiVideoDB.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 03023f71..f593a9c2 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -309,16 +309,8 @@ class WriteKodiVideoDB(): album = MBitem.get("Album") track = MBitem.get("Track") dateplayed = userData.get("LastPlayedDate") - - if MBitem.get("DateCreated") != None: - dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ") - else: - dateadded = None - - if userData.get("PlayCount") != "0" and userData.get("PlayCount") != None: - playcount = int(userData.get('PlayCount')) - else: - playcount = None #playcount must be set to NULL in the db + playcount = userData.get('PlayCount') + dateadded = API().getDateCreated(MBitem) ##### ADD OR UPDATE THE FILE AND PATH ##### ##### NOTE THAT LASTPLAYED AND PLAYCOUNT ARE STORED AT THE FILE ENTRY #####