mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
use scandir to read dir content on file explorer (#64)
This commit is contained in:
@@ -46,7 +46,7 @@ class Track:
|
||||
self.length = tags["length"]
|
||||
self.genre = tags["genre"]
|
||||
self.bitrate = tags["bitrate"]
|
||||
|
||||
|
||||
try:
|
||||
self.image = tags["image"]
|
||||
except KeyError:
|
||||
@@ -102,11 +102,9 @@ class Album:
|
||||
|
||||
def get_p_track(ptrack):
|
||||
for track in api.TRACKS:
|
||||
if (
|
||||
track.title == ptrack["title"]
|
||||
and track.artists == ptrack["artists"]
|
||||
and ptrack["album"] == track.album
|
||||
):
|
||||
if (track.title == ptrack["title"]
|
||||
and track.artists == ptrack["artists"]
|
||||
and ptrack["album"] == track.album):
|
||||
return track
|
||||
|
||||
|
||||
@@ -191,9 +189,11 @@ class Folder:
|
||||
name: str
|
||||
path: str
|
||||
trackcount: int
|
||||
is_sym: bool = False
|
||||
"""The number of tracks in the folder"""
|
||||
|
||||
def __init__(self, data) -> None:
|
||||
self.name = data["name"]
|
||||
self.path = data["path"]
|
||||
self.is_sym = data["is_sym"]
|
||||
self.trackcount = data["trackcount"]
|
||||
|
||||
Reference in New Issue
Block a user