Path handling and settings changes
This commit is contained in:
parent
a1c27792ee
commit
a380c01573
|
@ -11,10 +11,7 @@ class Path:
|
|||
return os.path.expanduser("~") + self.subpath
|
||||
|
||||
def get_path(self):
|
||||
if self.path:
|
||||
return f"/{'/'.join(self.path)}"
|
||||
else:
|
||||
return f"/{''.join(self.path)}"
|
||||
return f"/{'/'.join(self.path)}" if self.path else f"/{''.join(self.path)}"
|
||||
|
||||
def get_path_list(self):
|
||||
return self.path
|
||||
|
@ -24,7 +21,7 @@ class Path:
|
|||
self.load_directory()
|
||||
|
||||
def pop_from_path(self):
|
||||
if len(self.path) > 1:
|
||||
try:
|
||||
self.path.pop()
|
||||
|
||||
if not self.go_past_home:
|
||||
|
@ -32,6 +29,8 @@ class Path:
|
|||
self.set_to_home()
|
||||
|
||||
self.load_directory()
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def set_path(self, path):
|
||||
if path == self.get_path():
|
||||
|
|
|
@ -199,7 +199,7 @@ class View(Settings, FileHandler, Launcher, Icon, Path):
|
|||
|
||||
def get_current_sub_path(self):
|
||||
path = self.get_path()
|
||||
home = self.get_home() + "/"
|
||||
home = f"{self.get_home()}/"
|
||||
return path.replace(home, "")
|
||||
|
||||
def get_end_of_path(self):
|
||||
|
|
|
@ -59,7 +59,7 @@ class Settings:
|
|||
subpath = settings["base_of_home"]
|
||||
HIDE_HIDDEN_FILES = True if settings["hide_hidden_files"] == "true" else False
|
||||
FFMPG_THUMBNLR = FFMPG_THUMBNLR if settings["thumbnailer_path"] == "" else settings["thumbnailer_path"]
|
||||
go_past_home = True if settings["go_past_home"] == "true" else False
|
||||
go_past_home = True if settings["go_past_home"] == "" else settings["go_past_home"]
|
||||
lock_folder = True if settings["lock_folder"] == "true" else False
|
||||
locked_folders = settings["locked_folders"].split("::::")
|
||||
mplayer_options = settings["mplayer_options"].split()
|
||||
|
|
Loading…
Reference in New Issue