mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-28 22:41:08 -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
|
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:
|
Example output:
|
||||||
|
|
||||||
|
@ -463,9 +463,9 @@ conf.registerChannelValue(
|
|||||||
"albumTemplate",
|
"albumTemplate",
|
||||||
registry.String(
|
registry.String(
|
||||||
"^ {%if section %}[{{section}}] {% endif %}{% if title %}{{title}} :: {% endif"
|
"^ {%if section %}[{{section}}] {% endif %}{% if title %}{{title}} :: {% endif"
|
||||||
" %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not"
|
" %}{%- if description -%}{{description}} :: {% endif %}{{image_count}} images"
|
||||||
" sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe"
|
" :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{%"
|
||||||
" for work{% endif %}",
|
" elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}",
|
||||||
_("""imgur album template"""),
|
_("""imgur album template"""),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -408,7 +408,10 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
log.debug("SpiffyTitles: attempt #%s for %s" % (retries, url))
|
log.debug("SpiffyTitles: attempt #%s for %s" % (retries, url))
|
||||||
is_redirect = False
|
is_redirect = False
|
||||||
try:
|
try:
|
||||||
headers = self.get_headers(channel)
|
if retries > 1:
|
||||||
|
headers = self.get_headers(channel)
|
||||||
|
else:
|
||||||
|
headers = {}
|
||||||
log.debug("SpiffyTitles: requesting %s" % (url))
|
log.debug("SpiffyTitles: requesting %s" % (url))
|
||||||
with requests.get(
|
with requests.get(
|
||||||
url,
|
url,
|
||||||
@ -1587,6 +1590,7 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
"view_count": "{:,}".format(album["views"]),
|
"view_count": "{:,}".format(album["views"]),
|
||||||
"image_count": "{:,}".format(album["images_count"]),
|
"image_count": "{:,}".format(album["images_count"]),
|
||||||
"nsfw": album.get("nsfw"),
|
"nsfw": album.get("nsfw"),
|
||||||
|
"description": album.get("description"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return compiled_template
|
return compiled_template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user