22
33import structlog
44from PySide6 .QtCore import QSettings
5- from src .core .constants import TS_FOLDER_NAME
65from src .core .enums import SettingItems
76from src .core .library .alchemy .library import LibraryStatus
87
@@ -14,27 +13,26 @@ class DriverMixin:
1413
1514 def evaluate_path (self , open_path : str | None ) -> LibraryStatus :
1615 """Check if the path of library is valid."""
17- library_path : Path | None = None
16+ storage_path : Path | None = None
1817 if open_path :
19- library_path = Path (open_path )
20- if not library_path .exists ():
18+ storage_path = Path (open_path )
19+ if not storage_path .exists ():
2120 logger .error ("Path does not exist." , open_path = open_path )
2221 return LibraryStatus (success = False , message = "Path does not exist." )
2322 elif self .settings .value (
2423 SettingItems .START_LOAD_LAST , defaultValue = True , type = bool
2524 ) and self .settings .value (SettingItems .LAST_LIBRARY ):
26- library_path = Path (str (self .settings .value (SettingItems .LAST_LIBRARY )))
27- if not ( library_path / TS_FOLDER_NAME ) .exists ():
25+ storage_path = Path (str (self .settings .value (SettingItems .LAST_LIBRARY )))
26+ if not storage_path .exists ():
2827 logger .error (
2928 "TagStudio folder does not exist." ,
30- library_path = library_path ,
31- ts_folder = TS_FOLDER_NAME ,
29+ storage_path = storage_path ,
3230 )
3331 self .settings .setValue (SettingItems .LAST_LIBRARY , "" )
3432 # dont consider this a fatal error, just skip opening the library
35- library_path = None
33+ storage_path = None
3634
3735 return LibraryStatus (
3836 success = True ,
39- library_path = library_path ,
37+ storage_path = storage_path ,
4038 )
0 commit comments