Skip to content

Commit 5bad11e

Browse files
authored
[DONE] Improve RSS Feeds (#1215)
RSS feed improvements suggested in issue #1108
1 parent 370f887 commit 5bad11e

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

pod/video/feeds.py

+2-16
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from django.contrib.sites.shortcuts import get_current_site
1010
from django.urls import reverse
1111
from django.shortcuts import get_object_or_404
12-
from django.utils.html import format_html
1312

1413
from .context_processors import get_available_videos
1514

@@ -189,11 +188,10 @@ def items(self, obj):
189188

190189
def item_title(self, item) -> str:
191190
sub = re.sub(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", "", item.title)
192-
return "%s | %s" % (item.owner.get_full_name(), sub)
191+
return sub
193192

194193
def item_link(self, item) -> str:
195194
url = "".join([self.author_link, item.get_absolute_url()])
196-
url += "?is_iframe=true"
197195
return url
198196

199197
def item_author_name(self, item):
@@ -212,20 +210,8 @@ def item_author_link(self, item) -> str:
212210
)
213211

214212
def item_description(self, item) -> str:
215-
thumbnail_url = "".join([self.prefix, item.get_thumbnail_url().replace("//", "")])
216-
title = re.sub(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", "", item.title)
217-
img = format_html(
218-
'<img style="max-width:100px" '
219-
'src="%s" alt="%s" loading="lazy"/>'
220-
% (
221-
thumbnail_url,
222-
title.replace("{", "").replace("}", "").replace('"', "'"),
223-
)
224-
)
225-
description = "%s<br/>" % img
226-
sub = re.sub(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", "", item.description)
227213
# use re sub to remove Control characters are not supported in XML 1.0
228-
description += sub # item.description
214+
description = re.sub(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", "", item.description) # item.description
229215
description += "<br/> %s: %s" % (_("Duration"), item.duration_in_time)
230216
return description
231217

0 commit comments

Comments
 (0)