From c0beac896b07fad0d6945d8c49fce41ab6f44116 Mon Sep 17 00:00:00 2001 From: Thilo Kogge Date: Tue, 28 Jun 2022 16:58:28 +0200 Subject: [PATCH] fixes #79 --- python/podcast/podpost.py | 3 ++- qml/components/PlayerHandler.qml | 2 ++ qml/harbour-podqast.qml | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/podcast/podpost.py b/python/podcast/podpost.py index 27fd594..c7aae45 100644 --- a/python/podcast/podpost.py +++ b/python/podcast/podpost.py @@ -252,7 +252,8 @@ class Podpost(BaseModel): "loaded": loaded, "haschapters": haschapters, "listened": self.listened or self.position > 0 and ( - self.duration - self.position < Constants().markListenedBeforeEndThreshold * 1000) + self.duration - self.position < Constants().markListenedBeforeEndThreshold * 1000), + "podcastTitle": self.podcast.title if not self.isaudio else "" } def get_image_descriptor(self): diff --git a/qml/components/PlayerHandler.qml b/qml/components/PlayerHandler.qml index 56df622..2b7ab69 100644 --- a/qml/components/PlayerHandler.qml +++ b/qml/components/PlayerHandler.qml @@ -16,6 +16,7 @@ Python { property string playtext: "" property string firstid: "" property string firsttitle: "" + property string firstPodcastTitle: "" property var chapters property int aktchapter property double playpos: 0 @@ -90,6 +91,7 @@ Python { function setEpisode(data, chapterlist) { firstid = data.id firsttitle = data.title + firstPodcastTitle=data.podcastTitle chapters = chapterlist playicon = data.logo_url playtext = data.title diff --git a/qml/harbour-podqast.qml b/qml/harbour-podqast.qml index 1c612a0..472a2b4 100644 --- a/qml/harbour-podqast.qml +++ b/qml/harbour-podqast.qml @@ -500,11 +500,9 @@ ApplicationWindow { playbackStatus: playerHandler.isPlaying ? Mpris.Playing : Mpris.Paused onTitleChanged: { - metaData.title = playerHandler.firsttitle - // metaData.albumArtist = playerHandler. - var metadata = mprisPlayer.metadata metadata[Mpris.metadataToString(Mpris.Title)] = playerHandler.firsttitle + metadata[Mpris.metadataToString(Mpris.AlbumArtist)] = playerHandler.firstPodcastTitle mprisPlayer.metadata = metadata } -- GitLab