fixed music runtime calculation

This commit is contained in:
Marcel van der Veldt 2015-05-10 02:30:47 +02:00
parent ad00392a68
commit 4063be6e99

View file

@ -12,7 +12,7 @@ import urllib
import sqlite3 import sqlite3
import os import os
from decimal import Decimal from decimal import Decimal
from datetime import datetime from datetime import datetime, timedelta
from DownloadUtils import DownloadUtils from DownloadUtils import DownloadUtils
from PlayUtils import PlayUtils from PlayUtils import PlayUtils
@ -332,7 +332,7 @@ class WriteKodiMusicDB():
genres = " / ".join(MBitem.get("Genres")) genres = " / ".join(MBitem.get("Genres"))
artists = " / ".join(MBitem.get("Artists")) artists = " / ".join(MBitem.get("Artists"))
track = MBitem.get("IndexNumber") 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") year = MBitem.get("ProductionYear")
bio = utils.convertEncoding(API().getOverview(MBitem)) bio = utils.convertEncoding(API().getOverview(MBitem))