mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
fix: showing non-existing paths on homepage
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import pathlib
|
||||||
from swingmusic.db.userdata import PlaylistTable
|
from swingmusic.db.userdata import PlaylistTable
|
||||||
from swingmusic.lib.home import find_mix
|
from swingmusic.lib.home import find_mix
|
||||||
from swingmusic.lib.home.recentlyadded import get_recently_added_playlist
|
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:
|
if is_home_dir:
|
||||||
folder = os.path.expanduser("~")
|
folder = os.path.expanduser("~")
|
||||||
|
|
||||||
|
if not pathlib.Path(folder).exists():
|
||||||
|
continue
|
||||||
|
|
||||||
item = {
|
item = {
|
||||||
"type": "folder",
|
"type": "folder",
|
||||||
"hash": entry.type_src,
|
"hash": folder,
|
||||||
"timestamp": entry.timestamp,
|
"timestamp": entry.timestamp,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user