Add episode webpage link to shownotes
This commit is contained in:
parent
ab311a20c4
commit
532a99edea
3 changed files with 8 additions and 0 deletions
1
main.py
1
main.py
|
@ -335,6 +335,7 @@ class gPotherSide:
|
||||||
'title': episode.trimmed_title,
|
'title': episode.trimmed_title,
|
||||||
'description': util.remove_html_tags(episode.description),
|
'description': util.remove_html_tags(episode.description),
|
||||||
'metadata': ' | '.join(self._format_metadata(episode)),
|
'metadata': ' | '.join(self._format_metadata(episode)),
|
||||||
|
'link': episode.link if episode.link != episode.url else '',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _format_metadata(self, episode):
|
def _format_metadata(self, episode):
|
||||||
|
|
|
@ -21,12 +21,14 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
import 'common/constants.js' as Constants
|
import 'common/constants.js' as Constants
|
||||||
|
import 'icons/icons.js' as Icons
|
||||||
|
|
||||||
SlidePage {
|
SlidePage {
|
||||||
id: detailPage
|
id: detailPage
|
||||||
|
|
||||||
property int episode_id
|
property int episode_id
|
||||||
property string title
|
property string title
|
||||||
|
property string link
|
||||||
property bool ready: false
|
property bool ready: false
|
||||||
|
|
||||||
PBusyIndicator {
|
PBusyIndicator {
|
||||||
|
@ -38,6 +40,7 @@ SlidePage {
|
||||||
py.call('main.show_episode', [episode_id], function (episode) {
|
py.call('main.show_episode', [episode_id], function (episode) {
|
||||||
descriptionLabel.text = episode.description;
|
descriptionLabel.text = episode.description;
|
||||||
metadataLabel.text = episode.metadata;
|
metadataLabel.text = episode.metadata;
|
||||||
|
detailPage.link = episode.link;
|
||||||
detailPage.ready = true;
|
detailPage.ready = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -58,6 +61,9 @@ SlidePage {
|
||||||
|
|
||||||
SlidePageHeader {
|
SlidePageHeader {
|
||||||
title: 'Shownotes'
|
title: 'Shownotes'
|
||||||
|
icon: (detailPage.link != '') ? Icons.link : ''
|
||||||
|
iconText: 'Website'
|
||||||
|
onIconClicked: Qt.openUrlExternally(detailPage.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -18,3 +18,4 @@ var loop_alt2 = '\ue033';
|
||||||
var folder = '\ue065';
|
var folder = '\ue065';
|
||||||
var magnifying_glass = '\ue074';
|
var magnifying_glass = '\ue074';
|
||||||
var cog = '\u2699';
|
var cog = '\u2699';
|
||||||
|
var link = '\ue077';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue