fix: showing non-existing paths on homepage

This commit is contained in:
cwilvx
2025-06-17 13:10:35 +03:00
parent 7c295f42ad
commit bcee25c6c6
+5 -1
View File
@@ -1,4 +1,5 @@
import os
import pathlib
from swingmusic.db.userdata import PlaylistTable
from swingmusic.lib.home import find_mix
from swingmusic.lib.home.recentlyadded import get_recently_added_playlist
@@ -98,9 +99,12 @@ def create_items(entries: list[TrackLog], limit: int):
if is_home_dir:
folder = os.path.expanduser("~")
if not pathlib.Path(folder).exists():
continue
item = {
"type": "folder",
"hash": entry.type_src,
"hash": folder,
"timestamp": entry.timestamp,
}