sane-tag-music: fix sandboxing to support renaming
This commit is contained in:
@@ -230,6 +230,7 @@ in
|
||||
"sane-scripts.tag-music".sandbox = {
|
||||
method = "bwrap";
|
||||
autodetectCliPaths = "existing";
|
||||
whitelistPwd = true; # for music renaming
|
||||
};
|
||||
|
||||
"sane-scripts.vpn".fs = lib.foldl'
|
||||
|
@@ -95,6 +95,8 @@ logger = logging.getLogger(__name__)
|
||||
kks = pykakasi.kakasi()
|
||||
|
||||
IMAGE_EXTENSIONS = [
|
||||
# "bmp", # Writing of BMP files is not yet supported
|
||||
"gif",
|
||||
"jpg",
|
||||
"jpeg",
|
||||
"png",
|
||||
@@ -109,6 +111,7 @@ def maybe_romanize(a: str) -> str|None:
|
||||
if a == "お握り": return "onigiri"
|
||||
if a == "存流": return "ARU"
|
||||
if a.lower() == "жужжалка": return "zhuzhzhalka" # Russian
|
||||
if a == "♞": return "knight"
|
||||
if a == "+": return "."
|
||||
if a == "&": return "and"
|
||||
|
||||
@@ -370,6 +373,7 @@ class Tags:
|
||||
return os.path.join(artist, filename)
|
||||
|
||||
if not (artist and album and title):
|
||||
logger.warning(f"missing artist/album/title after cleaning path: {self} ({artist!r}, {album!r}, {title!r}")
|
||||
return None
|
||||
|
||||
if self.producer:
|
||||
|
Reference in New Issue
Block a user