Skip to content

Commit

Permalink
4.6.1 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XilinJia committed Apr 8, 2024
1 parent 01a32dc commit 0fb3f09
Show file tree
Hide file tree
Showing 29 changed files with 85 additions and 101 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
// Version code schema (not used):
// "1.2.3-beta4" -> 1020304
// "1.2.3" -> 1020395
versionCode 3020125
versionName "4.6.0"
versionCode 3020126
versionName "4.6.1"

def commit = ""
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,23 +519,18 @@ class PlaybackService : MediaBrowserServiceCompat() {
}

private fun skipIntro(playable: Playable) {
if (playable !is FeedMedia) {
return
}
if (playable !is FeedMedia) return

val preferences = playable.item?.feed?.preferences
val skipIntro = preferences?.feedSkipIntro ?: 0

val context = applicationContext
if (skipIntro > 0 && playable.getPosition() < skipIntro * 1000) {
val skipIntroMS = skipIntro * 1000
if (skipIntro > 0 && playable.getPosition() < skipIntroMS) {
val duration = duration
if (skipIntro * 1000 < duration || duration <= 0) {
if (skipIntroMS < duration || duration <= 0) {
Log.d(TAG, "skipIntro " + playable.getEpisodeTitle())
mediaPlayer?.seekTo(skipIntro * 1000)
val skipIntroMesg = context.getString(R.string.pref_feed_skip_intro_toast,
skipIntro)
val toast = Toast.makeText(context, skipIntroMesg,
Toast.LENGTH_LONG)
mediaPlayer?.seekTo(skipIntroMS)
val skipIntroMesg = applicationContext.getString(R.string.pref_feed_skip_intro_toast, skipIntro)
val toast = Toast.makeText(applicationContext, skipIntroMesg, Toast.LENGTH_LONG)
toast.show()
}
}
Expand Down Expand Up @@ -1156,11 +1151,13 @@ class PlaybackService : MediaBrowserServiceCompat() {

val feedMedia = playable
val preferences = feedMedia.item?.feed?.preferences
val skipEnd = preferences?.feedSkipEnding
if (skipEnd != null && skipEnd > 0 && skipEnd * 1000 < this.duration && (remainingTime - (skipEnd * 1000) > 0)
&& ((remainingTime - skipEnd * 1000) < (currentPlaybackSpeed * 1000))) {
Log.d(TAG,
"skipEndingIfNecessary: Skipping the remaining " + remainingTime + " " + skipEnd * 1000 + " speed " + currentPlaybackSpeed)
val skipEnd = preferences?.feedSkipEnding?:0
val skipEndMS = skipEnd * 1000
// Log.d(TAG, "skipEndingIfNecessary: checking " + remainingTime + " " + skipEndMS + " speed " + currentPlaybackSpeed)
// if (skipEnd > 0 && skipEndMS < this.duration && (remainingTime - skipEndMS > 0)
// && ((remainingTime - skipEndMS) < currentPlaybackSpeed * 1000)) {
if (skipEnd > 0 && skipEndMS < this.duration && (remainingTime - skipEndMS < 0)) {
Log.d(TAG, "skipEndingIfNecessary: Skipping the remaining " + remainingTime + " " + skipEndMS + " speed " + currentPlaybackSpeed)
val context = applicationContext
val skipMesg = context.getString(R.string.pref_feed_skip_ending_toast, skipEnd)
val toast = Toast.makeText(context, skipMesg, Toast.LENGTH_LONG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
/**
* Displays a dialog with a username and password text field and an optional checkbox to save username and preferences.
*/
abstract class FeedPreferenceSkipDialog(context: Context, skipIntroInitialValue: Int, skipEndInitialValue: Int) : MaterialAlertDialogBuilder(context) {
abstract class FeedPreferenceSkipDialog(context: Context, skipIntroInitialValue: Int, skipEndInitialValue: Int)
: MaterialAlertDialogBuilder(context) {

init {
setTitle(R.string.pref_feed_skip)
val binding = FeedPrefSkipDialogBinding.bind(View.inflate(context, R.layout.feed_pref_skip_dialog, null))
// val rootView = View.inflate(context, R.layout.feed_pref_skip_dialog, null)
setView(binding.root)

val etxtSkipIntro = binding.etxtSkipIntro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ class FeedSettingsFragment : Fragment() {
DBWriter.setFeedPreferences(feedPreferences!!)
EventBus.getDefault().post(
ac.mdiq.podcini.util.event.settings.SkipIntroEndingChangedEvent(feedPreferences!!.feedSkipIntro,
feedPreferences!!.feedSkipEnding,
feed!!.id))
feedPreferences!!.feedSkipEnding, feed!!.id))
}
}.show()
false
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@
<!--Home fragment-->







<string name="notification_permission_denied">لقد رفضت السماح بلإشعارات</string>
<string name="notification_permission_text">منذ Android 13، هناك حاجة إلى إشعار المستوى الأعلى للتحديث والتشغيل
العادي. يمكنك عدم السماح بإشعارات الفئات الفرعية حسب رغبتك.
</string>
<string name="notification_permission_denied">لقد رفضت السماح بلإشعارات</string>
<string name="open_settings">افتح الإعدادات</string>
<string name="configure_home">أضبط شاشة المنزل</string>
<!--Download Statistics fragment-->
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="statistics_counting_range">Reproduït entre entre %1$s i %2$s</string>
<string name="statistics_counting_total">Reproduït en total</string>

<string name="notification_permission_text">Podcini necessita el vostre permís per mostrar notificacions. Per defecte, Podcini només mostra notificacions mentre alguna cosa s\'està baixant o quan alguna cosa surt malament.</string>
<string name="notification_permission_denied">S\'ha denegat el permís per a les notificacions</string>
<string name="deny_label">Denega</string>
<string name="open_settings">Obre la configuració</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
<string name="statistics_counting_range">Přehráno mezi 1%1$s a 2%2$s</string>
<string name="statistics_counting_total">Celkem přehnáno</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini potřebuje vaše povolení k zobrazování oznámení. Ve výchozím nastavení Podcini zobrazuje oznámení pouze během stahování nebo když se něco pokazí.</string>
<string name="notification_permission_denied">Zamítli jste oprávnění.</string>
\ <string name="notification_permission_denied">Zamítli jste oprávnění.</string>
<string name="notification_permission_deny_warning">Pokud oznámení zakážete a něco se pokazí, nemusí se vám podařit zjistit proč.</string>
<string name="deny_label">Zakázat</string>
<string name="open_settings">Otevřít nastavení</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="statistics_counting_range">Afspillet mellem %1$s og %2$s</string>
<string name="statistics_counting_total">Afspillet i alt</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini har brug for din tilladelse til at vise notifikationer. Som udgangspunkt viser Podcini kun notifikationer, mens noget hentes, eller når noget går galt.</string>
<string name="notification_permission_denied">Du afviste tilladelsen.</string>
<string name="notification_permission_deny_warning">Hvis du deaktiverer notifikationer, og noget går galt, kan du måske ikke finde ud af, hvorfor det gik galt.</string>
<string name="deny_label">Nægt</string>
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
<string name="statistics_counting_range">Abgespielt zwischen %1$s und %2$s</string>
<string name="statistics_counting_total">Insgesamt abgespielt</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini benötigt deine Erlaubnis, um Benachrichtigungen anzuzeigen. Standardmäßig zeigt Podcini nur Benachrichtigungen an, wenn etwas heruntergeladen wird oder wenn etwas schief läuft.</string>
<string name="notification_permission_denied">Du hast die Berechtigung abgelehnt.</string>
<string name="notification_permission_text">Seit Android 13 ist für die normale Aktualisierung und Wiedergabe eine
Benachrichtigung der obersten Ebene erforderlich. Sie können die Benachrichtigung von Unterkategorien auf Wunsch
verbieten.
</string>
<string name="notification_permission_denied">Du hast die Berechtigung abgelehnt.</string>
<string name="notification_permission_deny_warning">Wenn die Benachrichtigungen deaktiviert werden und etwas schief geht, kannst du möglicherweise nicht herausfinden, warum dies passiert ist.</string>
<string name="deny_label">Ablehnen</string>
<string name="open_settings">Einstellungen öffnen</string>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
<string name="statistics_counting_range">Reproducido entre%1$s y %2$s</string>
<string name="statistics_counting_total">Reproducido en total</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini necesita </string>
<string name="notification_permission_denied">Denegaste el permiso.</string>
<string name="notification_permission_text">Desde Android 13, se necesita una notificación de nivel superior para la
actualización y reproducción normales. Puede no permitir notificaciones de subcategorías si lo desea.
</string>
<string name="notification_permission_denied">Denegaste el permiso.</string>
<string name="notification_permission_deny_warning">Si deshabilita las notificaciones y se produce un error, puede no encontrarlo posteriormente.</string>
<string name="deny_label">Denegar</string>
<string name="open_settings">Abrir ajustes</string>
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/values-eu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@
<string name="statistics_counting_range">%1$s eta %2$s bitartean joa</string>
<string name="statistics_counting_total">Joa guztira</string>
<!--Home fragment-->






<string name="notification_permission_text">Podciniek zure baimena behar du jakinarazpenak bistaratzeko. Modu lehenetsian Podciniek bi kasutan soilik erakusten ditu jakinarazpenak: zerbait deskargatu bitartean edo zerbait oker doanean.</string>
<string name="notification_permission_denied">Baimena ukatu duzu.</string>
<string name="deny_label">Ukatu</string>
<string name="open_settings">Ireki ezarpenak</string>
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
<string name="statistics_counting_range">Lu entre %1$s et %2$s</string>
<string name="statistics_counting_total">De durée de lecture</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini a besoin de votre autorisation pour afficher les notifications. Par défaut, Podcini, ne notifie que si quelque chose est en cours de téléchargement ou pose problème.</string>
<string name="notification_permission_denied">Vous avez refusé l\'autorisation.</string>
<string name="notification_permission_text">Depuis Android 13, une notification de niveau supérieur est nécessaire
pour l’actualisation et la lecture normales. Vous pouvez refuser les notifications de sous-catégories à votre
guise.
</string>
<string name="notification_permission_denied">Vous avez refusé l\'autorisation.</string>
<string name="notification_permission_deny_warning">Si vous désactivez les notifications et que quelque chose pose problème vous risquez de ne pas comprendre pourquoi.</string>
<string name="deny_label">Refuser</string>
<string name="open_settings">Ouvrir les préférences</string>
Expand Down
10 changes: 1 addition & 9 deletions app/src/main/res/values-gl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@
<string name="statistics_counting_range">Reproducido entre %1$s e %2$s</string>
<string name="statistics_counting_total">Total reproducido</string>
<!--Home fragment-->







<string name="notification_permission_text">Podcini precisa permiso para mostrar notificacións. Por defecto Podcini só mostra notificacións cando se está descargando algo ou cando algo non vai ben.</string>
<string name="notification_permission_denied">Non outorgaches o permiso</string>
<string name="notification_permission_denied">Non outorgaches o permiso</string>
<string name="notification_permission_deny_warning">Se desactivas as notificacións e algo vai fall, é posible que non coñezas a razón do fallo.</string>
<string name="deny_label">Rexeitar</string>
<string name="open_settings">Ir aos axustes</string>
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
<string name="statistics_counting_range">Riprodotto fra %1$s e %2$s</string>
<string name="statistics_counting_total">Riprodotto in totale</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini ha bisogno del tuo permesso per mostrarti le notifiche. Per impostazione predefinita, Podcini ti mostra notifiche solo quando stai scaricando qualcosa o quando qualcosa va storto.</string>
<string name="notification_permission_denied">Hai negato l\'autorizzazione.</string>
<string name="notification_permission_text">A partire da Android 13, è necessaria una notifica di livello superiore
per il normale aggiornamento e riproduzione. Puoi non consentire le notifiche delle sottocategorie come
desideri.
</string>
<string name="notification_permission_denied">Hai negato l\'autorizzazione.</string>
<string name="notification_permission_deny_warning">Se disabiliti le notifiche e qualcosa va storto, potresti non essere in grado di individuare la causa del problema.</string>
<string name="deny_label">Nega</string>
<string name="open_settings">Apri le impostazioni</string>
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@
<string name="statistics_counting_range">התנגן בין %1$s לבין %2$s</string>
<string name="statistics_counting_total">התנגן בסך הכול</string>
<!--Home fragment-->







<string name="notification_permission_text">לאנטנה־פּוֹד דרושה ההרשאה שלך להציג התראות. כברירת מחדל, אנטנה־פּוֹד תציג הורדות רק כשמשהו יורד או משהו השתבש.</string>
<string name="notification_permission_denied">דחית את בקשת ההרשאה.</string>
<string name="notification_permission_deny_warning">אם בחרת להשבית את ההתראות ומשהו משתבש, יכול להיות שהתקלה תחמוק מעיניך.</string>
<string name="deny_label">דחייה</string>
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
<!--Home fragment-->







<string name="configure_home">ホーム画面の設定</string>
<string name="notification_permission_text">Android 13 以降、通常の更新と再生にはトップレベルの通知が必要です。
ご希望に応じて、サブカテゴリの通知を禁止することができます。
</string>
<string name="configure_home">ホーム画面の設定</string>
<!--Download Statistics fragment-->
<string name="total_size_downloaded_podcasts">デバイス上のエピソードの合計サイズ</string>
<!--Main activity-->
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@
<!--Home fragment-->







<string name="notification_permission_denied">Nie udzielono zgody.</string>
<string name="notification_permission_text">Od wersji Androida 13 do normalnego odświeżania i odtwarzania potrzebne
są powiadomienia najwyższego poziomu. Na własne życzenie możesz wyłączyć powiadomienia o podkategoriach.
</string>
<string name="notification_permission_denied">Nie udzielono zgody.</string>
<string name="open_settings">Otwórz ustawienia</string>
<string name="configure_home">Konfiguruj stronę główną</string>
<!--Download Statistics fragment-->
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
<string name="statistics_counting_range">Reproduzidos entre %1$s e %2$s</string>
<string name="statistics_counting_total">Reproduzidos no total</string>

<string name="notification_permission_denied">Você negou a permissão.</string>
<string name="notification_permission_text">Desde o Android 13, a notificação de nível superior é necessária para
atualização e reprodução normais. Você pode proibir notificações de subcategorias conforme desejar.
</string>
<string name="notification_permission_denied">Você negou a permissão.</string>
<string name="open_settings">Abrir as configurações</string>
<string name="configure_home">Configurar Página Principal</string>
<!--Download Statistics fragment-->
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
<string name="statistics_counting_range">Reproduzidos entre %1$s e %2$s</string>
<string name="statistics_counting_total">Total</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini precisa de sua permissão para mostrar notificações. Por definição, a aplicação apenas mostra notificações se estiver a descarregar ficheiros ou se algo errado acontecer.</string>
<string name="notification_permission_denied">Permissões recusadas</string>
<string name="notification_permission_text">Desde o Android 13, a notificação de nível superior é necessária para
atualização e reprodução normais. Você pode proibir notificações de subcategorias conforme desejar.
</string>
<string name="notification_permission_denied">Permissões recusadas</string>
<string name="notification_permission_deny_warning">Se desativar as notificações e ocorrer algum erro, não receberá quaisquer informações acerca desse erro</string>
<string name="deny_label">Recusar</string>
<string name="open_settings">Abrir definições</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="statistics_counting_range">Redat între %1$s și %2$s</string>
<string name="statistics_counting_total">Redat în total</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini necesită permisiunea ta pentru a afișa notificări. În mod implicit Podcini afișează notificări doar în momentul în care un podcast este descărcat sau în momentul în care apare o eroare.</string>
<string name="notification_permission_denied">Ați refuzat permisiunea.</string>
<string name="notification_permission_deny_warning">Dacă dezactivezi notificările și ceva nu funcționează corect, există posibilitatea de a nu putea să afli ce a mers greșit.</string>
<string name="deny_label">Refuză</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="statistics_counting_range">Prehrané medzi %1$s a %2$s</string>
<string name="statistics_counting_total">Prehrané celkom</string>
<!--Home fragment-->
<string name="notification_permission_text">Podcini potrebuje vaše povolenie na zobrazovanie upozornení. V predvolenom nastavení Podcini zobrazuje upozornenia iba vtedy, keď sa niečo sťahuje alebo keď sa niečo nepodarí.</string>
<string name="notification_permission_denied">Odmietli ste povolenie.</string>
<string name="notification_permission_deny_warning">Ak vypnete upozornenia a niečo sa nepodarí, možno nebudete môcť zistiť, prečo sa to nepodarilo.</string>
<string name="deny_label">Odmietnuť</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<string name="statistics_counting_range">Spelat mellan %1$s och %2$s</string>
<string name="statistics_counting_total">Spelat totalt</string>

<string name="notification_permission_text">Podcini behöver ditt tillstånd att visa notiser. Som standard visar Podcini bara notiser när något laddas ner eller när något går fel.</string>
<string name="notification_permission_denied">Du nekade behörigheten.</string>
<string name="notification_permission_deny_warning">Om du stänger av notiser och något går fel kan det vara svårt att få reda på varför.</string>
<string name="deny_label">Neka</string>
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@
<!--Home fragment-->







<string name="notification_permission_denied">İzni reddettiniz</string>
<string name="notification_permission_text">Android 13\'ten bu yana normal yenileme ve oynatma için üst düzey
bildirime ihtiyaç duyulmaktadır. Dilediğiniz takdirde alt kategorilerin bildirimlerine izin vermeyebilirsiniz.
</string>
<string name="notification_permission_denied">İzni reddettiniz</string>
<string name="open_settings">Ayarları aç</string>
<string name="configure_home">Ana Ekranı Özelleştir</string>
<!--Download Statistics fragment-->
Expand Down
Loading

0 comments on commit 0fb3f09

Please sign in to comment.