mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
fix: errors raised by Pycharm
This commit is contained in:
@@ -90,23 +90,9 @@ class SQLitePlaylistMethods:
|
||||
@staticmethod
|
||||
def add_item_to_json_list(playlist_id: int, field: str, items: list[str]):
|
||||
"""
|
||||
Adds a string item to a json dumped list using a playlist id and field name. Takes the playlist ID, a field name, an item to add to the field, and an error to raise if the item is already in the field.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
playlist_id : int
|
||||
The ID of the playlist to add the item to.
|
||||
field : str
|
||||
The field in the database that you want to add the item to.
|
||||
item : str
|
||||
The item to add to the list.
|
||||
error : Exception
|
||||
The error to raise if the item is already in the list.
|
||||
|
||||
Returns
|
||||
-------
|
||||
A list of strings.
|
||||
|
||||
Adds a string item to a json dumped list using a playlist id and field name.
|
||||
Takes the playlist ID, a field name,
|
||||
an item to add to the field, and an error to raise if the item is already in the field.
|
||||
"""
|
||||
sql = f"SELECT {field} FROM playlists WHERE id = ?"
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class SQLiteTrackMethods:
|
||||
cur.execute("DELETE FROM tracks WHERE filepath=?", (filepath,))
|
||||
|
||||
@staticmethod
|
||||
def remove_tracks_by_folders(folders: list[str]):
|
||||
def remove_tracks_by_folders(folders: set[str]):
|
||||
sql = "DELETE FROM tracks WHERE folder = ?"
|
||||
|
||||
with SQLiteManager() as cur:
|
||||
|
||||
Reference in New Issue
Block a user