Compare commits
2 commits
1efa46b814
...
67b67d87fa
Author | SHA1 | Date | |
---|---|---|---|
67b67d87fa | |||
7bc8cd1bee |
2 changed files with 23 additions and 0 deletions
|
@ -5,6 +5,7 @@ import socket
|
||||||
import collections
|
import collections
|
||||||
import time
|
import time
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
import mpv
|
import mpv
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ class Sync(Thread):
|
||||||
ready = False
|
ready = False
|
||||||
destination = "255.255.255.255"
|
destination = "255.255.255.255"
|
||||||
reload_check = None
|
reload_check = None
|
||||||
|
_pos = None
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.is_main = kwargs.get('mode', 'main') == 'main'
|
self.is_main = kwargs.get('mode', 'main') == 'main'
|
||||||
|
@ -91,6 +93,14 @@ class Sync(Thread):
|
||||||
self.send_position_local()
|
self.send_position_local()
|
||||||
elif self.ready:
|
elif self.ready:
|
||||||
self.adjust_position()
|
self.adjust_position()
|
||||||
|
if self._pos != self.mpv.playlist_current_pos:
|
||||||
|
self._pos = self.mpv.playlist_current_pos
|
||||||
|
if self._pos != -1:
|
||||||
|
try:
|
||||||
|
track = self.mpv.playlist[self._pos]
|
||||||
|
logger.error("%s %s", datetime.now(), track["filename"])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def reload_playlist(self):
|
def reload_playlist(self):
|
||||||
if not self.reload_check:
|
if not self.reload_check:
|
||||||
|
|
13
sax.py
13
sax.py
|
@ -13,6 +13,19 @@ project = KDEnliveProject(root)
|
||||||
long_wav = "Soon_Kim_Long_Reverb_Only2.wav"
|
long_wav = "Soon_Kim_Long_Reverb_Only2.wav"
|
||||||
nois_wav = "Soon_Kim_Noise.wav"
|
nois_wav = "Soon_Kim_Noise.wav"
|
||||||
reverb_wav = "Soon_Kim_Short_Reverb_Mix2.wav"
|
reverb_wav = "Soon_Kim_Short_Reverb_Mix2.wav"
|
||||||
|
'''
|
||||||
|
i = item.models.Item.objects.get(data__title='Soon_Kim_Long_Reverb_Only2')
|
||||||
|
i.files.all()[0].data.path
|
||||||
|
'/srv/pandora/data/media/6b/44/16/3f2905e886/data.wav'
|
||||||
|
|
||||||
|
i = item.models.Item.objects.get(data__title='Soon_Kim_Short_Reverb_Mix2')
|
||||||
|
i.files.all()[0].data.path
|
||||||
|
'/srv/pandora/data/media/ee/e0/04/d4ab42c3de/data.wav'
|
||||||
|
|
||||||
|
i = item.models.Item.objects.get(data__title='Soon_Kim_Noise')
|
||||||
|
i.files.all()[0].data.path
|
||||||
|
'/srv/pandora/data/media/84/88/87/d2fb2e2dc2/data.wav'
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
long = {
|
long = {
|
||||||
|
|
Loading…
Reference in a new issue