summaryrefslogtreecommitdiffstats
path: root/gallery_dl/formatter.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-06-06 02:40:15 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-06-06 02:40:15 -0400
commit1c28712d865e30ed752988ba0b6944882250b665 (patch)
treee5d5083a418f5c19616cb940c090c2dfb646d3cb /gallery_dl/formatter.py
parent6e662211019a89caec44de8a57c675872b0b5498 (diff)
New upstream version 1.27.0.upstream/1.27.0
Diffstat (limited to 'gallery_dl/formatter.py')
-rw-r--r--gallery_dl/formatter.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/gallery_dl/formatter.py b/gallery_dl/formatter.py
index b83cf21..0b212d5 100644
--- a/gallery_dl/formatter.py
+++ b/gallery_dl/formatter.py
@@ -243,13 +243,12 @@ class TemplateFStringFormatter(FStringFormatter):
def parse_field_name(field_name):
+ if field_name[0] == "'":
+ return "_lit", (operator.itemgetter(field_name[1:-1]),)
+
first, rest = _string.formatter_field_name_split(field_name)
funcs = []
- if first[0] == "'":
- funcs.append(operator.itemgetter(first[1:-1]))
- first = "_lit"
-
for is_attr, key in rest:
if is_attr:
func = operator.attrgetter