From bd43749d9848cdfcbbb21b5053870e1210c89f19 Mon Sep 17 00:00:00 2001 From: Keeper-of-the-Keys Date: Sun, 31 Mar 2024 15:32:22 +0300 Subject: [PATCH] Revert "AllEpisodes Page updates" --- common/GPodderCore.qml | 2 - common/GPodderEpisodeListModel.qml | 69 ++++++++++--------- common/GPodderEpisodeListModelConnections.qml | 22 +++--- common/GPodderPodcastListModel.qml | 6 +- qml/AllEpisodesPage.qml | 14 ++-- qml/EpisodeFilterDialog.qml | 3 +- qml/EpisodesPage.qml | 19 +++-- qml/Main.qml | 14 ---- qml/PodcastsPage.qml | 9 +-- .../harbour-org.gpodder.sailfish-bg.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-de.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-es.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-it.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-pl.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-ru.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-sv.ts | 31 ++++----- .../harbour-org.gpodder.sailfish-zh_CN.ts | 31 ++++----- translations/harbour-org.gpodder.sailfish.ts | 33 ++++----- 18 files changed, 189 insertions(+), 250 deletions(-) diff --git a/common/GPodderCore.qml b/common/GPodderCore.qml index dc83d77..7920d32 100644 --- a/common/GPodderCore.qml +++ b/common/GPodderCore.qml @@ -42,7 +42,6 @@ Python { signal updatedEpisode(var episode) signal updateStats() signal configChanged(string key, var value) - signal initialized() Component.onCompleted: { setHandler('hello', function (coreversion, uiversion, parserversion) { @@ -74,7 +73,6 @@ Python { importModule('main', function() { py.call('main.initialize', [py.progname], function() { py.ready = true; - initialized(); }); }); } diff --git a/common/GPodderEpisodeListModel.qml b/common/GPodderEpisodeListModel.qml index d42c520..8f2a777 100644 --- a/common/GPodderEpisodeListModel.qml +++ b/common/GPodderEpisodeListModel.qml @@ -24,9 +24,9 @@ import 'util.js' as Util import 'constants.js' as Constants ListModel { - property int podcast_id: -1 - property var myself: this + id: episodeListModel + property int podcast_id: -1 property var queries: ({ All: '', @@ -40,20 +40,28 @@ ListModel { }) property var filters: ([ - { label: qsTr("All"), query: queries.All }, - { label: qsTr("Fresh"), query: queries.Fresh }, - { label: qsTr("Downloaded"), query: queries.Downloaded }, - { label: qsTr("Unplayed downloads"), query: queries.UnplayedDownloads }, - { label: qsTr("Finished downloads"), query: queries.FinishedDownloads }, - { label: qsTr("Hide deleted"), query: queries.HideDeleted }, - { label: qsTr("Deleted episodes"), query: queries.Deleted }, - { label: qsTr("Short downloads (< 10 min)"), query: queries.ShortDownloads }, + { label: qsTr("All"), query: episodeListModel.queries.All }, + { label: qsTr("Fresh"), query: episodeListModel.queries.Fresh }, + { label: qsTr("Downloaded"), query: episodeListModel.queries.Downloaded }, + { label: qsTr("Unplayed downloads"), query: episodeListModel.queries.UnplayedDownloads }, + { label: qsTr("Finished downloads"), query: episodeListModel.queries.FinishedDownloads }, + { label: qsTr("Hide deleted"), query: episodeListModel.queries.HideDeleted }, + { label: qsTr("Deleted episodes"), query: episodeListModel.queries.Deleted }, + { label: qsTr("Short downloads (< 10 min)"), query: episodeListModel.queries.ShortDownloads }, ]) property bool ready: false property int currentFilterIndex: -1 property string currentCustomQuery: queries.All + Component.onCompleted: { + // Request filter, then load episodes + py.call('main.get_config_value', ['ui.qml.episode_list.filter_eql'], function (result) { + setQueryFromUpdate(result); + reload(); + }); + } + function forEachEpisode(callback) { // Go from bottom up (= chronological order) for (var i=count-1; i>=0; i--) { @@ -61,12 +69,12 @@ ListModel { } } - function setQueryFromIndex(index) { - console.debug("Setting filter index ", index) - setQueryEx(filters[index].query, true); + function setQueryIndex(index) { + currentFilterIndex = index; + py.call('main.set_config_value', ['ui.qml.episode_list.filter_eql', filters[currentFilterIndex].query]); } - function setQueryFromConfigUpdate(query) { + function setQueryFromUpdate(query) { setQueryEx(query, false); } @@ -77,32 +85,29 @@ ListModel { function setQueryEx(query, update) { for (var i=0; i AllEpisodesPage - - - Episodes: - Епизоди: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Отбелязване като стари - + Enqueue episodes in player Добавяне към опашката - + Unsubscribe Отабониране - + No episodes found Няма намерени епизоди @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Всички - + Fresh Нови и неизтеглени - + Downloaded Изтеглени - + Unplayed downloads Непускани епизоди - + Finished downloads Изслушани епизоди - + Hide deleted Без изтритите - + Deleted episodes Изтрити епизоди - + Short downloads (< 10 min) Кратки епизоди (< 10 мин) @@ -510,7 +505,7 @@ Абонаменти - + No subscriptions Няма абонаменти diff --git a/translations/harbour-org.gpodder.sailfish-de.ts b/translations/harbour-org.gpodder.sailfish-de.ts index 8a34470..733505b 100644 --- a/translations/harbour-org.gpodder.sailfish-de.ts +++ b/translations/harbour-org.gpodder.sailfish-de.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Episoden: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Markiere Folge als gehört - + Enqueue episodes in player Episoden zur Playliste hinzufügen - + Unsubscribe Abonnement aufheben - + No episodes found Keine Episoden gefunden @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Alle - + Fresh Neu - + Downloaded Heruntergeladen - + Unplayed downloads Heruntergeladen & Nicht abgespielt - + Finished downloads Heruntergeladen & Fertig - + Hide deleted Gelöschte ausblenden - + Deleted episodes Gelöscht - + Short downloads (< 10 min) Heruntergeladen & Länge < 10min @@ -509,7 +504,7 @@ Abonnierte Podcasts - + No subscriptions Keine abonnierten Podcasts diff --git a/translations/harbour-org.gpodder.sailfish-es.ts b/translations/harbour-org.gpodder.sailfish-es.ts index b617b89..4ddd2a0 100644 --- a/translations/harbour-org.gpodder.sailfish-es.ts +++ b/translations/harbour-org.gpodder.sailfish-es.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Episodios: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Marcar episodios como antiguos - + Enqueue episodes in player Poner episodios en cola - + Unsubscribe Eliminar suscripción - + No episodes found No se han encontrado episodios @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Todos - + Fresh Nuevos - + Downloaded Descargados - + Unplayed downloads Descargas sin reproducir - + Finished downloads Descargas reproducidas - + Hide deleted Ocultar borrados - + Deleted episodes Episodios borrados - + Short downloads (< 10 min) Descargas cortas ( < 10 min) @@ -509,7 +504,7 @@ Suscripciones - + No subscriptions No hay suscripciones diff --git a/translations/harbour-org.gpodder.sailfish-it.ts b/translations/harbour-org.gpodder.sailfish-it.ts index bb15716..c73149b 100644 --- a/translations/harbour-org.gpodder.sailfish-it.ts +++ b/translations/harbour-org.gpodder.sailfish-it.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Episodi: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Segna episodio come vecchio - + Enqueue episodes in player Accoda episodi nel player - + Unsubscribe Disiscriviti - + No episodes found Nessun episodio @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Tutti - + Fresh Nuovi - + Downloaded Scaricati - + Unplayed downloads Download non riprodotti - + Finished downloads Download completati - + Hide deleted Nascondi eliminati - + Deleted episodes Episodi eliminati - + Short downloads (< 10 min) Download corti (< 10 min) @@ -509,7 +504,7 @@ iscrizioni - + No subscriptions Nessuna iscrizione diff --git a/translations/harbour-org.gpodder.sailfish-pl.ts b/translations/harbour-org.gpodder.sailfish-pl.ts index 1668709..1f44770 100644 --- a/translations/harbour-org.gpodder.sailfish-pl.ts +++ b/translations/harbour-org.gpodder.sailfish-pl.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Odcinki: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Oznacz odcinki jako stare - + Enqueue episodes in player Kolejkuj odcinki w odtwarzaczu - + Unsubscribe Anuluj subskrypcję - + No episodes found Brak odcinków @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Wszytskie - + Fresh Nowe - + Downloaded Pobrane - + Unplayed downloads Nieodtworzone pobrane - + Finished downloads Zakończone pobrania - + Hide deleted Ukryj usunięte - + Deleted episodes Usunięte odcinki - + Short downloads (< 10 min) Krótkie pobrane (< 10min) @@ -509,7 +504,7 @@ Subskrypcje - + No subscriptions Brak subskrybcji diff --git a/translations/harbour-org.gpodder.sailfish-ru.ts b/translations/harbour-org.gpodder.sailfish-ru.ts index 2111b7e..83e2e38 100644 --- a/translations/harbour-org.gpodder.sailfish-ru.ts +++ b/translations/harbour-org.gpodder.sailfish-ru.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Выпуски: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Отметить выпуски как старые - + Enqueue episodes in player В очередь проигрывателя - + Unsubscribe Отменить подписку - + No episodes found Нет выпусков @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Все - + Fresh Последние - + Downloaded Скачанные - + Unplayed downloads Непрослушанные - + Finished downloads Завершенные закачки - + Hide deleted Скрыть удаленные - + Deleted episodes Удаленные выпуски - + Short downloads (< 10 min) Короткие (< 10 минут) @@ -509,7 +504,7 @@ Подписки - + No subscriptions Нет подписок diff --git a/translations/harbour-org.gpodder.sailfish-sv.ts b/translations/harbour-org.gpodder.sailfish-sv.ts index 7cd8cf3..d660d2b 100644 --- a/translations/harbour-org.gpodder.sailfish-sv.ts +++ b/translations/harbour-org.gpodder.sailfish-sv.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - Avsnitt: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old Markera avsnitt som gamla - + Enqueue episodes in player Köa avsnitt i spelaren - + Unsubscribe Sluta prenumerera - + No episodes found Inga avsnitt hittades @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All Alla - + Fresh Nya - + Downloaded Nerladdat - + Unplayed downloads Ospelade nerladdningar - + Finished downloads Slutförda nerladdningar - + Hide deleted Dölj borttagna - + Deleted episodes Borttagna avsnitt - + Short downloads (< 10 min) Korta nerladdningar (<10 min) @@ -509,7 +504,7 @@ Prenumerationer - + No subscriptions Inga prenumerationer diff --git a/translations/harbour-org.gpodder.sailfish-zh_CN.ts b/translations/harbour-org.gpodder.sailfish-zh_CN.ts index fe86b9f..f6081f7 100644 --- a/translations/harbour-org.gpodder.sailfish-zh_CN.ts +++ b/translations/harbour-org.gpodder.sailfish-zh_CN.ts @@ -31,11 +31,6 @@ AllEpisodesPage - - - Episodes: - 剧集: - No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old 标记剧集已播放 - + Enqueue episodes in player 排列播放器的剧集 - + Unsubscribe 取消订阅 - + No episodes found 没有找到剧集 @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All 全部 - + Fresh 新的 - + Downloaded 下载 - + Unplayed downloads 未播放的下载 - + Finished downloads 已完成的下载 - + Hide deleted 隐藏已删除 - + Deleted episodes 已删除剧集 - + Short downloads (< 10 min) 较短的下载(10分钟以内) @@ -509,7 +504,7 @@ 订阅 - + No subscriptions 无订阅 diff --git a/translations/harbour-org.gpodder.sailfish.ts b/translations/harbour-org.gpodder.sailfish.ts index 3f0fc53..24d67bf 100644 --- a/translations/harbour-org.gpodder.sailfish.ts +++ b/translations/harbour-org.gpodder.sailfish.ts @@ -32,12 +32,7 @@ AllEpisodesPage - - Episodes: - - - - + No episodes found @@ -148,22 +143,22 @@ EpisodesPage - + Mark episodes as old - + Enqueue episodes in player - + Unsubscribe - + No episodes found @@ -171,42 +166,42 @@ GPodderEpisodeListModel - + All - + Fresh - + Downloaded - + Unplayed downloads - + Finished downloads - + Hide deleted - + Deleted episodes - + Short downloads (< 10 min) @@ -509,7 +504,7 @@ - + No subscriptions