rename playlists
This commit is contained in:
parent
47f4359cef
commit
ea604e719f
@ -57,11 +57,11 @@ config.ini db/
|
||||
- ~~when table is focused, start typing to match against the primary sort column~~
|
||||
- ~~remember last window size~~
|
||||
- ~~automatically fix broken config before loading app (new config options added)~~
|
||||
- ~~allow spectrum analyzer to fall when playback stops or song is paused~~
|
||||
- jump to currently playing song - how do i make this work regardless of current sort params?
|
||||
- playlist autoexporting
|
||||
- .wav, .ogg, .flac convertor
|
||||
- playback modes (normal, repeat playlist, repeat 1 song, shuffle)
|
||||
- autoplay next song in all modes
|
||||
- allow spectrum analyzer to fall when playback stops or song is paused
|
||||
- ability to delete playlist
|
||||
- automatic "radio" based on artist or genre
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PyQt5.QtWidgets import QAction, QListWidget, QMenu, QMessageBox, QTreeWidget, QTreeWidgetItem
|
||||
from PyQt5.QtWidgets import QAction, QInputDialog, QListWidget, QMenu, QMessageBox, QTreeWidget, QTreeWidgetItem
|
||||
from PyQt5.QtCore import pyqtSignal, Qt, QPoint
|
||||
import DBA
|
||||
from logging import debug
|
||||
@ -71,8 +71,19 @@ class PlaylistsPane(QTreeWidget):
|
||||
window.exec_()
|
||||
|
||||
def rename_playlist(self, *args):
|
||||
# TODO: implement this
|
||||
pass
|
||||
"""
|
||||
Asks user for input
|
||||
Renames selected playlist based on user input
|
||||
"""
|
||||
text, ok = QInputDialog.getText(self, "Rename playlist", "New name: ")
|
||||
|
||||
if len(text) > 64:
|
||||
QMessageBox.warning(self, "WARNING", "Name must not exceed 64 characters")
|
||||
return
|
||||
if ok:
|
||||
with DBA.DBAccess() as db:
|
||||
db.execute('UPDATE playlist SET name = ? WHERE id = ?;', (text, self.playlist_db_id_choice))
|
||||
self.reload_playlists()
|
||||
|
||||
def delete_playlist(self, *args):
|
||||
"""Deletes a playlist"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user