mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
SpiffyTites: add description to imgur.albumTemplate
This commit is contained in:
parent
2ac00bdb40
commit
4a7e9912c0
@ -218,7 +218,7 @@ Example output:
|
||||
|
||||
Default value
|
||||
|
||||
`^ {%if section %}[{{section}}] {% endif -%}{%- if title -%}{{title}} :: {% endif %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
`^ {%if section %}[{{section}}] {% endif -%}{%- if title -%}{{title}} :: {% endif %}{%- if description -%}{{description}} :: {% endif %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
|
||||
Example output:
|
||||
|
||||
|
@ -463,9 +463,9 @@ conf.registerChannelValue(
|
||||
"albumTemplate",
|
||||
registry.String(
|
||||
"^ {%if section %}[{{section}}] {% endif %}{% if title %}{{title}} :: {% endif"
|
||||
" %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not"
|
||||
" sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe"
|
||||
" for work{% endif %}",
|
||||
" %}{%- if description -%}{{description}} :: {% endif %}{{image_count}} images"
|
||||
" :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{%"
|
||||
" elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}",
|
||||
_("""imgur album template"""),
|
||||
),
|
||||
)
|
||||
|
@ -408,7 +408,10 @@ class SpiffyTitles(callbacks.Plugin):
|
||||
log.debug("SpiffyTitles: attempt #%s for %s" % (retries, url))
|
||||
is_redirect = False
|
||||
try:
|
||||
headers = self.get_headers(channel)
|
||||
if retries > 1:
|
||||
headers = self.get_headers(channel)
|
||||
else:
|
||||
headers = {}
|
||||
log.debug("SpiffyTitles: requesting %s" % (url))
|
||||
with requests.get(
|
||||
url,
|
||||
@ -1587,6 +1590,7 @@ class SpiffyTitles(callbacks.Plugin):
|
||||
"view_count": "{:,}".format(album["views"]),
|
||||
"image_count": "{:,}".format(album["images_count"]),
|
||||
"nsfw": album.get("nsfw"),
|
||||
"description": album.get("description"),
|
||||
}
|
||||
)
|
||||
return compiled_template
|
||||
|
Loading…
x
Reference in New Issue
Block a user