mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 18:22:53 +01:00
Implemented Rekordbox core base
This commit is contained in:
1 parent
6e24f5ef1d
commit
4592e13228
18 files changed
+2170
-6
No files matched your search
@@ -40,6 +40,30 @@ def open_library(path: Path):
|
||||
return driver_for(path).open(path)
|
||||
|
||||
|
||||
def describe(path: Path) -> dict:
|
||||
"""Describe a library path using whichever adapter recognises it.
|
||||
|
||||
Used for the picker's "last opened" shortcut, which must still render when
|
||||
the file has since been moved or deleted — so an unrecognised path gets a
|
||||
plain description with ``exists`` false rather than an error.
|
||||
"""
|
||||
try:
|
||||
return driver_for(path).describe(path)
|
||||
except (LibraryNotSupported, OSError):
|
||||
pass
|
||||
try:
|
||||
exists = path.is_file()
|
||||
except OSError:
|
||||
exists = False
|
||||
return {
|
||||
"path": str(path),
|
||||
"label": path.name,
|
||||
"version": None,
|
||||
"modified": None,
|
||||
"exists": exists,
|
||||
}
|
||||
|
||||
|
||||
def detect_all() -> list:
|
||||
"""Every library found in the platforms' default install locations."""
|
||||
out: list = []
|
||||
|
||||
Reference in new issue
Block a user