mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
Restyle Remove global lists and read everything from the database. (#71)
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from dataclasses import dataclass
|
||||
from os import scandir
|
||||
import time
|
||||
from typing import Tuple
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from app.models import Folder
|
||||
from app.models import Track
|
||||
|
||||
from app import instances
|
||||
from app.models import Folder
|
||||
from app.models import Track
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -27,10 +26,14 @@ def get_folder_track_count(path: str) -> int:
|
||||
def create_folder(dir: Dir) -> Folder:
|
||||
"""Create a single Folder object"""
|
||||
folder = {
|
||||
"name": dir.path.split("/")[-1],
|
||||
"path": dir.path,
|
||||
"is_sym": dir.is_sym,
|
||||
"trackcount": instances.tracks_instance.find_tracks_inside_path_regex(dir.path),
|
||||
"name":
|
||||
dir.path.split("/")[-1],
|
||||
"path":
|
||||
dir.path,
|
||||
"is_sym":
|
||||
dir.is_sym,
|
||||
"trackcount":
|
||||
instances.tracks_instance.find_tracks_inside_path_regex(dir.path),
|
||||
}
|
||||
|
||||
return Folder(folder)
|
||||
|
||||
Reference in New Issue
Block a user