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