Make submit button play url in MPV
This commit is contained in:
parent
8a3b42dea3
commit
8525506744
@ -12,7 +12,7 @@ class MPV(next_MPV):
|
|||||||
super().__init__(debug=True)
|
super().__init__(debug=True)
|
||||||
|
|
||||||
def play(self, url):
|
def play(self, url):
|
||||||
self.command("loadfile", path)
|
self.command("loadfile", url)
|
||||||
self.set_property("pause", False)
|
self.set_property("pause", False)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import remi.gui as gui, random, os, time
|
import remi.gui as gui, random, os, time
|
||||||
from remi import start, App
|
from remi import start, App
|
||||||
from threading import Timer
|
from threading import Timer
|
||||||
|
from mpv_control import mpv
|
||||||
|
|
||||||
class namespace(object): pass
|
class namespace(object): pass
|
||||||
|
|
||||||
@ -71,10 +72,6 @@ class MyApp(App):
|
|||||||
['3', 'spis meg', "90:01"],
|
['3', 'spis meg', "90:01"],
|
||||||
['3', "Slidervalue: %s" % self.playback.slider.get_value(), "0:00"]])
|
['3', "Slidervalue: %s" % self.playback.slider.get_value(), "0:00"]])
|
||||||
|
|
||||||
mpv.step()
|
|
||||||
mpv.get_queue()
|
|
||||||
mpv.position()
|
|
||||||
|
|
||||||
Timer(1, self.mainLoop).start()
|
Timer(1, self.mainLoop).start()
|
||||||
def playback_play(self): pass
|
def playback_play(self): pass
|
||||||
def playback_pause(self): pass
|
def playback_pause(self): pass
|
||||||
@ -84,6 +81,7 @@ class MyApp(App):
|
|||||||
value = self.input.field.get_text()
|
value = self.input.field.get_text()
|
||||||
|
|
||||||
print(value)
|
print(value)
|
||||||
|
mpv.play(value)
|
||||||
self.input.field.set_text("")
|
self.input.field.set_text("")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user