mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
move nav folder-paths into a new component (#66)
* move folder-paths into a new component * move nav playlist title into new components
This commit is contained in:
@@ -6,18 +6,14 @@ import time
|
||||
from io import BytesIO
|
||||
|
||||
import requests
|
||||
from tqdm import tqdm
|
||||
from app import api
|
||||
from app import helpers
|
||||
from app import settings
|
||||
from app.lib import watchdoge
|
||||
from app.lib.populate import Populate
|
||||
from PIL import Image
|
||||
from progress.bar import Bar
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from app.lib.trackslib import create_all_tracks
|
||||
|
||||
|
||||
@helpers.background
|
||||
def reindex_tracks():
|
||||
@@ -44,9 +40,9 @@ def populate():
|
||||
pop = Populate()
|
||||
pop.run()
|
||||
|
||||
tracks = create_all_tracks()
|
||||
api.TRACKS.clear()
|
||||
api.TRACKS.extend(tracks)
|
||||
# tracks = create_all_tracks()
|
||||
# api.TRACKS.clear()
|
||||
# api.TRACKS.extend(tracks)
|
||||
|
||||
|
||||
class getArtistImage:
|
||||
|
||||
@@ -123,9 +123,7 @@ class getFnF:
|
||||
dirs.append(Dir(**dir))
|
||||
elif entry.is_file() and entry.name.endswith((".mp3", ".flac")):
|
||||
files.append(entry.path)
|
||||
s = time()
|
||||
tracks = self.get_tracks(files)
|
||||
print(f"{time() - s} seconds to get tracks")
|
||||
|
||||
folders = [create_folder(dir) for dir in dirs]
|
||||
folders = filter(lambda f: f.trackcount > 0, folders)
|
||||
|
||||
Reference in New Issue
Block a user