mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-14 14:16:11 +00:00
Merge branch 'master' of https://github.com/MediaBrowser/Emby.Kodi
This commit is contained in:
commit
f7c25be2b1
2 changed files with 13 additions and 9 deletions
|
@ -128,25 +128,29 @@ class API():
|
||||||
|
|
||||||
if "Video" in type:
|
if "Video" in type:
|
||||||
videotrack = {}
|
videotrack = {}
|
||||||
videotrack['videocodec'] = mediaStream.get('Codec')
|
videotrack['videocodec'] = mediaStream.get('Codec', "").lower()
|
||||||
if "mpeg4" in videotrack['videocodec']:
|
container = item['MediaSources'][0].get('Container', "").lower()
|
||||||
profile = mediaStream.get('Profile', "")
|
if "msmpeg4" in videotrack['videocodec']:
|
||||||
if "Advanced" in profile:
|
videotrack['videocodec'] = "divx"
|
||||||
|
elif "mpeg4" in videotrack['videocodec']:
|
||||||
|
profile = mediaStream.get('Profile', "").lower()
|
||||||
|
if "simple profile" in profile:
|
||||||
videotrack['videocodec'] = "xvid"
|
videotrack['videocodec'] = "xvid"
|
||||||
elif "h264" in videotrack['videocodec']:
|
elif "h264" in videotrack['videocodec']:
|
||||||
container = item['MediaSources'][0].get('Container', "")
|
if container in ("mp4", "mov", "m4v"):
|
||||||
if "mp4" in container:
|
|
||||||
videotrack['videocodec'] = "avc1"
|
videotrack['videocodec'] = "avc1"
|
||||||
videotrack['height'] = mediaStream.get('Height')
|
videotrack['height'] = mediaStream.get('Height')
|
||||||
videotrack['width'] = mediaStream.get('Width')
|
videotrack['width'] = mediaStream.get('Width')
|
||||||
videotrack['Video3DFormat'] = item.get('Video3DFormat')
|
videotrack['Video3DFormat'] = item.get('Video3DFormat')
|
||||||
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "1:1")
|
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0")
|
||||||
if len(videotrack['aspectratio']) >= 3:
|
if len(videotrack['aspectratio']) >= 3:
|
||||||
try:
|
try:
|
||||||
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
|
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
|
||||||
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
||||||
except:
|
except:
|
||||||
videotrack['aspectratio'] = 1.85
|
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
|
||||||
|
else:
|
||||||
|
videotrack['aspectratio'] = round(float(videotrack['width'] / videotrack['height']), 6)
|
||||||
videotracks.append(videotrack)
|
videotracks.append(videotrack)
|
||||||
|
|
||||||
elif "Audio" in type:
|
elif "Audio" in type:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<category label="30014"> <!-- Emby -->
|
<category label="30014"> <!-- Emby -->
|
||||||
<setting id="ipaddress" type="text" label="30000" default="" visible="true" enable="true" />
|
<setting id="ipaddress" type="text" label="30000" default="" visible="true" enable="true" />
|
||||||
<setting id="altip" type="bool" label="Use alternate address" default="false" visible="true" enable="true" />
|
<setting id="altip" type="bool" label="Use alternate address" default="false" visible="true" enable="true" />
|
||||||
<setting id="https" type="bool" label="30243" visible="true" enable="true" default="false" />
|
|
||||||
<setting id="secondipaddress" type="text" label="Secondary Server Address" default="" visible="eq(-1,true)" enable="true" />
|
<setting id="secondipaddress" type="text" label="Secondary Server Address" default="" visible="eq(-1,true)" enable="true" />
|
||||||
|
<setting id="https" type="bool" label="30243" visible="true" enable="true" default="false" />
|
||||||
<setting id="port" type="number" label="30030" default="8096" visible="true" enable="true" />
|
<setting id="port" type="number" label="30030" default="8096" visible="true" enable="true" />
|
||||||
<setting id="username" type="text" label="30024" default="" />
|
<setting id="username" type="text" label="30024" default="" />
|
||||||
<setting type="sep" />
|
<setting type="sep" />
|
||||||
|
|
Loading…
Reference in a new issue