Selezione Tipologia Visualizzazione Riprendi da (Impostazioni/Riproduzione)
This commit is contained in:
@@ -1618,17 +1618,63 @@ def play_torrent(item, xlistitem, mediaurl):
|
|||||||
xbmc.sleep(3000)
|
xbmc.sleep(3000)
|
||||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def resume_playback(played_time):
|
def resume_playback(played_time):
|
||||||
|
class ResumePlayback(xbmcgui.WindowXMLDialog):
|
||||||
|
Close = False
|
||||||
|
Resume = False
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
self.action_exitkeys_id = [92, 10]
|
||||||
|
self.progress_control = None
|
||||||
|
played_time = kwargs.get('played_time')
|
||||||
|
m, s = divmod(played_time, 60)
|
||||||
|
h, m = divmod(m, 60)
|
||||||
|
self.setProperty("time", '%02d:%02d:%02d' % (h, m, s))
|
||||||
|
|
||||||
|
def set_values(self, value):
|
||||||
|
self.Resume = value
|
||||||
|
self.Close = True
|
||||||
|
|
||||||
|
def is_close(self):
|
||||||
|
return self.Close
|
||||||
|
|
||||||
|
def onClick(self, controlId):
|
||||||
|
if controlId == 3012: # Resume
|
||||||
|
self.set_values(True)
|
||||||
|
self.close()
|
||||||
|
elif controlId == 3013: # Cancel
|
||||||
|
self.set_values(False)
|
||||||
|
self.close()
|
||||||
|
|
||||||
|
def onAction(self, action):
|
||||||
|
if action in self.action_exitkeys_id:
|
||||||
|
self.set_values(False)
|
||||||
|
self.close()
|
||||||
|
|
||||||
|
|
||||||
if played_time and played_time > 30:
|
if played_time and played_time > 30:
|
||||||
m, s = divmod(played_time, 60)
|
if config.get_setting('resume_menu') == 0:
|
||||||
h, m = divmod(m, 60)
|
Dialog = ResumePlayback('ResumePlayback.xml', config.get_runtime_path(), played_time=played_time)
|
||||||
idx = xbmcgui.Dialog().contextmenu(
|
Dialog.show()
|
||||||
[
|
t = 0
|
||||||
xbmc.getLocalizedString(12022).format('%02d:%02d:%02d' % (h, m, s)),
|
while not Dialog.is_close() and t < 100:
|
||||||
xbmc.getLocalizedString(12021)
|
t += 1
|
||||||
])
|
xbmc.sleep(100)
|
||||||
if idx: played_time = 0
|
if not Dialog.Resume: played_time = 0
|
||||||
|
else:
|
||||||
|
m, s = divmod(played_time, 60)
|
||||||
|
h, m = divmod(m, 60)
|
||||||
|
idx = xbmcgui.Dialog().contextmenu(
|
||||||
|
[
|
||||||
|
xbmc.getLocalizedString(12022).format('%02d:%02d:%02d' % (h, m, s)),
|
||||||
|
xbmc.getLocalizedString(12021)
|
||||||
|
])
|
||||||
|
if idx in [-1, 0]: played_time = 0
|
||||||
|
|
||||||
else: played_time = 0
|
else: played_time = 0
|
||||||
|
xbmc.sleep(300)
|
||||||
return played_time
|
return played_time
|
||||||
|
|
||||||
##### INPUTSTREM #####
|
##### INPUTSTREM #####
|
||||||
|
|||||||
@@ -199,6 +199,18 @@ msgctxt "#30046"
|
|||||||
msgid "Resume from start"
|
msgid "Resume from start"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#30047"
|
||||||
|
msgid "Show resume from How:"
|
||||||
|
msgstr "Mostra riprendi da come:"
|
||||||
|
|
||||||
|
msgctxt "#30048"
|
||||||
|
msgid "Custom window"
|
||||||
|
msgstr "Finestra personalizzata"
|
||||||
|
|
||||||
|
msgctxt "#30049"
|
||||||
|
msgid "Skin window"
|
||||||
|
msgstr "Finestra della skin"
|
||||||
|
|
||||||
msgctxt "#30050"
|
msgctxt "#30050"
|
||||||
msgid "Server connection error"
|
msgid "Server connection error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -199,6 +199,18 @@ msgctxt "#30046"
|
|||||||
msgid "Resume from start"
|
msgid "Resume from start"
|
||||||
msgstr "Riprendi dall'inizio"
|
msgstr "Riprendi dall'inizio"
|
||||||
|
|
||||||
|
msgctxt "#30047"
|
||||||
|
msgid "Show resume from How:"
|
||||||
|
msgstr "Mostra riprendi da come:"
|
||||||
|
|
||||||
|
msgctxt "#30048"
|
||||||
|
msgid "Custom window"
|
||||||
|
msgstr "Finestra personalizzata"
|
||||||
|
|
||||||
|
msgctxt "#30049"
|
||||||
|
msgid "Skin window"
|
||||||
|
msgstr "Finestra della skin"
|
||||||
|
|
||||||
msgctxt "#30050"
|
msgctxt "#30050"
|
||||||
msgid "Server connection error"
|
msgid "Server connection error"
|
||||||
msgstr "Errore connessione server"
|
msgstr "Errore connessione server"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<setting id="servers_favorites" visible="true" type="action" label="60551" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19mYXZvcml0ZXMiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
<setting id="servers_favorites" visible="true" type="action" label="60551" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19mYXZvcml0ZXMiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
||||||
<setting id="servers_blacklist" visible="true" type="action" label="60550" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19ibGFja2xpc3QiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
<setting id="servers_blacklist" visible="true" type="action" label="60550" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19ibGFja2xpc3QiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
|
||||||
<setting id="window_type" type="select" lvalues="60622|60623" label="60621" default="0"/>
|
<setting id="window_type" type="select" lvalues="60622|60623" label="60621" default="0"/>
|
||||||
|
<setting id="resume_menu" type="select" lvalues="30048|30049" label="30047" default="0"/>
|
||||||
<!-- <setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)" subsetting="true"/> -->
|
<!-- <setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)" subsetting="true"/> -->
|
||||||
<setting id="checklinks" type="bool" label="30020" default="false"/>
|
<setting id="checklinks" type="bool" label="30020" default="false"/>
|
||||||
<setting id="checklinks_number" type="slider" option="int" range="5,5,20" label="30021" default="5" visible="eq(-1,true)" subsetting="true"/>
|
<setting id="checklinks_number" type="slider" option="int" range="5,5,20" label="30021" default="5" visible="eq(-1,true)" subsetting="true"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user