diff --git a/common/main.py b/common/main.py index 9dc1420..75553e6 100644 --- a/common/main.py +++ b/common/main.py @@ -37,6 +37,7 @@ import datetime import re from concurrent.futures import ThreadPoolExecutor +from timermanager import TimerManager logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) @@ -64,6 +65,7 @@ class gPotherSide: def __init__(self): self.core = None self._checking_for_new_episodes = False + self.timermanager = TimerManager() def initialize(self, progname): assert self.core is None, 'Already initialized' @@ -448,13 +450,13 @@ def provider_sort_key(p): return p.priority return [{ - 'label': provider.name, + 'label': provider.unit_name, 'can_search': provider.kind == provider.PROVIDER_SEARCH } for provider in sorted(registry.directory.select(select_provider), key=provider_sort_key, reverse=True)] def get_directory_entries(self, provider, query): def match_provider(p): - return p.name == provider + return p.unit_name == provider for provider in registry.directory.select(match_provider): return [{ @@ -467,6 +469,17 @@ def match_provider(p): return [] + def disable_scheduled_update(self): + if self.timermanager.timer_and_service_exist(): + self.timermanager.deactivate_timer() + + def set_scheduled_update(self, interval): + if not self.timermanager.timer_and_service_exist(): + self.timermanager.write_service() + self.timermanager.write_timer(interval) + self.timermanager.activate_timer() + self.set_config_value("update.scheduled_interval", interval) + PILL_TEMPLATE = """ SettingsPage - + About Относно - + Settings Настройки - + YouTube YouTube - + API Key (v3) API ключ (v3) - + Limits Ограничения - + Maximum episodes per feed Максимален брой епизоди за RSS емисия + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-de.ts b/translations/harbour-org.gpodder.sailfish-de.ts index 75df417..f2d9688 100644 --- a/translations/harbour-org.gpodder.sailfish-de.ts +++ b/translations/harbour-org.gpodder.sailfish-de.ts @@ -512,35 +512,45 @@ SettingsPage - + About Über - + Settings Einstellungen - + YouTube YouTube - + API Key (v3) API Schlüssel (v3) - + Limits Grenzen - + Maximum episodes per feed Maximale Anzahl Episoden pro Feed + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-es.ts b/translations/harbour-org.gpodder.sailfish-es.ts index 859d315..b36e091 100644 --- a/translations/harbour-org.gpodder.sailfish-es.ts +++ b/translations/harbour-org.gpodder.sailfish-es.ts @@ -512,35 +512,45 @@ SettingsPage - + About Acerca de - + Settings Ajustes - + YouTube YouTube - + API Key (v3) Clave API (v3) - + Limits Límites - + Maximum episodes per feed Núm. máximo de episodios por canal + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-it.ts b/translations/harbour-org.gpodder.sailfish-it.ts index e381673..2f0438d 100644 --- a/translations/harbour-org.gpodder.sailfish-it.ts +++ b/translations/harbour-org.gpodder.sailfish-it.ts @@ -512,35 +512,45 @@ SettingsPage - + About Info - + Settings Impostazioni - + YouTube YouTube - + API Key (v3) API Key (v3) - + Limits Limiti - + Maximum episodes per feed Massimo episodi per feed + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-pl.ts b/translations/harbour-org.gpodder.sailfish-pl.ts index b0d0fca..08f96a7 100644 --- a/translations/harbour-org.gpodder.sailfish-pl.ts +++ b/translations/harbour-org.gpodder.sailfish-pl.ts @@ -512,35 +512,45 @@ SettingsPage - + About O gPodder - + Settings Ustawienia - + YouTube YouTube - + API Key (v3) Klucz API (v3) - + Limits Limity - + Maximum episodes per feed Maksymalna liczba odcinków na kanał + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-ru.ts b/translations/harbour-org.gpodder.sailfish-ru.ts index 07beb1f..6c14af3 100644 --- a/translations/harbour-org.gpodder.sailfish-ru.ts +++ b/translations/harbour-org.gpodder.sailfish-ru.ts @@ -512,35 +512,45 @@ SettingsPage - + About О программе - + Settings Настройка - + YouTube YouTube - + API Key (v3) Ключ API (версия 3) - + Limits Ограничения - + Maximum episodes per feed Максимальное число выпусков + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-sv.ts b/translations/harbour-org.gpodder.sailfish-sv.ts index 88179c8..ab414ea 100644 --- a/translations/harbour-org.gpodder.sailfish-sv.ts +++ b/translations/harbour-org.gpodder.sailfish-sv.ts @@ -512,35 +512,45 @@ SettingsPage - + About Om - + Settings Inställningar - + YouTube YouTube - + API Key (v3) API-nyckel (v3) - + Limits Begränsningar - + Maximum episodes per feed Max antal avsnitt per flöde + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish-zh_CN.ts b/translations/harbour-org.gpodder.sailfish-zh_CN.ts index 8a562de..11ecdd5 100644 --- a/translations/harbour-org.gpodder.sailfish-zh_CN.ts +++ b/translations/harbour-org.gpodder.sailfish-zh_CN.ts @@ -512,35 +512,45 @@ SettingsPage - + About 关于 - + Settings 设置 - + YouTube YouTube - + API Key (v3) API 密钥(v3) - + Limits 限制 - + Maximum episodes per feed 每个订阅流的最大剧集 + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/harbour-org.gpodder.sailfish.ts b/translations/harbour-org.gpodder.sailfish.ts index 0cae0ee..97a4279 100644 --- a/translations/harbour-org.gpodder.sailfish.ts +++ b/translations/harbour-org.gpodder.sailfish.ts @@ -512,35 +512,45 @@ SettingsPage - + About - + Settings - + YouTube - + API Key (v3) - + Limits - + Maximum episodes per feed + + + Automatic Updates + + + + + Choose Time + + SleepTimerDialog diff --git a/translations/py_gettext/base.pot b/translations/py_gettext/base.pot new file mode 100644 index 0000000..8ed0312 --- /dev/null +++ b/translations/py_gettext/base.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-06 19:44+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: common/service.py:13 common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_title" +msgstr "" + +#: common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_body" +msgstr "" diff --git a/translations/py_gettext/de/LC_MESSAGES/base.mo b/translations/py_gettext/de/LC_MESSAGES/base.mo new file mode 100644 index 0000000..925633d Binary files /dev/null and b/translations/py_gettext/de/LC_MESSAGES/base.mo differ diff --git a/translations/py_gettext/de/LC_MESSAGES/base.po b/translations/py_gettext/de/LC_MESSAGES/base.po new file mode 100644 index 0000000..0ea1fb2 --- /dev/null +++ b/translations/py_gettext/de/LC_MESSAGES/base.po @@ -0,0 +1,7 @@ +#: common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_title" +msgstr "GPodder aktualisiert" + +#: common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_body" +msgstr "Alle Podcasts wurden aktualisiert!" diff --git a/translations/py_gettext/en/LC_MESSAGES/base.mo b/translations/py_gettext/en/LC_MESSAGES/base.mo new file mode 100644 index 0000000..55e6191 Binary files /dev/null and b/translations/py_gettext/en/LC_MESSAGES/base.mo differ diff --git a/translations/py_gettext/en/LC_MESSAGES/base.po b/translations/py_gettext/en/LC_MESSAGES/base.po new file mode 100644 index 0000000..c4c7370 --- /dev/null +++ b/translations/py_gettext/en/LC_MESSAGES/base.po @@ -0,0 +1,7 @@ +#: common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_title" +msgstr "GPodder refreshed" + +#: common/service.py:27 common/service.py:29 +msgid "gpodder.refresh_notification_body" +msgstr "All podcasts have been updated!"