mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +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:
|
||||
videotrack = {}
|
||||
videotrack['videocodec'] = mediaStream.get('Codec')
|
||||
if "mpeg4" in videotrack['videocodec']:
|
||||
profile = mediaStream.get('Profile', "")
|
||||
if "Advanced" in profile:
|
||||
videotrack['videocodec'] = mediaStream.get('Codec', "").lower()
|
||||
container = item['MediaSources'][0].get('Container', "").lower()
|
||||
if "msmpeg4" in videotrack['videocodec']:
|
||||
videotrack['videocodec'] = "divx"
|
||||
elif "mpeg4" in videotrack['videocodec']:
|
||||
profile = mediaStream.get('Profile', "").lower()
|
||||
if "simple profile" in profile:
|
||||
videotrack['videocodec'] = "xvid"
|
||||
elif "h264" in videotrack['videocodec']:
|
||||
container = item['MediaSources'][0].get('Container', "")
|
||||
if "mp4" in container:
|
||||
if container in ("mp4", "mov", "m4v"):
|
||||
videotrack['videocodec'] = "avc1"
|
||||
videotrack['height'] = mediaStream.get('Height')
|
||||
videotrack['width'] = mediaStream.get('Width')
|
||||
videotrack['Video3DFormat'] = item.get('Video3DFormat')
|
||||
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "1:1")
|
||||
videotrack['aspectratio'] = mediaStream.get('AspectRatio', "0")
|
||||
if len(videotrack['aspectratio']) >= 3:
|
||||
try:
|
||||
aspectwidth, aspectheight = videotrack['aspectratio'].split(':')
|
||||
videotrack['aspectratio'] = round(float(aspectwidth) / float(aspectheight), 6)
|
||||
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)
|
||||
|
||||
elif "Audio" in type:
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<category label="30014"> <!-- Emby -->
|
||||
<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="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="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="username" type="text" label="30024" default="" />
|
||||
<setting type="sep" />
|
||||
|
|
Loading…
Reference in a new issue