Merge remote-tracking branch 'origin/sharedplaylists' into sharedplaylist
This commit is contained in:
commit
03bb31eefa
@ -411,7 +411,13 @@ class SyncplayClient(object):
|
|||||||
self.userlist.currentUser.setFile(filename, duration, size, path)
|
self.userlist.currentUser.setFile(filename, duration, size, path)
|
||||||
self.sendFile()
|
self.sendFile()
|
||||||
|
|
||||||
# TODO: execute changeToPlaylistIndex if file found in playlist
|
# TODO: Fix for GUIDS
|
||||||
|
try:
|
||||||
|
index = self._playlist.index(filename)
|
||||||
|
self.changeToPlaylistIndex(index)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def changeToPlaylistIndex(self, index, username = None):
|
def changeToPlaylistIndex(self, index, username = None):
|
||||||
if self._playlistIndex == index:
|
if self._playlistIndex == index:
|
||||||
@ -421,8 +427,7 @@ class SyncplayClient(object):
|
|||||||
self._protocol.setPlaylistIndex(index)
|
self._protocol.setPlaylistIndex(index)
|
||||||
elif username != self.getUsername():
|
elif username != self.getUsername():
|
||||||
# TODO: Display info about playlist file change
|
# TODO: Display info about playlist file change
|
||||||
|
try:
|
||||||
if index in self._playlist:
|
|
||||||
filename = self._playlist[index]
|
filename = self._playlist[index]
|
||||||
# TODO: Find Path
|
# TODO: Find Path
|
||||||
path = 'https://www.youtube.com/watch?v=0iXX5h6Hxxs'
|
path = 'https://www.youtube.com/watch?v=0iXX5h6Hxxs'
|
||||||
@ -431,6 +436,8 @@ class SyncplayClient(object):
|
|||||||
else:
|
else:
|
||||||
# TODO: Notify user about file not found
|
# TODO: Notify user about file not found
|
||||||
pass
|
pass
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
def changePlaylist(self, files, username = None):
|
def changePlaylist(self, files, username = None):
|
||||||
self._playlist = files
|
self._playlist = files
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user