From 5224565642c6d9ccfa059a653d63d310a2889d95 Mon Sep 17 00:00:00 2001 From: auouymous Date: Sat, 29 Apr 2023 22:11:27 -0600 Subject: [PATCH] Always show released time in shownotes. --- src/gpodder/gtkui/shownotes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gpodder/gtkui/shownotes.py b/src/gpodder/gtkui/shownotes.py index a906e835..94dba29f 100644 --- a/src/gpodder/gtkui/shownotes.py +++ b/src/gpodder/gtkui/shownotes.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # +import datetime import html import logging from urllib.parse import urlparse @@ -201,7 +202,8 @@ class gPodderShownotesText(gPodderShownotes): heading = episode.title subheading = _('from %s') % (episode.channel.title) details = self.details_fmt % { - 'date': util.format_date(episode.published), + 'date': '{} {}'.format(datetime.datetime.fromtimestamp(episode.published).strftime('%H:%M'), + util.format_date(episode.published)), 'size': util.format_filesize(episode.file_size, digits=1) if episode.file_size > 0 else "-", 'duration': episode.get_play_info_string()} @@ -342,7 +344,8 @@ class gPodderShownotesHTML(gPodderShownotes): heading = '

%s

' % html.escape(episode.title) subheading = _('from %s') % html.escape(episode.channel.title) details = '%s' % html.escape(self.details_fmt % { - 'date': util.format_date(episode.published), + 'date': '{} {}'.format(datetime.datetime.fromtimestamp(episode.published).strftime('%H:%M'), + util.format_date(episode.published)), 'size': util.format_filesize(episode.file_size, digits=1) if episode.file_size > 0 else "-", 'duration': episode.get_play_info_string()})