removed dots from the beginning of files and paths tu unhide file system elements on linux/unix like systems
This commit is contained in:
parent
cc16c3f26e
commit
a5c8e6f051
@ -1,6 +1,16 @@
|
||||
import os.path
|
||||
import logging
|
||||
|
||||
UNHIDE_CHAR = ','
|
||||
|
||||
def unhide(part: str):
|
||||
if len(part) == 0:
|
||||
return ""
|
||||
if part[0] == ".":
|
||||
part[0] = UNHIDE_CHAR
|
||||
|
||||
return part
|
||||
|
||||
|
||||
class UrlPath:
|
||||
def __init__(self, database, logger: logging.Logger, genre: str):
|
||||
@ -25,7 +35,7 @@ class UrlPath:
|
||||
self.get_album(row))
|
||||
|
||||
def escape_part(self, part: str):
|
||||
return part.replace("/", " ")
|
||||
return unhide(part.replace("/", " "))
|
||||
|
||||
def get_genre(self):
|
||||
return self.escape_part(self.genre)
|
||||
|
Loading…
Reference in New Issue
Block a user