Use an empty video file to "fail" playback
This commit is contained in:
parent
b23c6e2932
commit
fc836bebe6
3 changed files with 5 additions and 1 deletions
BIN
empty_video.mp4
Normal file
BIN
empty_video.mp4
Normal file
Binary file not shown.
|
@ -3,6 +3,7 @@ Used to kick off Kodi playback
|
|||
"""
|
||||
from logging import getLogger
|
||||
from threading import Thread
|
||||
from os.path import join
|
||||
|
||||
from xbmc import Player, sleep
|
||||
|
||||
|
@ -26,6 +27,8 @@ import state
|
|||
LOG = getLogger("PLEX." + __name__)
|
||||
# Do we need to return ultimately with a setResolvedUrl?
|
||||
RESOLVE = True
|
||||
# We're "failing" playback with a video of 0 length
|
||||
NULL_VIDEO = join(v.ADDON_FOLDER, 'addons', v.ADDON_ID, 'empty_video.mp4')
|
||||
###############################################################################
|
||||
|
||||
|
||||
|
@ -173,7 +176,7 @@ def _ensure_resolve(abort=False):
|
|||
# Because playback won't start with context menu play
|
||||
state.PKC_CAUSED_STOP = True
|
||||
result = Playback_Successful()
|
||||
result.listitem = PKC_ListItem(path='PKC_Dummy_Path_Which_Fails')
|
||||
result.listitem = PKC_ListItem(path=NULL_VIDEO)
|
||||
pickle_me(result)
|
||||
if abort:
|
||||
# Reset some playback variables
|
||||
|
|
|
@ -33,6 +33,7 @@ _ADDON = Addon()
|
|||
ADDON_NAME = 'PlexKodiConnect'
|
||||
ADDON_ID = 'plugin.video.plexkodiconnect'
|
||||
ADDON_VERSION = _ADDON.getAddonInfo('version')
|
||||
ADDON_FOLDER = try_decode(xbmc.translatePath('special://home'))
|
||||
|
||||
KODILANGUAGE = xbmc.getLanguage(xbmc.ISO_639_1)
|
||||
KODIVERSION = int(xbmc.getInfoLabel("System.BuildVersion")[:2])
|
||||
|
|
Loading…
Reference in a new issue