From 4063be6e9916d07c4dc8f51f41d422ab36992c21 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 10 May 2015 02:30:47 +0200 Subject: [PATCH] fixed music runtime calculation --- resources/lib/WriteKodiMusicDB.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/WriteKodiMusicDB.py b/resources/lib/WriteKodiMusicDB.py index fa9f6d7d..5bca29c8 100644 --- a/resources/lib/WriteKodiMusicDB.py +++ b/resources/lib/WriteKodiMusicDB.py @@ -12,7 +12,7 @@ import urllib import sqlite3 import os from decimal import Decimal -from datetime import datetime +from datetime import datetime, timedelta from DownloadUtils import DownloadUtils from PlayUtils import PlayUtils @@ -332,7 +332,7 @@ class WriteKodiMusicDB(): genres = " / ".join(MBitem.get("Genres")) artists = " / ".join(MBitem.get("Artists")) track = MBitem.get("IndexNumber") - duration = int(timeInfo.get('Duration'))*60 ## TODO --> duration in seconds, now its capped at minutes + duration = MBitem.get("RunTimeTicks", 0) / 10000000 year = MBitem.get("ProductionYear") bio = utils.convertEncoding(API().getOverview(MBitem))