forked from Wobbl/Wobuzz
Implemented playing of different playlist, but its buggy.
This commit is contained in:
parent
744d050bac
commit
2b1310990a
3 changed files with 23 additions and 7 deletions
|
@ -68,8 +68,6 @@ class PlaylistView(QTreeWidget):
|
|||
|
||||
self.itemDropped.emit(self, items)
|
||||
|
||||
self.on_user_sort()
|
||||
|
||||
else:
|
||||
items = self.app.gui.dropped
|
||||
|
||||
|
@ -78,6 +76,8 @@ class PlaylistView(QTreeWidget):
|
|||
for item in items:
|
||||
track = item.track
|
||||
|
||||
self.playlist.tracks.append(track)
|
||||
|
||||
track_item = TrackItem(track, i, self)
|
||||
|
||||
i += 1
|
||||
|
@ -86,6 +86,8 @@ class PlaylistView(QTreeWidget):
|
|||
|
||||
event.accept()
|
||||
|
||||
self.on_user_sort()
|
||||
|
||||
def dragEnterEvent(self, event):
|
||||
# store dragged items in gui.dropped, so the other playlist can receive it
|
||||
if event.source() == self:
|
||||
|
@ -106,6 +108,9 @@ class PlaylistView(QTreeWidget):
|
|||
i += 1
|
||||
|
||||
def on_track_activation(self, item, column):
|
||||
if not self.app.player.current_playlist == self.playlist:
|
||||
self.app.player.current_playlist = self.playlist
|
||||
|
||||
index = self.indexOfTopLevelItem(item)
|
||||
self.app.player.play_track_in_playlist(index)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue