mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Using user titles for folder RSS feeds.
This commit is contained in:
parent
9b81b7fcc7
commit
a2866ac7e3
1 changed files with 12 additions and 3 deletions
|
@ -1248,15 +1248,24 @@ def folder_rss_feed(request, user_id, secret_token, unread_filter, folder_slug):
|
|||
|
||||
for story in stories:
|
||||
feed = Feed.get_by_id(story['story_feed_id'])
|
||||
feed_title = feed.feed_title if feed else ""
|
||||
try:
|
||||
usersub = UserSubscription.objects.get(user=user, feed=feed)
|
||||
if usersub.user_title:
|
||||
feed_title = usersub.user_title
|
||||
except UserSubscription.DoesNotExist:
|
||||
usersub = None
|
||||
|
||||
story_content = """%s<br><br><img src="//%s/rss_feeds/icon/%s" width="16" height="16"> %s""" % (
|
||||
smart_str(story['story_content']),
|
||||
Site.objects.get_current().domain,
|
||||
story['story_feed_id'],
|
||||
feed.feed_title if feed else ""
|
||||
feed_title,
|
||||
)
|
||||
story_content = re.sub(r'[\x00-\x08\x0B-\x0C\x0E-\x1F]', '', story_content)
|
||||
# story_content = re.sub(r'[\x00-\x08\x0B-\x0C\x0E-\x1F]', '', story_content)
|
||||
story_title = "%s%s" % (("%s: " % feed_title) if feed_title else "", story['story_title'])
|
||||
story_data = {
|
||||
'title': "%s%s" % (("%s: " % feed.feed_title) if feed else "", story['story_title']),
|
||||
'title': story_title,
|
||||
'link': story['story_permalink'],
|
||||
'description': story_content,
|
||||
'categories': story['story_tags'],
|
||||
|
|
Loading…
Add table
Reference in a new issue