Made drag n drop activate just when the playlist is fully loaded.

This commit is contained in:
The Wobbler 2025-02-19 18:57:23 +01:00
parent d8f885959b
commit db191cbc44
3 changed files with 9 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import os
import threading
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QAbstractItemView
from .track import Track
@ -65,6 +66,11 @@ class Playlist:
elif isinstance(self.load_from, list): # if it's created from tracks
self.load_from_paths(self.load_from)
for dock_id in self.views: # enable drag and drop on every view
view = self.views[dock_id]
view.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
def load_from_m3u(self, path):
file = open(path, "r")
m3u = file.read()