TOOLSP
"
WELCOME !

Please ! USE [CODE] tags for your LINKS and CODE.

Favor usar balisas [CODE] para sus vínculos y código.

Merci d'utiliser les balises [CODE] pour vos liens et code.


[code]http://Thank.you[/code]
"
*** Doc. Kodi & PYthon ***
.
.
Python & Modules PY
.
.
.
.
(Video) Cache Kodi
.
.
.
Addons Kodi
.
.
.
Addons Kodi
.
.
*** GITHUB ***
.
.
URLresolver (J.S.) [GIT] +
.
.
.
URLresolver (elD.) [GIT] -
.
.
URLresolver (tvA.) [GIT] -
.
.
.
.
Cloudflare (external) [GIT]
.
.
.
*** Associated ***
.
Pastebin Your list online
.
mediafire Upload Files
.
imgur Upload Pics
lyngsat TV logos collection
transparent .png
.
http://hola.org free? VPN
Hola.apk free? VPN App.
.
hidester- free Proxy
.
webgrabplus EPG - Eng
xmltv EPG - Fr
kazer EPG - Fr
.
.wordreference Traduction
.
mail.com (fast sign-in)
.
.
FRIENDS / PARTNERS

£$π community

créer un forum


play it again ?? as loop

Go down

play it again ?? as loop Empty play it again ?? as loop

Post by Sylphilds on Sun 2 Dec - 5:43

hi

is there a way to reload a stream when it stopped because of token expired ?

i've got a regex which load a video with token and expire after 4 hours


i want to know if it is possible that £$π plays it again as a loop ??

has somebody an idea ?

thanks for suggestion

Sylphilds

Messages : 34
Date d'inscription : 2017-04-17

View user profile

Back to top Go down

play it again ?? as loop Empty Re: play it again ?? as loop

Post by jujuuj on Sun 2 Dec - 7:06


do you mean that your regex is able to take the new token but only if u run it manualy (by clicking the link every 4 hours) ?

or do you mean that you don't know how to find the new token ?

Not exactly what you want, but it should b possible
to run an executebuiltin every .. 2 hours with alink including the $doregex you need to get token..

import xbmc
def lsprodata............

exe-built playmedia(with doregex)
time.sleep( 7200 )
exe-built playmedia(with doregex)

how does it stop ? is it in the next second after the change of token ? or can u keep on watching ?

jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

play it again ?? as loop Empty Re: play it again ?? as loop

Post by jujuuj on Sun 2 Dec - 7:08

I wish you can share what you already have .. about that ..

here some info ... your solution is probably inside ...


xbmc.executebuiltin('XBMC.PlayMedia("http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h",1)')
while (xbmc.Player().isPlayingVideo() == True) and (not xbmc.abortRequested):
time.sleep( 5 )
xbmc.executebuiltin('XBMC.Notification(sound over,continuing ..!,5000)')





import xbmc
import time
import random
import os
import fileinput
time.sleep(1.5)
#list = os.listdir( Music_Path )
#xbmc.executebuiltin( 'PlayMedia(' + Music_Path + '/' + random.choice(list) + ')' )
list = os.listdir( Music_Path )
xbmc.executebuiltin( 'PlayMedia(' + Music_Path + random.choice(list) + ')' )




Autoexec.py
# Put this into the userdata folder, see http://wiki.xbmc.org/index.php?title=Userdata for details where this is for each platform
import xbmc
xbmc.executebuiltin('xbmc.PlayMedia("/storage/videos/","isdir")')
xbmc.executebuiltin('xbmc.PlayerControl(repeatall)')
xbmc.executebuiltin("Action(Fullscreen)")



AudioDelayMinus Decrease the delay amount of audio (use if audio is being heard too early)
AudioDelayPlus Increase the delay amount of audio (use if audio is being heard too late)

Play Play the selected item (or folder of items). Note: You may want to use playpause instead of just "play", since it will no longer pause media already being played.
PlayPause Play the selected item (or folder of items). Will also pause media when something is already playing.
Delete Used in My Files to delete a file.




import xbmc
import time

def PlayAndWait(mediafile):
xbmc.executebuiltin("PlayMedia(%s)" % mediafile, True)
while xbmc.Player().isPlaying():
time.sleep(1.0)

PlayAndWait("/mnt/usb/video1.mp4")
xbmc.executebuiltin("SlideShow(/mnt/usb/slideshow)")



import xbmc, time
xbmc.executebuiltin( "PlayMedia(/mnt/usb/video1.mp4)" )
time.sleep(20)
xbmc.executebuiltin( "SlideShow(/mnt/usb/slideshow)" )



executebuiltin("ActivateWindow(systemsettings)").

import xbmc
xbmc.executebuiltin("PlayMedia(/storage/.kodi/userdata/playlists/music/radio.m3u)")
xbmc.executebuiltin("PlayerControl(Random)")


The % operator is used for string formatting. %s is a format specification for a string variable, the value of which is specified after the % so:
xbmc.executebuiltin("PlayMedia(%s)" % mediafile, True)
is saying replace %s with the value of mediafile.


https://kodi.wiki/view/Built-in_scripting
Using Built-in Functions from python

To run a built-in Kodi function from within a python script, you just need to call executebuiltin() with the function name. For example,

xbmc.executebuiltin('XBMC.RunScript(Q:\Scripts\myscript.py)')

will run the script myscript.py located in the Scripts directory. On 28.11.2011 a optional parameter was added. Normal call will be non-blocking - so it returns before the extraction has been finished. Now it's possible to call built-in functions blocking by doing:

xbmc.executebuiltin('XBMC.RunScript(Q:\Scripts\myscript.py)', True)




lien £$π
xbmc.executebuiltin('ActivateWindow(10502,"plugin://plugin.video.live.streamspro/?

lien F4µ
xbmc.executebuiltin('PlayMedia("plugin://plugin.video.live.streamspro/?url=plugin%3A%2F%2Fplugin.video.f4mTester%2F%3
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

play it again ?? as loop Empty Re: play it again ?? as loop

Post by jujuuj on Wed 5 Dec - 19:23

et si tu fais ça ?
Code:

import xbmc
import time

def PlayAndWait(mediafile):
 xbmc.executebuiltin("PlayMedia(%s)" % mediafile, True)
 while xbmc.Player().isPlaying():
 time.sleep(1.0)

 PlayAndWait("ton-lien")
 PlayAndWait("ton-lien")
 PlayAndWait("ton-lien")
 PlayAndWait("ton-lien")

... faudrait voir SI ça tient pas 24h déjà ?
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

play it again ?? as loop Empty Re: play it again ?? as loop

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum