mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix folder count
+ fix: file count when you have similar folder names + enforce trailing / on track folder paths
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from app.settings import SessionVarKeys, get_flag
|
||||
@@ -61,6 +62,11 @@ class Track:
|
||||
self.last_mod = int(self.last_mod)
|
||||
self.date = int(self.date)
|
||||
|
||||
# add a trailing slash to the folder path
|
||||
# to avoid matching a folder starting with the same name as the root path
|
||||
# eg. .../Music and .../Music Videos
|
||||
self.folder = os.path.join(self.folder, "")
|
||||
|
||||
if self.artists is not None:
|
||||
artists = split_artists(self.artists)
|
||||
new_title = self.title
|
||||
|
||||
Reference in New Issue
Block a user