From ef67f985898e3ae708018771ada4756f7c698eec Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Thu, 11 Feb 2021 12:10:37 +0200 Subject: [PATCH 1/8] Rename QML elements due to name clash with new Silica elements --- qml/EpisodeItem.qml | 4 ++-- qml/GpodderIconContextMenu.qml | 42 +++++++++++++++++++++++++++++++++ qml/GpodderIconMenuItem.qml | 43 ++++++++++++++++++++++++++++++++++ qml/PlayerPage.qml | 10 ++++---- qml/PodcastItem.qml | 2 +- 5 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 qml/GpodderIconContextMenu.qml create mode 100644 qml/GpodderIconMenuItem.qml diff --git a/qml/EpisodeItem.qml b/qml/EpisodeItem.qml index 71f8bed..aa7188b 100644 --- a/qml/EpisodeItem.qml +++ b/qml/EpisodeItem.qml @@ -65,9 +65,9 @@ ListItem { onClicked: openMenu() menu: Component { - IconContextMenu { + GpodderIconContextMenu { IconMenuItem { - text: episodeItem.isPlaying ? qsTr("Pause") : qsTr("Play") + text: episodeItem.isPlaying ? qsTr('Pause') : qsTr('Play') icon.source: 'image://theme/icon-m-' + (episodeItem.isPlaying ? 'pause' : 'play') onClicked: { if (episodeItem.isPlaying) { diff --git a/qml/GpodderIconContextMenu.qml b/qml/GpodderIconContextMenu.qml new file mode 100644 index 0000000..1741ca0 --- /dev/null +++ b/qml/GpodderIconContextMenu.qml @@ -0,0 +1,42 @@ + +/** + * + * gPodder QML UI Reference Implementation + * Copyright (c) 2013, 2014, Thomas Perl + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + */ + +import QtQuick 2.0 +import QtQuick.Layouts 1.1 +import Sailfish.Silica 1.0 + +ContextMenu { + default property alias children: container.children + + Item { + height: Theme.itemSizeMedium + width: parent.width + Row { + id: container + + anchors { + verticalCenter: parent.verticalCenter + horizontalCenter: parent.horizontalCenter + leftMargin: Theme.horizontalPageMargin + rightMargin: Theme.horizontalPageMargin + } + } + } +} diff --git a/qml/GpodderIconMenuItem.qml b/qml/GpodderIconMenuItem.qml new file mode 100644 index 0000000..698f273 --- /dev/null +++ b/qml/GpodderIconMenuItem.qml @@ -0,0 +1,43 @@ + +/** + * + * gPodder QML UI Reference Implementation + * Copyright (c) 2013, 2014, Thomas Perl + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + + +IconButton { + property alias text: lbl.text + + Label { + id: lbl + opacity: parent.down + Behavior on opacity { + FadeAnimation {} + } + + anchors { + verticalCenter: parent.top + horizontalCenter: parent.horizontalCenter + } + + color: Theme.highlightColor + font.pixelSize: Theme.fontSizeTiny + } +} diff --git a/qml/PlayerPage.qml b/qml/PlayerPage.qml index 86806dc..c95ae48 100644 --- a/qml/PlayerPage.qml +++ b/qml/PlayerPage.qml @@ -188,7 +188,7 @@ Page { height: Theme.itemSizeLarge spacing: Theme.paddingMedium - IconMenuItem { + GpodderIconMenuItem { text: qsTr("- 1 min") icon.source: 'image://theme/icon-m-previous' @@ -198,7 +198,7 @@ Page { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("- 10 sec") icon.source: 'image://theme/icon-m-previous' GPodderAutoFire { @@ -207,7 +207,7 @@ Page { } } - IconMenuItem { + GpodderIconMenuItem { text: player.isPlaying ? qsTr("Pause") : qsTr("Play") onClicked: { if (player.isPlaying) { @@ -219,7 +219,7 @@ Page { icon.source: player.isPlaying ? 'image://theme/icon-m-pause' : 'image://theme/icon-m-play' } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("+ 10 sec") icon.source: 'image://theme/icon-m-next' GPodderAutoFire { @@ -228,7 +228,7 @@ Page { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("+ 1 min") icon.source: 'image://theme/icon-m-next' GPodderAutoFire { diff --git a/qml/PodcastItem.qml b/qml/PodcastItem.qml index 56300a4..23d0aae 100644 --- a/qml/PodcastItem.qml +++ b/qml/PodcastItem.qml @@ -25,7 +25,7 @@ ListItem { id: podcastItem menu: Component { - IconContextMenu { + GpodderIconContextMenu { IconMenuItem { text: qsTr("Refresh") icon.source: 'image://theme/icon-m-sync' From 1f718ffa932fb222f6a163906c5420b24ea7ef29 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Thu, 11 Feb 2021 12:12:25 +0200 Subject: [PATCH 2/8] Renamed to GpodderIcon* --- qml/IconContextMenu.qml | 42 ---------------------------------------- qml/IconMenuItem.qml | 43 ----------------------------------------- 2 files changed, 85 deletions(-) delete mode 100644 qml/IconContextMenu.qml delete mode 100644 qml/IconMenuItem.qml diff --git a/qml/IconContextMenu.qml b/qml/IconContextMenu.qml deleted file mode 100644 index 1741ca0..0000000 --- a/qml/IconContextMenu.qml +++ /dev/null @@ -1,42 +0,0 @@ - -/** - * - * gPodder QML UI Reference Implementation - * Copyright (c) 2013, 2014, Thomas Perl - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -import QtQuick 2.0 -import QtQuick.Layouts 1.1 -import Sailfish.Silica 1.0 - -ContextMenu { - default property alias children: container.children - - Item { - height: Theme.itemSizeMedium - width: parent.width - Row { - id: container - - anchors { - verticalCenter: parent.verticalCenter - horizontalCenter: parent.horizontalCenter - leftMargin: Theme.horizontalPageMargin - rightMargin: Theme.horizontalPageMargin - } - } - } -} diff --git a/qml/IconMenuItem.qml b/qml/IconMenuItem.qml deleted file mode 100644 index 698f273..0000000 --- a/qml/IconMenuItem.qml +++ /dev/null @@ -1,43 +0,0 @@ - -/** - * - * gPodder QML UI Reference Implementation - * Copyright (c) 2013, 2014, Thomas Perl - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -import QtQuick 2.0 -import Sailfish.Silica 1.0 - - -IconButton { - property alias text: lbl.text - - Label { - id: lbl - opacity: parent.down - Behavior on opacity { - FadeAnimation {} - } - - anchors { - verticalCenter: parent.top - horizontalCenter: parent.horizontalCenter - } - - color: Theme.highlightColor - font.pixelSize: Theme.fontSizeTiny - } -} From ef6184fba573d93ec1529cdc16d9357dff1b5d37 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Fri, 12 Feb 2021 00:40:34 +0200 Subject: [PATCH 3/8] Update podcastparser to latest version --- podcastparser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podcastparser b/podcastparser index 045b836..dc8b0f3 160000 --- a/podcastparser +++ b/podcastparser @@ -1 +1 @@ -Subproject commit 045b83623921b4592a64a51ed65d78324b85e1b5 +Subproject commit dc8b0f3bbc29a57f28b294940a39287ca9341eb2 From ca3d553648c8edfeee047bf10d326eb25890b5e7 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Fri, 12 Feb 2021 00:42:49 +0200 Subject: [PATCH 4/8] Bump gpodder-core to 4.12.0 --- gpodder-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpodder-core b/gpodder-core index 1913398..682760e 160000 --- a/gpodder-core +++ b/gpodder-core @@ -1 +1 @@ -Subproject commit 19133986cf4ef6ca6146ad875952b5ac318a998b +Subproject commit 682760e61e0bfb3f111be31a79fd46543ed7c189 From aede8dbe643c1e9883603fd14ac40c56a9ae1bb2 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Fri, 12 Feb 2021 00:45:22 +0200 Subject: [PATCH 5/8] Bump version to 4.11.99 --- common/main.py | 2 +- rpm/harbour-org.gpodder.sailfish.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/main.py b/common/main.py index 9dc1420..e4e4c13 100644 --- a/common/main.py +++ b/common/main.py @@ -19,7 +19,7 @@ # of gpodder-core, but we might have a different release schedule later on. If # we decide to have parallel releases, we can at least start using this version # to check if the core version is compatible with the QML UI version. -__version__ = '4.11.9' +__version__ = '4.11.99' import pyotherside import gpodder diff --git a/rpm/harbour-org.gpodder.sailfish.spec b/rpm/harbour-org.gpodder.sailfish.spec index c7b7f59..5a5d5a1 100644 --- a/rpm/harbour-org.gpodder.sailfish.spec +++ b/rpm/harbour-org.gpodder.sailfish.spec @@ -8,7 +8,7 @@ Summary: Media and podcast aggregator Name: harbour-org.gpodder.sailfish -Version: 4.11.9 +Version: 4.11.99 Release: 1 Group: System/GUI/Other License: ISC / GPLv3 From 3123fb2e7625ffb9cc4245b07f281661c08e715d Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Wed, 17 Feb 2021 16:11:14 +0200 Subject: [PATCH 6/8] Resolve SFOS4 namespace issues --- qml/EpisodeItem.qml | 12 ++++++------ qml/PodcastItem.qml | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/qml/EpisodeItem.qml b/qml/EpisodeItem.qml index aa7188b..8e692cf 100644 --- a/qml/EpisodeItem.qml +++ b/qml/EpisodeItem.qml @@ -66,7 +66,7 @@ ListItem { menu: Component { GpodderIconContextMenu { - IconMenuItem { + GpodderIconMenuItem { text: episodeItem.isPlaying ? qsTr('Pause') : qsTr('Play') icon.source: 'image://theme/icon-m-' + (episodeItem.isPlaying ? 'pause' : 'play') onClicked: { @@ -78,7 +78,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Download") icon.source: 'image://theme/icon-m-download' visible: downloadState !== Constants.state.downloaded @@ -88,7 +88,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Enqueue") icon.source: 'image://theme/icon-m-add' onClicked: { @@ -101,7 +101,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Delete") icon.source: 'image://theme/icon-m-delete' visible: downloadState !== Constants.state.deleted @@ -114,14 +114,14 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { id: toggleNew text: qsTr("Toggle New") icon.source: 'image://theme/icon-m-favorite' + (isNew ? '-selected' : '') onClicked: Util.disableUntilReturn(toggleNew, py, 'main.toggle_new', [id]); } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Shownotes") icon.source: 'image://theme/icon-m-about' onClicked: { diff --git a/qml/PodcastItem.qml b/qml/PodcastItem.qml index 23d0aae..46defdc 100644 --- a/qml/PodcastItem.qml +++ b/qml/PodcastItem.qml @@ -26,7 +26,7 @@ ListItem { menu: Component { GpodderIconContextMenu { - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Refresh") icon.source: 'image://theme/icon-m-sync' onClicked: { @@ -35,7 +35,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Unsubscribe") icon.source: 'image://theme/icon-m-delete' onClicked: { @@ -47,7 +47,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Rename") icon.source: 'image://theme/icon-m-edit' onClicked: { @@ -65,7 +65,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Change section") icon.source: 'image://theme/icon-m-shuffle' onClicked: { @@ -83,7 +83,7 @@ ListItem { } } - IconMenuItem { + GpodderIconMenuItem { text: qsTr("Podcast detail") icon.source: 'image://theme/icon-m-about' onClicked: { From 294aade0fa9fa6de8ba3bebbe699bcc7211af5a1 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Wed, 17 Feb 2021 17:42:03 +0200 Subject: [PATCH 7/8] Dynamic episode art loading --- common/main.py | 5 +++-- gpodder-core | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/main.py b/common/main.py index e4e4c13..dbb47ac 100644 --- a/common/main.py +++ b/common/main.py @@ -120,7 +120,7 @@ def _get_cover(self, podcast): filename = self.core.cover_downloader.get_cover(podcast) if not filename: return '' - return 'file://' + filename + return filename def _get_playback_progress(self, episode): if episode.total_time > 0 and episode.current_position > 0: @@ -299,6 +299,7 @@ def progress_callback(progress): # TODO: Handle the case where there is already a DownloadTask episode.download(progress_callback) self.core.save() + self.core.cover_downloader.get_cover(self._get_podcast_by_id(episode.podcast_id), download=True, episode=episode) self._episode_state_changed(episode) def delete_episode(self, episode_id): @@ -370,7 +371,7 @@ def _get_episode_art(self, episode): filename = self.core.cover_downloader.get_cover(episode.podcast, False, episode) if not filename: return '' - return 'file://' + filename + return filename def play_episode(self, episode_id): episode = self._get_episode_by_id(episode_id) diff --git a/gpodder-core b/gpodder-core index 682760e..5590c87 160000 --- a/gpodder-core +++ b/gpodder-core @@ -1 +1 @@ -Subproject commit 682760e61e0bfb3f111be31a79fd46543ed7c189 +Subproject commit 5590c87032c445980ad50d9ca992704e012bfaf3 From e93bd2ef7446539c86e4ee5910a9320f468bd642 Mon Sep 17 00:00:00 2001 From: "E.S. Rosenberg a.k.a. Keeper of the Keys" Date: Wed, 17 Feb 2021 17:46:26 +0200 Subject: [PATCH 8/8] Bump version to 4.12.0 -- "Malkosh" --- common/main.py | 2 +- rpm/harbour-org.gpodder.sailfish.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/main.py b/common/main.py index dbb47ac..3c74a9a 100644 --- a/common/main.py +++ b/common/main.py @@ -19,7 +19,7 @@ # of gpodder-core, but we might have a different release schedule later on. If # we decide to have parallel releases, we can at least start using this version # to check if the core version is compatible with the QML UI version. -__version__ = '4.11.99' +__version__ = '4.12.0' import pyotherside import gpodder diff --git a/rpm/harbour-org.gpodder.sailfish.spec b/rpm/harbour-org.gpodder.sailfish.spec index 5a5d5a1..6ecc268 100644 --- a/rpm/harbour-org.gpodder.sailfish.spec +++ b/rpm/harbour-org.gpodder.sailfish.spec @@ -8,7 +8,7 @@ Summary: Media and podcast aggregator Name: harbour-org.gpodder.sailfish -Version: 4.11.99 +Version: 4.12.0 Release: 1 Group: System/GUI/Other License: ISC / GPLv3