mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
duration fix for streamdetails
This commit is contained in:
parent
ec5ad7d762
commit
541f440853
2 changed files with 7 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.emby"
|
<addon id="plugin.video.emby"
|
||||||
name="Emby"
|
name="Emby"
|
||||||
version="1.1.18"
|
version="1.1.19"
|
||||||
provider-name="Emby.media">
|
provider-name="Emby.media">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
|
|
|
@ -249,7 +249,7 @@ class WriteKodiVideoDB():
|
||||||
self.AddStudiosToMedia(movieid, studios, "movie", cursor)
|
self.AddStudiosToMedia(movieid, studios, "movie", cursor)
|
||||||
|
|
||||||
# Add streamdetails
|
# Add streamdetails
|
||||||
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor)
|
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), runtime ,fileid, cursor)
|
||||||
|
|
||||||
# Add to or remove from favorites tag
|
# Add to or remove from favorites tag
|
||||||
if userData.get('Favorite'):
|
if userData.get('Favorite'):
|
||||||
|
@ -424,7 +424,7 @@ class WriteKodiVideoDB():
|
||||||
self.AddStudiosToMedia(idMVideo, studios, "musicvideo", cursor)
|
self.AddStudiosToMedia(idMVideo, studios, "musicvideo", cursor)
|
||||||
|
|
||||||
#add streamdetails
|
#add streamdetails
|
||||||
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor)
|
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), runtime ,fileid, cursor)
|
||||||
|
|
||||||
#set resume point
|
#set resume point
|
||||||
resume = int(round(float(timeInfo.get("ResumeTime"))))*60
|
resume = int(round(float(timeInfo.get("ResumeTime"))))*60
|
||||||
|
@ -715,7 +715,7 @@ class WriteKodiVideoDB():
|
||||||
self.AddPeopleToMedia(episodeid, MBitem.get('People'), "episode", connection, cursor)
|
self.AddPeopleToMedia(episodeid, MBitem.get('People'), "episode", connection, cursor)
|
||||||
|
|
||||||
# Add streamdetails
|
# Add streamdetails
|
||||||
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), fileid, cursor)
|
self.AddStreamDetailsToMedia(API().getMediaStreams(MBitem), runtime, fileid, cursor)
|
||||||
|
|
||||||
# Update artwork
|
# Update artwork
|
||||||
self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "episode"), episodeid, "episode", "thumb", cursor)
|
self.addOrUpdateArt(API().getArtwork(MBitem, "Primary", mediaType = "episode"), episodeid, "episode", "thumb", cursor)
|
||||||
|
@ -1154,15 +1154,15 @@ class WriteKodiVideoDB():
|
||||||
query = "DELETE FROM taglinks WHERE idMedia = ? AND media_type = ? AND idTag = ?"
|
query = "DELETE FROM taglinks WHERE idMedia = ? AND media_type = ? AND idTag = ?"
|
||||||
cursor.execute(query, (id, mediatype, idTag))
|
cursor.execute(query, (id, mediatype, idTag))
|
||||||
|
|
||||||
def AddStreamDetailsToMedia(self, streamdetails, fileid, cursor):
|
def AddStreamDetailsToMedia(self, streamdetails, runtime , fileid, cursor):
|
||||||
|
|
||||||
# First remove any existing entries
|
# First remove any existing entries
|
||||||
cursor.execute("DELETE FROM streamdetails WHERE idFile = ?", (fileid,))
|
cursor.execute("DELETE FROM streamdetails WHERE idFile = ?", (fileid,))
|
||||||
if streamdetails:
|
if streamdetails:
|
||||||
# Video details
|
# Video details
|
||||||
for videotrack in streamdetails['videocodec']:
|
for videotrack in streamdetails['videocodec']:
|
||||||
query = "INSERT INTO streamdetails(idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth, iVideoHeight, strStereoMode) values(?, ?, ?, ?, ?, ?, ?)"
|
query = "INSERT INTO streamdetails(idFile, iStreamType, strVideoCodec, fVideoAspect, iVideoWidth, iVideoHeight, iVideoDuration ,strStereoMode) values(?, ?, ?, ?, ?, ?, ?, ?)"
|
||||||
cursor.execute(query, (fileid, 0, videotrack.get('videocodec'), videotrack.get('aspectratio'), videotrack.get('width'), videotrack.get('height'), videotrack.get('Video3DFormat')))
|
cursor.execute(query, (fileid, 0, videotrack.get('videocodec'), videotrack.get('aspectratio'), videotrack.get('width'), videotrack.get('height'), runtime ,videotrack.get('Video3DFormat')))
|
||||||
|
|
||||||
# Audio details
|
# Audio details
|
||||||
for audiotrack in streamdetails['audiocodec']:
|
for audiotrack in streamdetails['audiocodec']:
|
||||||
|
|
Loading…
Reference in a new issue