From 07a01ffddba443a74e9bea4facfaf8849e449adb Mon Sep 17 00:00:00 2001
From: imashnake0
Date: Mon, 20 Jun 2022 22:43:52 -0400
Subject: [PATCH 01/97] Replace classpath with `plugins` DSL
Replaced the old way of adding plugins to the classpath with plugins DSL: https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block.
---
build.gradle | 18 ++++--------------
settings.gradle | 9 +++++++++
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/build.gradle b/build.gradle
index 0a229bb5e..540bd4371 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,18 +1,8 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-buildscript {
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:7.2.1'
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
+plugins {
+ id 'com.android.application' apply false version '7.2.1'
+ id 'org.jetbrains.kotlin.android' apply false version '1.7.0'
}
task clean(type: Delete) {
delete rootProject.buildDir
-}
\ No newline at end of file
+}
diff --git a/settings.gradle b/settings.gradle
index be6d8ccca..d89938f77 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,11 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
@@ -5,5 +13,6 @@ dependencyResolutionManagement {
mavenCentral()
}
}
+
rootProject.name = "LibreTube"
include ':app'
From 3cfd505f45b401c95c0c3f26bd37be9c5b26b567 Mon Sep 17 00:00:00 2001
From: imashnake0
Date: Mon, 20 Jun 2022 22:44:22 -0400
Subject: [PATCH 02/97] Minor cleanup
Added white spaces.
---
app/build.gradle | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 969e97e7a..09780f3a8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,14 +29,17 @@ android {
resValue "string", "app_name", "LibreTube Debug"
}
}
+
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
kotlinOptions {
jvmTarget = '1.8'
}
+
splits {
abi {
enable true
@@ -46,11 +49,13 @@ android {
}
}
+
packagingOptions {
jniLibs {
excludes += ['lib/armeabi-v7a/*_neon.so']
}
}
+
namespace 'com.github.libretube'
}
@@ -76,14 +81,12 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
- //do not update jackson annotations! it does not supports
Date: Tue, 21 Jun 2022 08:18:41 +0200
Subject: [PATCH 03/97] fix string
---
.../java/com/github/libretube/preferences/AdvancedSettings.kt | 1 -
app/src/main/res/values/strings.xml | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
index 3f0715198..22a7aee55 100644
--- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
@@ -9,7 +9,6 @@ import androidx.preference.PreferenceManager
import com.github.libretube.R
import com.github.libretube.requireMainActivityRestart
import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import org.chromium.base.CommandLine.reset
class AdvancedSettings : PreferenceFragmentCompat() {
val TAG = "AdvancedSettings"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 13f95ac83..c8023e03a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -202,5 +202,5 @@
Automatically play the next video when the current is finished.Clone playlistRestore defaults
- Are you sure you want to reset all the apps settings to its default?
+ Are you sure? This will log you out and reset all your settings!
From 00530939643c170a971e0028354e203968cdcd96 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Sun, 19 Jun 2022 12:09:53 +0000
Subject: [PATCH 04/97] Translated using Weblate (Turkish)
Currently translated at 99.4% (196 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 29 ++++++++++++++++----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index eddc36f52..b9ac16bcd 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -12,7 +12,7 @@
GörünümBağlantı hatası.Kullanıcı adı ve parola girmelisiniz.
- Bu bir LibreTube hesabı içindir.
+ Bu, LibreTube hesabı içindir.Varsayılan Video ÇözünürlüğüOynatma listesini silOynatma Listesi Oluştur
@@ -36,7 +36,7 @@
Abone olunduÖnce birkaç kanala abone olun.Bu görüntü indirilemiyor.
- VLC\'de aç
+ VLC\'de AçAbonelikleri İçe AktarBir şeyler ters gitti.Burada hiçbir şey yok.
@@ -57,7 +57,7 @@
KütüphaneSistemKoyu
- %1$s Abone
+ %1$s aboneAçıkVideolarAna Sayfa
@@ -89,12 +89,12 @@
BağışçıBölüm atlandıÜcretli promosyon, yönlendirmeler ve doğrudan reklamlar. Kendi reklamını yapmak veya amaçlara, yaratıcılara, internet sitelerine ve ürünlere ücretsiz hakiki duyurular için değil.
- Ödenmemiş/Kendini Tanıtmak
+ Ödenmemiş/Kendi ReklamıEtkileşim hatırlatıcısı (beğen ve abone ol)Ara Verme/Giriş AnimasyonuGerçek içeriği olmayan bir aralık. Duraklatma, statik kare, yinelenen animasyon olabilir. Bilgi içeren geçişler için kullanılmamalıdır.
- İçeriğin ortasında beğenmek, abone olmak veya takip etmek için kısa bir hatırlatma olduğunda. Uzun veya belirli bir şey hakkındaysa, bunun yerine kendini tanıtmalıdır.
- Ücretsiz veya kendini tanıtım dışında \"bağışçı\" ile benzer. Bu, mallar, bağışlar veya kiminle işbirliği yaptığına dair bilgilerle ilgili bölümleri içerir.
+ İçeriğin ortasında beğenmek, abone olmak veya takip etmek için kısa bir hatırlatma olduğunda. Uzun veya belirli bir şey hakkındaysa, bunun yerine kendi reklamıdır.
+ Ücretsiz veya kendi reklamı dışında \"bağışçı\" ile benzer. Bu, mallar, bağışlar veya kiminle işbirliği yaptığına dair bilgilerle ilgili bölümleri içerir.Bitiş kartları ve kanal simgesiYT Müzik ŞarkılarıYT Müzik Albümleri
@@ -147,7 +147,7 @@
Dahili depolamaİndirilen medyanın saklandığı klasörün adı.Filmler klasörü
- URL\'yi şununla paylaş:
+ URL\'yi şununla paylaşAdİndirme klasörüHafıza kartı
@@ -162,12 +162,12 @@
Aptal şekilliUçan alevPiped, giriş, abonelikler
- Oluşum ekle
- Özel oluşumları temizle
+ Sunucu Ekle
+ Özel sunucuları temizleErişim aracı API\'sinin URL\'si
- Özel bir oluşum ekleyin (riski size ait olmak üzere)
+ Özel bir sunucu ekleyin (kendi sorumluluğunuzdadır)Adı ve API URL\'sini girin.
- Oluşumun adı
+ Sunucu adıLütfen, çalışan bir URL girinSürüm %1$sLibreTube ekibini tanıyın ve tüm bunların nasıl gerçekleştiğini öğrenin.
@@ -189,4 +189,11 @@
SesVideoİndiriliyor
+ Oto.oynat
+ Trend sayfasını gizle
+ Kalite
+ Davranış
+ Kalite ve oynatıcı davranışı
+ Piped, kullandığımız API\'yi sağlayan YouTube için açık kaynaklı alternatif bir internet ön yüzüdür. Piped olmasaydı LibreTube olmazdı. Geliştiricilerine çok teşekkürler!
+ Erişim aracı ön ucuna giden URL
\ No newline at end of file
From 22ecc8eb464c8d1a2e4713210b3a883b9041c081 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Sun, 19 Jun 2022 12:39:29 +0000
Subject: [PATCH 05/97] Translated using Weblate (Turkish)
Currently translated at 99.4% (196 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index b9ac16bcd..b24958c96 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -47,9 +47,9 @@
Oynatma listesi adıHakkındaVLC\'de açılamıyor. Kurulmamış olabilir.
- Erişim Aracı Seç
- Özel erişim aracı
- Sunucu bir engelle karşılaştı, başka bir erişim aracını deneyebilir misiniz\?
+ Sunucu seç
+ Özel sunucu
+ Sunucu bir engelle karşılaştı, başka sunucunu deneyebilir misiniz\?Ağ sütunlarıYouTube veya NewPipe\'tanOynatma listesi adı boş olamaz
@@ -69,7 +69,7 @@
Yeniden DeneKonumAyarlar
- Erişim Aracı
+ SunucuAyarlamalarİnternet SitesiVarsayılan Sekme
@@ -164,7 +164,7 @@
Piped, giriş, aboneliklerSunucu EkleÖzel sunucuları temizle
- Erişim aracı API\'sinin URL\'si
+ Sunucu API\'sinin URL\'siÖzel bir sunucu ekleyin (kendi sorumluluğunuzdadır)Adı ve API URL\'sini girin.Sunucu adı
@@ -176,7 +176,7 @@
Alakasız/ŞakalarVideonun ana içeriğini anlamak için gerekli olmayan yalnızca dolgu veya mizah için eklenen teğet sahneler için.Müzik: Müzik Dışı Bölüm
- Sadece müzik videolarında kullanım içindir. Resmi mikslerin değil videonun bazı kısımlarını kapsamalıdır. Sonuç olarak, video Spotify\'a veya diğer karışık versiyonlara mümkün olduğunca yakın olmalı veya konuşmayı ve diğer dikkat dağıtıcı unsurları azaltmalıdır.
+ Sadece müzik videolarında kullanım içindir. Resmi mikslerin değil videonun bazı kısımlarını kapsamalıdır. Sonuç olarak, video Spotify\'a veya diğer miks versiyona mümkün olduğunca yakın olmalı veya konuşmayı ve diğer dikkat dağıtıcı unsurları azaltmalıdır.Önizleme/ÖzetBu veya serisindeki gelecekteki videolarda gelecek içeriği detaylandıran, ancak ek bilgi sağlamayan segmentler için. Yalnızca burada görünen klipleri içeriyorsa, bu büyük olasılıkla yanlış kategoridir.İlgili içerik
@@ -190,10 +190,10 @@
VideoİndiriliyorOto.oynat
- Trend sayfasını gizle
+ Popüler sayfasını gizleKaliteDavranışKalite ve oynatıcı davranışıPiped, kullandığımız API\'yi sağlayan YouTube için açık kaynaklı alternatif bir internet ön yüzüdür. Piped olmasaydı LibreTube olmazdı. Geliştiricilerine çok teşekkürler!
- Erişim aracı ön ucuna giden URL
+ Sunucu ön ucuna giden URL
\ No newline at end of file
From 29a561758351fd2529057c85c0fd3d37b51b5336 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Sun, 19 Jun 2022 12:08:40 +0000
Subject: [PATCH 06/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 6f00f0f82..e972908c4 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -5,7 +5,7 @@
AxtarınVideolarAbunə Olun
- Abunəlikdən Çıxın
+ Abunəlikdən çıxınPaylaşınSaxlayınEndirin
@@ -38,7 +38,7 @@
YT Musiqi MahnılarıYT Musiqi VideolarıYT Musiqi Pleylistləri
- Defolt Tab
+ Defolt PanelSponsorBlokhttps://sponsor.ajay.app API\'sini istifadə edirHəqiqi məzmunu olmayan aralıq. Fasilə, statik çərçivə, təkrarlanan animasiya ola bilər. Məlumat ehtiva edən keçidlər üçün istifadə edilməməlidir.
@@ -46,9 +46,9 @@
Bitişdən sonra məlumat. Məlumatla nəticə çıxarmaq üçün deyil.SeqmentlərSponsor
- Ödənişsiz/Özünü Reklam
- Ödənişsiz və ya özünü reklam istisna olmaqla, \"sponsor\" kimi. Buraya mallar, ianələr və ya onların kiminlə əməkdaşlıq etdiyi barədə məlumatlar haqqında bölmələr daxildir.
- Bəyənmək, abunə olmaq və ya məzmunun ortasında izləmək üçün qısa xatırlatma olduqda. Əgər uzun və ya konkret bir şey haqqındadırsa, bunun əvəzinə özünü reklam lazımdır.
+ Ödənişsiz/Öz Reklamı
+ Ödənişsiz və ya öz reklamı istisna olmaqla, \"sponsor\" kimi. Buraya mallar, ianələr və ya onların kiminlə əməkdaşlıq etdiyi barədə məlumatlar haqqında bölmələr daxildir.
+ Bəyənmək, abunə olmaq və ya məzmunun ortasında izləmək üçün qısa xatırlatma olduqda. Əgər uzun və ya konkret bir şey haqqındadırsa, bunun əvəzinə öz reklamıdır.LisenziyaPleylist adı boş ola bilməzBitdi.
@@ -57,7 +57,7 @@
Yenidən Cəhd EdinSeqment ötürüldüAçıq
- Ödənişli reklam ,tövsiyələr və birbaşa reklamlar. Səbəblərə, yaradıcılara, vebsaytlara və məhsullara özünü reklam və ya pulsuz orijinal çağırışlar üçün deyil.
+ Ödənişli reklam, tövsiyələr və birbaşa reklamlar.Öz reklamı və ya səbəblərə, yaradıcılara, veb saytlara və məhsullara pulsuz orijinal elanlar üçün deyil.İnteraksiya xatırlatma(bəyən və abunə ol)Fasilə/Giriş AnimasiyasıDaxil olun/qeydiyyatdan keçin
@@ -70,7 +70,7 @@
Endirmək alınmadı.VLC\'də AçınVLC\'də açmaq mümkün deyil. O, quraşdırılmamış ola bilər.
- Abunəlikləri İdxal Edin
+ Abunəlikləri idxal edinYouTube və ya NewPipe\'danMövzuServerdə problem var. Başqasını cəhd edə bilərsiniz\?
@@ -92,8 +92,8 @@
DilSistemSistem
- Açıq
- Tünd
+ İşıqlı
+ Qaranlıq%1$s abunəçi%1$s videoTənzimləmələr
@@ -128,9 +128,9 @@
Tətbiq və onun xüsusiyyətləri haqqında ətraflı məlumat üçün veb sayta daxil olun.Töhfəİdeyalar, tərcümələr, dizayn dəyişiklikləri təmin edin, kodu aydınlaşdırın və yazın. Nə qədər çox etsəniz, bir o qədər yaxşıdır!
- GPLv3+ kopyalanmış azad lisenziyadır. İstifadə edin, öyrənin, dəyişdirin və paylaşın; hamı ilə.
+ GPLv3+ kopyalanmış pulsuz lisenziyadır. İstifadə edin, öyrənin, dəyişdirin və paylaşın; birlikdə.İanə Edin
- Mümkünsə, bunun sizə nə dəyəri varsa verin. LibreTube komandası ianə və ya yardımınızdan kiçikdir.
+ Mümkünsə, bunun sizə nə dəyəri varsa verin. LibreTube komandası ianə və ya yardımınızdan daha kiçikdir.Yeni versiyanı axtarınƏn son versiya işlədilir.Defolt oynatma sürəti
@@ -180,7 +180,7 @@
Bu və ya onun seriyasındakı gələcək videolarda qarşıdan gələn məzmunu təfərrüatlandıran, lakin əlavə məlumat təqdim etməyən seqmentlər üçün. Əgər o, yalnız burada görünən klipləri ehtiva edirsə, bu, çox güman ki, yanlış kateqoriyadır.Bölmələri gizlədinYalnız doldurucu və ya yumor üçün əlavə edilmiş əlaqəsiz səhnələr üçün,videonun əsas məzmununu başa düşmək tələb olunmur.
- Yalnız musiqi videolarında istifadə üçün. O, rəsmi qarışıqların bir hissəsi deyil, videonun hissələrini əhatə etməlidir. Sonda video Spotify və ya hər hansı digər qarışıq versiyaya mümkün qədər yaxından bənzəməlidir və ya danışıq və ya digər diqqəti yayındıran amilləri azaltmalıdır.
+ Yalnız musiqi videolarında istifadə üçün. O, rəsmi mikslərin bir hissəsi deyil, videonun hissələrini əhatə etməlidir. Sonda video Spotify və ya hər hansı digər miks versiyaya mümkün qədər yaxından bənzəməlidir və ya danışıq və ya digər diqqəti yayındıran amilləri azaltmalıdır.Oynadıcı üçün video formatıMaks. bufer üçün video saniyələrin miqdarı.Ön yükləmə
@@ -195,6 +195,6 @@
DavranışKeyfiyyət və oynadıcı davranışıGəlir axtarın
- (Piped) YouTube üçün açıq mənbəli alternativ veb-frontendi, istifadə etdiyimiz API təmin edir. Piped olmasaydı, LibreTube mövcud olmazdı. Onların tərtibatçılarına böyük təşəkkürlər!
+ Piped, istifadə etdiyimiz API\' ni təmin edən YouTube üçün açıq mənbəli alternativ veb interfeysidir. Piped olmasaydı LibreTube olmazdı. Tərtibatçılarına böyük təşəkkürlər!Server üçün URL
\ No newline at end of file
From 3f591ca6a8603fa3224633cd02f78e2d499373e5 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Sun, 19 Jun 2022 13:24:08 +0000
Subject: [PATCH 07/97] Translated using Weblate (Azerbaijani)
Currently translated at 99.4% (196 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index e972908c4..a4d192fd5 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -172,7 +172,7 @@
Versiya %1$sLibreTube komandası və bunların necə baş verdiyini öyrənin.Əlaqədar məzmun
- Baxdıqlarınızla yanaşı əlaqəli yayımları göstərin.
+ İzlədiyinizin altında əlaqəli yayımları göstərin.Əlaqəsiz/ZarafatlarBölmələri göstərinMusiqi: Musiqisiz Bölmə
@@ -194,7 +194,7 @@
KeyfiyyətDavranışKeyfiyyət və oynadıcı davranışı
- Gəlir axtarın
+ Seek incrementPiped, istifadə etdiyimiz API\' ni təmin edən YouTube üçün açıq mənbəli alternativ veb interfeysidir. Piped olmasaydı LibreTube olmazdı. Tərtibatçılarına böyük təşəkkürlər!Server üçün URL
\ No newline at end of file
From ec7c86cce4e1a6afb1d2bddfd8b7be923d44c741 Mon Sep 17 00:00:00 2001
From: Super12138
Date: Sun, 19 Jun 2022 23:55:00 +0000
Subject: [PATCH 08/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 68.0% (134 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 4ed4cc6c8..174196d95 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -117,4 +117,21 @@
YouTube后台播放版本 %1$s 可用
+ 是否前往GitHub下载最新版本?
+ 选择下载视频(音频)的存储位置
+ 访问LibreTube的官方网站获取LibreTube应用了解更多信息。
+ 提供想法、翻译、设计、更改、清理和编写代码。做得越多越好!
+ 如果同时下载了视频和音频文件,将会合并成视频文件。
+ 下载到
+ 如果可以的话,把这对你有价值的东西给你。 LibreTube 团队比您的捐赠或帮助更小。
+ 检测新版本
+ 点击查找LibreTube的最新版本
+ LibreTube使用了GPLv3+许可证。你可以用来学习、研究和分享。
+ 预览/回放
+ 视频格式
+ 外观
+ 排版
+ 下载
+ 贡献
+ 捐助
\ No newline at end of file
From b00f0582d253cba6bb5730a64346141398b407cf Mon Sep 17 00:00:00 2001
From: Rex_sa
Date: Sun, 19 Jun 2022 16:10:21 +0000
Subject: [PATCH 09/97] Translated using Weblate (Arabic)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ar/
---
app/src/main/res/values-ar/strings.xml | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index c10046ded..6b56cb349 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -175,13 +175,13 @@
تحويل الملفات إذا تم تنزيل كل من الصوت والفيديو.حيث يتم تخزين الوسائط التي تم تنزيلها.متقدم
- المشغل
+ الصوت والفيديوGPLv3+ هو ترخيص حر متروك للحقوق. الاستخدام والدراسة والتغيير والمشاركة؛ مع الجميع.أعط ما يستحقه هذا لك ، إذا استطعت. فريق LibreTube أصغر من تبرعك أو مساعدتك.سرعة التشغيل الافتراضيةاضبط التطبيق حسب رغبتك.
- تعرف على الجميع.
- المشغل، التنزيلات، التاريخ
+ تعرف على كل من يشارك في تطوير التطبيق وتحسينه.
+ التنزيلات والتاريخإضافة مثيل مخصص (على مسؤوليتك الخاصة)مجلد الأفلاممشاركة عنوان URL إلى
@@ -190,4 +190,11 @@
صوتفيديوقيد التحميل
+ إخفاء صفحة المحتوى الشائع
+ عنوان URL لمثيل الواجهة الأمامية
+ الجودة
+ السلوك
+ الجودة وسلوك المشغل
+ معدل التقديم
+ Piped هي واجهة ويب بديلة مفتوحة المصدر ل YouTube توفر واجهة برمجة التطبيقات التي نستخدمها. بدون Piped ، لن يكون LibreTube موجودا. شكرا جزيلا لمطوريهم!
\ No newline at end of file
From 7839f1fd0f1a6cc99c879b3651d776a2b39f48dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=85=A4AbsurdUsername?=
Date: Sun, 19 Jun 2022 16:02:13 +0000
Subject: [PATCH 10/97] Translated using Weblate (Italian)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/
---
app/src/main/res/values-it/strings.xml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index e931ea3bb..9a4b0d253 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -119,7 +119,7 @@
ScaricamentiConversione dei file se entrambi audio e video vengono scaricati.Formato video
- Lettore, scaricamenti, cronologia
+ Scaricamenti, cronologiaLa versione %1$s è disponibileAndare ai rilasci su GitHub per scaricarlo\?Aspetto
@@ -138,12 +138,12 @@
Stai eseguendo l\'ultima versione.Velocità di riproduzione predefinitaAvanzate
- Lettore
+ Audio e videoRegola l\'app a tuo piacimento.Dal vivoAutoriQuesto commento non ha risposte.
- Fai conoscenza con tutti.
+ Conosci tutti coloro che sono coinvolti nello sviluppo e nel miglioramento dell\'applicazione.Cartella degli scaricamentiScheda SDCartella musicale
@@ -191,4 +191,10 @@
Con videoScaricandoNascondi la pagina Tendenze
+ URL dell\'istanza frontend
+ Qualità
+ Comportamento
+ Qualità e comportamento lettore
+ Cerca incremento
+ Piped è un\' alternativa web-frontend open-source per YouTube che fornisce l\'API che usiamo. Senza Piped, LibreTube non esisterebbe. Un enorme grazie ai loro sviluppatori!
\ No newline at end of file
From a59c0986066dfd45d966c428f893548093d0369f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?=
Date: Sun, 19 Jun 2022 13:37:01 +0000
Subject: [PATCH 11/97] Translated using Weblate (Spanish)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/es/
---
app/src/main/res/values-es/strings.xml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index ff01ecb75..5b5b7c57a 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -123,7 +123,7 @@
AparienciaEste comentario no tiene respuestas.Autores
- Conozca a todos.
+ Conozca a todos los que están involucrados en el desarrollo y la mejora de la aplicación.Almacenamiento internoTarjeta SDCompartir con
@@ -154,7 +154,7 @@
La GPLv3+ es una licencia libre con copyleft. Utiliza, estudia, cambia y comparte; con todos.Carpeta de películasEstás utilizando la última versión.
- Reproductor, descargas e historial
+ Descargas, historialAntiguoEl nombre de la carpeta en la que se almacenan los medios descargados.Añadir instancia
@@ -169,7 +169,7 @@
ContribuciónDonarAvanzado
- Reproductor
+ Audio y vídeoAjuste la aplicación a su gusto.Velocidad de reproducción predeterminadaEn vivo
@@ -192,4 +192,9 @@
Sin audioAudioVídeo
+ Calidad
+ Comportamiento
+ Calidad y comportamiento del reproductor
+ Incremento de búsqueda
+ Piped es una interfaz web alternativa de código abierto para YouTube que proporciona la API que usamos. Sin Piped, LibreTube no existiría. ¡Muchas gracias a sus desarrolladores!
\ No newline at end of file
From 8b693fc4fe08fb34a6debecbce5bc0cab0bb4649 Mon Sep 17 00:00:00 2001
From: ReVanced
Date: Sun, 19 Jun 2022 16:06:45 +0000
Subject: [PATCH 12/97] Translated using Weblate (Turkish)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index b24958c96..21da44eac 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -196,4 +196,5 @@
Kalite ve oynatıcı davranışıPiped, kullandığımız API\'yi sağlayan YouTube için açık kaynaklı alternatif bir internet ön yüzüdür. Piped olmasaydı LibreTube olmazdı. Geliştiricilerine çok teşekkürler!Sunucu ön ucuna giden URL
+ Aramayı artırın
\ No newline at end of file
From 438858d7c76a44f2c1168b2fdf611822690e31ce Mon Sep 17 00:00:00 2001
From: IceDBorn
Date: Sun, 19 Jun 2022 16:37:17 +0000
Subject: [PATCH 13/97] Translated using Weblate (Greek)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/el/
---
app/src/main/res/values-el/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index b63f17381..8a40dee1a 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -195,6 +195,6 @@
ΠοιότηταΣυμπεριφοράΠοιότητα και συμπεριφορά του αναπαραγωγέα
- Προσάυξηση αναζήτησης
+ Προσαύξηση αναπήδησηςΤο Piped είναι μία εναλλακτική σελίδα ανοικτού κώδικα για το YouTube που παρέχει το API που χρησιμοποιούμε. Χωρίς το Piped, το LibreTube δεν θα υπήρχε. Τεράστιες ευχαριστίες στους προγραμματιστές του!
\ No newline at end of file
From 6c803785cd0264cc6621c7797063415fca8d5ede Mon Sep 17 00:00:00 2001
From: ReVanced
Date: Sun, 19 Jun 2022 16:05:32 +0000
Subject: [PATCH 14/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index a4d192fd5..b2bb75986 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -194,7 +194,7 @@
KeyfiyyətDavranışKeyfiyyət və oynadıcı davranışı
- Seek increment
+ Axtarışı artırınPiped, istifadə etdiyimiz API\' ni təmin edən YouTube üçün açıq mənbəli alternativ veb interfeysidir. Piped olmasaydı LibreTube olmazdı. Tərtibatçılarına böyük təşəkkürlər!Server üçün URL
\ No newline at end of file
From 18df222d1377d2773294168600c73cdd558df956 Mon Sep 17 00:00:00 2001
From: Eric
Date: Mon, 20 Jun 2022 01:26:31 +0000
Subject: [PATCH 15/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 68.0% (134 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 174196d95..9424255ce 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -118,14 +118,14 @@
后台播放版本 %1$s 可用是否前往GitHub下载最新版本?
- 选择下载视频(音频)的存储位置
+ 选择下载视频(音频)的存储位置。访问LibreTube的官方网站获取LibreTube应用了解更多信息。提供想法、翻译、设计、更改、清理和编写代码。做得越多越好!如果同时下载了视频和音频文件,将会合并成视频文件。下载到如果可以的话,把这对你有价值的东西给你。 LibreTube 团队比您的捐赠或帮助更小。检测新版本
- 点击查找LibreTube的最新版本
+ 单击检查应用是否是最新版。LibreTube使用了GPLv3+许可证。你可以用来学习、研究和分享。预览/回放视频格式
From f0c4ca09b9829fdd90e63203e5c4dbff5d0c6e3e Mon Sep 17 00:00:00 2001
From: JY3
Date: Mon, 20 Jun 2022 03:35:17 +0000
Subject: [PATCH 16/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 68.0% (134 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 9424255ce..e757beae5 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -133,5 +133,5 @@
排版下载贡献
- 捐助
+ 捐赠
\ No newline at end of file
From d5a8a87cea8f4cfa9a19ae7d64824c1f9a5f8829 Mon Sep 17 00:00:00 2001
From: JY3
Date: Mon, 20 Jun 2022 09:11:55 +0000
Subject: [PATCH 17/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 68.0% (134 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index e757beae5..84e8ce602 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -47,7 +47,7 @@
登录已登录。您已登录。您可以退出您的帐号。
- 注册成功。您现在可以订阅频道了。
+ 注册成功。现在您可以订阅频道了。请登录并重试。已退出登录。自定义实例
From 62338961ebf1c6c63280d3e97cb8cda843faab02 Mon Sep 17 00:00:00 2001
From: "J. Lavoie"
Date: Mon, 20 Jun 2022 11:53:17 +0000
Subject: [PATCH 18/97] Translated using Weblate (French)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fr/
---
app/src/main/res/values-fr/strings.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 18835bb6d..3a372076b 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -143,7 +143,7 @@
En directCe commentaire n\'a pas de réponse.Auteurs
- Apprenez à connaître tout le monde.
+ Apprenez à connaître toutes les personnes qui participent au développement et à l\'amélioration de l\'application.Carte SDLe nom du dossier dans lequel le média téléchargé est stocké.Nom
@@ -196,4 +196,5 @@
ComportementQualité et comportement du lecteurRechercher l\'incrément
+ Piped est un front-end web alternatif open-source pour YouTube qui fournit l\'API que nous utilisons. Sans Piped, LibreTube n\'existerait pas. Un grand merci à leurs développeurs !
\ No newline at end of file
From 84531dc661f395419d8d68622cf51a4aa584a1ec Mon Sep 17 00:00:00 2001
From: irure
Date: Mon, 20 Jun 2022 09:52:32 +0000
Subject: [PATCH 19/97] Translated using Weblate (Basque)
Currently translated at 100.0% (197 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/eu/
---
app/src/main/res/values-eu/strings.xml | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index 4e92acb49..1305bda52 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -107,11 +107,11 @@
Azken bertsioa da hau.Azken bertsioa erabiltzen ari zara.Aurreratua
- Erabiltzailea
+ Audioa eta bideoaEgokitu aplikazioa zure gustura.
- Erreproduzitzailea, deskargak, historiala
+ Deskargak, historialaIruzkin honek ez du erantzunik.
- Ezagutu guztiak.
+ Ezagutu aplikazioaren garapenean eta hobekuntzan parte hartzen duten guztiak.IzenaDeskargatutako multimediak gordetzen diren karpetaren izena.Deskarga karpeta
@@ -185,4 +185,16 @@
Aurrez kargatzeaErreproduzitzailearen bideo formatuaErreprodukzio automatikoa
+ Bideorik gabe
+ Audiorik gabe
+ Audioa
+ Bideoa
+ Deskargatzen
+ Ezkutatu joera-orria
+ Instantziaren frontenderako URLa
+ Kalitatea
+ Portaera
+ Kalitatea eta erreprodukzioaen portaera
+ Bilatu gehikuntza
+ Piped kode irekiko web-frontend alternatibo bat da eta YouTube-k erabiltzen duen APIa eskaintzen du. Piped gabe, LibreTube ez litzateke existituko. Mila esker haien garatzaileei!
\ No newline at end of file
From ea41ce02c442116288126c461a242680e104cb31 Mon Sep 17 00:00:00 2001
From: Super12138
Date: Mon, 20 Jun 2022 12:09:50 +0000
Subject: [PATCH 20/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 77.1% (152 of 197 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 84e8ce602..8d1a12b3f 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -134,4 +134,22 @@
下载贡献捐赠
+ 作者
+ 下载文件夹
+ SD 卡
+ 保存视频或音频的文件夹名称。
+ 文件夹名称
+ 内部存储
+ 默认播放速度
+ 高级
+ 音频和视频
+ 根据您自己的喜好调整应用程序。
+ 下载, 历史记录
+ 此评论没有人回复。
+ 音乐文件夹
+ 电影文件夹
+ 了解参与开发和改进LibreTube的每个人。
+ 正在使用最新的版本
+ 您正在运行最新的版本。
+ 直播
\ No newline at end of file
From 3bd503a25a65d0ba1d7a93fe7a0ee02cbd0b693e Mon Sep 17 00:00:00 2001
From: Rex_sa
Date: Mon, 20 Jun 2022 19:01:48 +0000
Subject: [PATCH 21/97] Translated using Weblate (Arabic)
Currently translated at 100.0% (200 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ar/
---
app/src/main/res/values-ar/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index 6b56cb349..e38f5a80b 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -197,4 +197,7 @@
الجودة وسلوك المشغلمعدل التقديمPiped هي واجهة ويب بديلة مفتوحة المصدر ل YouTube توفر واجهة برمجة التطبيقات التي نستخدمها. بدون Piped ، لن يكون LibreTube موجودا. شكرا جزيلا لمطوريهم!
+ الإيقاف المؤقت التلقائي
+ قم بتشغيل الفيديو التالي تلقائيا عند الانتهاء من الحالي.
+ أوقف المشغل مؤقتا عند إيقاف تشغيل الشاشة.
\ No newline at end of file
From a20b678ad2f16a2d0daf91f4f2aa96001de014df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=85=A4AbsurdUsername?=
Date: Mon, 20 Jun 2022 14:08:09 +0000
Subject: [PATCH 22/97] Translated using Weblate (Italian)
Currently translated at 100.0% (200 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/
---
app/src/main/res/values-it/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 9a4b0d253..e88368792 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -197,4 +197,7 @@
Qualità e comportamento lettoreCerca incrementoPiped è un\' alternativa web-frontend open-source per YouTube che fornisce l\'API che usiamo. Senza Piped, LibreTube non esisterebbe. Un enorme grazie ai loro sviluppatori!
+ Riproduci automaticamente il video successivo quando quello corrente è finito.
+ Pausa automatica
+ Metti in pausa il lettore quando lo schermo é spento.
\ No newline at end of file
From 2736341fdf365438382107ed1d9f70621ac856dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?=
Date: Mon, 20 Jun 2022 18:58:25 +0000
Subject: [PATCH 23/97] Translated using Weblate (Spanish)
Currently translated at 100.0% (200 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/es/
---
app/src/main/res/values-es/strings.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 5b5b7c57a..c4c1df8ca 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -9,7 +9,7 @@
ContraseñaIniciar sesiónRegistrarse
- Calidad:
+ CalidadBuscarCerrar sesiónCancelar
@@ -197,4 +197,7 @@
Calidad y comportamiento del reproductorIncremento de búsquedaPiped es una interfaz web alternativa de código abierto para YouTube que proporciona la API que usamos. Sin Piped, LibreTube no existiría. ¡Muchas gracias a sus desarrolladores!
+ Pausa automática
+ Pausa el reproductor cuando se apaga la pantalla.
+ Reproduce automáticamente el siguiente vídeo cuando el actual haya terminado.
\ No newline at end of file
From 782ed1e7fafdf7960a0779c360e832136bf67516 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Mon, 20 Jun 2022 13:51:19 +0000
Subject: [PATCH 24/97] Translated using Weblate (Turkish)
Currently translated at 100.0% (200 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 21da44eac..8dcff7108 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -197,4 +197,7 @@
Piped, kullandığımız API\'yi sağlayan YouTube için açık kaynaklı alternatif bir internet ön yüzüdür. Piped olmasaydı LibreTube olmazdı. Geliştiricilerine çok teşekkürler!Sunucu ön ucuna giden URLAramayı artırın
+ Oto.duraklama
+ Ekran kapatıldığında oynatıcıyı duraklatın.
+ Akım bittiğinde sonraki videoyu otomatik olarak oynatın.
\ No newline at end of file
From ed7e26da44102ac361555a30512137dcf77e8dfb Mon Sep 17 00:00:00 2001
From: Nizami
Date: Mon, 20 Jun 2022 13:47:47 +0000
Subject: [PATCH 25/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (200 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index b2bb75986..8737f6016 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -197,4 +197,7 @@
Axtarışı artırınPiped, istifadə etdiyimiz API\' ni təmin edən YouTube üçün açıq mənbəli alternativ veb interfeysidir. Piped olmasaydı LibreTube olmazdı. Tərtibatçılarına böyük təşəkkürlər!Server üçün URL
+ Cari bitdikdə növbəti videonu avtomatik olaraq oynadın.
+ Avto-fasilə
+ Ekran söndürüldükdə pleyeri dayandırın.
\ No newline at end of file
From 9db119681a4659a256d3c5f7f768ee0fa24a0764 Mon Sep 17 00:00:00 2001
From: Super12138
Date: Mon, 20 Jun 2022 12:24:02 +0000
Subject: [PATCH 26/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 89.5% (179 of 200 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 8d1a12b3f..4678278a9 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -152,4 +152,31 @@
正在使用最新的版本您正在运行最新的版本。直播
+ %1$s 次观看
+ 默认
+ 简约图形
+ 飞舞的火焰
+ 小鸟
+ 渐变
+ 时尚火炬
+ 简约火焰
+ 管道,登录,订阅
+ URL或API
+ 添加实例
+ 需要填写名称与实例URL或链接才能保存。
+ 删除所有自定义实例
+ 请输入有效的URL
+ 相关内容
+ 在您正在观看的内容旁边显示相关的内容。
+ 添加自定义实例(后果自负)
+ 实例名称
+ 当前版本 %1$s
+ 了解LibreTube 团队以及更多信息。
+ 显示章节
+ 隐藏章节
+ 预加载
+ 缓冲视频的最长时间。
+ 播放器的视频格式
+ 没有音频
+ 没有视频
\ No newline at end of file
From ed0083f0fe6b014e7ed41133ec4854689b4b6d73 Mon Sep 17 00:00:00 2001
From: Nizami
Date: Mon, 20 Jun 2022 20:35:40 +0000
Subject: [PATCH 27/97] Translated using Weblate (Turkish)
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 8dcff7108..9a6c7115f 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -200,4 +200,5 @@
Oto.duraklamaEkran kapatıldığında oynatıcıyı duraklatın.Akım bittiğinde sonraki videoyu otomatik olarak oynatın.
+ Oynatma listesini klonla
\ No newline at end of file
From dda1314bd38ba9232f1ca08de92ad4ac0bb2c85e Mon Sep 17 00:00:00 2001
From: Nizami
Date: Mon, 20 Jun 2022 20:34:44 +0000
Subject: [PATCH 28/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 8737f6016..476c8738e 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -200,4 +200,5 @@
Cari bitdikdə növbəti videonu avtomatik olaraq oynadın.Avto-fasiləEkran söndürüldükdə pleyeri dayandırın.
+ Pleylisti klonlayın
\ No newline at end of file
From 56ebda482df92d484c4137505ba07c041e645f52 Mon Sep 17 00:00:00 2001
From: Yaron Shahrabani
Date: Mon, 20 Jun 2022 20:04:38 +0000
Subject: [PATCH 29/97] Translated using Weblate (Hebrew)
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/he/
---
app/src/main/res/values-iw/strings.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index 84a06f969..370904af5 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -197,4 +197,8 @@
התנהגותהגדלת קפיצהPiped הוא חלופה בקוד פתוח למנשק המשתמש של YouTube ומספק את ה־API בו אנו משתמשים. בלי Piped, LibreTube לא היה קיים. אנו מודים למפתחים מקרב לב!
+ השהיה אוטומטית
+ השהיית הנגן עם כיבוי המסך.
+ שכפול רשימת הנגינה
+ לנגן את הסרטון הבא אוטומטית כשהנוכחי מסתיים.
\ No newline at end of file
From 1a051bda683880a8f7284ad1480b330047e4b63f Mon Sep 17 00:00:00 2001
From: Stefano Privato
<9ae976b2-7d28-4d98-bdc2-39642f86fd34@crazyer.anonaddy.com>
Date: Tue, 21 Jun 2022 05:55:31 +0000
Subject: [PATCH 30/97] Translated using Weblate (Italian)
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/
---
app/src/main/res/values-it/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index e88368792..52262def7 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -200,4 +200,5 @@
Riproduci automaticamente il video successivo quando quello corrente è finito.Pausa automaticaMetti in pausa il lettore quando lo schermo é spento.
+ Clona playlist
\ No newline at end of file
From 15be6c48e5a80dd00866fd4de0ed073bb7f2e74c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?=
Date: Mon, 20 Jun 2022 23:20:07 +0000
Subject: [PATCH 31/97] Translated using Weblate (Spanish)
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/es/
---
app/src/main/res/values-es/strings.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index c4c1df8ca..bdd0a9990 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -200,4 +200,5 @@
Pausa automáticaPausa el reproductor cuando se apaga la pantalla.Reproduce automáticamente el siguiente vídeo cuando el actual haya terminado.
+ Clonar lista de reproducción
\ No newline at end of file
From 92d9037a9fbb3701146158513948bb051f091988 Mon Sep 17 00:00:00 2001
From: Super12138
Date: Tue, 21 Jun 2022 00:00:58 +0000
Subject: [PATCH 32/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (201 of 201 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 32 ++++++++++++++++++----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 4678278a9..1d450bf32 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -95,7 +95,7 @@
有偿推广、有偿推荐和直接广告。不是自我宣传或无偿发自内心的赞美动机、创造者、网站和产品。无偿/自我推广除了无偿或自我宣传,与 \"赞助商 \"类似。这包括有关商品、捐赠或与谁合作的信息。
- SponsorBlock
+ 赞助板块使用 https://sponsor.ajay.app 的 API开赞助商
@@ -108,12 +108,12 @@
黄绿黑
- Mystic Material 3
+ Material 3通知开关图标
- Piped
+ 管道YouTube后台播放版本 %1$s 可用
@@ -121,7 +121,7 @@
选择下载视频(音频)的存储位置。访问LibreTube的官方网站获取LibreTube应用了解更多信息。提供想法、翻译、设计、更改、清理和编写代码。做得越多越好!
- 如果同时下载了视频和音频文件,将会合并成视频文件。
+ 如果同时下载了音频与视频,则转换成视频文件。下载到如果可以的话,把这对你有价值的东西给你。 LibreTube 团队比您的捐赠或帮助更小。检测新版本
@@ -149,7 +149,7 @@
音乐文件夹电影文件夹了解参与开发和改进LibreTube的每个人。
- 正在使用最新的版本
+ 正在使用最新的版本。您正在运行最新的版本。直播%1$s 次观看
@@ -179,4 +179,26 @@
播放器的视频格式没有音频没有视频
+ 遗失的遗产
+ 分享链接到
+ 填充 切线/笑话
+ 对于只为填充或幽默而添加的切身场景,不需要理解视频的主要内容。
+ 音乐:非音乐部分
+ 音频
+ 视频
+ 下载中
+ 自动播放
+ 隐藏热门页面
+ 实例前端的URL
+ 清晰度
+ 布局
+ 清晰度和播放器行为
+ 寻求增量
+ Piped是YouTube的一个开源替代网络前端,提供我们使用的API。没有Piped,LibreTube就不会存在。衷心感谢他们的开发者!
+ 自动暂停
+ 当屏幕关闭时暂停播放视频。
+ 当前的视频播完后,自动播放下一个视频。
+ 复制播放列表
+ 仅用于音乐视频。它应该涵盖视频的一部分,而不是官方混音的一部分。最后,视频应尽可能类似于 Spotify 或任何其他混合版本,或减少谈话或其他干扰。
+ 对于详细说明此系列视频或未来视频中即将出现的内容的片段,但不提供其他信息。如果它包含仅出现在此处的剪辑,则这很可能是错误的类别。
\ No newline at end of file
From feb952a12bfb61b126593d527cf58ca4e552c70a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Allan=20Nordh=C3=B8y?=
Date: Tue, 21 Jun 2022 08:46:46 +0000
Subject: [PATCH 33/97] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?=
=?UTF-8?q?=20Bokm=C3=A5l)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently translated at 87.6% (178 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/nb_NO/
---
app/src/main/res/values-nb-rNO/strings.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml
index e97131b73..703828320 100644
--- a/app/src/main/res/values-nb-rNO/strings.xml
+++ b/app/src/main/res/values-nb-rNO/strings.xml
@@ -197,4 +197,10 @@
Kvalitet og avspilleroppførselBlafringsmengdePiped er en fri alternativ grenseflate for YouTube som tilbyr API-et programmet bruker. Uten Piped ville ikke LibreTube eksistert. Stor takk til utviklerne deres.
+ Logg ut og tilbakestill alle innstillinger\?
+ Spill neste video når nåværende er fullført.
+ Gjenopprett forvalg
+ Automatisk pause
+ Sett avspilleren på pause når skjermen skrus av.
+ Dupliser spillelisten
\ No newline at end of file
From f0303d5c9b5c1a2976eeabf84e2f94da1b1a063e Mon Sep 17 00:00:00 2001
From: Rex_sa
Date: Tue, 21 Jun 2022 11:11:43 +0000
Subject: [PATCH 34/97] Translated using Weblate (Arabic)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ar/
---
app/src/main/res/values-ar/strings.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index e38f5a80b..6bf04c086 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -200,4 +200,7 @@
الإيقاف المؤقت التلقائيقم بتشغيل الفيديو التالي تلقائيا عند الانتهاء من الحالي.أوقف المشغل مؤقتا عند إيقاف تشغيل الشاشة.
+ استعادة الإعدادات الافتراضية
+ هل أنت متأكد؟ سيؤدي ذلك إلى تسجيل خروجك وإعادة تعيين جميع إعداداتك!
+ نسخ قائمة التشغيل
\ No newline at end of file
From dc7fffbfdc71276ad481c8ed3f0c4b9d250d0879 Mon Sep 17 00:00:00 2001
From: hossein
Date: Wed, 22 Jun 2022 09:55:34 +0000
Subject: [PATCH 35/97] Translated using Weblate (Persian)
Currently translated at 31.5% (64 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fa/
---
app/src/main/res/values-fa/strings.xml | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml
index 2f2265ab9..ef9064dd6 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -85,4 +85,28 @@
فهرست پخشآلبومهای موسیقیمجوز
+ یوتیوب
+ پلی لیست های یوتیوب موزیک
+ بخش رد شده
+ بخش
+ یادآوری تعامل (لایک و اشتراک)
+ لهجه
+ ابی شاد
+ سبز
+ زرد
+ بنفش
+ سیاه
+ سرخ
+ روشن
+ خاموش
+ ظاهر
+ رفتار
+ دانلود در...
+ جایی که فایل دانلود شده ذخیره میشود.
+ برای اطلاعات بیشتر در مورد برنامه و ویژگی های آن به وب سایت مراجعه کنید.
+ به اندازه ای که این برنامه را دوست دارید به ما کمک کنید. تیم ما کوچک است و هر مقدار کمکی مفید است.
+ نسخه %1$s موجود است
+ دانلودها
+ فرمت ویدئو
+ کمک کردن
\ No newline at end of file
From 091d66ea0d17779bafe507f446939c72845918f8 Mon Sep 17 00:00:00 2001
From: hotaru
Date: Wed, 22 Jun 2022 09:12:54 +0000
Subject: [PATCH 36/97] Translated using Weblate (Russian)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ru/
---
app/src/main/res/values-ru/strings.xml | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index f6bb3ccb4..b4d50f7f1 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -132,7 +132,7 @@
Гладкий градиентПерейти к выпускам на GitHub, чтобы загрузить его\?Поведение
- Познакомьтесь со всеми.
+ Познакомьтесь со всеми, кто участвует в разработке и улучшении приложения.Имя папки, в которой хранится загруженные медиафайлы.Прикольная птицаОгненный огонь
@@ -179,9 +179,9 @@
Вы используете последнюю версию.Скорость воспроизведения по умолчаниюПродвинутое
- Плеер
+ Аудио и видеоНастройте приложение по своему вкусу.
- Плеер, загрузки, история
+ Загрузки, историяВ прямом эфиреФормат видео для плеераАудио
@@ -191,4 +191,16 @@
Скрыть вкладку \"тренды\"Нет видеоНет звука
+ Восстановить настройки по-умолчанию
+ Piped — это альтернативный веб-интерфейс с открытым исходным кодом для YouTube, предоставляющий API, который мы используем. Без Piped не существовало бы LibreTube. Огромное спасибо их разработчикам!
+ Вы уверены\? Это выведет вас из системы и сбросит все ваши настройки!
+ URL-адрес экземпляра
+ Качество
+ Поведение
+ Качество и поведение плеера
+ Шаг перемотки
+ Автопауза
+ Ставить плеер на паузу, когда экран выключен.
+ Автоматически воспроизводить следующее видео после завершения текущего.
+ Клонировать плейлист
\ No newline at end of file
From 973d45cd1743a1850582a832628c53ca62c8bb0e Mon Sep 17 00:00:00 2001
From: kaltoros
Date: Tue, 21 Jun 2022 21:16:05 +0000
Subject: [PATCH 37/97] Translated using Weblate (Korean)
Currently translated at 98.0% (199 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ko/
---
app/src/main/res/values-ko/strings.xml | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 8e0e6e6a0..9c2da0098 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -120,7 +120,7 @@
오디오와 비디오가 모두 다운로드된 경우 파일 변환.원하는 대로 앱을 조정하세요.이 댓글에는 답글이 없습니다.
- 모두를 알아보세요.
+ 앱 개발과 개선에 참여한 사람이 누구인지 알아보세요.%1$s 버전 사용 가능GitHub의 릴리스로 이동하여 다운로드하시겠습니까\?동작
@@ -182,4 +182,21 @@
분량을 채우기 위한 사족 씬이나 동영상의 메인 컨텐츠를 이해하는데 필요하지 않은 유머가 해당됩니다.돌진하는 새휘날리는 화염
+ 초기값으로 복원
+ 정말 실행합니까\? 이후 로그아웃되며 설정값이 모두 지워집니다!
+ 현재 동영상이 끝나면 다음 동영상을 자동으로 재생합니다.
+ 오디오 없음
+ 비디오 없음
+ 오디오
+ 비디오
+ 다운로드 중
+ 자동 재생
+ 인기 동영상 페이지 숨기기
+ 품질
+ 행동
+ 품질 및 플레이어 행동
+ Piped는 이 앱이 사용하는, YouTube용 오픈소스 대안 웹 프로트엔드 API를 제공합니다. Piped 없이는 LibreTube가 존재하지 않습니다. 그들의 개발품에 매우 큰 감사를 보냅니다!
+ 자동 일시중지
+ 화면이 꺼질 경우 동영상 재생을 일시중지합니다.
+ 재생목록 복제
\ No newline at end of file
From d023278238f9869516650d3f206d426e22328850 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=85=A4AbsurdUsername?=
Date: Tue, 21 Jun 2022 08:05:50 +0000
Subject: [PATCH 38/97] Translated using Weblate (Italian)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/it/
---
app/src/main/res/values-it/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 52262def7..4d30628bc 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -201,4 +201,6 @@
Pausa automaticaMetti in pausa il lettore quando lo schermo é spento.Clona playlist
+ Ripristina predefiniti
+ Sei sicuro\? Questo ti disconnetterà e ripristinerà tutte le tue impostazioni!
\ No newline at end of file
From cda18f1aadb06007a5156d76f521491021b9a64a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?=
Date: Tue, 21 Jun 2022 11:50:34 +0000
Subject: [PATCH 39/97] Translated using Weblate (Spanish)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/es/
---
app/src/main/res/values-es/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index bdd0a9990..1a7cf324c 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -201,4 +201,6 @@
Pausa el reproductor cuando se apaga la pantalla.Reproduce automáticamente el siguiente vídeo cuando el actual haya terminado.Clonar lista de reproducción
+ Restaurar los valores predeterminados
+ ¿Está seguro\? ¡Esto te cerrará la sesión y restablecerá todos tus ajustes!
\ No newline at end of file
From 0196c0910b4b7c9b93a99fbaa09832738aeadfd7 Mon Sep 17 00:00:00 2001
From: "J. Lavoie"
Date: Wed, 22 Jun 2022 11:34:43 +0000
Subject: [PATCH 40/97] Translated using Weblate (French)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fr/
---
app/src/main/res/values-fr/strings.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 3a372076b..88ea14659 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -197,4 +197,10 @@
Qualité et comportement du lecteurRechercher l\'incrémentPiped est un front-end web alternatif open-source pour YouTube qui fournit l\'API que nous utilisons. Sans Piped, LibreTube n\'existerait pas. Un grand merci à leurs développeurs !
+ Restaurer les valeurs par défaut
+ Êtes-vous sûr·e \? Ceci va vous déconnecter et réinitialiser tous vos paramètres !
+ Pause automatique
+ Mettre le lecteur en pause lorsque l\'écran est éteint.
+ Lancer automatiquement la vidéo suivante lorsque la vidéo en cours est terminée.
+ Cloner la liste de lecture
\ No newline at end of file
From 8a9749b0fe43c4fe91f040213ae64d5c9016d3e4 Mon Sep 17 00:00:00 2001
From: NRJ
Date: Wed, 22 Jun 2022 09:16:01 +0000
Subject: [PATCH 41/97] Translated using Weblate (Hindi)
Currently translated at 23.6% (48 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/hi/
---
app/src/main/res/values-hi/strings.xml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index 5906f5144..f196abc8d 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -19,7 +19,7 @@
आप पहले ही लॉग इन हैं, आप अपने खाते से लॉगआउट कर सकते हैं।कृपया पुनः लॉगिन करें और पुनः प्रयास करें!इंस्टेंस चुनें
- एक कस्टम इंस्टेंस जोड़ें
+ अलग इंस्टेंस जोड़ेंलॉग इन/रजिस्टरसफलतापूर्वक सब्सक्राइब ही गया!इस स्ट्रीम को डाउनलोड नहीं कर सकते!
@@ -51,4 +51,8 @@
एक और डाउनलोड पहले से ही हो रहा है कृपया इसके समाप्त होने तक प्रतीक्षा करें!क्वालिटी चुनें:के बारे में
+ होम
+ सदस्यता
+ लायब्ररी
+ वीडियो
\ No newline at end of file
From 63618ab7961908ba498bd88775c7e9a62f816eb6 Mon Sep 17 00:00:00 2001
From: ReVanced
Date: Tue, 21 Jun 2022 09:14:31 +0000
Subject: [PATCH 42/97] Translated using Weblate (Turkish)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/tr/
---
app/src/main/res/values-tr/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 9a6c7115f..7dab3d58f 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -201,4 +201,6 @@
Ekran kapatıldığında oynatıcıyı duraklatın.Akım bittiğinde sonraki videoyu otomatik olarak oynatın.Oynatma listesini klonla
+ Varsayılanlara sıfırla
+ Emin misin\? Bu, oturumunuzu kapatacak ve tüm ayarlarınızı sıfırlayacaktır!
\ No newline at end of file
From 1da57df5d4eed8520d1763956209fae15a3ffe82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=20=C4=81vis?=
Date: Wed, 22 Jun 2022 08:59:51 +0000
Subject: [PATCH 43/97] Translated using Weblate (Latvian)
Currently translated at 90.1% (183 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/lv/
---
app/src/main/res/values-lv/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml
index 7e986a16e..4226ccf24 100644
--- a/app/src/main/res/values-lv/strings.xml
+++ b/app/src/main/res/values-lv/strings.xml
@@ -156,7 +156,7 @@
Šī ir jaunākā versija.Šī ir jaunākā versija.Tehniski
- Atskaņotājs
+ Audio un videoPielāgojiet aplikāciju tā, kā jūs to vēlaties.Atskaņotājs, lejupielādes, vēstureNoklusējuma atskaņošanas ātrums
From a5debcde425dac6bee11ea07739956b110277838 Mon Sep 17 00:00:00 2001
From: ReVanced
Date: Tue, 21 Jun 2022 09:12:34 +0000
Subject: [PATCH 44/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 476c8738e..77c1cbbdc 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -201,4 +201,6 @@
Avto-fasiləEkran söndürüldükdə pleyeri dayandırın.Pleylisti klonlayın
+ Defoltlara bərpa edin
+ Siz əminsiz\? Bu, sizi sistemdən çıxaracaq və bütün tənzimləmələrinizi sıfırlayacaq!
\ No newline at end of file
From ac6a1bc9026b8c4a586341eb92caca24cbda228d Mon Sep 17 00:00:00 2001
From: Yaron Shahrabani
Date: Tue, 21 Jun 2022 12:43:02 +0000
Subject: [PATCH 45/97] Translated using Weblate (Hebrew)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/he/
---
app/src/main/res/values-iw/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index 370904af5..5c02f795f 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -201,4 +201,6 @@
השהיית הנגן עם כיבוי המסך.שכפול רשימת הנגינהלנגן את הסרטון הבא אוטומטית כשהנוכחי מסתיים.
+ שחזור ברירות מחדל
+ להמשיך\? פעולה זו תוציא אותך מהמערכת ותאפס את כל ההגדרות שלך!
\ No newline at end of file
From 6fde9258a0085f85b7ed12fddeff553f448b3e2a Mon Sep 17 00:00:00 2001
From: Doan Quan Tien
Date: Tue, 21 Jun 2022 15:21:21 +0000
Subject: [PATCH 46/97] Translated using Weblate (Vietnamese)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/vi/
---
app/src/main/res/values-vi/strings.xml | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index 9e69cc7a0..8050be497 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -92,11 +92,11 @@
Ủng hộTốc độ phát mặc địnhNâng cao
- Trình phát
+ Âm thanh và videoTinh chỉnh ứng dụng theo ý thích của bạn.
- Trình phát, tải xuống, lịch sử
+ Tải xuống, lịch sửTrực tiếp
- Bình luận gì không có phản hồi nào.
+ Bình luận này không có phản hồi nào.Tác giảTênKho lưu trữ nội bộ
@@ -184,4 +184,23 @@
Tìm hiểu về nhóm LibreTube và cách mà tất cả diễn ra.Các nội dung liên quanĐịnh dạng video cho trình phát
+ Khôi phục mặc định
+ Bạn chắc chứ\? Điều này sẽ đăng xuất bạn ra và đặt lại tất cả các cài đặt của bạn!
+ Không có âm thanh
+ Không có video
+ Âm thanh
+ Video
+ Đang tải xuống
+ Tự động phát
+ Ẩn trang thịnh hành
+ URL dẫn đến instance frontend
+ Chất lượng
+ Hành vi
+ Chất lượng và hành vi của trình phát
+ Tìm kiếm sự gia tăng
+ Piped là một giao diện web thay thế mã nguồn mở cho YouTube, cung cấp API mà chúng tôi sử dụng. Nếu không có Piped, LibreTube sẽ không thể tồn tại. Cảm ơn rất nhiều đến các nhà phát triển của họ!
+ Tự động dừng
+ Dừng trình phát khi màn hình tắt.
+ Tự động phát video tiếp theo khi video hiện tại kết thúc.
+ Nhân bản danh sách phát
\ No newline at end of file
From 02ce1bc8f42014410c56500570c57af9829e021d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=20=C4=81vis?=
Date: Wed, 22 Jun 2022 16:57:58 +0000
Subject: [PATCH 47/97] Translated using Weblate (Latvian)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/lv/
---
app/src/main/res/values-lv/strings.xml | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml
index 4226ccf24..f64da66fe 100644
--- a/app/src/main/res/values-lv/strings.xml
+++ b/app/src/main/res/values-lv/strings.xml
@@ -118,7 +118,7 @@
Atskaņot fonāŠim komentāram nav atbilžu.Autori
- Iepazīstieties ar visiem.
+ Iepazīstieties ar visiem, kas ir iesaistīti aplikācijas veidošanā un uzlabošanā.Nosaukums mapei, kurā tiek saglabāti lejupielādētie faili.Lejupielādēt uzNosaukums
@@ -158,7 +158,7 @@
TehniskiAudio un videoPielāgojiet aplikāciju tā, kā jūs to vēlaties.
- Atskaņotājs, lejupielādes, vēsture
+ Lejupielādes, vēstureNoklusējuma atskaņošanas ātrumsTiešraidePievienot pielāgotu instanci (uz jūsu atbildību)
@@ -185,4 +185,22 @@
Atskaņotāja video formātsTikai priekš mūzikas video. Tas ir laika sprīžiem, kas nav oficiālajā dziesmas versijā. Beigās video vajadzētu būt tik līdzīgam Spotify vai jebkurai citai dziesmas versijai, cik vien iespējams vai ar samazinātu runāšanas daudzumu un uzmanības novēršanu.Automātiski atskaņot
+ Atjaunot noklusējumu
+ Vai esat pārliecināts\? Šī darbība jūs izrakstīs un iestatīs visus iestatījumus uz noklusējumu!
+ Nav audio
+ Nav video
+ Audio
+ Video
+ Lejupielādē
+ Paslēpt tendenču lapu
+ URL instances frontend
+ Kvalitāte
+ Uzvedība
+ Kvalitāte un atskaņotāja uzvedība
+ Meklēšanas iedaļa
+ Piped ir atvērta pirmkoda alternatīva mājaslapa priekš YouTube, kas sniedz API, ko mēs izmantojam. Bez Piped, LibreTube neeksistētu. Milzīgs paldies viņu veidotājiem!
+ Automātiska pauzēšana
+ Iepauzēt atskaņotāju, kamēr ekrāns ir izslēgts.
+ Automātiski atskaņot nākamo video, kad pašreizējais ir beidzies.
+ Duplicēt atskaņošanas sarakstu
\ No newline at end of file
From 90141f343a39a63d25f1dd9aba4326ee71c8046b Mon Sep 17 00:00:00 2001
From: Nizami
Date: Thu, 23 Jun 2022 09:39:20 +0000
Subject: [PATCH 48/97] Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/az/
---
app/src/main/res/values-az/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 77c1cbbdc..cc6e701ea 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -127,7 +127,7 @@
Endirilmiş medianın saxlandığı yer.Tətbiq və onun xüsusiyyətləri haqqında ətraflı məlumat üçün veb sayta daxil olun.Töhfə
- İdeyalar, tərcümələr, dizayn dəyişiklikləri təmin edin, kodu aydınlaşdırın və yazın. Nə qədər çox etsəniz, bir o qədər yaxşıdır!
+ İdeyalar, tərcümələr, dizayn dəyişiklikləri təmin edin, kodu təmizləyin və yazın. Nə qədər çox etsəniz, bir o qədər yaxşıdır!GPLv3+ kopyalanmış pulsuz lisenziyadır. İstifadə edin, öyrənin, dəyişdirin və paylaşın; birlikdə.İanə EdinMümkünsə, bunun sizə nə dəyəri varsa verin. LibreTube komandası ianə və ya yardımınızdan daha kiçikdir.
From 990419ec6e467f41e2bb7008f13292fa35e2fec4 Mon Sep 17 00:00:00 2001
From: alefvanoon <53198048+alefvanoon@users.noreply.github.com>
Date: Fri, 24 Jun 2022 10:47:45 +0000
Subject: [PATCH 49/97] Add NotABug Mirror to README
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 1f9427f71..b5c6894f0 100644
--- a/README.md
+++ b/README.md
@@ -62,3 +62,4 @@ WARNING: THIS IS A BETA VERSION, THEREFORE YOU MAY ENCOUNTER BUGS. IF YOU DO, OP
## Mirrors (read-only)
GitLab
+NotABug
From 6682101c066295acb28481dd1550e939182ff05d Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Fri, 24 Jun 2022 14:44:59 +0200
Subject: [PATCH 50/97] improve controls margin and size
---
.../res/layout/exo_styled_player_control_view.xml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 3e7c5e32a..eb743edcc 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -244,18 +244,22 @@
From 108a1d90b0519738fefc0d7170af5b7217c6d411 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Fri, 24 Jun 2022 15:03:29 +0200
Subject: [PATCH 51/97] cleanup
---
.../libretube/fragments/PlayerFragment.kt | 5 +++--
.../layout/exo_styled_player_control_view.xml | 20 -------------------
2 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 54aa2cad5..8e63a08ff 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -259,8 +259,9 @@ class PlayerFragment : Fragment() {
}
// FullScreen button trigger
- view.findViewById(R.id.fullscreen).setOnClickListener {
- // remember to hide everything when new thing added
+ val fullScreenButton = view.findViewById(R.id.fullscreen)
+ fullScreenButton.setOnClickListener {
+ exoPlayerView.hideController()
if (!isFullScreen) {
with(motionLayout) {
getConstraintSet(R.id.start).constrainHeight(R.id.player, -1)
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index eb743edcc..89236cece 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -136,14 +136,6 @@
android:layout_marginBottom="10dp"
android:layoutDirection="ltr">
-
-
-
-
@@ -160,14 +152,6 @@
android:id="@+id/fullscreen"
style="@style/ExoStyledControls.Button.Bottom.FullScreen" />
-
-
-
-
-
-
Date: Fri, 24 Jun 2022 15:16:14 +0200
Subject: [PATCH 52/97] fullscreen button dyncamic image
---
.../com/github/libretube/fragments/PlayerFragment.kt | 9 +++++----
app/src/main/res/drawable/ic_fullscreen.xml | 10 ++++++++++
app/src/main/res/drawable/ic_fullscreen_exit.xml | 10 ++++++++++
app/src/main/res/drawable/ic_lock.xml | 10 ++++++++++
app/src/main/res/drawable/ic_unlock.xml | 10 ++++++++++
.../main/res/layout/exo_styled_player_control_view.xml | 3 ++-
6 files changed, 47 insertions(+), 5 deletions(-)
create mode 100644 app/src/main/res/drawable/ic_fullscreen.xml
create mode 100644 app/src/main/res/drawable/ic_fullscreen_exit.xml
create mode 100644 app/src/main/res/drawable/ic_lock.xml
create mode 100644 app/src/main/res/drawable/ic_unlock.xml
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 8e63a08ff..f7ef8381f 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -182,6 +182,7 @@ class PlayerFragment : Fragment() {
val mainMotionLayout =
mainActivity.findViewById(R.id.mainMotionLayout)
mainMotionLayout.progress = abs(progress)
+ exoPlayerView.hideController()
eId = endId
sId = startId
}
@@ -192,13 +193,11 @@ class PlayerFragment : Fragment() {
val mainMotionLayout =
mainActivity.findViewById(R.id.mainMotionLayout)
if (currentId == eId) {
- exoPlayerView.hideController()
exoPlayerView.useController = false
- mainMotionLayout.progress = 1.toFloat()
+ mainMotionLayout.progress = 1F
} else if (currentId == sId) {
- exoPlayerView.showController()
exoPlayerView.useController = true
- mainMotionLayout.progress = 0.toFloat()
+ mainMotionLayout.progress = 0F
}
}
@@ -269,6 +268,7 @@ class PlayerFragment : Fragment() {
}
view.findViewById(R.id.main_container).isClickable = true
view.findViewById(R.id.linLayout).visibility = View.GONE
+ fullScreenButton.setImageResource(R.drawable.ic_fullscreen_exit)
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
isFullScreen = true
@@ -279,6 +279,7 @@ class PlayerFragment : Fragment() {
}
view.findViewById(R.id.main_container).isClickable = false
view.findViewById(R.id.linLayout).visibility = View.VISIBLE
+ fullScreenButton.setImageResource(R.drawable.ic_fullscreen)
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
isFullScreen = false
diff --git a/app/src/main/res/drawable/ic_fullscreen.xml b/app/src/main/res/drawable/ic_fullscreen.xml
new file mode 100644
index 000000000..bf4ff36cd
--- /dev/null
+++ b/app/src/main/res/drawable/ic_fullscreen.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_fullscreen_exit.xml b/app/src/main/res/drawable/ic_fullscreen_exit.xml
new file mode 100644
index 000000000..27064c626
--- /dev/null
+++ b/app/src/main/res/drawable/ic_fullscreen_exit.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_lock.xml b/app/src/main/res/drawable/ic_lock.xml
new file mode 100644
index 000000000..a1e2be625
--- /dev/null
+++ b/app/src/main/res/drawable/ic_lock.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_unlock.xml b/app/src/main/res/drawable/ic_unlock.xml
new file mode 100644
index 000000000..8dd1faa58
--- /dev/null
+++ b/app/src/main/res/drawable/ic_unlock.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 89236cece..747adddac 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -150,7 +150,8 @@
+ style="@style/ExoStyledControls.Button.Bottom.FullScreen"
+ android:src="@drawable/ic_fullscreen"/>
From cf332443a87107db3a425ca03247fe7bc31878f5 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Fri, 24 Jun 2022 17:26:36 +0200
Subject: [PATCH 53/97] lock player button
---
.../com/github/libretube/DownloadService.kt | 10 ++--
.../libretube/adapters/CommentsAdapter.kt | 2 +-
.../libretube/adapters/PlaylistAdapter.kt | 2 +-
.../libretube/adapters/PlaylistsAdapter.kt | 2 +-
.../libretube/adapters/SearchAdapter.kt | 8 ++-
.../libretube/adapters/SubscriptionAdapter.kt | 3 +-
.../adapters/SubscriptionChannelAdapter.kt | 2 +-
.../libretube/dialogs/AddtoPlaylistDialog.kt | 2 +-
.../libretube/dialogs/CreatePlaylistDialog.kt | 2 +-
.../libretube/dialogs/CustomInstanceDialog.kt | 8 ++-
.../github/libretube/dialogs/LoginDialog.kt | 2 +-
.../dialogs/PlaylistOptionsDialog.kt | 2 +-
.../libretube/fragments/ChannelFragment.kt | 8 ++-
.../com/github/libretube/fragments/Home.kt | 3 +-
.../com/github/libretube/fragments/Library.kt | 2 +-
.../libretube/fragments/PlayerFragment.kt | 40 ++++++++++---
.../libretube/fragments/PlaylistFragment.kt | 3 +-
.../libretube/fragments/SearchFragment.kt | 4 +-
.../libretube/fragments/Subscriptions.kt | 5 +-
.../com/github/libretube/obj/CommentsPage.kt | 2 +-
.../java/com/github/libretube/obj/Playlist.kt | 2 +-
.../com/github/libretube/obj/PlaylistId.kt | 2 +-
.../com/github/libretube/obj/Playlists.kt | 2 +-
.../libretube/preferences/InstanceSettings.kt | 13 +++--
.../libretube/util/DescriptionAdapter.kt | 5 +-
.../util/{VideoViews.kt => FormatShort.kt} | 0
.../github/libretube/util/UpdateChecker.kt | 4 +-
.../drawable/{ic_lock.xml => ic_locked.xml} | 10 ++--
.../{ic_unlock.xml => ic_unlocked.xml} | 2 +-
.../layout/exo_styled_player_control_view.xml | 57 +++++++++++--------
30 files changed, 128 insertions(+), 81 deletions(-)
rename app/src/main/java/com/github/libretube/util/{VideoViews.kt => FormatShort.kt} (100%)
rename app/src/main/res/drawable/{ic_lock.xml => ic_locked.xml} (71%)
rename app/src/main/res/drawable/{ic_unlock.xml => ic_unlocked.xml} (91%)
diff --git a/app/src/main/java/com/github/libretube/DownloadService.kt b/app/src/main/java/com/github/libretube/DownloadService.kt
index e13b766b5..997b383c0 100644
--- a/app/src/main/java/com/github/libretube/DownloadService.kt
+++ b/app/src/main/java/com/github/libretube/DownloadService.kt
@@ -69,7 +69,6 @@ class DownloadService : Service() {
}
private fun downloadManager() {
-
// create folder for temporary files
tempDir = File(
applicationContext.getExternalFilesDir(DIRECTORY_DOWNLOADS),
@@ -255,10 +254,11 @@ class DownloadService : Service() {
if (returnCode.toString() != "0") downloadFailedNotification()
else downloadSucceededNotification()
onDestroy()
- }, {
- // CALLED WHEN SESSION PRINTS LOGS
- Log.e(TAG, it.message.toString())
- }
+ },
+ {
+ // CALLED WHEN SESSION PRINTS LOGS
+ Log.e(TAG, it.message.toString())
+ }
) {
// CALLED WHEN SESSION GENERATES STATISTICS
Log.e(TAG + "stat", it.time.toString())
diff --git a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt
index efce52157..3ce71ac4a 100644
--- a/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/CommentsAdapter.kt
@@ -19,11 +19,11 @@ import com.github.libretube.obj.CommentsPage
import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.formatShort
import com.squareup.picasso.Picasso
-import java.io.IOException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import retrofit2.HttpException
+import java.io.IOException
class CommentsAdapter(
private val videoId: String,
diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
index bfc1e481a..28e9065f0 100644
--- a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
@@ -20,11 +20,11 @@ import com.github.libretube.obj.PlaylistId
import com.github.libretube.obj.StreamItem
import com.github.libretube.util.RetrofitInstance
import com.squareup.picasso.Picasso
-import java.io.IOException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import retrofit2.HttpException
+import java.io.IOException
class PlaylistAdapter(
private val videoFeed: MutableList,
diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
index 1d3c8e5a2..63fd37428 100644
--- a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
@@ -17,10 +17,10 @@ import com.github.libretube.obj.Playlists
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.squareup.picasso.Picasso
-import java.io.IOException
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import retrofit2.HttpException
+import java.io.IOException
class PlaylistsAdapter(
private val playlists: MutableList,
diff --git a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt
index 33b5c705f..d7a8d465d 100644
--- a/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SearchAdapter.kt
@@ -85,10 +85,11 @@ class SearchViewHolder(
val viewsString = if (item.views?.toInt() != -1) item.views.formatShort() else ""
val uploadDate = if (item.uploadedDate != null) item.uploadedDate else ""
views.text =
- if (viewsString != "" && uploadDate != "")
+ if (viewsString != "" && uploadDate != "") {
"$viewsString • $uploadDate"
- else
+ } else {
viewsString + uploadDate
+ }
val channelName = v.findViewById(R.id.search_channel_name)
channelName.text = item.uploaderName
v.setOnClickListener {
@@ -145,9 +146,10 @@ class SearchViewHolder(
val playlistChannelName = v.findViewById(R.id.search_name)
playlistChannelName.text = item.uploaderName
val playlistVideosNumber = v.findViewById(R.id.search_playlist_videos)
- if (item.videos?.toInt() != -1)
+ if (item.videos?.toInt() != -1) {
playlistVideosNumber.text =
v.context.getString(R.string.videoCount, item.videos.toString())
+ }
v.setOnClickListener {
// playlist clicked
val activity = v.context as MainActivity
diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt
index 0db923b83..a05024ce0 100644
--- a/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionAdapter.kt
@@ -34,8 +34,9 @@ class SubscriptionAdapter(
fun updateItems() {
// limitedVideoFeed.add("")
i += 10
- if (i > videoFeed.size)
+ if (i > videoFeed.size) {
i = videoFeed.size
+ }
notifyDataSetChanged()
}
diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
index 3ae744511..dcd3b4e03 100644
--- a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
@@ -15,11 +15,11 @@ import com.github.libretube.obj.Subscribe
import com.github.libretube.obj.Subscription
import com.github.libretube.util.RetrofitInstance
import com.squareup.picasso.Picasso
-import java.io.IOException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import retrofit2.HttpException
+import java.io.IOException
class SubscriptionChannelAdapter(private val subscriptions: MutableList) :
RecyclerView.Adapter() {
diff --git a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
index 80453c14b..126bdd7e0 100644
--- a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
@@ -19,8 +19,8 @@ import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class AddtoPlaylistDialog : DialogFragment() {
private val TAG = "AddToPlaylistDialog"
diff --git a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
index d33cf90ee..000bf1897 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
@@ -19,8 +19,8 @@ import com.github.libretube.obj.Playlists
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class CreatePlaylistDialog : DialogFragment() {
val TAG = "CreatePlaylistDialog"
diff --git a/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
index e1f06186a..50e49356c 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
@@ -52,13 +52,17 @@ class CustomInstanceDialog : DialogFragment() {
} catch (e: Exception) {
// invalid URL
Toast.makeText(
- context, getString(R.string.invalid_url), Toast.LENGTH_SHORT
+ context,
+ getString(R.string.invalid_url),
+ Toast.LENGTH_SHORT
).show()
}
} else {
// at least one empty input
Toast.makeText(
- context, context?.getString(R.string.empty_instance), Toast.LENGTH_SHORT
+ context,
+ context?.getString(R.string.empty_instance),
+ Toast.LENGTH_SHORT
).show()
}
}
diff --git a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
index ae27c5ca2..8d1cc33f8 100644
--- a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
@@ -17,8 +17,8 @@ import com.github.libretube.R
import com.github.libretube.obj.Login
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class LoginDialog : DialogFragment() {
private val TAG = "LoginDialog"
diff --git a/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt b/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
index 862bf8a4f..94fd2702d 100644
--- a/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
@@ -11,11 +11,11 @@ import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import java.io.IOException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import retrofit2.HttpException
+import java.io.IOException
class PlaylistOptionsDialog(
private val playlistId: String,
diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
index f42f95b69..f2a78c4d5 100644
--- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
@@ -22,8 +22,8 @@ import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.formatShort
import com.google.android.material.button.MaterialButton
import com.squareup.picasso.Picasso
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class ChannelFragment : Fragment() {
@@ -201,7 +201,10 @@ class ChannelFragment : Fragment() {
channelName.text = response.name
if (response.verified) {
channelName.setCompoundDrawablesWithIntrinsicBounds(
- 0, 0, R.drawable.ic_verified, 0
+ 0,
+ 0,
+ R.drawable.ic_verified,
+ 0
)
}
view.findViewById(R.id.channel_subs).text = resources.getString(
@@ -231,7 +234,6 @@ class ChannelFragment : Fragment() {
private fun fetchNextPage() {
fun run() {
-
lifecycleScope.launchWhenCreated {
val response = try {
RetrofitInstance.api.getChannelNextPage(channel_id!!, nextPage!!)
diff --git a/app/src/main/java/com/github/libretube/fragments/Home.kt b/app/src/main/java/com/github/libretube/fragments/Home.kt
index 5235e72c7..b78d774e3 100644
--- a/app/src/main/java/com/github/libretube/fragments/Home.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Home.kt
@@ -16,8 +16,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R
import com.github.libretube.adapters.TrendingAdapter
import com.github.libretube.util.RetrofitInstance
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class Home : Fragment() {
@@ -34,7 +34,6 @@ class Home : Fragment() {
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
-
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_home, container, false)
}
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index 14946625e..812411b4c 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -19,8 +19,8 @@ import com.github.libretube.adapters.PlaylistsAdapter
import com.github.libretube.dialogs.CreatePlaylistDialog
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.floatingactionbutton.FloatingActionButton
-import java.io.IOException
import retrofit2.HttpException
+import java.io.IOException
class Library : Fragment() {
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index f7ef8381f..10c035f05 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -18,6 +18,7 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.Button
import android.widget.FrameLayout
import android.widget.ImageButton
import android.widget.ImageView
@@ -84,11 +85,11 @@ import com.google.android.material.button.MaterialButton
import com.google.android.material.card.MaterialCardView
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.squareup.picasso.Picasso
+import org.chromium.net.CronetEngine
+import retrofit2.HttpException
import java.io.IOException
import java.util.concurrent.Executors
import kotlin.math.abs
-import org.chromium.net.CronetEngine
-import retrofit2.HttpException
var isFullScreen = false
@@ -118,6 +119,7 @@ class PlayerFragment : Fragment() {
private lateinit var segmentData: Segments
private var relatedStreams: List? = arrayListOf()
private var relatedStreamsEnabled = true
+ private var isPlayerLocked: Boolean = false
private lateinit var relDownloadVideo: LinearLayout
@@ -297,6 +299,23 @@ class PlayerFragment : Fragment() {
}
}
+ // lock and unlock the player
+ val lockPlayerButton = view.findViewById(R.id.lock_player)
+ lockPlayerButton.setOnClickListener {
+ // change the locked/unlocked icon
+ if (!isPlayerLocked) {
+ lockPlayerButton.setImageResource(R.drawable.ic_locked)
+ } else {
+ lockPlayerButton.setImageResource(R.drawable.ic_unlocked)
+ }
+
+ // show/hide all the controls
+ lockPlayer(isPlayerLocked)
+
+ // change locked status
+ isPlayerLocked = !isPlayerLocked
+ }
+
val scrollView = view.findViewById(R.id.player_scrollView)
scrollView.viewTreeObserver
.addOnScrollChangedListener {
@@ -364,8 +383,9 @@ class PlayerFragment : Fragment() {
exoPlayerView.postDelayed(this::checkForSegments, 100)
- if (!::segmentData.isInitialized || segmentData.segments.isEmpty())
+ if (!::segmentData.isInitialized || segmentData.segments.isEmpty()) {
return
+ }
segmentData.segments.forEach { segment: Segment ->
val segmentStart = (segment.segment!![0] * 1000.0f).toLong()
@@ -460,7 +480,6 @@ class PlayerFragment : Fragment() {
}
if (categories.size > 0) {
segmentData = try {
-
RetrofitInstance.api.getSegments(
videoId!!,
"[\"" + TextUtils.join("\",\"", categories) + "\"]"
@@ -525,7 +544,6 @@ class PlayerFragment : Fragment() {
playWhenReady: Boolean,
playbackState: Int
) {
-
exoPlayerView.keepScreenOn = !(
playbackState == Player.STATE_IDLE ||
playbackState == Player.STATE_ENDED ||
@@ -629,7 +647,6 @@ class PlayerFragment : Fragment() {
}
view.findViewById(R.id.player_channel).setOnClickListener {
-
val activity = view.context as MainActivity
val bundle = bundleOf("channel_id" to response.uploaderUrl)
activity.navController.navigate(R.id.channel, bundle)
@@ -719,7 +736,6 @@ class PlayerFragment : Fragment() {
}
for (vid in response.videoStreams!!) {
- Log.e(TAG, vid.toString())
// append quality to list if it has the preferred format (e.g. MPEG)
if (vid.format.equals(videoFormatPreference)) { // preferred format
videosNameArray += vid.quality!!
@@ -865,7 +881,6 @@ class PlayerFragment : Fragment() {
}
private fun initializePlayerNotification(c: Context) {
-
mediaSession = MediaSessionCompat(c, this.javaClass.name)
mediaSession.apply {
isActive = true
@@ -889,6 +904,15 @@ class PlayerFragment : Fragment() {
}
}
+ private fun lockPlayer(isLocked: Boolean) {
+ val visibility = if (isLocked) View.VISIBLE else View.GONE
+ exoPlayerView.findViewById(R.id.controls_top_right).visibility = visibility
+ exoPlayerView.findViewById(R.id.exo_play_pause).visibility = visibility
+ exoPlayerView.findViewById
-
-
-
-
-
+ android:layout_height="15dp">
-
+
+
+
+
+
Date: Thu, 23 Jun 2022 14:40:40 +0000
Subject: [PATCH 54/97] Translated using Weblate (Greek)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/el/
---
app/src/main/res/values-el/strings.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 8a40dee1a..f9185c492 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -197,4 +197,10 @@
Ποιότητα και συμπεριφορά του αναπαραγωγέαΠροσαύξηση αναπήδησηςΤο Piped είναι μία εναλλακτική σελίδα ανοικτού κώδικα για το YouTube που παρέχει το API που χρησιμοποιούμε. Χωρίς το Piped, το LibreTube δεν θα υπήρχε. Τεράστιες ευχαριστίες στους προγραμματιστές του!
+ Επαναφορά προεπιλογών
+ Είστε σίγουρος/η; Αυτό θα σας αποσυνδέσει και θα επαναφέρει όλες τις ρυθμίσεις σας!
+ Αυτόματη παύση
+ Παύση της αναπαραγωγής όταν η οθόνη είναι απενεργοποιημένη.
+ Αυτόματη αναπαραγωγή του επόμενου βίντεο όταν τελειώσει το τρέχον.
+ Κλωνοποίηση λίστας αναπαραγωγής
\ No newline at end of file
From 6322b3f0d368eb700de3fb9a677c9466e0a52e2a Mon Sep 17 00:00:00 2001
From: Issa1553
Date: Fri, 24 Jun 2022 21:05:19 +0000
Subject: [PATCH 55/97] Translated using Weblate (Dutch)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/nl/
---
app/src/main/res/values-nl/strings.xml | 163 +++++++++++++++++++------
1 file changed, 124 insertions(+), 39 deletions(-)
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 6c2fde7eb..f60853233 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -1,6 +1,6 @@
- Kies Kwaliteit:
+ KwaliteitGeregistreerd. Nu kunt u zich abonneren op kanalen.ZoekenVideo\'s
@@ -16,16 +16,16 @@
UitloggenAnnulerenAl ingelogd. U mag uitloggen uit uw account.
- Log in en probeer het opnieuw a.u.b.!
+ Log in en probeer het opnieuw a.u.b.Kies een instantie
- Een aangepaste instantie toevoegen
- Kies een regio
- Inloggen/Registreren
+ Aangepaste instantie
+ Regio
+ Inloggen/registrerenGelieve eerst in te loggen of te registreren in de instellingen.Abonneer je eerst op enkele kanalen.Kan deze stream niet downloaden.Download voltooid.
- Een andere download is al bezig. Wacht alstublieft tot het klaar is.
+ Wacht a.u.b. tot alle downloads klaar zijn…Download mislukt.Open in VLCKan niet openen in VLC. Het is mogelijk niet geïnstalleerd.
@@ -33,17 +33,17 @@
Van YouTube of NewPipeThemaEr ging iets mis.
- Dit is niet uw Gmail account.
+ Dit is voor een LibreTube account.GeabonneerdNetwerkfout.
- Kies rasterkolommen
+ RasterkolommenAfspeellijstnaam
- Systeemtaal
+ SysteemStartBibliotheekUitgelogd.Standaard videoresolutie
- Geen Internet Verbinding
+ Maak eerst verbinding met het internet.OpnieuwCommentarenKies zoekfilter
@@ -60,62 +60,147 @@
YT-muziekafspeellijstenStandaard TabbladSponsorBlock
- Gebruikt API van https://sponsor.ajay.app/
+ Gebruikt de https://sponsor.ajay.app APISegment overgeslagen
- Ingeschakeld
+ AanSegmentenSponsor
- Betaalde promotie, betaalde verwijzingen en directe advertenties. Niet voor zelfpromotie of gratis shoutouts naar goede doelen/makers/websites/producten die ze leuk vinden.
+ Betaalde promotie, betaalde verwijzingen en directe advertenties. Niet voor zelfpromotie of gratis oprechte shoutouts naar goede doelen, makers, websites en producten.Onbetaald/Zelfpromotie
- Vergelijkbaar met \"sponsor\" behalve voor onbetaalde of zelfpromotie. Dit omvat secties over merchandise, donaties, of informatie over met wie ze hebben samengewerkt.
- Interactieherinnering (Abonneren)
- Als er een korte herinnering is om te liken, abonneren of volgen in het midden van de inhoud. Als het lang is of over iets specifieks gaat, moet het in plaats daarvan onder zelfpromotie staan.
+ Vergelijkbaar met \"sponsor\" behalve voor onbetaalde of zelfpromotie. Dit omvat secties over merchandise, donaties, of info over met wie ze hebben samengewerkt.
+ Interactieherinnering (liken en abonneren)
+ Als er een korte herinnering is om te liken, abonneren of volgen in het midden van de inhoud. Als het lang is of over iets specifieks gaat, moet het in plaats daarvan zelfpromotie zijn.Pauze/Intro AnimatieYouTube
- Speel op achtergrond
+ Speel op de achtergrondAbonnementenJa
- Een interval zonder eigenlijke inhoud. Kan een pauze zijn, een statisch frame, een herhalende animatie. Dit mag niet worden gebruikt voor overgangen die informatie bevatten.
- Eindkaarten/Credits
- Credits of wanneer de YouTube endcards verschijnen. Niet voor conclusies met informatie.
+ Een interval zonder eigenlijke inhoud. Kan een pauze zijn, een statisch frame, een herhalende animatie. Mag niet worden gebruikt voor overgangen die informatie bevatten.
+ Eindkaarten en aftiteling
+ Info na afloop. Niet voor conclusies met info.Licentie
- Kleur Accent
- Rood
- Pixel Blauw
- Geel
- Groen
- Paars
- OLED-thema
- Materiaal Jij
+ Accenten
+ Rust rood
+ Gelukzalig blauw
+ Yeeting geel
+ Groovy groen
+ Plezierig paars
+ Zwart
+ Mystiek Materiaal 3Meldingen
- App-pictogram
- Ingeschakeld
- Uitgeschakeld
+ Pictogram
+ Aan
+ UitPipedVersie %1$s is beschikbaar
- Er is een nieuwe update beschikbaar. Klik op oké om doorgestuurd te worden naar de update pagina op GitHub.
+ Ga naar releases op GitHub om het te downloaden\?Afspeellijst makenIngelogd.De naam van de afspeellijst mag niet leeg zijnMislukt :(
- Aanpassing
+ AanpassingenNiets hier.Afspeellijst verwijderenDe afspeellijst verwijderen\?
- Afspeellijst gemaakt!
+ Afspeellijst gemaakt.Over
- Licht Thema
- Donker Thema
+ Licht
+ DonkerInstellingen%1$s video\'sEr is een probleem met de server. Probeer een andere instantie\?U moet een gebruikersnaam en een wachtwoord invoeren.Toevoegen aan afspeellijst
- Succes!
+ Gedaan.Locatie
- Taal Wijzigen
- Systeem Standaard
+ Taal
+ Systeem%1$s abonneesInstantieWebsite
+ Standaardwaarden herstellen
+ Weet je het zeker\? Dit zult u uitloggen en al uw instellingen resetten!
+ Gedrag
+ Video formaat
+ Downloads
+ Deze commentaar heeft geen reacties.
+ Auteurs
+ Maak kennis met iedereen die betrokken is bij de ontwikkeling en verbetering van de app.
+ Interne opslag
+ SD-kaart
+ %1$s weergaven
+ Standaard
+ Waar gedownloade media wordt opgeslagen.
+ Bied ideeën, vertalingen, ontwerpwijzigingen, maak schoon en schrijf de code. Hoe meer er wordt gedaan, hoe beter het wordt!
+ De GPLv3+ is een auteursplichtelijk libre licentie. Gebruiken, bestuderen, veranderen en delen; met iedereen.
+ Geef wat dit je waard is, als u kunt. Team LibreTube is kleiner dan uw donatie of hulp.
+ Download naar
+ Zoek naar nieuwe versie
+ Naam
+ Downloads, geschiedenis
+ URL delen naar
+ Verloren erfenis
+ Glib gradiënt
+ Modieus vuur
+ Trendy zaklamp
+ Dwaas gevormd
+ Voer een URL in die werkt
+ Versie %1$s
+ Maak kennis met team LibreTube en hoe het allemaal gebeurt.
+ Filler Tangens/Grappen
+ Muziek: Niet-Muziek Sectie
+ Voorbeschouwing/Samenvatting
+ Uiterlijk
+ Conversie van bestanden als zowel audio als video worden gedownload.
+ Klik om te zien of de app up-to-date is.
+ De nieuwste versie wordt gedraaid.
+ U gebruikt de nieuwste versie.
+ Standaard afspeelsnelheid
+ Geavanceerd
+ Audio en video
+ Pas de app aan naar uw wens.
+ Live
+ De naam van de map waarin gedownloade media wordt opgeslagen.
+ Download map
+ Muziek map
+ Film map
+ Vliegende vlam
+ Verhoogde vogel
+ Piped, login, abonnementen
+ Voeg een aangepaste instantie toe (op eigen risico)
+ Instantienaam
+ URL naar instantie-API
+ Instantie Toevoegen
+ Vul de naam en de API URL in.
+ Aangepaste instanties wissen
+ Verwante inhoud
+ Hoofdstukken weergeven
+ Hoofdstukken verbergen
+ Voor bijkomstige scènes die alleen als opvulling of ter vermaak zijn toegevoegd en niet noodzakelijk zijn om de hoofdinhoud van de video te begrijpen.
+ Alleen voor gebruik in muziekvideo\'s. Het moet betrekking hebben op delen van de video die geen deel uitmaken van de officiële mixen. Uiteindelijk moet de video zo goed mogelijk lijken op de Spotify- of andere gemixte versie, of minder praten of andere afleidingen bevatten.
+ Voor segmenten die de komende inhoud in deze of toekomstige video\'s in zijn serie beschrijven, maar geen extra info geven. Als het clips bevat die alleen hier verschijnen, is dit zeer waarschijnlijk de verkeerde categorie.
+ Toon verwante streams naast wat u bekijkt.
+ Voorladen
+ Max. aantal seconden video om te bufferen.
+ Videoformaat voor speler
+ Bezoek de website voor meer info over de app en de functies.
+ Bijdragen
+ Doneer
+ Geen audio
+ Geen video
+ Audio
+ Video
+ Downloaden
+ Autospel
+ Trending pagina verbergen
+ URL naar instantie front-end
+ Kwaliteit
+ Gedrag
+ Kwaliteit en spelersgedrag
+ Zoek toename
+ Piped is een open-bron alternatieve web-front-end voor YouTube en levert de API die wij gebruiken. Zonder Piped zou LibreTube niet bestaan. Enorm bedankt aan hun ontwikkelaars!
+ Autopauze
+ Pauzeer de speler wanneer het scherm wordt uitgeschakeld.
+ Speel automatisch de volgende video af wanneer de huidige is afgelopen.
+ Afspeellijst klonen
\ No newline at end of file
From ceb1dd9cd66f1cae946b608dee7708c26b524ba3 Mon Sep 17 00:00:00 2001
From: irure
Date: Fri, 24 Jun 2022 10:32:16 +0000
Subject: [PATCH 56/97] Translated using Weblate (Basque)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/eu/
---
app/src/main/res/values-eu/strings.xml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index 1305bda52..93ffec4d3 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -101,19 +101,19 @@
GitHub-era joan deskargatzeko\?Amaierako txartelak eta kredituakBideo formatua
- Audioa eta bideoa deskargatzen badira, fitxategi bihurtzea.
+ Deskargatutako fitxategietarakoDeskargatu hona
- Deskargatutako multimedia gordetzen den lekuan.
+ Deskargatutako multimedia gordetzen den lekuaAzken bertsioa da hau.Azken bertsioa erabiltzen ari zara.AurreratuaAudioa eta bideoa
- Egokitu aplikazioa zure gustura.
+ Egokitu aplikazioa zure gusturaDeskargak, historialaIruzkin honek ez du erantzunik.Ezagutu aplikazioaren garapenean eta hobekuntzan parte hartzen duten guztiak.Izena
- Deskargatutako multimediak gordetzen diren karpetaren izena.
+ Deskargatutako multimediak gordetzen diren karpetaren izenaDeskarga karpetaSD txartelaMusika karpeta
@@ -197,4 +197,10 @@
Kalitatea eta erreprodukzioaen portaeraBilatu gehikuntzaPiped kode irekiko web-frontend alternatibo bat da eta YouTube-k erabiltzen duen APIa eskaintzen du. Piped gabe, LibreTube ez litzateke existituko. Mila esker haien garatzaileei!
+ Leheneratu lehenetsiak
+ Ziur zaude\? Honek saioa amaitu eta zure ezarpen guztiak berrezarriko ditu!
+ Pantaila itzalita dagoenean, erreproduzitzailea gelditu.
+ Erreproduzitu automatikoki hurrengo bideoa unekoa amaitzen denean.
+ Automatikoki gelditzea
+ Klonatu erreprodukzio-zerrenda
\ No newline at end of file
From 360af0ebde7ad5060a939d48bf47410c6874bc36 Mon Sep 17 00:00:00 2001
From: SameenAhnaf
Date: Sat, 25 Jun 2022 05:23:10 +0200
Subject: [PATCH 57/97] Added translation using Weblate (Bengali)
---
app/src/main/res/values-bn/strings.xml | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 app/src/main/res/values-bn/strings.xml
diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml
new file mode 100644
index 000000000..a6b3daec9
--- /dev/null
+++ b/app/src/main/res/values-bn/strings.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
From ca58039f7af5c48f5c8da265b859dea96b45c6b7 Mon Sep 17 00:00:00 2001
From: imashnake0
Date: Sat, 25 Jun 2022 01:52:52 -0400
Subject: [PATCH 58/97] Revert "Minor cleanup"
This reverts commit 3cfd505f45b401c95c0c3f26bd37be9c5b26b567.
---
app/build.gradle | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 09780f3a8..969e97e7a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,17 +29,14 @@ android {
resValue "string", "app_name", "LibreTube Debug"
}
}
-
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
-
kotlinOptions {
jvmTarget = '1.8'
}
-
splits {
abi {
enable true
@@ -49,13 +46,11 @@ android {
}
}
-
packagingOptions {
jniLibs {
excludes += ['lib/armeabi-v7a/*_neon.so']
}
}
-
namespace 'com.github.libretube'
}
@@ -81,12 +76,14 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
- // Do not update jackson annotations! It does not supports < API 26.
+ //do not update jackson annotations! it does not supports
Date: Sat, 25 Jun 2022 02:21:15 +0000
Subject: [PATCH 59/97] Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/zh_Hans/
---
app/src/main/res/values-zh-rCN/strings.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 1d450bf32..c5031eebe 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -201,4 +201,6 @@
复制播放列表仅用于音乐视频。它应该涵盖视频的一部分,而不是官方混音的一部分。最后,视频应尽可能类似于 Spotify 或任何其他混合版本,或减少谈话或其他干扰。对于详细说明此系列视频或未来视频中即将出现的内容的片段,但不提供其他信息。如果它包含仅出现在此处的剪辑,则这很可能是错误的类别。
+ 恢复默认值
+ 你确定吗?这会让你退出账户并重置你的所有设置!
\ No newline at end of file
From 70bfd1cd49eedcd9ddaff1cbb6f921355d6443ad Mon Sep 17 00:00:00 2001
From: SameenAhnaf
Date: Sat, 25 Jun 2022 03:26:03 +0000
Subject: [PATCH 60/97] Translated using Weblate (Bengali)
Currently translated at 100.0% (203 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/bn/
---
app/src/main/res/values-bn/strings.xml | 206 ++++++++++++++++++++++++-
1 file changed, 205 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml
index a6b3daec9..55ee8b2ae 100644
--- a/app/src/main/res/values-bn/strings.xml
+++ b/app/src/main/res/values-bn/strings.xml
@@ -1,2 +1,206 @@
-
\ No newline at end of file
+
+ ডাউনলোড
+ সমন্বয়
+ হোম
+ লাইব্রেরি
+ আনসাবস্ক্রাইব
+ সাবস্ক্রাইব
+ শেয়ার
+ ইউটিউব অথবা নিউপাইপ হতে
+ থিম
+ সার্ভারের সাথে সংযোগ স্থাপনে সমস্যা হয়েছে। আপনি কি অন্য ইনস্ট্যান্স চেষ্টা করবেন\?
+ নেটওয়ার্ক ত্রুটি।
+ একটি ত্রুটি দেখা দিয়েছে।
+ আপনাকে ব্যবহারকারীর নাম ও পাসওয়ার্ড উল্লেখ করতে হবে।
+ ডিফল্ট ভিডিও রেজ্যুলেশন
+ গ্রিড কলামগুলো
+ এখানে কিছুই পাওয়া যায়নি।
+ প্লেলিস্ট মুছে ফেলুন
+ আপনি কি প্লেলিস্টটি মুছে ফেলতে চান\?
+ প্লেলিস্ট তৈরি করুন
+ প্লেলিস্ট তৈরি করা হয়েছে।
+ প্লেলিস্টের নাম
+ প্লেলিস্টে যোগ করুন
+ কাজটি সম্পন্ন হয়েছে।
+ কাজটি সম্পন্ন করা যায়নি :(
+ সম্পর্কে
+ ভাষা
+ সিস্টেম
+ সিস্টেম
+ উজ্জ্বল
+ অন্ধকার
+ সাবস্ক্রাইবার সংখ্যা %1$s
+ সেটিংস
+ অবস্থান
+ ইনস্ট্যান্স
+ ওয়েবসাইট
+ মন্তব্যগুলো
+ চ্যানেলগুলো
+ সবগুলো
+ প্লেলিস্টগুলো
+ ঠিক আছে
+ অনুসন্ধান ইতিহাস
+ ইতিহাস মুছে ফেলুন
+ ডিফল্ট ট্যাব
+ স্পন্সরব্লক
+ এটি https://sponsor.ajay.app এপিআই ব্যবহার করে
+ চালু
+ ভিডিওর অংশগুলো
+ স্পন্সর
+ বিনামূল্যে/ব্যক্তিগত উৎসাহ
+ ইউটিউব মিউজিক গানগুলো
+ ইউটিউব মিউজিক ভিডিওগুলো
+ ইউটিউব মিউজিক অ্যালবামগুলো
+ ভিডিওর মাঝখানে লাইক, সাবস্ক্রাইব অথবা ফলো করার জন্য সংক্ষিপ্ত রিমাইন্ডার। অংশটুকু দীর্ঘ অথবা নির্দিষ্ট কোনো বিষয়ের উপর হলে ব্যক্তিগত উৎসাহ নির্বাচন করা উচিত।
+ বিচ্ছেদ/সূচনা এনিমেশন
+ সঙ্গীত: বাদ্যবিহীন দৃশ্য
+ আসন্ন/পুনরালোচনা
+ হাস্যরস/কৌতুক
+ লাইসেন্স
+ স্বতন্ত্র রং
+ নীল
+ হলুদ
+ সবুজ
+ বেগুনি
+ লাল
+ মিথস্ক্রিয়া রিমাইন্ডার (লাইক ও সাবস্ক্রাইব)
+ ইতিকথা ও কৃতিত্ব
+ ভিডিওর সমাপ্তিতে উল্লেখ করা হয়েছে এমন অংশ। প্রয়োজনীয় তথ্য আছে এমন উপসংহারের জন্য অপ্রযোজ্য।
+ মিস্টিক ম্যাটেরিয়াল ৩
+ আইকন
+ চালু
+ বন্ধ
+ পাইপড
+ ইউটিউব
+ ব্যাকগ্রাউন্ডে প্লে করুন
+ সংস্করণ %1$s এ আপডেট করা যাবে
+ আপনি কি গিটহাব রিলিজ থেকে ডাউনলোড করতে ইচ্ছুক\?
+ উপস্থাপনা
+ আচরণ
+ ডাউনলোডগুলো
+ ভিডিও ফরম্যাট
+ ফাইল কনভার্সন যদি অডিও ও ভিডিও উভয়ই ডাউনলোড করা হয়।
+ ডাউনলোড স্থান
+ যেখানে ডাউনলোড করা মিডিয়া সংরক্ষণ করা হয়।
+ অ্যাপ সম্পর্কে বিস্তারিত তথ্য ও ফিচার জানতে ওয়েবসাইটে প্রবেশ করুন।
+ অনুদান প্রদান
+ নতুন সংস্করণ দেখুন
+ অ্যাপটি হালনাগাদ করা হয়েছে।
+ ডিফল্ট প্লেব্যাক গতি
+ অগ্রবর্তী
+ অ্যাপটি আপনার মনমতো সাজিয়ে তুলুন।
+ অ্যাপটি নির্মাণ ও উন্নয়নে সহযোগী ব্যক্তিদের সম্পর্কে জানুন।
+ নাম
+ নির্মাতাগণ
+ ডাউনলোড ফোল্ডারের নাম ঠিক করুন।
+ অভ্যন্তরীণ স্টোরেজ
+ ডাউনলোড ফোল্ডার
+ মেমোরি কার্ড
+ লিংক শেয়ার করুন
+ অডিও ফোল্ডার
+ ভিডিও ফোল্ডার
+ হারানো লিগ্যাসি
+ গ্লিব গ্রেডিয়েন্ট
+ ফ্যাশনেবল আগুন
+ জ্বলন্ত শিখা
+ পাইপড, লগইন, সাবস্ক্রিপশনগুলো
+ সতর্কতার সাথে কাস্টম ইনস্ট্যান্স যোগ করুন
+ ইনস্ট্যান্সের নাম
+ ইনস্ট্যান্স এপিআই লিংক
+ ইনস্ট্যান্স যোগ করুন
+ কাস্টম ইনস্ট্যান্সগুলো মুছে ফেলুন
+ কাজ করে এমন একটি লিংক উল্লেখ করুন
+ সংস্করণ %1$s
+ সম্পর্কিত কন্টেন্ট
+ শক্তিশালী পাখি
+ অধ্যায়গুলো প্রদর্শন করুন
+ অধ্যায়গুলো আড়াল করুন
+ প্রিলোড করা হচ্ছে
+ প্লেয়ারের জন্য ভিডিও ফরম্যাট
+ ভিডিও বাফারিংএর জন্য সর্বোচ্চ সময় (সেকেন্ডে)।
+ কোনো অডিও নেই
+ কোনো ভিডিও নেই
+ অডিও
+ ভিডিও
+ ডাউনলোড করা হচ্ছে
+ অটোপ্লে
+ ট্রেন্ডিং পৃষ্ঠা আড়াল করুন
+ ইনস্ট্যান্স ফ্রন্টইন্ডের লিংক
+ মান
+ মান ও প্লেয়ার গতিবিধি
+ গতিবিধি
+ সন্ধান দ্রুতি
+ পাইপড ইউটিউবের জন্য একটি ওপেন সোর্স বিকল্প ফ্রন্টইন্ড যা আমাদের ব্যবহৃত এপিআই ব্যবহার করে। পাইপড ব্যতীত লিবরাটিউবের অস্তিত্বই থাকতো না। উক্ত প্রজেক্টের ডেভেলপারদেরকে অসংখ্য ধন্যবাদ!
+ অটোপজ
+ ভিডিওগুলো
+ স্ক্রিন বন্ধ হওয়ার পর স্বয়ংক্রিয়ভাবে প্লেয়ার বন্ধ করুন।
+ প্লেলিস্ট ক্লোন করুন
+ ডিফল্ট সেটিংস ফিরিয়ে আনুন
+ ইতিমধ্যে লগ ইন করা হয়েছে। আপনি আপনার অ্যাকাউন্ট থেকে লগ আউট হয়ে যেতে পারেন।
+ প্রথমে কিছু চ্যানেল সাবস্ক্রাইব করুন।
+ অনুগ্রহ করে প্রথমে সেটিংসে লগ ইন অথবা নিবন্ধন করুন।
+ অনুগ্রহ করে সব ডাউনলোড সমাপ্ত হওয়া পর্যন্ত অপেক্ষা করুন…
+ সাবস্ক্রিপশনগুলো ইমপোর্ট করুন
+ ইতিহাস
+ প্লেলিস্টটির নাম খালি থাকতে পারে না
+ ভিডিও সংখ্যা %1$s
+ পুনরায় চেষ্টা করুন
+ প্রথমে অনুসন্ধান ফিল্টার নির্বাচন করুন
+ ইউটিউব মিউজিক প্লেলিস্টগুলো
+ ভিডিও অংশ অতিক্রম করা হয়েছে
+ অর্থ প্রদানের মাধ্যমে করা উৎসাহ, সুপারিশ এবং সরাসরি বিজ্ঞাপন। ব্যক্তিগত উৎসাহ অথবা ঘটনা, নির্মাতা, ওয়েবসাইট অথবা পণ্যের প্রতি আন্তরিক নিবেদনের জন্য প্রযোজ্য।
+ ব্যক্তিগত উৎসাহ ব্যতীত \"স্পন্সর\"এর সাথে সাদৃশ্যপূর্ণ। নিজস্ব পণ্য, অনুদান অথবা সহযোগী নির্মাতা সম্পর্কিত তথ্য উল্লেখ করা হয়।
+ মূল কন্টেন্টের বাইরে বিরতি। এটি যেকোনো স্বল্প বিরতি, স্থির চিত্র অথবা পুনরাবৃত্তিক এনিমেশনের জন্য প্রযোজ্য। এমন এনিমেশনের জন্য ব্যবহার করা অনুচিত যাতে প্রয়োজনীয় তথ্য বিদ্যমান।
+ এমন স্পর্শকাতর দৃশ্য যা হাস্যরস উদ্দীপক কিন্তু ভিডিওর মূল কন্টেন্ট বোঝার জন্য অপ্রয়োজনীয়।
+ নোটিফিকেশনগুলো
+ ডাউনলোডগুলো, ইতিহাস
+ এই মন্তব্যে কোনো প্রত্যুত্তর নেই।
+ কালো
+ শুধুমাত্র মিউজিক ভিডিওর জন্য প্রযোজ্য। অফিসিয়াল মিক্সগুলোর অংশ এমন দৃশ্যগুলো এখানে অপ্রযোজ্য। স্পটিফাই বা অডিও ভার্সনের প্রতিফলন ঘটায় অথবা ন্যূনতম অপ্রয়োজনীয় অংশ থাকবে।
+ অবদানে
+ ভিডিওর এই অংশে আসন্ন কন্টেন্ট অথবা একই সিরিজের অন্য ভিডিওতে পূর্বে আলোচনা করা হয়েছে এমন তথ্য এখানে থাকবে যদি এখানে এমন তথ্য থাকে যা অন্য ভিডিও বা একই ভিডিওর অন্য কোথাও আলোচনা করা হয়নি, তবে ভিডিওর উক্ত অংশের জন্য ভুল ক্যাটাগরি নির্বাচন করা হয়েছে।
+ আইডিয়া, অনুবাদ, ডিজাইন এবং কোড ডেভেলপ করুন। যত সহায়তা, তত ভালো!
+ অডিও ও ভিডিও
+ GPLv3+ একটি কপিলেফট লিবরা লাইসেন্স। সবার সাথে ব্যবহার, অধ্যয়ন, পরিবর্তন ও শেয়ার করুন।
+ অ্যাপটি হালনাগাদ করা হয়েছে কিনা জানতে ক্লিক করুন।
+ আপনি সর্বশেষ সংস্করণ ব্যবহার করছেন।
+ সরাসরি
+ আপনি যা পারেন, তাই দিয়ে প্রজেক্টটিকে উৎসাহিত করুন। টিম লিবরাটিউব আপনার অনুদানের চেয়ে ছোট।
+ দর্শক সংখ্যা %1$s
+ ট্রেন্ডি টর্চ
+ কিম্ভুতকিমাকার
+ আপনার দেখতে থাকা ভিডিও সম্পর্কিত ভিডিও প্রদর্শন করুন।
+ ডিফল্ট
+ অ্যাপের নাম ও লিংক উল্লেখ করুন।
+ টিম লিবরাটিউবের সদস্যদের ও তাদের কাজ সম্পর্কে জানুন।
+ ভিডিও শেষ হওয়ার পর স্বয়ংক্রিয়ভাবে নতুন ভিডিও প্লে করুন।
+ আপনি কি নিশ্চিত\? আপনি লগ আউট হয়ে যাবেন এবং সমস্ত সেটিংস আগের অবস্থায় ফিরে যাবে!
+ ভিএলসি অ্যাপে প্রদর্শন করা যাচ্ছে না। সম্ভবত অ্যাপটি ইনস্টল করা হয়নি।
+ এটি একটি লিবরাটিউব অ্যাকাউন্টের জন্য।
+ প্রথমে ইন্টারনেট চালু করুন।
+ হ্যাঁ
+ কোয়ালিটি
+ অনুসন্ধান
+ সংরক্ষণ
+ ব্যবহারকারীর নাম
+ পাসওয়ার্ড
+ নিবন্ধন
+ লগ আউট
+ বাতিল
+ লগ ইন করা হয়েছে।
+ লগ আউট করা হয়েছে।
+ নিবন্ধন করা হয়েছে। আপনি এখন চ্যানেলগুলো সাবস্ক্রাইব করতে পারবেন।
+ অনুগ্রহ করে লগ ইন করুন এবং আবার চেষ্টা করুন।
+ ইনস্ট্যান্স নির্বাচন করুন
+ এলাকা
+ লগ ইন/নিবন্ধন
+ সাবস্ক্রাইব করা হয়েছে
+ এই স্ট্রিম ডাউনলোড করা সম্ভব হচ্ছে না।
+ ডাউনলোড করা সমাপ্ত হয়েছে।
+ ডাউনলোড ব্যর্থ হয়েছে।
+ সাবস্ক্রিপশনগুলো
+ লগ ইন
+ কাস্টম ইনস্ট্যান্স
+ ভিএলসি অ্যাপে প্রদর্শন
+
\ No newline at end of file
From 30d5789a6aab19258ef05d7c90a4f90183ceb74b Mon Sep 17 00:00:00 2001
From: imashnake0
Date: Sat, 25 Jun 2022 04:00:23 -0400
Subject: [PATCH 61/97] Updated Gradle
Reviewed release notes and updated Gradle to 7.4.2.
---
gradle/wrapper/gradle-wrapper.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index dbfa5e60e..2a99b6d35 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Dec 09 16:25:51 GST 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
From b36b21725c225621b4b736fc51de1df64d63b8b8 Mon Sep 17 00:00:00 2001
From: imashnake0
Date: Sat, 25 Jun 2022 04:04:21 -0400
Subject: [PATCH 62/97] Added `libs` catalog
Added version catalogs.
---
app/build.gradle | 47 +++++++++++++++++++--------------------
gradle/libs.versions.toml | 43 +++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 24 deletions(-)
create mode 100644 gradle/libs.versions.toml
diff --git a/app/build.gradle b/app/build.gradle
index 969e97e7a..794fb472d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -55,35 +55,34 @@ android {
}
dependencies {
- //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
+ //debugImplementation libs.square.leakcanary
- implementation 'androidx.appcompat:appcompat:1.4.1'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
- implementation 'com.google.android.material:material:1.6.0'
- implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
- implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'androidx.preference:preference-ktx:1.2.0'
+ implementation libs.androidx.appcompat
+ implementation libs.androidx.constraintlayout
+ implementation libs.androidx.legacySupport
+ implementation libs.androidx.multidex
+ implementation libs.androidx.navigation.fragment
+ implementation libs.androidx.navigation.ui
+ implementation libs.androidx.preference
- androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ androidTestImplementation libs.androidx.test.junit
+ androidTestImplementation libs.androidx.test.espressoCore
- implementation 'com.squareup.picasso:picasso:2.8'
- implementation 'de.hdodenhof:circleimageview:3.1.0'
- implementation 'com.google.android.exoplayer:exoplayer:2.17.1'
- implementation 'com.google.android.exoplayer:extension-mediasession:2.17.1'
- implementation 'androidx.multidex:multidex:2.0.1'
+ implementation libs.circleimageview
- implementation 'com.squareup.retrofit2:retrofit:2.9.0'
- implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
- //do not update jackson annotations! it does not supports
Date: Sat, 25 Jun 2022 17:55:03 +0200
Subject: [PATCH 63/97] delete account
---
.../libretube/dialogs/DeleteAccountDialog.kt | 94 +++++++++++++++++++
.../github/libretube/obj/DeleteUserRequest.kt | 5 +
.../com/github/libretube/util/PipedApi.kt | 7 ++
app/src/main/res/layout/activity_settings.xml | 5 +-
.../main/res/layout/dialog_delete_account.xml | 46 +++++++++
app/src/main/res/layout/fragment_about.xml | 12 ---
app/src/main/res/values/strings.xml | 6 +-
app/src/main/res/xml/instance_settings.xml | 22 ++++-
8 files changed, 178 insertions(+), 19 deletions(-)
create mode 100644 app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
create mode 100644 app/src/main/java/com/github/libretube/obj/DeleteUserRequest.kt
create mode 100644 app/src/main/res/layout/dialog_delete_account.xml
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
new file mode 100644
index 000000000..ca635b5d4
--- /dev/null
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -0,0 +1,94 @@
+package com.github.libretube.dialogs
+
+import android.app.Dialog
+import android.content.Context
+import android.os.Bundle
+import android.util.Log
+import android.util.TypedValue
+import android.widget.Button
+import android.widget.EditText
+import android.widget.TextView
+import android.widget.Toast
+import androidx.core.text.HtmlCompat
+import androidx.fragment.app.DialogFragment
+import androidx.lifecycle.lifecycleScope
+import com.github.libretube.R
+import com.github.libretube.obj.DeleteUserRequest
+import com.github.libretube.util.RetrofitInstance
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+import retrofit2.HttpException
+import java.io.IOException
+
+class DeleteAccountDialog : DialogFragment() {
+ private val TAG = "DeleteAccountDialog"
+ lateinit var username: EditText
+ lateinit var password: EditText
+ override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+ return activity?.let {
+ val builder = MaterialAlertDialogBuilder(it)
+ val inflater = requireActivity().layoutInflater
+ val view = inflater.inflate(R.layout.dialog_login, null)
+
+ password = view.findViewById(R.id.delete_password)
+ view.findViewById(R.id.delete_account_confirm).setOnClickListener {
+ if (password.text.toString() != "") {
+ deleteAccount(password.text.toString())
+ } else {
+ Toast.makeText(context, R.string.empty, Toast.LENGTH_SHORT).show()
+ }
+ }
+
+ val typedValue = TypedValue()
+ this.requireActivity().theme.resolveAttribute(R.attr.colorPrimaryDark, typedValue, true)
+ val hexColor = String.format("#%06X", (0xFFFFFF and typedValue.data))
+ val appName = HtmlCompat.fromHtml(
+ "LibreTube",
+ HtmlCompat.FROM_HTML_MODE_COMPACT
+ )
+ view.findViewById(R.id.title).text = appName
+
+ builder.setView(view)
+ builder.create()
+ } ?: throw IllegalStateException("Activity cannot be null")
+ }
+
+ private fun deleteAccount(password: String) {
+ fun run() {
+ lifecycleScope.launchWhenCreated {
+ val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = sharedPref?.getString("token", "")!!
+
+ val response = try {
+ RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
+ } catch (e: IOException) {
+ println(e)
+ Log.e(TAG, "IOException, you might not have internet connection")
+ Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
+ return@launchWhenCreated
+ } catch (e: HttpException) {
+ Log.e(TAG, "HttpException, unexpected response")
+ Toast.makeText(context, R.string.server_error, Toast.LENGTH_SHORT).show()
+ return@launchWhenCreated
+ } catch (e: Exception) {
+ Log.e(TAG, "dafaq?$e")
+ return@launchWhenCreated
+ }
+ Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
+ logout()
+ dialog?.dismiss()
+ }
+ }
+ run()
+ }
+
+ private fun logout() {
+ val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = sharedPref?.getString("token", "")
+ if (token != "") {
+ with(sharedPref!!.edit()) {
+ putString("token", "")
+ apply()
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/github/libretube/obj/DeleteUserRequest.kt b/app/src/main/java/com/github/libretube/obj/DeleteUserRequest.kt
new file mode 100644
index 000000000..f48084e46
--- /dev/null
+++ b/app/src/main/java/com/github/libretube/obj/DeleteUserRequest.kt
@@ -0,0 +1,5 @@
+package com.github.libretube.obj
+
+data class DeleteUserRequest(
+ var password: String? = null
+)
diff --git a/app/src/main/java/com/github/libretube/util/PipedApi.kt b/app/src/main/java/com/github/libretube/util/PipedApi.kt
index 82b8c67aa..86018af13 100644
--- a/app/src/main/java/com/github/libretube/util/PipedApi.kt
+++ b/app/src/main/java/com/github/libretube/util/PipedApi.kt
@@ -2,6 +2,7 @@ package com.github.libretube.util
import com.github.libretube.obj.Channel
import com.github.libretube.obj.CommentsPage
+import com.github.libretube.obj.DeleteUserRequest
import com.github.libretube.obj.Instances
import com.github.libretube.obj.Login
import com.github.libretube.obj.Message
@@ -86,6 +87,12 @@ interface PipedApi {
@POST("register")
suspend fun register(@Body login: Login): Token
+ @POST("user/delete")
+ suspend fun deleteAccount(
+ @Header("Authorization") token: String,
+ @Body password: DeleteUserRequest
+ ): Message
+
@GET("feed")
suspend fun getFeed(@Query("authToken") token: String?): List
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 30f251f90..160a46e2e 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -11,9 +11,10 @@
android:id="@+id/back_imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="6dp"
+ android:layout_marginLeft="20dp"
android:layout_marginVertical="10dp"
android:backgroundTint="@android:color/transparent"
+ android:background="?android:selectableItemBackgroundBorderless"
android:src="@drawable/ic_arrow_back" />
diff --git a/app/src/main/res/layout/dialog_delete_account.xml b/app/src/main/res/layout/dialog_delete_account.xml
new file mode 100644
index 000000000..cb6ac0b6d
--- /dev/null
+++ b/app/src/main/res/layout/dialog_delete_account.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml
index 4fe82127a..1bf1f174b 100644
--- a/app/src/main/res/layout/fragment_about.xml
+++ b/app/src/main/res/layout/fragment_about.xml
@@ -26,8 +26,6 @@
android:textSize="27sp"
android:textStyle="bold" />
-
-
@@ -45,8 +43,6 @@
-
-
@@ -64,8 +60,6 @@
-
-
@@ -83,8 +77,6 @@
-
-
@@ -102,8 +94,6 @@
-
-
@@ -121,8 +111,6 @@
-
-
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c8023e03a..1ac1a750e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -43,7 +43,7 @@
Network error.Something went wrong.You have to enter a username and password.
- This is for a LibreTube account.
+ This is for a Piped account.Default video resolutionGrid columnsNothing here.
@@ -203,4 +203,8 @@
Clone playlistRestore defaultsAre you sure? This will log you out and reset all your settings!
+ Delete account
+ Delete your Piped account
+ Account
+ Restore
diff --git a/app/src/main/res/xml/instance_settings.xml b/app/src/main/res/xml/instance_settings.xml
index a3ab05caf..b411d31b7 100644
--- a/app/src/main/res/xml/instance_settings.xml
+++ b/app/src/main/res/xml/instance_settings.xml
@@ -13,15 +13,19 @@
app:title="@string/instances" />
+ app:title="@string/customInstance" />
+ app:title="@string/clear_customInstances" />
+
+
+
+
+
+
+
+
+
+
Date: Sat, 25 Jun 2022 20:28:29 +0430
Subject: [PATCH 64/97] Update gradle-wrapper.properties
---
gradle/wrapper/gradle-wrapper.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 2a99b6d35..dbfa5e60e 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Dec 09 16:25:51 GST 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
From 36db98dd095dd8cf251d0616c1cefa9b6334ce9a Mon Sep 17 00:00:00 2001
From: archroid <50708771+archroid@users.noreply.github.com>
Date: Sat, 25 Jun 2022 20:32:50 +0430
Subject: [PATCH 65/97] Update gradle-wrapper.properties
---
gradle/wrapper/gradle-wrapper.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index dbfa5e60e..945a17a6b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Dec 09 16:25:51 GST 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
From efd2f54876e8a317aa006c7bf36549b0976f40b2 Mon Sep 17 00:00:00 2001
From: archroid <50708771+archroid@users.noreply.github.com>
Date: Sat, 25 Jun 2022 20:40:31 +0430
Subject: [PATCH 66/97] Update gradle-wrapper.properties
---
gradle/wrapper/gradle-wrapper.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 945a17a6b..2a99b6d35 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Dec 09 16:25:51 GST 2021
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
From c410c7c88ffcb51862550ada31082c2d63bd3c73 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sat, 25 Jun 2022 18:11:11 +0200
Subject: [PATCH 67/97] fixes
---
.../libretube/dialogs/DeleteAccountDialog.kt | 21 ++++++-------------
.../libretube/preferences/InstanceSettings.kt | 21 +++++++++++++++----
app/src/main/res/layout/activity_settings.xml | 3 ++-
3 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
index ca635b5d4..b84c6e9c0 100644
--- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -3,7 +3,6 @@ package com.github.libretube.dialogs
import android.app.Dialog
import android.content.Context
import android.os.Bundle
-import android.util.Log
import android.util.TypedValue
import android.widget.Button
import android.widget.EditText
@@ -16,8 +15,6 @@ import com.github.libretube.R
import com.github.libretube.obj.DeleteUserRequest
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import retrofit2.HttpException
-import java.io.IOException
class DeleteAccountDialog : DialogFragment() {
private val TAG = "DeleteAccountDialog"
@@ -27,7 +24,11 @@ class DeleteAccountDialog : DialogFragment() {
return activity?.let {
val builder = MaterialAlertDialogBuilder(it)
val inflater = requireActivity().layoutInflater
- val view = inflater.inflate(R.layout.dialog_login, null)
+ val view = inflater.inflate(R.layout.dialog_delete_account, null)
+
+ view.findViewById(R.id.cancel_button).setOnClickListener {
+ dialog?.dismiss()
+ }
password = view.findViewById(R.id.delete_password)
view.findViewById(R.id.delete_account_confirm).setOnClickListener {
@@ -60,18 +61,8 @@ class DeleteAccountDialog : DialogFragment() {
val response = try {
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
- } catch (e: IOException) {
- println(e)
- Log.e(TAG, "IOException, you might not have internet connection")
- Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
- return@launchWhenCreated
- } catch (e: HttpException) {
- Log.e(TAG, "HttpException, unexpected response")
- Toast.makeText(context, R.string.server_error, Toast.LENGTH_SHORT).show()
- return@launchWhenCreated
} catch (e: Exception) {
- Log.e(TAG, "dafaq?$e")
- return@launchWhenCreated
+ e.printStackTrace()
}
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
logout()
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index affcbc4c1..7da153f88 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -22,6 +22,7 @@ import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
import com.github.libretube.R
import com.github.libretube.dialogs.CustomInstanceDialog
+import com.github.libretube.dialogs.DeleteAccountDialog
import com.github.libretube.dialogs.LoginDialog
import com.github.libretube.requireMainActivityRestart
import com.github.libretube.util.RetrofitInstance
@@ -59,8 +60,8 @@ class InstanceSettings : PreferenceFragmentCompat() {
val jsonObject = JSONTokener(json).nextValue() as JSONObject
Log.e(TAG, jsonObject.getJSONArray("subscriptions").toString())
for (
- i in 0 until jsonObject.getJSONArray("subscriptions")
- .length()
+ i in 0 until jsonObject.getJSONArray("subscriptions")
+ .length()
) {
var url =
jsonObject.getJSONArray("subscriptions").getJSONObject(i)
@@ -113,6 +114,9 @@ class InstanceSettings : PreferenceFragmentCompat() {
val topBarTextView = activity?.findViewById(R.id.topBar_textView)
topBarTextView?.text = getString(R.string.instance)
+ val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = sharedPref?.getString("token", "")
+
val instance = findPreference("selectInstance")
// fetchInstance()
initCustomInstances()
@@ -150,10 +154,19 @@ class InstanceSettings : PreferenceFragmentCompat() {
true
}
+ val deleteAccount = findPreference("delete_account")
+ deleteAccount?.setOnPreferenceClickListener {
+ if (token != "") {
+ val newFragment = DeleteAccountDialog()
+ newFragment.show(childFragmentManager, "DeleteAccountDialog")
+ } else {
+ Toast.makeText(context, R.string.login_first, Toast.LENGTH_SHORT).show()
+ }
+ true
+ }
+
val importFromYt = findPreference("import_from_yt")
importFromYt?.setOnPreferenceClickListener {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")!!
// check StorageAccess
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Log.d("myz", "" + Build.VERSION.SDK_INT)
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 160a46e2e..1479e8963 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -5,7 +5,8 @@
+ android:layout_height="wrap_content"
+ android:paddingVertical="5dp" >
Date: Sat, 25 Jun 2022 18:12:46 +0200
Subject: [PATCH 68/97] ktlint
---
.../java/com/github/libretube/preferences/InstanceSettings.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 7da153f88..9c5157de7 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -60,8 +60,8 @@ class InstanceSettings : PreferenceFragmentCompat() {
val jsonObject = JSONTokener(json).nextValue() as JSONObject
Log.e(TAG, jsonObject.getJSONArray("subscriptions").toString())
for (
- i in 0 until jsonObject.getJSONArray("subscriptions")
- .length()
+ i in 0 until jsonObject.getJSONArray("subscriptions")
+ .length()
) {
var url =
jsonObject.getJSONArray("subscriptions").getJSONObject(i)
From fb61d8c8828af455d109e1113bbbda532344792c Mon Sep 17 00:00:00 2001
From: hands8142
Date: Sat, 25 Jun 2022 12:34:34 +0000
Subject: [PATCH 69/97] Translated using Weblate (Korean)
Currently translated at 98.5% (200 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/ko/
---
app/src/main/res/values-ko/strings.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 9c2da0098..76d7d574c 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -142,7 +142,7 @@
기본 재생 속도고급오디오 및 비디오
- 플레이어, 다운로드, 기록
+ 다운로드, 기록실시간이름SD 카드
@@ -175,7 +175,7 @@
최대 버퍼링할 비디오의 시간(초)입니다.플레이어의 비디오 형식사전 로딩
- 레거시
+ 잃어버린 레거시세련된 등불멋진 불사족/농담
@@ -199,4 +199,5 @@
자동 일시중지화면이 꺼질 경우 동영상 재생을 일시중지합니다.재생목록 복제
+ 인스턴스 프론트엔드에 대한 URL
\ No newline at end of file
From 0f7a86696e99c8dbc437cec22912089ab0174764 Mon Sep 17 00:00:00 2001
From: toxcien
Date: Sat, 25 Jun 2022 15:33:34 +0000
Subject: [PATCH 70/97] Translated using Weblate (Finnish)
Currently translated at 45.3% (92 of 203 strings)
Translation: LibreTube/LibreTube
Translate-URL: https://hosted.weblate.org/projects/libretube/libretube/fi/
---
app/src/main/res/values-fi/strings.xml | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index 23bfac0cf..9d2859ea8 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -31,19 +31,19 @@
Videon oletustarkkuusValitse ruudukon sarakkeetSovelluksen teema
- Onnistui!
+ Onnistui.TietojaValitse laatu:JaaLisää mukautettu instanssiTilaa ensin joitakin kanavia.
- Toinen lataus on jo käynnissä, odota kunnes se on valmis.
+ Odota kunnes kaikki lataukset ovat valmiita.Ei voi ladata tätä videota.Avaa VLC:ssäVerkkovirhe.Tuo tilaukset YouTubestaJokin meni pieleen.
- Soittolista luotu!
+ Soittolista luotu.Täällä ei ole mitään.Poista soittolistaHaluatko varmasti poistaa tämän soittolistan\?
@@ -57,11 +57,11 @@
TilauksetKirjastoVideot
- Vaihda kieltä
+ KieliJärjestelmän kieli
- Tumma teema
+ TummaJärjestelmän oletusarvo
- Vaalea teema
+ Vaalea%1$s tilaajaaKommentitEi Internet-yhteyttä
@@ -104,4 +104,13 @@
Tee sovelluksesta haluamasi näköinen.EdistynytLive
+ YT Musiikki Soittolistat
+ Ohitettu segmentti
+ Sponsori
+ Ei maksettu/itsensä mainostaminen
+ Segmentit
+ Väliaika/Intro animaatio
+ Päällä
+ Samankaltainen kuin \"sponsori\" lukuunottamatta ei maksettua tai itsensä mainostamista. Tämä sisältää osiot, jotka sisältävät kauppatavaraa, lahjoituksia tai tietoa keiden kanssa he tekivät yhteistyötä.
+ Vuorovaikutus muistutus (tykkäys ja tilaus)
\ No newline at end of file
From fac6abf56606ad3c8909c2e53c78a2d4257623a6 Mon Sep 17 00:00:00 2001
From: archroid <50708771+archroid@users.noreply.github.com>
Date: Sat, 25 Jun 2022 20:56:09 +0430
Subject: [PATCH 71/97] Update build.gradle
---
build.gradle | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/build.gradle b/build.gradle
index 540bd4371..ac6cbecbb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,25 @@
-plugins {
- id 'com.android.application' apply false version '7.2.1'
- id 'org.jetbrains.kotlin.android' apply false version '1.7.0'
+//plugins {
+ // id 'com.android.application' apply false version '7.2.1'
+ //id 'org.jetbrains.kotlin.android' apply false version '1.7.0'
+//}
+
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.2.1'
+ classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
}
task clean(type: Delete) {
From d0c0c7fe3b658f8ff918048f9d799b1b58250643 Mon Sep 17 00:00:00 2001
From: archroid <50708771+archroid@users.noreply.github.com>
Date: Sat, 25 Jun 2022 20:56:45 +0430
Subject: [PATCH 72/97] Update settings.gradle
---
settings.gradle | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/settings.gradle b/settings.gradle
index d89938f77..8ef48f67a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,10 +1,10 @@
-pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- }
-}
+//pluginManagement {
+ // repositories {
+ //gradlePluginPortal()
+ // google()
+ // mavenCentral()
+ // }
+//}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
From cc73cd14c76739edd2c5f3137a1eb10c25939d2e Mon Sep 17 00:00:00 2001
From: archroid <50708771+archroid@users.noreply.github.com>
Date: Sat, 25 Jun 2022 20:59:26 +0430
Subject: [PATCH 73/97] Update build.gradle
---
build.gradle | 4 ----
1 file changed, 4 deletions(-)
diff --git a/build.gradle b/build.gradle
index ac6cbecbb..719afea14 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,7 +21,3 @@ buildscript {
task clean(type: Delete) {
delete rootProject.buildDir
}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
From 8062873ca25e2d8975f843a51be21ccac5db6f8f Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sat, 25 Jun 2022 18:30:17 +0200
Subject: [PATCH 74/97] hide password
---
.../java/com/github/libretube/dialogs/DeleteAccountDialog.kt | 1 +
.../java/com/github/libretube/preferences/InstanceSettings.kt | 1 +
app/src/main/res/layout/dialog_delete_account.xml | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
index b84c6e9c0..e9cb5458e 100644
--- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -63,6 +63,7 @@ class DeleteAccountDialog : DialogFragment() {
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
} catch (e: Exception) {
e.printStackTrace()
+ return@launchWhenCreated
}
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
logout()
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 9c5157de7..f1d6785b0 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -155,6 +155,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
val deleteAccount = findPreference("delete_account")
+ deleteAccount?.parent?.removePreference(deleteAccount)
deleteAccount?.setOnPreferenceClickListener {
if (token != "") {
val newFragment = DeleteAccountDialog()
diff --git a/app/src/main/res/layout/dialog_delete_account.xml b/app/src/main/res/layout/dialog_delete_account.xml
index cb6ac0b6d..4e092e4b9 100644
--- a/app/src/main/res/layout/dialog_delete_account.xml
+++ b/app/src/main/res/layout/dialog_delete_account.xml
@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
- android:inputType="text"
+ android:inputType="textPassword"
android:padding="12dp" />
From 0d30ad1227a28c40f796a6bc7e9f548dc2efe0f2 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sat, 25 Jun 2022 21:26:37 +0200
Subject: [PATCH 75/97] fix delete accounts
---
.../com/github/libretube/dialogs/DeleteAccountDialog.kt | 4 +++-
.../com/github/libretube/preferences/InstanceSettings.kt | 8 ++++----
app/src/main/java/com/github/libretube/util/PipedApi.kt | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
index e9cb5458e..ad81fe784 100644
--- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -3,6 +3,7 @@ package com.github.libretube.dialogs
import android.app.Dialog
import android.content.Context
import android.os.Bundle
+import android.util.Log
import android.util.TypedValue
import android.widget.Button
import android.widget.EditText
@@ -62,7 +63,8 @@ class DeleteAccountDialog : DialogFragment() {
val response = try {
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
} catch (e: Exception) {
- e.printStackTrace()
+ Log.e(TAG, e.toString())
+ Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
return@launchWhenCreated
}
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index f1d6785b0..02e1960b0 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -114,9 +114,6 @@ class InstanceSettings : PreferenceFragmentCompat() {
val topBarTextView = activity?.findViewById(R.id.topBar_textView)
topBarTextView?.text = getString(R.string.instance)
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
-
val instance = findPreference("selectInstance")
// fetchInstance()
initCustomInstances()
@@ -155,8 +152,9 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
val deleteAccount = findPreference("delete_account")
- deleteAccount?.parent?.removePreference(deleteAccount)
deleteAccount?.setOnPreferenceClickListener {
+ val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = sharedPref?.getString("token", "")
if (token != "") {
val newFragment = DeleteAccountDialog()
newFragment.show(childFragmentManager, "DeleteAccountDialog")
@@ -168,6 +166,8 @@ class InstanceSettings : PreferenceFragmentCompat() {
val importFromYt = findPreference("import_from_yt")
importFromYt?.setOnPreferenceClickListener {
+ val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = sharedPref?.getString("token", "")
// check StorageAccess
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Log.d("myz", "" + Build.VERSION.SDK_INT)
diff --git a/app/src/main/java/com/github/libretube/util/PipedApi.kt b/app/src/main/java/com/github/libretube/util/PipedApi.kt
index 86018af13..ca0f791a5 100644
--- a/app/src/main/java/com/github/libretube/util/PipedApi.kt
+++ b/app/src/main/java/com/github/libretube/util/PipedApi.kt
@@ -91,7 +91,7 @@ interface PipedApi {
suspend fun deleteAccount(
@Header("Authorization") token: String,
@Body password: DeleteUserRequest
- ): Message
+ )
@GET("feed")
suspend fun getFeed(@Query("authToken") token: String?): List
From 8be32bc5afb306ed1850d646f580e785d16fa103 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sat, 25 Jun 2022 22:21:22 +0200
Subject: [PATCH 76/97] introduce preferences helper
---
.../com/github/libretube/DownloadService.kt | 10 ++-
.../com/github/libretube/fragments/Home.kt | 11 ++-
.../libretube/fragments/PlayerFragment.kt | 16 ++---
.../libretube/fragments/SearchFragment.kt | 3 +-
.../libretube/preferences/AdvancedSettings.kt | 10 +--
.../libretube/preferences/InstanceSettings.kt | 9 ++-
.../com/github/libretube/util/LocaleHelper.kt | 4 +-
.../github/libretube/util/PreferenceHelper.kt | 70 +++++++++++++++++++
.../com/github/libretube/util/ThemeHelper.kt | 13 ++--
9 files changed, 101 insertions(+), 45 deletions(-)
create mode 100644 app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
diff --git a/app/src/main/java/com/github/libretube/DownloadService.kt b/app/src/main/java/com/github/libretube/DownloadService.kt
index 997b383c0..eb7b309aa 100644
--- a/app/src/main/java/com/github/libretube/DownloadService.kt
+++ b/app/src/main/java/com/github/libretube/DownloadService.kt
@@ -17,8 +17,8 @@ import android.os.IBinder
import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
-import androidx.preference.PreferenceManager
import com.arthenica.ffmpegkit.FFmpegKit
+import com.github.libretube.util.PreferenceHelper
import java.io.File
var IS_DOWNLOAD_RUNNING = false
@@ -48,8 +48,7 @@ class DownloadService : Service() {
videoUrl = intent.getStringExtra("videoUrl")!!
audioUrl = intent.getStringExtra("audioUrl")!!
duration = intent.getIntExtra("duration", 1)
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
- extension = sharedPreferences.getString("video_format", ".mp4")!!
+ extension = PreferenceHelper.getString(this, "video_format", ".mp4")!!
downloadType = if (audioUrl != "" && videoUrl != "") "mux"
else if (audioUrl != "") "audio"
else if (videoUrl != "") "video"
@@ -83,9 +82,8 @@ class DownloadService : Service() {
Log.e(TAG, "Directory already have")
}
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
- val downloadLocationPref = sharedPreferences.getString("download_location", "")
- val folderName = sharedPreferences.getString("download_folder", "")
+ val downloadLocationPref = PreferenceHelper.getString(this, "download_location", "")
+ val folderName = PreferenceHelper.getString(this, "download_folder", "LibreTube")
val location = when (downloadLocationPref) {
"downloads" -> Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS)
diff --git a/app/src/main/java/com/github/libretube/fragments/Home.kt b/app/src/main/java/com/github/libretube/fragments/Home.kt
index b78d774e3..573d1ad41 100644
--- a/app/src/main/java/com/github/libretube/fragments/Home.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Home.kt
@@ -9,12 +9,12 @@ import android.widget.ProgressBar
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
-import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R
import com.github.libretube.adapters.TrendingAdapter
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import retrofit2.HttpException
import java.io.IOException
@@ -41,8 +41,8 @@ class Home : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val recyclerView = view.findViewById(R.id.recview)
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val grid = sharedPreferences.getString(
+ val grid = PreferenceHelper.getString(
+ requireContext(),
"grid",
resources.getInteger(R.integer.grid_items).toString()
)!!
@@ -61,9 +61,8 @@ class Home : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPreferences =
- PreferenceManager.getDefaultSharedPreferences(requireContext())
- RetrofitInstance.api.getTrending(sharedPreferences.getString("region", "US")!!)
+ val region = PreferenceHelper.getString(requireContext(), "region", "US")
+ RetrofitInstance.api.getTrending(region!!)
} catch (e: IOException) {
println(e)
Log.e(TAG, "IOException, you might not have internet connection")
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 10c035f05..6da3a05ef 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -58,6 +58,7 @@ import com.github.libretube.obj.Subscribe
import com.github.libretube.preferences.SponsorBlockSettings
import com.github.libretube.util.CronetHelper
import com.github.libretube.util.DescriptionAdapter
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.formatShort
import com.google.android.exoplayer2.C
@@ -347,9 +348,11 @@ class PlayerFragment : Fragment() {
override fun onPause() {
// pause the player if the screen is turned off
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val pausePlayerOnScreenOffEnabled = sharedPreferences
- .getBoolean("pause_screen_off", false)
+ val pausePlayerOnScreenOffEnabled = PreferenceHelper.getBoolean(
+ requireContext(),
+ "pause_screen_off",
+ false
+ )
// check whether the screen is on
val pm = context?.getSystemService(Context.POWER_SERVICE) as PowerManager
@@ -717,11 +720,8 @@ class PlayerFragment : Fragment() {
}
private fun setResolutionAndSubtitles(view: View, response: Streams) {
- val sharedPreferences =
- PreferenceManager.getDefaultSharedPreferences(requireContext())
-
- val videoFormatPreference = sharedPreferences.getString("player_video_format", "WEBM")
- val defres = sharedPreferences.getString("default_res", "")!!
+ val videoFormatPreference = PreferenceHelper.getString(requireContext(), "player_video_format", "WEBM")
+ val defres = PreferenceHelper.getString(requireContext(), "default_res", "")!!
val qualityText = view.findViewById(R.id.quality_text)
val qualitySelect = view.findViewById(R.id.quality_select)
diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
index 70951c9fb..668af1bb8 100644
--- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
@@ -27,6 +27,7 @@ import com.github.libretube.adapters.SearchAdapter
import com.github.libretube.adapters.SearchHistoryAdapter
import com.github.libretube.adapters.SearchSuggestionsAdapter
import com.github.libretube.hideKeyboard
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.GlobalScope
@@ -276,7 +277,7 @@ class SearchFragment : Fragment() {
private fun addToHistory(query: String) {
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val searchHistoryEnabled = sharedPreferences.getBoolean("search_history_toggle", true)
+ val searchHistoryEnabled = PreferenceHelper.getBoolean(requireContext(), "search_history_toggle", true)
if (searchHistoryEnabled) {
var historyList = getHistory()
diff --git a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
index 22a7aee55..0929a26b6 100644
--- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
@@ -5,9 +5,9 @@ import android.os.Bundle
import android.widget.TextView
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
-import androidx.preference.PreferenceManager
import com.github.libretube.R
import com.github.libretube.requireMainActivityRestart
+import com.github.libretube.util.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class AdvancedSettings : PreferenceFragmentCompat() {
@@ -21,9 +21,7 @@ class AdvancedSettings : PreferenceFragmentCompat() {
val clearHistory = findPreference("clear_history")
clearHistory?.setOnPreferenceClickListener {
- val sharedPreferences =
- PreferenceManager.getDefaultSharedPreferences(requireContext())
- sharedPreferences.edit().remove("search_history").commit()
+ PreferenceHelper.removePreference(requireContext(), "search_history")
true
}
@@ -38,9 +36,7 @@ class AdvancedSettings : PreferenceFragmentCompat() {
MaterialAlertDialogBuilder(requireContext())
.setPositiveButton(R.string.reset) { _, _ ->
// clear default preferences
- val sharedPreferences =
- PreferenceManager.getDefaultSharedPreferences(requireContext())
- sharedPreferences.edit().clear().commit()
+ PreferenceHelper.clearPreferences(requireContext())
// clear login token
val sharedPrefToken =
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 02e1960b0..78dd0c471 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -25,6 +25,7 @@ import com.github.libretube.dialogs.CustomInstanceDialog
import com.github.libretube.dialogs.DeleteAccountDialog
import com.github.libretube.dialogs.LoginDialog
import com.github.libretube.requireMainActivityRestart
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import org.json.JSONObject
import org.json.JSONTokener
@@ -134,11 +135,9 @@ class InstanceSettings : PreferenceFragmentCompat() {
val clearCustomInstances = findPreference("clearCustomInstances")
clearCustomInstances?.setOnPreferenceClickListener {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- sharedPreferences.edit()
- .remove("custom_instances_name")
- .remove("custom_instances_url")
- .commit()
+ PreferenceHelper.removePreference(requireContext(), "custom_instances_name")
+ PreferenceHelper.removePreference(requireContext(), "custom_instances_url")
+ PreferenceHelper.removePreference(requireContext(), "custom_instances_frontend_url")
activity?.recreate()
true
}
diff --git a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
index 71a52a542..48714873d 100644
--- a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
@@ -2,14 +2,12 @@ package com.github.libretube.util
import android.content.Context
import android.os.Build
-import androidx.preference.PreferenceManager
import java.util.*
class LocaleHelper {
fun updateLanguage(context: Context) {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
- val languageName = sharedPreferences.getString("language", "sys")
+ val languageName = PreferenceHelper.getString(context, "language", "en")
if (languageName != "") {
setLanguage(context, languageName!!)
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
new file mode 100644
index 000000000..d97357f65
--- /dev/null
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -0,0 +1,70 @@
+package com.github.libretube.util
+
+import android.content.Context
+import android.content.SharedPreferences
+import androidx.preference.PreferenceManager
+
+object PreferenceHelper {
+ fun setString(context: Context, key: String?, value: String?) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.putString(key, value)
+ editor.apply()
+ }
+
+ fun setInt(context: Context, key: String?, value: Int) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.putInt(key, value)
+ editor.apply()
+ }
+
+ fun setLong(context: Context, key: String?, value: Long) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.putLong(key, value)
+ editor.apply()
+ }
+
+ fun setBoolean(context: Context, key: String?, value: Boolean) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.putBoolean(key, value)
+ editor.apply()
+ }
+
+ fun getString(context: Context, key: String?, defValue: String?): String? {
+ val settings: SharedPreferences = getDefaultSharedPreferences(context)
+ return settings.getString(key, defValue)
+ }
+
+ fun getInt(context: Context, key: String?, defValue: Int): Int {
+ val settings: SharedPreferences = getDefaultSharedPreferences(context)
+ return settings.getInt(key, defValue)
+ }
+
+ fun getLong(context: Context, key: String?, defValue: Long): Long {
+ val settings: SharedPreferences = getDefaultSharedPreferences(context)
+ return settings.getLong(key, defValue)
+ }
+
+ fun getBoolean(context: Context, key: String?, defValue: Boolean): Boolean {
+ val settings: SharedPreferences = getDefaultSharedPreferences(context)
+ return settings.getBoolean(key, defValue)
+ }
+
+ fun clearPreferences(context: Context) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.clear()
+ editor.commit()
+ }
+
+ fun removePreference(context: Context, value: String?) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ editor.remove(value)
+ editor.commit()
+ }
+
+ private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
+ return PreferenceManager.getDefaultSharedPreferences(context)
+ }
+ private fun getDefaultSharedPreferencesEditor(context: Context): SharedPreferences.Editor {
+ return getDefaultSharedPreferences(context).edit()
+ }
+}
diff --git a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
index 1719be3e7..815a72e47 100644
--- a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
@@ -7,7 +7,6 @@ import android.content.Intent
import android.content.pm.PackageManager
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
-import androidx.preference.PreferenceManager
import com.github.libretube.R
class ThemeHelper {
@@ -17,10 +16,8 @@ class ThemeHelper {
updateThemeMode(context)
}
- fun updateAccentColor(context: Context) {
- val colorAccent =
- PreferenceManager.getDefaultSharedPreferences(context).getString("accent_color", "red")
- when (colorAccent) {
+ private fun updateAccentColor(context: Context) {
+ when (PreferenceHelper.getString(context, "accent_color", "red")) {
"my" -> context.setTheme(R.style.Theme_MY)
"red" -> context.setTheme(R.style.Theme_Red)
"blue" -> context.setTheme(R.style.Theme_Blue)
@@ -30,10 +27,8 @@ class ThemeHelper {
}
}
- fun updateThemeMode(context: Context) {
- val themeMode =
- PreferenceManager.getDefaultSharedPreferences(context).getString("theme_togglee", "A")
- when (themeMode) {
+ private fun updateThemeMode(context: Context) {
+ when (PreferenceHelper.getString(context, "theme_togglee", "A")) {
"A" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
"L" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
"D" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
From 944a220a2429bacc1f830646689b5ab0bdf1de03 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 10:01:43 +0200
Subject: [PATCH 77/97] improve dialog buttons
---
.../libretube/dialogs/DeleteAccountDialog.kt | 4 +++-
app/src/main/res/layout/activity_settings.xml | 4 ++--
.../main/res/layout/dialog_addtoplaylist.xml | 4 ++--
.../main/res/layout/dialog_create_playlist.xml | 3 ++-
.../main/res/layout/dialog_custom_instance.xml | 3 ++-
.../main/res/layout/dialog_delete_account.xml | 3 ++-
app/src/main/res/layout/dialog_download.xml | 3 ++-
app/src/main/res/layout/dialog_login.xml | 3 ++-
app/src/main/res/values/style.xml | 18 +++++++++---------
9 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
index ad81fe784..2cb9bcea4 100644
--- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -14,6 +14,7 @@ import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.obj.DeleteUserRequest
+import com.github.libretube.requireMainActivityRestart
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@@ -60,13 +61,14 @@ class DeleteAccountDialog : DialogFragment() {
val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
val token = sharedPref?.getString("token", "")!!
- val response = try {
+ try {
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
} catch (e: Exception) {
Log.e(TAG, e.toString())
Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
return@launchWhenCreated
}
+ requireMainActivityRestart = true
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
logout()
dialog?.dismiss()
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 1479e8963..1bcce0752 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -12,7 +12,7 @@
android:id="@+id/back_imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="20dp"
+ android:layout_marginLeft="15dp"
android:layout_marginVertical="10dp"
android:backgroundTint="@android:color/transparent"
android:background="?android:selectableItemBackgroundBorderless"
@@ -23,7 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings"
- android:layout_marginLeft="20dp"
+ android:layout_marginLeft="25dp"
android:textSize="20sp"
android:layout_gravity="center" />
diff --git a/app/src/main/res/layout/dialog_addtoplaylist.xml b/app/src/main/res/layout/dialog_addtoplaylist.xml
index c5b01143b..684ee0190 100644
--- a/app/src/main/res/layout/dialog_addtoplaylist.xml
+++ b/app/src/main/res/layout/dialog_addtoplaylist.xml
@@ -4,7 +4,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
-
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/layout/dialog_create_playlist.xml b/app/src/main/res/layout/dialog_create_playlist.xml
index f6a44397a..9e84f7787 100644
--- a/app/src/main/res/layout/dialog_create_playlist.xml
+++ b/app/src/main/res/layout/dialog_create_playlist.xml
@@ -40,7 +40,8 @@
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/layout/dialog_custom_instance.xml b/app/src/main/res/layout/dialog_custom_instance.xml
index fa7d2a08e..2ab157e58 100644
--- a/app/src/main/res/layout/dialog_custom_instance.xml
+++ b/app/src/main/res/layout/dialog_custom_instance.xml
@@ -61,7 +61,8 @@
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/layout/dialog_delete_account.xml b/app/src/main/res/layout/dialog_delete_account.xml
index 4e092e4b9..dbeedecf1 100644
--- a/app/src/main/res/layout/dialog_delete_account.xml
+++ b/app/src/main/res/layout/dialog_delete_account.xml
@@ -39,7 +39,8 @@
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/layout/dialog_download.xml b/app/src/main/res/layout/dialog_download.xml
index a4a3060df..6efde9733 100644
--- a/app/src/main/res/layout/dialog_download.xml
+++ b/app/src/main/res/layout/dialog_download.xml
@@ -29,6 +29,7 @@
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/layout/dialog_login.xml b/app/src/main/res/layout/dialog_login.xml
index d9a178b5a..14733157f 100644
--- a/app/src/main/res/layout/dialog_login.xml
+++ b/app/src/main/res/layout/dialog_login.xml
@@ -51,7 +51,8 @@
+ style="@style/CustomDialogButton"
+ android:layout_marginRight="16dp"/>
diff --git a/app/src/main/res/values/style.xml b/app/src/main/res/values/style.xml
index 1cbbeeca2..7b03d823a 100644
--- a/app/src/main/res/values/style.xml
+++ b/app/src/main/res/values/style.xml
@@ -44,31 +44,31 @@
-
\ No newline at end of file
From 255677133a0888098daadd11f1bd0e0a282f90ff Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 10:36:34 +0200
Subject: [PATCH 78/97] cleanup prefs
---
.../java/com/github/libretube/MainActivity.kt | 24 +-----
.../github/libretube/dialogs/LoginDialog.kt | 2 +-
.../libretube/fragments/PlayerFragment.kt | 57 ++++++++++-----
.../github/libretube/obj/SponsorBlockPrefs.kt | 14 ++++
.../preferences/SponsorBlockSettings.kt | 73 -------------------
.../github/libretube/util/PreferenceHelper.kt | 5 ++
6 files changed, 62 insertions(+), 113 deletions(-)
create mode 100644 app/src/main/java/com/github/libretube/obj/SponsorBlockPrefs.kt
diff --git a/app/src/main/java/com/github/libretube/MainActivity.kt b/app/src/main/java/com/github/libretube/MainActivity.kt
index e6e7beee0..a3d6ec727 100644
--- a/app/src/main/java/com/github/libretube/MainActivity.kt
+++ b/app/src/main/java/com/github/libretube/MainActivity.kt
@@ -35,9 +35,9 @@ import androidx.navigation.ui.setupWithNavController
import androidx.preference.PreferenceManager
import com.github.libretube.fragments.PlayerFragment
import com.github.libretube.fragments.isFullScreen
-import com.github.libretube.preferences.SponsorBlockSettings
import com.github.libretube.util.CronetHelper
import com.github.libretube.util.LocaleHelper
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.ThemeHelper
import com.google.android.material.bottomnavigation.BottomNavigationView
@@ -56,27 +56,7 @@ class MainActivity : AppCompatActivity() {
CronetHelper.initCronet(this.applicationContext)
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
RetrofitInstance.url =
- sharedPreferences.getString("selectInstance", "https://pipedapi.kavin.rocks/")!!
- SponsorBlockSettings.sponsorBlockEnabled =
- sharedPreferences.getBoolean("sb_enabled_key", true)
- SponsorBlockSettings.sponsorNotificationsEnabled =
- sharedPreferences.getBoolean("sb_notifications_key", true)
- SponsorBlockSettings.introEnabled =
- sharedPreferences.getBoolean("intro_category_key", false)
- SponsorBlockSettings.selfPromoEnabled =
- sharedPreferences.getBoolean("selfpromo_category_key", false)
- SponsorBlockSettings.interactionEnabled =
- sharedPreferences.getBoolean("interaction_category_key", false)
- SponsorBlockSettings.sponsorsEnabled =
- sharedPreferences.getBoolean("sponsors_category_key", true)
- SponsorBlockSettings.outroEnabled =
- sharedPreferences.getBoolean("outro_category_key", false)
- SponsorBlockSettings.fillerEnabled =
- sharedPreferences.getBoolean("filler_category_key", false)
- SponsorBlockSettings.musicOfftopicEnabled =
- sharedPreferences.getBoolean("music_offtopic_category_key", false)
- SponsorBlockSettings.previewEnabled =
- sharedPreferences.getBoolean("preview_category_key", false)
+ PreferenceHelper.getString(this, "selectInstance", "https://pipedapi.kavin.rocks/")!!
ThemeHelper().updateTheme(this)
LocaleHelper().updateLanguage(this)
diff --git a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
index 8d1cc33f8..e32467d77 100644
--- a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
@@ -99,7 +99,7 @@ class LoginDialog : DialogFragment() {
Toast.makeText(context, R.string.server_error, Toast.LENGTH_SHORT).show()
return@launchWhenCreated
} catch (e: Exception) {
- Log.e(TAG, "dafaq?" + e.toString())
+ Log.e(TAG, "dafaq?$e")
return@launchWhenCreated
}
if (response.error != null) {
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 6da3a05ef..91ffc4a2e 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -52,10 +52,10 @@ import com.github.libretube.obj.ChapterSegment
import com.github.libretube.obj.PipedStream
import com.github.libretube.obj.Segment
import com.github.libretube.obj.Segments
+import com.github.libretube.obj.SponsorBlockPrefs
import com.github.libretube.obj.StreamItem
import com.github.libretube.obj.Streams
import com.github.libretube.obj.Subscribe
-import com.github.libretube.preferences.SponsorBlockSettings
import com.github.libretube.util.CronetHelper
import com.github.libretube.util.DescriptionAdapter
import com.github.libretube.util.PreferenceHelper
@@ -131,6 +131,7 @@ class PlayerFragment : Fragment() {
private lateinit var title: String
private lateinit var uploader: String
private lateinit var thumbnailUrl: String
+ private val sponsorBlockPrefs = SponsorBlockPrefs()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -152,6 +153,7 @@ class PlayerFragment : Fragment() {
super.onViewCreated(view, savedInstanceState)
hideKeyboard()
+ setSponsorBlockPrefs()
initializeTransitionLayout(view)
fetchJsonAndInitPlayer(view)
}
@@ -382,7 +384,7 @@ class PlayerFragment : Fragment() {
}
private fun checkForSegments() {
- if (!exoPlayer.isPlaying || !SponsorBlockSettings.sponsorBlockEnabled) return
+ if (!exoPlayer.isPlaying || !sponsorBlockPrefs.sponsorBlockEnabled) return
exoPlayerView.postDelayed(this::checkForSegments, 100)
@@ -395,7 +397,7 @@ class PlayerFragment : Fragment() {
val segmentEnd = (segment.segment[1] * 1000.0f).toLong()
val currentPosition = exoPlayer.currentPosition
if (currentPosition in segmentStart until segmentEnd) {
- if (SponsorBlockSettings.sponsorNotificationsEnabled) {
+ if (sponsorBlockPrefs.sponsorNotificationsEnabled) {
Toast.makeText(context, R.string.segment_skipped, Toast.LENGTH_SHORT).show()
}
exoPlayer.seekTo(segmentEnd)
@@ -424,10 +426,8 @@ class PlayerFragment : Fragment() {
thumbnailUrl = response.thumbnailUrl!!
// check whether related streams and autoplay are enabled
- val sharedPreferences = PreferenceManager
- .getDefaultSharedPreferences(requireContext())
- autoplay = sharedPreferences.getBoolean("autoplay", false)
- relatedStreamsEnabled = sharedPreferences.getBoolean("related_streams_toggle", true)
+ autoplay = PreferenceHelper.getBoolean(requireContext(),"autoplay", false)
+ relatedStreamsEnabled = PreferenceHelper.getBoolean(requireContext(), "related_streams_toggle", true)
// save related streams for autoplay
relatedStreams = response.relatedStreams
runOnUiThread {
@@ -452,33 +452,56 @@ class PlayerFragment : Fragment() {
run()
}
+ private fun setSponsorBlockPrefs() {
+ sponsorBlockPrefs.sponsorBlockEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "sb_enabled_key", true)
+ sponsorBlockPrefs.sponsorNotificationsEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "sb_notifications_key", true)
+ sponsorBlockPrefs.introEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "intro_category_key", false)
+ sponsorBlockPrefs.selfPromoEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "selfpromo_category_key", false)
+ sponsorBlockPrefs.interactionEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "interaction_category_key", false)
+ sponsorBlockPrefs.sponsorsEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "sponsors_category_key", true)
+ sponsorBlockPrefs.outroEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "outro_category_key", false)
+ sponsorBlockPrefs.fillerEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "filler_category_key", false)
+ sponsorBlockPrefs.musicOffTopicEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "music_offtopic_category_key", false)
+ sponsorBlockPrefs.previewEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "preview_category_key", false)
+ }
+
private fun fetchSponsorBlockSegments() {
fun run() {
lifecycleScope.launchWhenCreated {
- if (SponsorBlockSettings.sponsorBlockEnabled) {
+ if (sponsorBlockPrefs.sponsorBlockEnabled) {
val categories: ArrayList = arrayListOf()
- if (SponsorBlockSettings.introEnabled) {
+ if (sponsorBlockPrefs.introEnabled) {
categories.add("intro")
}
- if (SponsorBlockSettings.selfPromoEnabled) {
+ if (sponsorBlockPrefs.selfPromoEnabled) {
categories.add("selfpromo")
}
- if (SponsorBlockSettings.interactionEnabled) {
+ if (sponsorBlockPrefs.interactionEnabled) {
categories.add("interaction")
}
- if (SponsorBlockSettings.sponsorsEnabled) {
+ if (sponsorBlockPrefs.sponsorsEnabled) {
categories.add("sponsor")
}
- if (SponsorBlockSettings.outroEnabled) {
+ if (sponsorBlockPrefs.outroEnabled) {
categories.add("outro")
}
- if (SponsorBlockSettings.fillerEnabled) {
+ if (sponsorBlockPrefs.fillerEnabled) {
categories.add("filler")
}
- if (SponsorBlockSettings.musicOfftopicEnabled) {
+ if (sponsorBlockPrefs.musicOffTopicEnabled) {
categories.add("music_offtopic")
}
- if (SponsorBlockSettings.previewEnabled) {
+ if (sponsorBlockPrefs.previewEnabled) {
categories.add("preview")
}
if (categories.size > 0) {
@@ -534,7 +557,7 @@ class PlayerFragment : Fragment() {
// Listener for play and pause icon change
exoPlayer.addListener(object : Player.Listener {
override fun onIsPlayingChanged(isPlaying: Boolean) {
- if (isPlaying && SponsorBlockSettings.sponsorBlockEnabled) {
+ if (isPlaying && sponsorBlockPrefs.sponsorBlockEnabled) {
exoPlayerView.postDelayed(
this@PlayerFragment::checkForSegments,
100
diff --git a/app/src/main/java/com/github/libretube/obj/SponsorBlockPrefs.kt b/app/src/main/java/com/github/libretube/obj/SponsorBlockPrefs.kt
new file mode 100644
index 000000000..73118d5ca
--- /dev/null
+++ b/app/src/main/java/com/github/libretube/obj/SponsorBlockPrefs.kt
@@ -0,0 +1,14 @@
+package com.github.libretube.obj
+
+class SponsorBlockPrefs(
+ var sponsorBlockEnabled: Boolean = false,
+ var sponsorNotificationsEnabled: Boolean = false,
+ var sponsorsEnabled: Boolean = false,
+ var selfPromoEnabled: Boolean = false,
+ var interactionEnabled: Boolean = false,
+ var introEnabled: Boolean = false,
+ var outroEnabled: Boolean = false,
+ var fillerEnabled: Boolean = false,
+ var musicOffTopicEnabled: Boolean = false,
+ var previewEnabled: Boolean = false
+)
diff --git a/app/src/main/java/com/github/libretube/preferences/SponsorBlockSettings.kt b/app/src/main/java/com/github/libretube/preferences/SponsorBlockSettings.kt
index 1236a8b5c..4d8def0b3 100644
--- a/app/src/main/java/com/github/libretube/preferences/SponsorBlockSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/SponsorBlockSettings.kt
@@ -3,88 +3,15 @@ package com.github.libretube.preferences
import android.os.Bundle
import android.widget.TextView
import androidx.preference.PreferenceFragmentCompat
-import androidx.preference.SwitchPreferenceCompat
import com.github.libretube.R
class SponsorBlockSettings : PreferenceFragmentCompat() {
private val TAG = "SponsorBlockSettings"
- companion object {
- var sponsorBlockEnabled: Boolean = false
- var sponsorNotificationsEnabled: Boolean = false
- var sponsorsEnabled: Boolean = false
- var selfPromoEnabled: Boolean = false
- var interactionEnabled: Boolean = false
- var introEnabled: Boolean = false
- var outroEnabled: Boolean = false
- var fillerEnabled: Boolean = false
- var musicOfftopicEnabled: Boolean = false
- var previewEnabled: Boolean = false
- }
-
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.sponsorblock_settings, rootKey)
val topBarTextView = activity?.findViewById(R.id.topBar_textView)
topBarTextView?.text = getString(R.string.sponsorblock)
-
- val sponsorBlockToggle = findPreference("sb_enabled_key")
- sponsorBlockToggle?.setOnPreferenceChangeListener { _, newValue ->
- sponsorBlockEnabled = newValue as Boolean
- true
- }
-
- val notificationsToggle = findPreference("sb_notifications_key")
- notificationsToggle?.setOnPreferenceChangeListener { _, newValue ->
- sponsorNotificationsEnabled = newValue as Boolean
- true
- }
-
- val sponsorToggle = findPreference("sponsors_category_key")
- sponsorToggle?.setOnPreferenceChangeListener { _, newValue ->
- sponsorsEnabled = newValue as Boolean
- true
- }
- val selfPromoToggle = findPreference("selfpromo_category_key")
- selfPromoToggle?.setOnPreferenceChangeListener { _, newValue ->
- selfPromoEnabled = newValue as Boolean
- true
- }
-
- val interactionToggle = findPreference("interaction_category_key")
- interactionToggle?.setOnPreferenceChangeListener { _, newValue ->
- interactionEnabled = newValue as Boolean
- true
- }
-
- val introToggle = findPreference("intro_category_key")
- introToggle?.setOnPreferenceChangeListener { _, newValue ->
- introEnabled = newValue as Boolean
- true
- }
-
- val outroToggle = findPreference("outro_category_key")
- outroToggle?.setOnPreferenceChangeListener { _, newValue ->
- outroEnabled = newValue as Boolean
- true
- }
-
- val fillerToggle = findPreference("filler_category_key")
- fillerToggle?.setOnPreferenceChangeListener { _, newValue ->
- fillerEnabled = newValue as Boolean
- true
- }
-
- val musicToggle = findPreference("music_offtopic_category_key")
- musicToggle?.setOnPreferenceChangeListener { _, newValue ->
- musicOfftopicEnabled = newValue as Boolean
- true
- }
-
- val previewToggle = findPreference("preview_category_key")
- previewToggle?.setOnPreferenceChangeListener { _, newValue ->
- previewEnabled = newValue as Boolean
- true
- }
}
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index d97357f65..c0cbc257f 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -61,6 +61,11 @@ object PreferenceHelper {
editor.commit()
}
+ fun setPrivateStringPref(context: Context, key: String, newValue: String) {
+ val editor = context.getSharedPreferences(key, Context.MODE_PRIVATE).edit()
+ editor.putString(key, newValue).apply()
+ }
+
private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
return PreferenceManager.getDefaultSharedPreferences(context)
}
From 96ca250e48b1f51565634a03f154b94953548d9b Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 10:55:05 +0200
Subject: [PATCH 79/97] token pref helper
---
.../java/com/github/libretube/MainActivity.kt | 8 +++----
.../libretube/adapters/PlaylistAdapter.kt | 7 ++-----
.../libretube/adapters/PlaylistsAdapter.kt | 12 ++---------
.../libretube/dialogs/AddtoPlaylistDialog.kt | 4 ++--
.../libretube/dialogs/CreatePlaylistDialog.kt | 4 ++--
.../libretube/dialogs/DeleteAccountDialog.kt | 13 +++---------
.../github/libretube/dialogs/LoginDialog.kt | 7 +++----
.../dialogs/PlaylistOptionsDialog.kt | 5 ++---
.../github/libretube/dialogs/ShareDialog.kt | 4 +++-
.../libretube/dialogs/VideoOptionsDialog.kt | 7 ++-----
.../com/github/libretube/fragments/Library.kt | 7 +++----
.../libretube/fragments/PlayerFragment.kt | 7 +++----
.../libretube/fragments/PlaylistFragment.kt | 5 ++---
.../libretube/fragments/Subscriptions.kt | 8 +++----
.../libretube/preferences/InstanceSettings.kt | 16 +++-----------
.../github/libretube/util/PreferenceHelper.kt | 21 ++++++++++++++++---
16 files changed, 57 insertions(+), 78 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/MainActivity.kt b/app/src/main/java/com/github/libretube/MainActivity.kt
index a3d6ec727..14c721398 100644
--- a/app/src/main/java/com/github/libretube/MainActivity.kt
+++ b/app/src/main/java/com/github/libretube/MainActivity.kt
@@ -32,7 +32,6 @@ import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
-import androidx.preference.PreferenceManager
import com.github.libretube.fragments.PlayerFragment
import com.github.libretube.fragments.isFullScreen
import com.github.libretube.util.CronetHelper
@@ -54,7 +53,7 @@ class MainActivity : AppCompatActivity() {
DynamicColors.applyToActivityIfAvailable(this)
super.onCreate(savedInstanceState)
CronetHelper.initCronet(this.applicationContext)
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
+
RetrofitInstance.url =
PreferenceHelper.getString(this, "selectInstance", "https://pipedapi.kavin.rocks/")!!
@@ -80,12 +79,11 @@ class MainActivity : AppCompatActivity() {
bottomNavigationView.setupWithNavController(navController)
// hide the trending page if enabled
- val hideTrendingPage = sharedPreferences.getBoolean("hide_trending_page", false)
+ val hideTrendingPage = PreferenceHelper.getBoolean(this, "hide_trending_page", false)
if (hideTrendingPage) bottomNavigationView.menu.findItem(R.id.home2).isVisible = false
// navigate to the default start tab
- val defaultTab = sharedPreferences.getString("default_tab", "home")
- when (defaultTab) {
+ when (PreferenceHelper.getString(this, "default_tab", "home")) {
"home" -> navController.navigate(R.id.home2)
"subscriptions" -> navController.navigate(R.id.subscriptions)
"library" -> navController.navigate(R.id.library)
diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
index 28e9065f0..a0bf3594f 100644
--- a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
@@ -18,6 +18,7 @@ import com.github.libretube.dialogs.VideoOptionsDialog
import com.github.libretube.fragments.PlayerFragment
import com.github.libretube.obj.PlaylistId
import com.github.libretube.obj.StreamItem
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.squareup.picasso.Picasso
import kotlinx.coroutines.CoroutineScope
@@ -81,11 +82,7 @@ class PlaylistAdapter(
val delete = holder.v.findViewById(R.id.delete_playlist)
delete.visibility = View.VISIBLE
delete.setOnClickListener {
- val sharedPref = holder.v.context.getSharedPreferences(
- "token",
- Context.MODE_PRIVATE
- )
- val token = sharedPref?.getString("token", "")!!
+ val token = PreferenceHelper.getString(holder.v.context, "token", "")!!
removeFromPlaylist(token, position)
}
}
diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
index 63fd37428..08bdb332c 100644
--- a/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/PlaylistsAdapter.kt
@@ -1,7 +1,6 @@
package com.github.libretube.adapters
import android.app.Activity
-import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.View
@@ -14,6 +13,7 @@ import com.github.libretube.MainActivity
import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
import com.github.libretube.obj.Playlists
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.squareup.picasso.Picasso
@@ -57,11 +57,7 @@ class PlaylistsAdapter(
builder.setTitle(R.string.deletePlaylist)
builder.setMessage(R.string.areYouSure)
builder.setPositiveButton(R.string.yes) { _, _ ->
- val sharedPref = holder.v.context.getSharedPreferences(
- "token",
- Context.MODE_PRIVATE
- )
- val token = sharedPref?.getString("token", "")!!
+ val token = PreferenceHelper.getToken(holder.v.context)
deletePlaylist(playlist.id!!, token, position)
}
builder.setNegativeButton(R.string.cancel) { _, _ ->
@@ -96,10 +92,6 @@ class PlaylistsAdapter(
playlists.removeAt(position)
// FIXME: This needs to run on UI thread?
activity.runOnUiThread { notifyDataSetChanged() }
-
- /*if(playlists.isEmpty()){
- view.findViewById(R.id.boogh2).visibility=View.VISIBLE
- }*/
}
} catch (e: Exception) {
Log.e(TAG, e.toString())
diff --git a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
index 126bdd7e0..f91a98183 100644
--- a/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/AddtoPlaylistDialog.kt
@@ -17,6 +17,7 @@ import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import retrofit2.HttpException
@@ -34,8 +35,7 @@ class AddtoPlaylistDialog : DialogFragment() {
val builder = MaterialAlertDialogBuilder(it)
// Get the layout inflater
val inflater = requireActivity().layoutInflater
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- token = sharedPref?.getString("token", "")!!
+ token = PreferenceHelper.getToken(requireContext())
var view: View = inflater.inflate(R.layout.dialog_addtoplaylist, null)
spinner = view.findViewById(R.id.playlists_spinner)
button = view.findViewById(R.id.addToPlaylist)
diff --git a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
index 000bf1897..bbe08d94d 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
@@ -16,6 +16,7 @@ import androidx.fragment.app.setFragmentResult
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.obj.Playlists
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
@@ -46,8 +47,7 @@ class CreatePlaylistDialog : DialogFragment() {
dismiss()
}
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- token = sharedPref?.getString("token", "")!!
+ token = PreferenceHelper.getToken(requireContext())
val playlistName = view.findViewById(R.id.playlist_name)
val createPlaylistBtn = view.findViewById(R.id.create_new_playlist)
diff --git a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
index 2cb9bcea4..07f080a58 100644
--- a/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/DeleteAccountDialog.kt
@@ -15,6 +15,7 @@ import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.obj.DeleteUserRequest
import com.github.libretube.requireMainActivityRestart
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@@ -58,8 +59,7 @@ class DeleteAccountDialog : DialogFragment() {
private fun deleteAccount(password: String) {
fun run() {
lifecycleScope.launchWhenCreated {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")!!
+ val token = PreferenceHelper.getToken(requireContext())
try {
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
@@ -78,13 +78,6 @@ class DeleteAccountDialog : DialogFragment() {
}
private fun logout() {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
- if (token != "") {
- with(sharedPref!!.edit()) {
- putString("token", "")
- apply()
- }
- }
+ PreferenceHelper.setToken(requireContext(), "")
}
}
diff --git a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
index e32467d77..c1d570e36 100644
--- a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
@@ -15,6 +15,7 @@ import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.obj.Login
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import retrofit2.HttpException
@@ -29,13 +30,11 @@ class LoginDialog : DialogFragment() {
val builder = MaterialAlertDialogBuilder(it)
// Get the layout inflater
val inflater = requireActivity().layoutInflater
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
+ val token = PreferenceHelper.getToken(requireContext())
var view: View
Log.e("dafaq", token!!)
if (token != "") {
- val sharedPref2 = context?.getSharedPreferences("username", Context.MODE_PRIVATE)
- val user = sharedPref2?.getString("username", "")
+ val user = PreferenceHelper.getUsername(requireContext())
view = inflater.inflate(R.layout.dialog_logout, null)
view.findViewById(R.id.user).text =
view.findViewById(R.id.user).text.toString() + " (" + user + ")"
diff --git a/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt b/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
index 94fd2702d..a468a2344 100644
--- a/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/PlaylistOptionsDialog.kt
@@ -9,6 +9,7 @@ import android.widget.Toast
import androidx.fragment.app.DialogFragment
import com.github.libretube.R
import com.github.libretube.obj.PlaylistId
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.CoroutineScope
@@ -43,9 +44,7 @@ class PlaylistOptionsDialog(
when (which) {
// Clone the playlist to the users Piped account
0 -> {
- val sharedPref =
- context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
+ val token = PreferenceHelper.getToken(requireContext())
if (token != "") {
importPlaylist(token!!, playlistId)
} else {
diff --git a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
index 45836c26e..7fec764a2 100644
--- a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
@@ -6,6 +6,7 @@ import android.os.Bundle
import androidx.fragment.app.DialogFragment
import androidx.preference.PreferenceManager
import com.github.libretube.R
+import com.github.libretube.util.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class ShareDialog(
@@ -56,7 +57,8 @@ class ShareDialog(
private fun getCustomInstanceFrontendUrl(): String {
val sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(requireContext())
- val instancePref = sharedPreferences.getString(
+ val instancePref = PreferenceHelper.getString(
+ requireContext(),
"selectInstance",
"https://pipedapi.kavin.rocks"
)
diff --git a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt
index e5eb2a764..9271af500 100644
--- a/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/VideoOptionsDialog.kt
@@ -8,6 +8,7 @@ import android.widget.Toast
import androidx.fragment.app.DialogFragment
import com.github.libretube.BackgroundMode
import com.github.libretube.R
+import com.github.libretube.util.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder
/**
@@ -50,11 +51,7 @@ class VideoOptionsDialog(private val videoId: String, context: Context) : Dialog
}
// Add Video to Playlist Dialog
1 -> {
- val sharedPref = context?.getSharedPreferences(
- "token",
- Context.MODE_PRIVATE
- )
- val token = sharedPref?.getString("token", "")
+ val token = PreferenceHelper.getToken(requireContext())
if (token != "") {
val newFragment = AddtoPlaylistDialog()
val bundle = Bundle()
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index 812411b4c..279bef87b 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -17,6 +17,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R
import com.github.libretube.adapters.PlaylistsAdapter
import com.github.libretube.dialogs.CreatePlaylistDialog
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.google.android.material.floatingactionbutton.FloatingActionButton
import retrofit2.HttpException
@@ -47,8 +48,7 @@ class Library : Fragment() {
super.onViewCreated(view, savedInstanceState)
playlistRecyclerView = view.findViewById(R.id.playlist_recView)
playlistRecyclerView.layoutManager = LinearLayoutManager(view.context)
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- token = sharedPref?.getString("token", "")!!
+ token = PreferenceHelper.getToken(requireContext())
refreshLayout = view.findViewById(R.id.playlist_refresh)
if (token != "") {
view.findViewById(R.id.boogh2).visibility = View.GONE
@@ -59,8 +59,7 @@ class Library : Fragment() {
Log.d(TAG, "hmm")
fetchPlaylists(view)
}
- view.findViewById(R.id.create_playlist).setOnClickListener {
+ view.findViewById(R.id.create_playlist).setOnClickListener {
val newFragment = CreatePlaylistDialog()
newFragment.show(childFragmentManager, "Create Playlist")
}
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 91ffc4a2e..ab638300e 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -858,11 +858,10 @@ class PlayerFragment : Fragment() {
}
private fun createExoPlayer(view: View) {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val playbackSpeed = sharedPreferences.getString("playback_speed", "1F")?.toFloat()
+ val playbackSpeed = PreferenceHelper.getString(requireContext(), "playback_speed", "1F")?.toFloat()
// multiply by thousand: s -> ms
- val bufferingGoal = sharedPreferences.getString("buffering_goal", "50")?.toInt()!! * 1000
- val seekIncrement = sharedPreferences.getString("seek_increment", "5")?.toLong()!! * 1000
+ val bufferingGoal = PreferenceHelper.getString(requireContext(), "buffering_goal", "50")?.toInt()!! * 1000
+ val seekIncrement = PreferenceHelper.getString(requireContext(), "seek_increment", "5")?.toLong()!! * 1000
val cronetEngine: CronetEngine = CronetHelper.getCronetEngine()
val cronetDataSourceFactory: CronetDataSource.Factory =
diff --git a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
index ca5581dde..1b3f34ae3 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
@@ -15,6 +15,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.R
import com.github.libretube.adapters.PlaylistAdapter
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import retrofit2.HttpException
import java.io.IOException
@@ -75,9 +76,7 @@ class PlaylistFragment : Fragment() {
view.findViewById(R.id.playlist_uploader).text = response.uploader
view.findViewById(R.id.playlist_totVideos).text =
getString(R.string.videoCount, response.videos.toString())
- val sharedPref2 =
- context?.getSharedPreferences("username", Context.MODE_PRIVATE)
- val user = sharedPref2?.getString("username", "")
+ val user = PreferenceHelper.getUsername(requireContext())
var isOwner = false
if (response.uploaderUrl == null && response.uploader.equals(user, true)) {
isOwner = true
diff --git a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
index 353ceb40b..03b6f56dc 100644
--- a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
@@ -23,6 +23,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R
import com.github.libretube.adapters.SubscriptionAdapter
import com.github.libretube.adapters.SubscriptionChannelAdapter
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import retrofit2.HttpException
import java.io.IOException
@@ -50,8 +51,7 @@ class Subscriptions : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- token = sharedPref?.getString("token", "")!!
+ token = PreferenceHelper.getToken(requireContext())
refreshLayout = view.findViewById(R.id.sub_refresh)
if (token != "") {
view.findViewById(R.id.loginOrRegister).visibility = View.GONE
@@ -63,8 +63,8 @@ class Subscriptions : Fragment() {
var channelRecView = view.findViewById(R.id.sub_channels)
var feedRecView = view.findViewById(R.id.sub_feed)
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val grid = sharedPreferences.getString(
+ val grid = PreferenceHelper.getString(
+ requireContext(),
"grid",
resources.getInteger(R.integer.grid_items).toString()
)!!
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 78dd0c471..256fda642 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -152,8 +152,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
val deleteAccount = findPreference("delete_account")
deleteAccount?.setOnPreferenceClickListener {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
+ val token = PreferenceHelper.getToken(requireContext())
if (token != "") {
val newFragment = DeleteAccountDialog()
newFragment.show(childFragmentManager, "DeleteAccountDialog")
@@ -165,8 +164,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
val importFromYt = findPreference("import_from_yt")
importFromYt?.setOnPreferenceClickListener {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
+ val token = PreferenceHelper.getToken(requireContext())
// check StorageAccess
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Log.d("myz", "" + Build.VERSION.SDK_INT)
@@ -255,15 +253,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
private fun logout() {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- val token = sharedPref?.getString("token", "")
- if (token != "") {
- with(sharedPref!!.edit()) {
- putString("token", "")
- apply()
- }
- Toast.makeText(context, R.string.loggedout, Toast.LENGTH_SHORT).show()
- }
+ PreferenceHelper.setToken(requireContext(), "")
}
private fun fetchInstance() {
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index c0cbc257f..805251d0e 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -61,9 +61,24 @@ object PreferenceHelper {
editor.commit()
}
- fun setPrivateStringPref(context: Context, key: String, newValue: String) {
- val editor = context.getSharedPreferences(key, Context.MODE_PRIVATE).edit()
- editor.putString(key, newValue).apply()
+ fun getToken(context: Context): String {
+ val sharedPref = context.getSharedPreferences("token", Context.MODE_PRIVATE)
+ return sharedPref?.getString("token", "")!!
+ }
+
+ fun setToken(context: Context, newValue: String) {
+ val editor = context.getSharedPreferences("token", Context.MODE_PRIVATE).edit()
+ editor.putString("token", newValue)
+ }
+
+ fun getUsername(context: Context): String {
+ val sharedPref = context.getSharedPreferences("username", Context.MODE_PRIVATE)
+ return sharedPref.getString("username", "")!!
+ }
+
+ fun setUsername(context: Context, newValue: String) {
+ val editor = context.getSharedPreferences("username", Context.MODE_PRIVATE).edit()
+ editor.putString("username", newValue)
}
private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
From d1418650d1e291e95ae450f893a6c9a8c9b52d36 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 11:08:10 +0200
Subject: [PATCH 80/97] migrate more tokens to prefhelper
---
.../libretube/adapters/PlaylistAdapter.kt | 3 +-
.../adapters/SubscriptionChannelAdapter.kt | 11 +++---
.../libretube/dialogs/AddtoPlaylistDialog.kt | 1 -
.../libretube/dialogs/CreatePlaylistDialog.kt | 1 -
.../libretube/dialogs/DeleteAccountDialog.kt | 1 -
.../github/libretube/dialogs/LoginDialog.kt | 34 ++++---------------
.../libretube/fragments/ChannelFragment.kt | 16 ++++-----
.../com/github/libretube/fragments/Library.kt | 1 -
.../libretube/fragments/PlayerFragment.kt | 19 +++++------
.../libretube/fragments/PlaylistFragment.kt | 1 -
.../libretube/fragments/Subscriptions.kt | 2 --
.../libretube/preferences/AdvancedSettings.kt | 4 +--
.../libretube/preferences/InstanceSettings.kt | 5 ++-
13 files changed, 32 insertions(+), 67 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
index a0bf3594f..448060c49 100644
--- a/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/PlaylistAdapter.kt
@@ -1,7 +1,6 @@
package com.github.libretube.adapters
import android.app.Activity
-import android.content.Context
import android.os.Bundle
import android.text.format.DateUtils
import android.util.Log
@@ -82,7 +81,7 @@ class PlaylistAdapter(
val delete = holder.v.findViewById(R.id.delete_playlist)
delete.visibility = View.VISIBLE
delete.setOnClickListener {
- val token = PreferenceHelper.getString(holder.v.context, "token", "")!!
+ val token = PreferenceHelper.getToken(holder.v.context)
removeFromPlaylist(token, position)
}
}
diff --git a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
index dcd3b4e03..7ce63a5ba 100644
--- a/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SubscriptionChannelAdapter.kt
@@ -13,6 +13,7 @@ import com.github.libretube.MainActivity
import com.github.libretube.R
import com.github.libretube.obj.Subscribe
import com.github.libretube.obj.Subscription
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.squareup.picasso.Picasso
import kotlinx.coroutines.CoroutineScope
@@ -70,10 +71,9 @@ class SubscriptionChannelAdapter(private val subscriptions: MutableList(R.id.user).text.toString() + " (" + user + ")"
view.findViewById(R.id.logout).setOnClickListener {
Toast.makeText(context, R.string.loggedout, Toast.LENGTH_SHORT).show()
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- with(sharedPref!!.edit()) {
- putString("token", "")
- apply()
- }
+ PreferenceHelper.setToken(requireContext(), "")
dialog?.dismiss()
}
} else {
@@ -105,17 +101,8 @@ class LoginDialog : DialogFragment() {
Toast.makeText(context, response.error, Toast.LENGTH_SHORT).show()
} else if (response.token != null) {
Toast.makeText(context, R.string.loggedIn, Toast.LENGTH_SHORT).show()
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- with(sharedPref!!.edit()) {
- putString("token", response.token)
- apply()
- }
- val sharedPref2 =
- context?.getSharedPreferences("username", Context.MODE_PRIVATE)
- with(sharedPref2!!.edit()) {
- putString("username", login.username)
- apply()
- }
+ PreferenceHelper.setToken(requireContext(), response.token!!)
+ PreferenceHelper.setUsername(requireContext(), login.username!!)
dialog?.dismiss()
}
}
@@ -138,24 +125,15 @@ class LoginDialog : DialogFragment() {
Toast.makeText(context, R.string.server_error, Toast.LENGTH_SHORT).show()
return@launchWhenCreated
} catch (e: Exception) {
- Log.e(TAG, "dafaq?" + e.toString())
+ Log.e(TAG, "dafaq?$e")
return@launchWhenCreated
}
if (response.error != null) {
Toast.makeText(context, response.error, Toast.LENGTH_SHORT).show()
} else if (response.token != null) {
Toast.makeText(context, R.string.registered, Toast.LENGTH_SHORT).show()
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- with(sharedPref!!.edit()) {
- putString("token", response.token)
- apply()
- }
- val sharedPref2 =
- context?.getSharedPreferences("username", Context.MODE_PRIVATE)
- with(sharedPref2!!.edit()) {
- putString("username", login.username)
- apply()
- }
+ PreferenceHelper.setToken(requireContext(), response.token!!)
+ PreferenceHelper.setUsername(requireContext(), login.username!!)
dialog?.dismiss()
}
}
diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
index f2a78c4d5..a92afc6c4 100644
--- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
@@ -18,6 +18,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.github.libretube.R
import com.github.libretube.adapters.ChannelAdapter
import com.github.libretube.obj.Subscribe
+import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
import com.github.libretube.util.formatShort
import com.google.android.material.button.MaterialButton
@@ -63,9 +64,8 @@ class ChannelFragment : Fragment() {
val refreshChannel = {
refreshLayout?.isRefreshing = true
fetchChannel(view)
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
val subButton = view.findViewById(R.id.channel_subscribe)
- if (sharedPref?.getString("token", "") != "") {
+ if (PreferenceHelper.getToken(requireContext()) != "") {
isSubscribed(subButton)
}
}
@@ -95,10 +95,10 @@ class ChannelFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.isSubscribed(
channel_id!!,
- sharedPref?.getString("token", "")!!
+ token
)
} catch (e: IOException) {
println(e)
@@ -135,9 +135,9 @@ class ChannelFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.subscribe(
- sharedPref?.getString("token", "")!!,
+ token,
Subscribe(channel_id)
)
} catch (e: IOException) {
@@ -158,9 +158,9 @@ class ChannelFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.unsubscribe(
- sharedPref?.getString("token", "")!!,
+ token,
Subscribe(channel_id)
)
} catch (e: IOException) {
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index 279bef87b..ead5eceb7 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -1,6 +1,5 @@
package com.github.libretube.fragments
-import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index ab638300e..7ec0ff4c6 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -34,7 +34,6 @@ import androidx.core.os.bundleOf
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
-import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -426,7 +425,7 @@ class PlayerFragment : Fragment() {
thumbnailUrl = response.thumbnailUrl!!
// check whether related streams and autoplay are enabled
- autoplay = PreferenceHelper.getBoolean(requireContext(),"autoplay", false)
+ autoplay = PreferenceHelper.getBoolean(requireContext(), "autoplay", false)
relatedStreamsEnabled = PreferenceHelper.getBoolean(requireContext(), "related_streams_toggle", true)
// save related streams for autoplay
relatedStreams = response.relatedStreams
@@ -679,8 +678,8 @@ class PlayerFragment : Fragment() {
activity.findViewById(R.id.mainMotionLayout).transitionToEnd()
view.findViewById(R.id.playerMotionLayout).transitionToEnd()
}
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- if (sharedPref?.getString("token", "") != "") {
+ val token = PreferenceHelper.getToken(requireContext())
+ if (token != "") {
val channelId = response.uploaderUrl?.replace("/channel/", "")
val subButton = view.findViewById(R.id.player_subscribe)
isSubscribed(subButton, channelId!!)
@@ -940,10 +939,10 @@ class PlayerFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.isSubscribed(
channel_id,
- sharedPref?.getString("token", "")!!
+ token
)
} catch (e: IOException) {
println(e)
@@ -980,9 +979,9 @@ class PlayerFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.subscribe(
- sharedPref?.getString("token", "")!!,
+ token,
Subscribe(channel_id)
)
} catch (e: IOException) {
@@ -1003,9 +1002,9 @@ class PlayerFragment : Fragment() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref = context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.unsubscribe(
- sharedPref?.getString("token", "")!!,
+ token,
Subscribe(channel_id)
)
} catch (e: IOException) {
diff --git a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
index 1b3f34ae3..4e8c20dab 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlaylistFragment.kt
@@ -1,6 +1,5 @@
package com.github.libretube.fragments
-import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
index 03b6f56dc..d502a7cf3 100644
--- a/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Subscriptions.kt
@@ -1,6 +1,5 @@
package com.github.libretube.fragments
-import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
@@ -15,7 +14,6 @@ import android.widget.Toast
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
-import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
diff --git a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
index 0929a26b6..98701c106 100644
--- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
@@ -39,9 +39,7 @@ class AdvancedSettings : PreferenceFragmentCompat() {
PreferenceHelper.clearPreferences(requireContext())
// clear login token
- val sharedPrefToken =
- context?.getSharedPreferences("token", Context.MODE_PRIVATE)
- sharedPrefToken?.edit()?.clear()?.commit()
+ PreferenceHelper.setToken(requireContext(), "")
requireMainActivityRestart = true
activity?.recreate()
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 256fda642..193b3aa7c 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -309,11 +309,10 @@ class InstanceSettings : PreferenceFragmentCompat() {
fun run() {
lifecycleScope.launchWhenCreated {
val response = try {
- val sharedPref =
- context?.getSharedPreferences("token", Context.MODE_PRIVATE)
+ val token = PreferenceHelper.getToken(requireContext())
RetrofitInstance.api.importSubscriptions(
false,
- sharedPref?.getString("token", "")!!,
+ token,
channels
)
} catch (e: IOException) {
From 25fab2df40ea065bf26496dbea4f5c75d78e59c6 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 12:11:10 +0200
Subject: [PATCH 81/97] rewrite custom instances
---
app/build.gradle | 1 +
.../libretube/dialogs/CustomInstanceDialog.kt | 67 ++++---------------
.../github/libretube/dialogs/ShareDialog.kt | 25 ++-----
.../github/libretube/obj/CustomInstance.kt | 7 ++
.../libretube/preferences/InstanceSettings.kt | 28 ++------
.../github/libretube/util/PreferenceHelper.kt | 27 ++++++++
gradle/libs.versions.toml | 2 +
7 files changed, 62 insertions(+), 95 deletions(-)
create mode 100644 app/src/main/java/com/github/libretube/obj/CustomInstance.kt
diff --git a/app/build.gradle b/app/build.gradle
index 794fb472d..90f219fa8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -85,4 +85,5 @@ dependencies {
coreLibraryDesugaring libs.desugaring
implementation libs.cronet.embedded
+ implementation libs.gson
}
diff --git a/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
index 50e49356c..94df2f77d 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CustomInstanceDialog.kt
@@ -9,8 +9,9 @@ import android.widget.TextView
import android.widget.Toast
import androidx.core.text.HtmlCompat
import androidx.fragment.app.DialogFragment
-import androidx.preference.PreferenceManager
import com.github.libretube.R
+import com.github.libretube.obj.CustomInstance
+import com.github.libretube.util.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import java.net.URL
@@ -36,17 +37,22 @@ class CustomInstanceDialog : DialogFragment() {
}
addInstanceButton.setOnClickListener {
- val instanceName = instanceNameEditText.text.toString()
- val instanceApiUrl = instanceApiUrlEditText.text.toString()
- val instanceFrontendUrl = instanceFrontendUrlEditText.text.toString()
+ val customInstance = CustomInstance()
+ customInstance.name = instanceNameEditText.text.toString()
+ customInstance.apiUrl = instanceApiUrlEditText.text.toString()
+ customInstance.frontendUrl = instanceFrontendUrlEditText.text.toString()
- if (instanceName != "" && instanceApiUrl != "" && instanceFrontendUrl != "") {
+ if (
+ customInstance.name != "" &&
+ customInstance.apiUrl != "" &&
+ customInstance.frontendUrl != ""
+ ) {
try {
// check whether the URL is valid, otherwise catch
- URL(instanceApiUrl).toURI()
- URL(instanceFrontendUrl).toURI()
+ URL(customInstance.apiUrl).toURI()
+ URL(customInstance.frontendUrl).toURI()
- saveCustomInstance(instanceName, instanceApiUrl, instanceFrontendUrl)
+ PreferenceHelper.saveCustomInstance(requireContext(), customInstance)
activity?.recreate()
dismiss()
} catch (e: Exception) {
@@ -80,49 +86,4 @@ class CustomInstanceDialog : DialogFragment() {
builder.create()
} ?: throw IllegalStateException("Activity cannot be null")
}
-
- private fun saveCustomInstance(
- instanceName: String,
- instanceApiUrl: String,
- instanceFrontendApiUrl: String
- ) {
- val sharedPreferences = PreferenceManager
- .getDefaultSharedPreferences(requireContext())
-
- // get the names of the other custom instances
- var customInstancesNames = try {
- sharedPreferences
- .getStringSet("custom_instances_name", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
-
- // get the api urls of the other custom instances
- var customInstancesUrls = try {
- sharedPreferences
- .getStringSet("custom_instances_url", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
-
- // get the frontend urls of the other custom instances
- var customInstancesFrontendUrls = try {
- sharedPreferences
- .getStringSet("custom_instances_url", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
-
- // append new instance to the list
- customInstancesNames += instanceName
- customInstancesUrls += instanceApiUrl
- customInstancesFrontendUrls += instanceFrontendApiUrl
-
- // save them to the shared preferences
- sharedPreferences.edit()
- .putStringSet("custom_instances_name", HashSet(customInstancesNames))
- .putStringSet("custom_instances_url", HashSet(customInstancesUrls))
- .putStringSet("custom_instances_frontend_url", HashSet(customInstancesFrontendUrls))
- .apply()
- }
}
diff --git a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
index 7fec764a2..70e576340 100644
--- a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
@@ -55,8 +55,6 @@ class ShareDialog(
// get the frontend url if it's a custom instance
private fun getCustomInstanceFrontendUrl(): String {
- val sharedPreferences =
- PreferenceManager.getDefaultSharedPreferences(requireContext())
val instancePref = PreferenceHelper.getString(
requireContext(),
"selectInstance",
@@ -64,27 +62,12 @@ class ShareDialog(
)
// get the api urls of the other custom instances
- var customInstancesUrls = try {
- sharedPreferences
- .getStringSet("custom_instances_url", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
-
- // get the frontend urls of the other custom instances
- var customInstancesFrontendUrls = try {
- sharedPreferences
- .getStringSet("custom_instances_url", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
+ val customInstances = PreferenceHelper.getCustomInstances(requireContext())
// return the custom instance frontend url if available
- return if (customInstancesUrls.contains(instancePref)) {
- val index = customInstancesUrls.indexOf(instancePref)
- return customInstancesFrontendUrls[index]
- } else {
- ""
+ customInstances.forEach { instance ->
+ if (instance.apiUrl == instancePref) return instance.apiUrl
}
+ return ""
}
}
diff --git a/app/src/main/java/com/github/libretube/obj/CustomInstance.kt b/app/src/main/java/com/github/libretube/obj/CustomInstance.kt
new file mode 100644
index 000000000..880044448
--- /dev/null
+++ b/app/src/main/java/com/github/libretube/obj/CustomInstance.kt
@@ -0,0 +1,7 @@
+package com.github.libretube.obj
+
+class CustomInstance(
+ var name: String = "",
+ var apiUrl: String = "",
+ var frontendUrl: String = ""
+)
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 193b3aa7c..6173b1f03 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -135,9 +135,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
val clearCustomInstances = findPreference("clearCustomInstances")
clearCustomInstances?.setOnPreferenceClickListener {
- PreferenceHelper.removePreference(requireContext(), "custom_instances_name")
- PreferenceHelper.removePreference(requireContext(), "custom_instances_url")
- PreferenceHelper.removePreference(requireContext(), "custom_instances_frontend_url")
+ PreferenceHelper.removePreference(requireContext(), "customInstances")
activity?.recreate()
true
}
@@ -216,27 +214,15 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
private fun initCustomInstances() {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
+ val customInstances = PreferenceHelper.getCustomInstances(requireContext())
- // get the names of the custom instances
- val customInstancesNames = try {
- sharedPreferences
- .getStringSet("custom_instances_name", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
+ var instanceNames = resources.getStringArray(R.array.instances)
+ var instanceValues = resources.getStringArray(R.array.instancesValue)
+ customInstances.forEach{instance ->
+ instanceNames += instance.name
+ instanceValues += instance.apiUrl
}
- // get the urls of the custom instances
- val customInstancesUrls = try {
- sharedPreferences
- .getStringSet("custom_instances_url", HashSet())!!.toList()
- } catch (e: Exception) {
- emptyList()
- }
-
- val instanceNames = resources.getStringArray(R.array.instances) + customInstancesNames
- val instanceValues = resources.getStringArray(R.array.instancesValue) + customInstancesUrls
-
// add custom instances to the list preference
val instance = findPreference("selectInstance")
instance?.entries = instanceNames
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index 805251d0e..2da49ac4d 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -3,6 +3,10 @@ package com.github.libretube.util
import android.content.Context
import android.content.SharedPreferences
import androidx.preference.PreferenceManager
+import com.github.libretube.obj.CustomInstance
+import com.google.common.reflect.TypeToken
+import com.google.gson.Gson
+import java.lang.reflect.Type
object PreferenceHelper {
fun setString(context: Context, key: String?, value: String?) {
@@ -81,6 +85,29 @@ object PreferenceHelper {
editor.putString("username", newValue)
}
+ fun saveCustomInstance(context: Context, customInstance: CustomInstance) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ val gson = Gson()
+
+ val customInstancesList = getCustomInstances(context)
+ customInstancesList += customInstance
+
+ val json = gson.toJson(customInstancesList)
+ editor.putString("customInstances", json).commit()
+ }
+
+ fun getCustomInstances(context: Context): ArrayList {
+ val settings = getDefaultSharedPreferences(context)
+ val gson = Gson()
+ val json: String = settings.getString("customInstances", "")!!
+ val type: Type = object : TypeToken?>() {}.type
+ return try {
+ gson.fromJson(json, type)
+ } catch (e: Exception) {
+ arrayListOf()
+ }
+ }
+
private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
return PreferenceManager.getDefaultSharedPreferences(context)
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 63fc52d9e..2e6834caa 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -17,6 +17,7 @@ mobileffmpeg = "4.5.1.LTS"
desugaring = "1.1.5"
cronetEmbedded = "101.4951.41"
leakcanary = "2.8.1"
+gson = "2.9.0"
[libraries]
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
@@ -41,3 +42,4 @@ desugaring = { group = "com.android.tools", name = "desugar_jdk_libs", version.r
exoplayer-extension-cronet = { group = "com.google.android.exoplayer", name = "extension-cronet", version.ref = "exoplayer" }
cronet-embedded = { group = "org.chromium.net", name = "cronet-embedded", version.ref = "cronetEmbedded" }
square-leakcanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcanary" }
+gson = { group = "com.google.code.gson", name="gson", version.ref = "gson"}
\ No newline at end of file
From 6f1734c57e051f841a9ad221a8c5cbe85423a12e Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 12:20:06 +0200
Subject: [PATCH 82/97] move search history to prefhelper
---
.../adapters/SearchHistoryAdapter.kt | 5 ++---
.../libretube/fragments/SearchFragment.kt | 21 +++----------------
.../github/libretube/util/PreferenceHelper.kt | 17 +++++++++++++++
3 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
index 7dfdeaa72..baeea812d 100644
--- a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
@@ -6,10 +6,10 @@ import android.view.View
import android.view.ViewGroup
import android.widget.EditText
import android.widget.TextView
-import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.R
import com.github.libretube.fragments.SearchFragment
+import com.github.libretube.util.PreferenceHelper
import com.google.android.material.imageview.ShapeableImageView
class SearchHistoryAdapter(
@@ -35,9 +35,8 @@ class SearchHistoryAdapter(
holder.v.findViewById(R.id.history_text).text = history
holder.v.findViewById(R.id.delete_history).setOnClickListener {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
historyList = historyList - history
- sharedPreferences.edit().putStringSet("search_history", HashSet(historyList)).apply()
+ PreferenceHelper.saveHistory(context, historyList)
notifyDataSetChanged()
}
diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
index 668af1bb8..b8fadffca 100644
--- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
@@ -18,7 +18,6 @@ import android.widget.TextView.OnEditorActionListener
import android.widget.TextView.VISIBLE
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
-import androidx.preference.PreferenceManager
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -267,7 +266,7 @@ class SearchFragment : Fragment() {
private fun showHistory() {
searchRecView.visibility = GONE
- val historyList = getHistory()
+ val historyList = PreferenceHelper.getHistory(requireContext())
if (historyList.isNotEmpty()) {
historyRecView.adapter =
SearchHistoryAdapter(requireContext(), historyList, autoTextView, this)
@@ -276,10 +275,9 @@ class SearchFragment : Fragment() {
}
private fun addToHistory(query: String) {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
val searchHistoryEnabled = PreferenceHelper.getBoolean(requireContext(), "search_history_toggle", true)
if (searchHistoryEnabled) {
- var historyList = getHistory()
+ var historyList = PreferenceHelper.getHistory(requireContext())
if ((historyList.isNotEmpty() && historyList.contains(query)) || query == "") {
return
@@ -291,20 +289,7 @@ class SearchFragment : Fragment() {
historyList = historyList.takeLast(10)
}
- val set: Set = HashSet(historyList)
-
- sharedPreferences.edit().putStringSet("search_history", set)
- .apply()
- }
- }
-
- private fun getHistory(): List {
- return try {
- val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
- val set: Set = sharedPreferences.getStringSet("search_history", HashSet())!!
- set.toList()
- } catch (e: Exception) {
- emptyList()
+ PreferenceHelper.saveHistory(requireContext(), historyList)
}
}
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index 2da49ac4d..11f5ddd65 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -2,6 +2,7 @@ package com.github.libretube.util
import android.content.Context
import android.content.SharedPreferences
+import androidx.core.content.ContentProviderCompat.requireContext
import androidx.preference.PreferenceManager
import com.github.libretube.obj.CustomInstance
import com.google.common.reflect.TypeToken
@@ -108,6 +109,22 @@ object PreferenceHelper {
}
}
+ fun getHistory(context: Context): List {
+ return try {
+ val settings = getDefaultSharedPreferences(context)
+ val set: Set = settings.getStringSet("search_history", HashSet())!!
+ set.toList()
+ } catch (e: Exception) {
+ emptyList()
+ }
+ }
+
+ fun saveHistory(context: Context, historyList: List) {
+ val editor = getDefaultSharedPreferencesEditor(context)
+ val set: Set = HashSet(historyList)
+ editor.putStringSet("search_history", set).apply()
+ }
+
private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
return PreferenceManager.getDefaultSharedPreferences(context)
}
From ecacd13ceb3351d3de49b75af36de03ccee83020 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 12:20:56 +0200
Subject: [PATCH 83/97] ktlint
---
.../com/github/libretube/dialogs/LoginDialog.kt | 1 -
.../com/github/libretube/dialogs/ShareDialog.kt | 1 -
.../github/libretube/fragments/ChannelFragment.kt | 1 -
.../github/libretube/fragments/PlayerFragment.kt | 15 ++++++++++-----
.../github/libretube/fragments/SearchFragment.kt | 3 ++-
.../libretube/preferences/AdvancedSettings.kt | 1 -
.../libretube/preferences/InstanceSettings.kt | 6 ++----
.../com/github/libretube/util/PreferenceHelper.kt | 2 +-
app/src/main/res/layout/activity_settings.xml | 2 +-
app/src/main/res/layout/dialog_addtoplaylist.xml | 2 +-
.../main/res/layout/dialog_create_playlist.xml | 2 +-
.../main/res/layout/dialog_custom_instance.xml | 2 +-
app/src/main/res/layout/dialog_delete_account.xml | 2 +-
app/src/main/res/layout/dialog_download.xml | 2 +-
app/src/main/res/layout/dialog_login.xml | 2 +-
.../res/layout/exo_styled_player_control_view.xml | 4 ++--
16 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
index 65eba2c39..466249620 100644
--- a/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/LoginDialog.kt
@@ -1,7 +1,6 @@
package com.github.libretube.dialogs
import android.app.Dialog
-import android.content.Context
import android.os.Bundle
import android.util.Log
import android.util.TypedValue
diff --git a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
index 70e576340..8f92e7a8b 100644
--- a/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/ShareDialog.kt
@@ -4,7 +4,6 @@ import android.app.Dialog
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.DialogFragment
-import androidx.preference.PreferenceManager
import com.github.libretube.R
import com.github.libretube.util.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder
diff --git a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
index a92afc6c4..a45f80c71 100644
--- a/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/ChannelFragment.kt
@@ -1,7 +1,6 @@
package com.github.libretube.fragments
import android.annotation.SuppressLint
-import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 7ec0ff4c6..1701158d4 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -426,7 +426,8 @@ class PlayerFragment : Fragment() {
// check whether related streams and autoplay are enabled
autoplay = PreferenceHelper.getBoolean(requireContext(), "autoplay", false)
- relatedStreamsEnabled = PreferenceHelper.getBoolean(requireContext(), "related_streams_toggle", true)
+ relatedStreamsEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "related_streams_toggle", true)
// save related streams for autoplay
relatedStreams = response.relatedStreams
runOnUiThread {
@@ -742,7 +743,8 @@ class PlayerFragment : Fragment() {
}
private fun setResolutionAndSubtitles(view: View, response: Streams) {
- val videoFormatPreference = PreferenceHelper.getString(requireContext(), "player_video_format", "WEBM")
+ val videoFormatPreference =
+ PreferenceHelper.getString(requireContext(), "player_video_format", "WEBM")
val defres = PreferenceHelper.getString(requireContext(), "default_res", "")!!
val qualityText = view.findViewById(R.id.quality_text)
@@ -857,10 +859,13 @@ class PlayerFragment : Fragment() {
}
private fun createExoPlayer(view: View) {
- val playbackSpeed = PreferenceHelper.getString(requireContext(), "playback_speed", "1F")?.toFloat()
+ val playbackSpeed =
+ PreferenceHelper.getString(requireContext(), "playback_speed", "1F")?.toFloat()
// multiply by thousand: s -> ms
- val bufferingGoal = PreferenceHelper.getString(requireContext(), "buffering_goal", "50")?.toInt()!! * 1000
- val seekIncrement = PreferenceHelper.getString(requireContext(), "seek_increment", "5")?.toLong()!! * 1000
+ val bufferingGoal =
+ PreferenceHelper.getString(requireContext(), "buffering_goal", "50")?.toInt()!! * 1000
+ val seekIncrement =
+ PreferenceHelper.getString(requireContext(), "seek_increment", "5")?.toLong()!! * 1000
val cronetEngine: CronetEngine = CronetHelper.getCronetEngine()
val cronetDataSourceFactory: CronetDataSource.Factory =
diff --git a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
index b8fadffca..cfe515d71 100644
--- a/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/SearchFragment.kt
@@ -275,7 +275,8 @@ class SearchFragment : Fragment() {
}
private fun addToHistory(query: String) {
- val searchHistoryEnabled = PreferenceHelper.getBoolean(requireContext(), "search_history_toggle", true)
+ val searchHistoryEnabled =
+ PreferenceHelper.getBoolean(requireContext(), "search_history_toggle", true)
if (searchHistoryEnabled) {
var historyList = PreferenceHelper.getHistory(requireContext())
diff --git a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
index 98701c106..1de88cba5 100644
--- a/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/AdvancedSettings.kt
@@ -1,6 +1,5 @@
package com.github.libretube.preferences
-import android.content.Context
import android.os.Bundle
import android.widget.TextView
import androidx.preference.Preference
diff --git a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
index 6173b1f03..f34042572 100644
--- a/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/InstanceSettings.kt
@@ -2,7 +2,6 @@ package com.github.libretube.preferences
import android.Manifest
import android.content.ContentResolver
-import android.content.Context
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
@@ -19,7 +18,6 @@ import androidx.lifecycle.lifecycleScope
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
-import androidx.preference.PreferenceManager
import com.github.libretube.R
import com.github.libretube.dialogs.CustomInstanceDialog
import com.github.libretube.dialogs.DeleteAccountDialog
@@ -214,11 +212,11 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
private fun initCustomInstances() {
- val customInstances = PreferenceHelper.getCustomInstances(requireContext())
+ val customInstances = PreferenceHelper.getCustomInstances(requireContext())
var instanceNames = resources.getStringArray(R.array.instances)
var instanceValues = resources.getStringArray(R.array.instancesValue)
- customInstances.forEach{instance ->
+ customInstances.forEach { instance ->
instanceNames += instance.name
instanceValues += instance.apiUrl
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index 11f5ddd65..950d17d13 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -2,7 +2,6 @@ package com.github.libretube.util
import android.content.Context
import android.content.SharedPreferences
-import androidx.core.content.ContentProviderCompat.requireContext
import androidx.preference.PreferenceManager
import com.github.libretube.obj.CustomInstance
import com.google.common.reflect.TypeToken
@@ -128,6 +127,7 @@ object PreferenceHelper {
private fun getDefaultSharedPreferences(context: Context): SharedPreferences {
return PreferenceManager.getDefaultSharedPreferences(context)
}
+
private fun getDefaultSharedPreferencesEditor(context: Context): SharedPreferences.Editor {
return getDefaultSharedPreferences(context).edit()
}
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 1bcce0752..28406dca6 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -6,7 +6,7 @@
+ android:paddingVertical="5dp">
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/dialog_create_playlist.xml b/app/src/main/res/layout/dialog_create_playlist.xml
index 9e84f7787..50c0e4780 100644
--- a/app/src/main/res/layout/dialog_create_playlist.xml
+++ b/app/src/main/res/layout/dialog_create_playlist.xml
@@ -41,7 +41,7 @@
android:id="@+id/create_new_playlist"
android:text="@string/createPlaylist"
style="@style/CustomDialogButton"
- android:layout_marginRight="16dp"/>
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/dialog_custom_instance.xml b/app/src/main/res/layout/dialog_custom_instance.xml
index 2ab157e58..46c5d5f0b 100644
--- a/app/src/main/res/layout/dialog_custom_instance.xml
+++ b/app/src/main/res/layout/dialog_custom_instance.xml
@@ -62,7 +62,7 @@
android:id="@+id/addInstance"
android:text="@string/addInstance"
style="@style/CustomDialogButton"
- android:layout_marginRight="16dp"/>
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/dialog_delete_account.xml b/app/src/main/res/layout/dialog_delete_account.xml
index dbeedecf1..160472415 100644
--- a/app/src/main/res/layout/dialog_delete_account.xml
+++ b/app/src/main/res/layout/dialog_delete_account.xml
@@ -40,7 +40,7 @@
android:id="@+id/delete_account_confirm"
android:text="@string/deleteAccount"
style="@style/CustomDialogButton"
- android:layout_marginRight="16dp"/>
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/dialog_download.xml b/app/src/main/res/layout/dialog_download.xml
index 6efde9733..f4a8bf418 100644
--- a/app/src/main/res/layout/dialog_download.xml
+++ b/app/src/main/res/layout/dialog_download.xml
@@ -30,6 +30,6 @@
android:id="@+id/download"
android:text="@string/download"
style="@style/CustomDialogButton"
- android:layout_marginRight="16dp"/>
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/dialog_login.xml b/app/src/main/res/layout/dialog_login.xml
index 14733157f..a5a1bdaa9 100644
--- a/app/src/main/res/layout/dialog_login.xml
+++ b/app/src/main/res/layout/dialog_login.xml
@@ -52,7 +52,7 @@
android:id="@+id/login"
android:text="@string/login"
style="@style/CustomDialogButton"
- android:layout_marginRight="16dp"/>
+ android:layout_marginRight="16dp" />
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 131105b6a..291b9d370 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -54,7 +54,7 @@
android:padding="@dimen/exo_icon_padding"
android:background="#00FFFFFF"
app:tint="@android:color/white"
- android:layout_marginRight="10dp"/>
+ android:layout_marginRight="10dp" />
+ android:src="@drawable/ic_fullscreen" />
From b477e1a202aa7123c4f176a44f414aeb37fa0f70 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 12:26:19 +0200
Subject: [PATCH 84/97] use objects instead of class
---
app/src/main/java/com/github/libretube/MainActivity.kt | 4 ++--
app/src/main/java/com/github/libretube/RouterActivity.kt | 2 +-
app/src/main/java/com/github/libretube/SettingsActivity.kt | 4 ++--
.../com/github/libretube/preferences/AppearanceSettings.kt | 4 ++--
.../java/com/github/libretube/preferences/MainSettings.kt | 2 +-
app/src/main/java/com/github/libretube/util/LocaleHelper.kt | 2 +-
app/src/main/java/com/github/libretube/util/ThemeHelper.kt | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/MainActivity.kt b/app/src/main/java/com/github/libretube/MainActivity.kt
index 14c721398..357250e75 100644
--- a/app/src/main/java/com/github/libretube/MainActivity.kt
+++ b/app/src/main/java/com/github/libretube/MainActivity.kt
@@ -57,8 +57,8 @@ class MainActivity : AppCompatActivity() {
RetrofitInstance.url =
PreferenceHelper.getString(this, "selectInstance", "https://pipedapi.kavin.rocks/")!!
- ThemeHelper().updateTheme(this)
- LocaleHelper().updateLanguage(this)
+ ThemeHelper.updateTheme(this)
+ LocaleHelper.updateLanguage(this)
// show noInternet Activity if no internet available on app startup
if (!isNetworkAvailable(this)) {
diff --git a/app/src/main/java/com/github/libretube/RouterActivity.kt b/app/src/main/java/com/github/libretube/RouterActivity.kt
index 1292422a3..3033fcfbb 100644
--- a/app/src/main/java/com/github/libretube/RouterActivity.kt
+++ b/app/src/main/java/com/github/libretube/RouterActivity.kt
@@ -21,7 +21,7 @@ class RouterActivity : AppCompatActivity() {
handleSendText(uri!!)
} else {
// start app as normal if URI not in host list
- ThemeHelper().restartMainActivity(this)
+ ThemeHelper.restartMainActivity(this)
}
}
diff --git a/app/src/main/java/com/github/libretube/SettingsActivity.kt b/app/src/main/java/com/github/libretube/SettingsActivity.kt
index 27f6f5046..8e2a3f69b 100644
--- a/app/src/main/java/com/github/libretube/SettingsActivity.kt
+++ b/app/src/main/java/com/github/libretube/SettingsActivity.kt
@@ -19,7 +19,7 @@ class SettingsActivity : AppCompatActivity() {
val TAG = "SettingsActivity"
override fun onCreate(savedInstanceState: Bundle?) {
DynamicColors.applyToActivityIfAvailable(this)
- ThemeHelper().updateTheme(this)
+ ThemeHelper.updateTheme(this)
// makes the preference dialogs use material dialogs
setTheme(R.style.MaterialAlertDialog)
@@ -54,7 +54,7 @@ class SettingsActivity : AppCompatActivity() {
val nManager =
this.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
nManager.cancelAll()
- ThemeHelper().restartMainActivity(this)
+ ThemeHelper.restartMainActivity(this)
ActivityCompat.finishAffinity(this)
} else {
super.onBackPressed()
diff --git a/app/src/main/java/com/github/libretube/preferences/AppearanceSettings.kt b/app/src/main/java/com/github/libretube/preferences/AppearanceSettings.kt
index ea88a50f4..b8a4bd076 100644
--- a/app/src/main/java/com/github/libretube/preferences/AppearanceSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/AppearanceSettings.kt
@@ -21,7 +21,7 @@ class AppearanceSettings : PreferenceFragmentCompat() {
val themeToggle = findPreference("theme_togglee")
themeToggle?.setOnPreferenceChangeListener { _, _ ->
requireMainActivityRestart = true
- ThemeHelper().restartMainActivity(requireContext())
+ ThemeHelper.restartMainActivity(requireContext())
true
}
@@ -34,7 +34,7 @@ class AppearanceSettings : PreferenceFragmentCompat() {
val iconChange = findPreference("icon_change")
iconChange?.setOnPreferenceChangeListener { _, newValue ->
- ThemeHelper().changeIcon(requireContext(), newValue.toString())
+ ThemeHelper.changeIcon(requireContext(), newValue.toString())
true
}
diff --git a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt
index 6654872d4..a8ceef736 100644
--- a/app/src/main/java/com/github/libretube/preferences/MainSettings.kt
+++ b/app/src/main/java/com/github/libretube/preferences/MainSettings.kt
@@ -31,7 +31,7 @@ class MainSettings : PreferenceFragmentCompat() {
val language = findPreference("language")
language?.setOnPreferenceChangeListener { _, _ ->
- ThemeHelper().restartMainActivity(requireContext())
+ ThemeHelper.restartMainActivity(requireContext())
true
}
diff --git a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
index 48714873d..1c4ec8400 100644
--- a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt
@@ -4,7 +4,7 @@ import android.content.Context
import android.os.Build
import java.util.*
-class LocaleHelper {
+object LocaleHelper {
fun updateLanguage(context: Context) {
val languageName = PreferenceHelper.getString(context, "language", "en")
diff --git a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
index 815a72e47..ca9498685 100644
--- a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt
@@ -9,7 +9,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import com.github.libretube.R
-class ThemeHelper {
+object ThemeHelper {
fun updateTheme(context: Context) {
updateAccentColor(context)
From fcd012184eb8618e1ebc2123d1c77a0f4150c9ae Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 17:20:53 +0200
Subject: [PATCH 85/97] fix fab
---
.../java/com/github/libretube/fragments/Library.kt | 13 ++++++++++++-
.../github/libretube/fragments/PlayerFragment.kt | 4 ++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index ead5eceb7..d0dbf7736 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -28,6 +28,8 @@ class Library : Fragment() {
lateinit var token: String
private lateinit var playlistRecyclerView: RecyclerView
private lateinit var refreshLayout: SwipeRefreshLayout
+ private lateinit var createPlaylistButton: FloatingActionButton
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.let {
@@ -58,7 +60,8 @@ class Library : Fragment() {
Log.d(TAG, "hmm")
fetchPlaylists(view)
}
- view.findViewById(R.id.create_playlist).setOnClickListener {
+ createPlaylistButton = view.findViewById(R.id.create_playlist)
+ createPlaylistButton.setOnClickListener {
val newFragment = CreatePlaylistDialog()
newFragment.show(childFragmentManager, "Create Playlist")
}
@@ -71,6 +74,14 @@ class Library : Fragment() {
}
}
+ override fun onResume() {
+ // optimize CreatePlaylistFab bottom margin
+ val layoutParams = createPlaylistButton.layoutParams as ViewGroup.MarginLayoutParams
+ layoutParams.bottomMargin = if (isMiniPlayerVisible) 180 else 64
+ createPlaylistButton.layoutParams = layoutParams
+ super.onResume()
+ }
+
private fun fetchPlaylists(view: View) {
fun run() {
refreshLayout.isRefreshing = true
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 1701158d4..cb6ccca83 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -92,6 +92,7 @@ import java.util.concurrent.Executors
import kotlin.math.abs
var isFullScreen = false
+var isMiniPlayerVisible = false
class PlayerFragment : Fragment() {
@@ -197,9 +198,11 @@ class PlayerFragment : Fragment() {
val mainMotionLayout =
mainActivity.findViewById(R.id.mainMotionLayout)
if (currentId == eId) {
+ isMiniPlayerVisible = true
exoPlayerView.useController = false
mainMotionLayout.progress = 1F
} else if (currentId == sId) {
+ isMiniPlayerVisible = false
exoPlayerView.useController = true
mainMotionLayout.progress = 0F
}
@@ -218,6 +221,7 @@ class PlayerFragment : Fragment() {
playerMotionLayout.transitionToStart()
view.findViewById(R.id.close_imageView).setOnClickListener {
+ isMiniPlayerVisible = false
motionLayout.transitionToEnd()
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
From 8a053e87e10e419350861840d1026a54b7d3d3c1 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 17:22:06 +0200
Subject: [PATCH 86/97] fix
---
.../main/java/com/github/libretube/fragments/PlayerFragment.kt | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index cb6ccca83..667d40c3e 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -230,6 +230,7 @@ class PlayerFragment : Fragment() {
.commit()
}
view.findViewById(R.id.close_imageButton).setOnClickListener {
+ isMiniPlayerVisible = false
motionLayout.transitionToEnd()
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
From bae1182f21840655e7e21ae73ab0bda14387806e Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 17:49:42 +0200
Subject: [PATCH 87/97] fix
---
.../libretube/fragments/PlayerFragment.kt | 11 ++++++++--
.../layout/exo_styled_player_control_view.xml | 21 -------------------
2 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 667d40c3e..24dff80ca 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -2,6 +2,7 @@ package com.github.libretube.fragments
import android.annotation.SuppressLint
import android.app.NotificationManager
+import android.app.PictureInPictureParams
import android.content.Context
import android.content.Intent
import android.content.pm.ActivityInfo
@@ -439,7 +440,9 @@ class PlayerFragment : Fragment() {
createExoPlayer(view)
prepareExoPlayerView()
if (response.chapters != null) initializeChapters(response.chapters)
+ // set media sources for the player
setResolutionAndSubtitles(view, response)
+ initializePlayerView(view, response)
// support for time stamped links
if (arguments?.getLong("timeStamp") != null) {
val position = arguments?.getLong("timeStamp")!! * 1000
@@ -447,9 +450,9 @@ class PlayerFragment : Fragment() {
}
exoPlayer.prepare()
exoPlayer.play()
- initializePlayerView(view, response)
initializePlayerNotification(requireContext())
fetchSponsorBlockSegments()
+ // show comments if related streams disabled
if (!relatedStreamsEnabled) toggleComments()
}
}
@@ -1129,7 +1132,11 @@ class PlayerFragment : Fragment() {
isFullScreen
)
) {
- requireActivity().enterPictureInPictureMode()
+ activity?.enterPictureInPictureMode(updatePipParams())
}
}
+
+ private fun updatePipParams() = PictureInPictureParams.Builder()
+ .setActions(emptyList())
+ .build()
}
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 291b9d370..6c1566c57 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -166,27 +166,6 @@
-
-
-
-
-
-
-
-
-
-
Date: Sun, 26 Jun 2022 18:07:51 +0200
Subject: [PATCH 88/97] fix exo controller
---
.../java/com/github/libretube/fragments/PlayerFragment.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 24dff80ca..1f81707c6 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -442,14 +442,15 @@ class PlayerFragment : Fragment() {
if (response.chapters != null) initializeChapters(response.chapters)
// set media sources for the player
setResolutionAndSubtitles(view, response)
+ exoPlayer.prepare()
initializePlayerView(view, response)
// support for time stamped links
if (arguments?.getLong("timeStamp") != null) {
val position = arguments?.getLong("timeStamp")!! * 1000
exoPlayer.seekTo(position)
}
- exoPlayer.prepare()
exoPlayer.play()
+ exoPlayerView.useController = true
initializePlayerNotification(requireContext())
fetchSponsorBlockSegments()
// show comments if related streams disabled
@@ -545,6 +546,7 @@ class PlayerFragment : Fragment() {
setRepeatToggleModes(RepeatModeUtil.REPEAT_TOGGLE_MODE_ALL)
// controllerShowTimeoutMs = 1500
controllerHideOnTouch = true
+ useController = false
player = exoPlayer
}
}
From 2e9238a512f47f345566a9d9afc9fc1c1324d323 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 19:21:54 +0200
Subject: [PATCH 89/97] fix minor bugs
---
.../java/com/github/libretube/fragments/Library.kt | 11 +++++------
.../com/github/libretube/util/PreferenceHelper.kt | 10 +++++-----
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index d0dbf7736..d459a85d2 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -28,7 +28,6 @@ class Library : Fragment() {
lateinit var token: String
private lateinit var playlistRecyclerView: RecyclerView
private lateinit var refreshLayout: SwipeRefreshLayout
- private lateinit var createPlaylistButton: FloatingActionButton
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -57,10 +56,9 @@ class Library : Fragment() {
fetchPlaylists(view)
refreshLayout.isEnabled = true
refreshLayout.setOnRefreshListener {
- Log.d(TAG, "hmm")
fetchPlaylists(view)
}
- createPlaylistButton = view.findViewById(R.id.create_playlist)
+ val createPlaylistButton = view.findViewById(R.id.create_playlist)
createPlaylistButton.setOnClickListener {
val newFragment = CreatePlaylistDialog()
newFragment.show(childFragmentManager, "Create Playlist")
@@ -75,10 +73,11 @@ class Library : Fragment() {
}
override fun onResume() {
- // optimize CreatePlaylistFab bottom margin
- val layoutParams = createPlaylistButton.layoutParams as ViewGroup.MarginLayoutParams
+ // optimize CreatePlaylistFab bottom margin if miniPlayer active
+ val createPlaylistButton = view?.findViewById(R.id.create_playlist)
+ val layoutParams = createPlaylistButton?.layoutParams as ViewGroup.MarginLayoutParams
layoutParams.bottomMargin = if (isMiniPlayerVisible) 180 else 64
- createPlaylistButton.layoutParams = layoutParams
+ createPlaylistButton?.layoutParams = layoutParams
super.onResume()
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index 950d17d13..79f67e39f 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -56,13 +56,13 @@ object PreferenceHelper {
fun clearPreferences(context: Context) {
val editor = getDefaultSharedPreferencesEditor(context)
editor.clear()
- editor.commit()
+ editor.apply()
}
fun removePreference(context: Context, value: String?) {
val editor = getDefaultSharedPreferencesEditor(context)
editor.remove(value)
- editor.commit()
+ editor.apply()
}
fun getToken(context: Context): String {
@@ -72,7 +72,7 @@ object PreferenceHelper {
fun setToken(context: Context, newValue: String) {
val editor = context.getSharedPreferences("token", Context.MODE_PRIVATE).edit()
- editor.putString("token", newValue)
+ editor.putString("token", newValue).apply()
}
fun getUsername(context: Context): String {
@@ -82,7 +82,7 @@ object PreferenceHelper {
fun setUsername(context: Context, newValue: String) {
val editor = context.getSharedPreferences("username", Context.MODE_PRIVATE).edit()
- editor.putString("username", newValue)
+ editor.putString("username", newValue).apply()
}
fun saveCustomInstance(context: Context, customInstance: CustomInstance) {
@@ -93,7 +93,7 @@ object PreferenceHelper {
customInstancesList += customInstance
val json = gson.toJson(customInstancesList)
- editor.putString("customInstances", json).commit()
+ editor.putString("customInstances", json).apply()
}
fun getCustomInstances(context: Context): ArrayList {
From 731379e00617ba1400b6a5d38c5e9e3e8e23b98b Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 19:34:54 +0200
Subject: [PATCH 90/97] optimize playlist creation
---
.../libretube/dialogs/CreatePlaylistDialog.kt | 10 +++++--
.../com/github/libretube/fragments/Library.kt | 29 +++++++------------
.../github/libretube/util/PreferenceHelper.kt | 6 ++--
3 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
index ce69b89ba..85c1f57a6 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
@@ -14,6 +14,7 @@ import androidx.fragment.app.DialogFragment
import androidx.fragment.app.setFragmentResult
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
+import com.github.libretube.fragments.Library
import com.github.libretube.obj.Playlists
import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.RetrofitInstance
@@ -87,8 +88,13 @@ class CreatePlaylistDialog : DialogFragment() {
Toast.makeText(context, getString(R.string.unknown_error), Toast.LENGTH_SHORT)
.show()
}
- // tell the Subscription Activity to fetch the playlists again
- setFragmentResult("fetchPlaylists", bundleOf("" to ""))
+ // refresh the playlists in the library
+ try {
+ val parent = parentFragment as Library
+ parent.fetchPlaylists()
+ } catch (e: Exception) {
+ Log.e(TAG, e.toString())
+ }
dismiss()
}
}
diff --git a/app/src/main/java/com/github/libretube/fragments/Library.kt b/app/src/main/java/com/github/libretube/fragments/Library.kt
index d459a85d2..4c844066e 100644
--- a/app/src/main/java/com/github/libretube/fragments/Library.kt
+++ b/app/src/main/java/com/github/libretube/fragments/Library.kt
@@ -53,19 +53,16 @@ class Library : Fragment() {
if (token != "") {
view.findViewById(R.id.boogh2).visibility = View.GONE
view.findViewById(R.id.textLike2).visibility = View.GONE
- fetchPlaylists(view)
+ fetchPlaylists()
refreshLayout.isEnabled = true
refreshLayout.setOnRefreshListener {
- fetchPlaylists(view)
+ fetchPlaylists()
}
val createPlaylistButton = view.findViewById(R.id.create_playlist)
createPlaylistButton.setOnClickListener {
val newFragment = CreatePlaylistDialog()
newFragment.show(childFragmentManager, "Create Playlist")
}
- childFragmentManager.setFragmentResultListener("fetchPlaylists", this) { _, _ ->
- fetchPlaylists(view)
- }
} else {
refreshLayout.isEnabled = false
view.findViewById(R.id.create_playlist).visibility = View.GONE
@@ -81,7 +78,7 @@ class Library : Fragment() {
super.onResume()
}
- private fun fetchPlaylists(view: View) {
+ fun fetchPlaylists() {
fun run() {
refreshLayout.isRefreshing = true
lifecycleScope.launchWhenCreated {
@@ -101,12 +98,8 @@ class Library : Fragment() {
}
if (response.isNotEmpty()) {
runOnUiThread {
- with(view.findViewById(R.id.boogh2)) {
- visibility = View.GONE
- }
- with(view.findViewById(R.id.textLike2)) {
- visibility = View.GONE
- }
+ view?.findViewById(R.id.boogh2)?.visibility = View.GONE
+ view?.findViewById(R.id.textLike2)?.visibility = View.GONE
}
val playlistsAdapter = PlaylistsAdapter(
response.toMutableList(),
@@ -115,13 +108,13 @@ class Library : Fragment() {
playlistRecyclerView.adapter = playlistsAdapter
} else {
runOnUiThread {
- with(view.findViewById(R.id.boogh2)) {
- visibility = View.VISIBLE
- setImageResource(R.drawable.ic_list)
+ view?.findViewById(R.id.boogh2).apply {
+ this?.visibility = View.VISIBLE
+ this?.setImageResource(R.drawable.ic_list)
}
- with(view.findViewById(R.id.textLike2)) {
- visibility = View.VISIBLE
- text = getString(R.string.emptyList)
+ view?.findViewById(R.id.textLike2).apply {
+ this?.visibility = View.VISIBLE
+ this?.text = getString(R.string.emptyList)
}
}
}
diff --git a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
index 79f67e39f..310a02578 100644
--- a/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
+++ b/app/src/main/java/com/github/libretube/util/PreferenceHelper.kt
@@ -55,14 +55,12 @@ object PreferenceHelper {
fun clearPreferences(context: Context) {
val editor = getDefaultSharedPreferencesEditor(context)
- editor.clear()
- editor.apply()
+ editor.clear().apply()
}
fun removePreference(context: Context, value: String?) {
val editor = getDefaultSharedPreferencesEditor(context)
- editor.remove(value)
- editor.apply()
+ editor.remove(value).apply()
}
fun getToken(context: Context): String {
From 042fab09a4519a273fe1687467cafaa9a7c73e57 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Sun, 26 Jun 2022 19:35:27 +0200
Subject: [PATCH 91/97] imports
---
.../java/com/github/libretube/dialogs/CreatePlaylistDialog.kt | 2 --
1 file changed, 2 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
index 85c1f57a6..d08256704 100644
--- a/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
+++ b/app/src/main/java/com/github/libretube/dialogs/CreatePlaylistDialog.kt
@@ -8,10 +8,8 @@ import android.view.View
import android.widget.Button
import android.widget.TextView
import android.widget.Toast
-import androidx.core.os.bundleOf
import androidx.core.text.HtmlCompat
import androidx.fragment.app.DialogFragment
-import androidx.fragment.app.setFragmentResult
import androidx.lifecycle.lifecycleScope
import com.github.libretube.R
import com.github.libretube.fragments.Library
From eda413326173a04059692692d9bd3da83d80c899 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Mon, 27 Jun 2022 18:46:44 +0200
Subject: [PATCH 92/97] suggestions UI improvements
---
.../adapters/SearchHistoryAdapter.kt | 4 +--
.../main/res/drawable/ic_arrow_up_left.xml | 11 ++++++
app/src/main/res/layout/fragment_search.xml | 2 +-
app/src/main/res/layout/searchhistory_row.xml | 10 +++---
.../main/res/layout/searchsuggestion_row.xml | 36 +++++++++++++------
5 files changed, 43 insertions(+), 20 deletions(-)
create mode 100644 app/src/main/res/drawable/ic_arrow_up_left.xml
diff --git a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
index baeea812d..a25359f30 100644
--- a/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
+++ b/app/src/main/java/com/github/libretube/adapters/SearchHistoryAdapter.kt
@@ -5,12 +5,12 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.EditText
+import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.github.libretube.R
import com.github.libretube.fragments.SearchFragment
import com.github.libretube.util.PreferenceHelper
-import com.google.android.material.imageview.ShapeableImageView
class SearchHistoryAdapter(
private val context: Context,
@@ -34,7 +34,7 @@ class SearchHistoryAdapter(
val history = historyList[position]
holder.v.findViewById(R.id.history_text).text = history
- holder.v.findViewById(R.id.delete_history).setOnClickListener {
+ holder.v.findViewById(R.id.delete_history).setOnClickListener {
historyList = historyList - history
PreferenceHelper.saveHistory(context, historyList)
notifyDataSetChanged()
diff --git a/app/src/main/res/drawable/ic_arrow_up_left.xml b/app/src/main/res/drawable/ic_arrow_up_left.xml
new file mode 100644
index 000000000..e5ed20662
--- /dev/null
+++ b/app/src/main/res/drawable/ic_arrow_up_left.xml
@@ -0,0 +1,11 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml
index cf46d6d0b..bd8242fdd 100644
--- a/app/src/main/res/layout/fragment_search.xml
+++ b/app/src/main/res/layout/fragment_search.xml
@@ -329,7 +329,7 @@
android:id="@+id/history_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_margin="10dp"
+ android:layout_marginVertical="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/app/src/main/res/layout/searchhistory_row.xml b/app/src/main/res/layout/searchhistory_row.xml
index 11bcf477e..f35fd9070 100644
--- a/app/src/main/res/layout/searchhistory_row.xml
+++ b/app/src/main/res/layout/searchhistory_row.xml
@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:layout_marginBottom="16dp"
+ android:paddingHorizontal="16dp"
+ android:paddingVertical="8dp"
android:background="?android:attr/selectableItemBackground">
-
-
-
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ android:layout_margin="5dp" />
+ android:layout_marginHorizontal="8dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/arrow"
+ app:layout_constraintStart_toEndOf="@id/search_icon"
+ app:layout_constraintTop_toTopOf="parent" />
-
\ No newline at end of file
+
+
\ No newline at end of file
From e548905873d691295e2c53dbae418434412a42e0 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Mon, 27 Jun 2022 19:02:10 +0200
Subject: [PATCH 93/97] title in fullscreen
---
.../libretube/fragments/PlayerFragment.kt | 26 ++++++++++++++-----
.../layout/exo_styled_player_control_view.xml | 11 ++++++++
2 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 1f81707c6..0264319c0 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -267,8 +267,13 @@ class PlayerFragment : Fragment() {
toggleComments()
}
- // FullScreen button trigger
+
val fullScreenButton = view.findViewById(R.id.fullscreen)
+ val exoTitle = view.findViewById(R.id.exo_title)
+ val mainContainer = view.findViewById(R.id.main_container)
+ val linLayout = view.findViewById(R.id.linLayout)
+
+ // FullScreen button trigger
fullScreenButton.setOnClickListener {
exoPlayerView.hideController()
if (!isFullScreen) {
@@ -276,24 +281,29 @@ class PlayerFragment : Fragment() {
getConstraintSet(R.id.start).constrainHeight(R.id.player, -1)
enableTransition(R.id.yt_transition, false)
}
- view.findViewById(R.id.main_container).isClickable = true
- view.findViewById(R.id.linLayout).visibility = View.GONE
+
+ mainContainer.isClickable = true
+ linLayout.visibility = View.GONE
fullScreenButton.setImageResource(R.drawable.ic_fullscreen_exit)
+ exoTitle.visibility = View.VISIBLE
+
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
- isFullScreen = true
} else {
with(motionLayout) {
getConstraintSet(R.id.start).constrainHeight(R.id.player, 0)
enableTransition(R.id.yt_transition, true)
}
- view.findViewById(R.id.main_container).isClickable = false
- view.findViewById(R.id.linLayout).visibility = View.VISIBLE
+
+ mainContainer.isClickable = false
+ linLayout.visibility = View.VISIBLE
fullScreenButton.setImageResource(R.drawable.ic_fullscreen)
+ exoTitle.visibility = View.GONE
+
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
- isFullScreen = false
}
+ isFullScreen = !isFullScreen
}
// switching between original aspect ratio (black bars) and zoomed to fill device screen
@@ -564,6 +574,8 @@ class PlayerFragment : Fragment() {
view.findViewById(R.id.player_title).text = response.title
view.findViewById(R.id.player_description).text = response.description
+ view.findViewById(R.id.exo_title).text = response.title
+
// Listener for play and pause icon change
exoPlayer.addListener(object : Player.Listener {
override fun onIsPlayingChanged(isPlaying: Boolean) {
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 6c1566c57..41397298b 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -63,6 +63,17 @@
android:src="@drawable/ic_unlocked"
android:padding="@dimen/exo_icon_padding"
android:background="#00FFFFFF" />
+
+
Date: Mon, 27 Jun 2022 19:13:31 +0200
Subject: [PATCH 94/97] player UI improvements
---
.../libretube/fragments/PlayerFragment.kt | 5 +--
.../layout/exo_styled_player_control_view.xml | 40 ++++++++++++-------
2 files changed, 27 insertions(+), 18 deletions(-)
diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
index 0264319c0..87f7bdf55 100644
--- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
+++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt
@@ -267,7 +267,6 @@ class PlayerFragment : Fragment() {
toggleComments()
}
-
val fullScreenButton = view.findViewById(R.id.fullscreen)
val exoTitle = view.findViewById(R.id.exo_title)
val mainContainer = view.findViewById(R.id.main_container)
@@ -298,7 +297,7 @@ class PlayerFragment : Fragment() {
mainContainer.isClickable = false
linLayout.visibility = View.VISIBLE
fullScreenButton.setImageResource(R.drawable.ic_fullscreen)
- exoTitle.visibility = View.GONE
+ exoTitle.visibility = View.INVISIBLE
val mainActivity = activity as MainActivity
mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
@@ -770,7 +769,7 @@ class PlayerFragment : Fragment() {
val defres = PreferenceHelper.getString(requireContext(), "default_res", "")!!
val qualityText = view.findViewById(R.id.quality_text)
- val qualitySelect = view.findViewById(R.id.quality_select)
+ val qualitySelect = view.findViewById(R.id.quality_linLayout)
var videosNameArray: Array = arrayOf()
var videosUrlArray: Array = arrayOf()
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 41397298b..8392a9631 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -27,7 +27,7 @@
android:layout_height="0dp"
android:background="@color/exo_black_opacity_60" />
-
-
+
+
+
+
@@ -113,9 +121,11 @@
android:padding="@dimen/exo_icon_padding"
android:background="#00FFFFFF"
app:tint="@android:color/white" />
+
+
-
+
Date: Mon, 27 Jun 2022 19:16:22 +0200
Subject: [PATCH 95/97] quality select fix
---
app/src/main/res/layout/exo_styled_player_control_view.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index 8392a9631..a5b9eef0b 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -113,13 +113,12 @@
android:text="HLS"
android:textColor="#FFFFFF" />
-
From 0f5f4b459c4afd1489d6a9bf168c5c9d69fcae66 Mon Sep 17 00:00:00 2001
From: Bnyro
Date: Mon, 27 Jun 2022 19:17:52 +0200
Subject: [PATCH 96/97] code reformat
---
app/src/main/AndroidManifest.xml | 118 +++++++--------
app/src/main/res/drawable/ic_add.xml | 4 +-
app/src/main/res/drawable/ic_arrow_down.xml | 4 +-
.../main/res/drawable/ic_arrow_up_down.xml | 6 +-
app/src/main/res/drawable/ic_aspect_ratio.xml | 10 +-
app/src/main/res/drawable/ic_bell.xml | 4 +-
app/src/main/res/drawable/ic_bell_small.xml | 4 +-
app/src/main/res/drawable/ic_block.xml | 4 +-
app/src/main/res/drawable/ic_campaign.xml | 4 +-
app/src/main/res/drawable/ic_close.xml | 4 +-
app/src/main/res/drawable/ic_color.xml | 4 +-
app/src/main/res/drawable/ic_delete.xml | 4 +-
app/src/main/res/drawable/ic_download.xml | 4 +-
.../main/res/drawable/ic_download_filled.xml | 4 +-
.../main/res/drawable/ic_empty_playlist.xml | 8 +-
app/src/main/res/drawable/ic_filter.xml | 4 +-
app/src/main/res/drawable/ic_frame.xml | 4 +-
.../main/res/drawable/ic_fullscreen_exit.xml | 10 +-
app/src/main/res/drawable/ic_grid.xml | 4 +-
app/src/main/res/drawable/ic_hd.xml | 4 +-
app/src/main/res/drawable/ic_hearted.xml | 4 +-
.../main/res/drawable/ic_history_filled.xml | 4 +-
app/src/main/res/drawable/ic_home.xml | 8 +-
.../main/res/drawable/ic_home_outlined.xml | 4 +-
app/src/main/res/drawable/ic_info.xml | 4 +-
app/src/main/res/drawable/ic_library.xml | 8 +-
app/src/main/res/drawable/ic_license.xml | 4 +-
app/src/main/res/drawable/ic_like.xml | 4 +-
app/src/main/res/drawable/ic_list.xml | 4 +-
app/src/main/res/drawable/ic_login.xml | 12 +-
app/src/main/res/drawable/ic_login_filled.xml | 4 +-
app/src/main/res/drawable/ic_no_wifi.xml | 4 +-
app/src/main/res/drawable/ic_pause.xml | 4 +-
app/src/main/res/drawable/ic_pause_filled.xml | 4 +-
app/src/main/res/drawable/ic_pinned.xml | 8 +-
app/src/main/res/drawable/ic_play_filled.xml | 4 +-
app/src/main/res/drawable/ic_playlist.xml | 10 +-
app/src/main/res/drawable/ic_region.xml | 4 +-
app/src/main/res/drawable/ic_save.xml | 4 +-
app/src/main/res/drawable/ic_search.xml | 10 +-
app/src/main/res/drawable/ic_server.xml | 4 +-
app/src/main/res/drawable/ic_share.xml | 4 +-
app/src/main/res/drawable/ic_skip.xml | 4 +-
app/src/main/res/drawable/ic_speed.xml | 4 +-
app/src/main/res/drawable/ic_sponsorblock.xml | 4 +-
.../main/res/drawable/ic_subscriptions.xml | 8 +-
app/src/main/res/drawable/ic_theme.xml | 4 +-
app/src/main/res/drawable/ic_thumb_up.xml | 4 +-
app/src/main/res/drawable/ic_time.xml | 4 +-
app/src/main/res/drawable/ic_translate.xml | 4 +-
app/src/main/res/drawable/ic_trash.xml | 4 +-
app/src/main/res/drawable/ic_trending.xml | 4 +-
app/src/main/res/drawable/ic_update.xml | 4 +-
app/src/main/res/drawable/ic_upload.xml | 4 +-
app/src/main/res/drawable/ic_verified.xml | 4 +-
app/src/main/res/drawable/ic_video.xml | 4 +-
app/src/main/res/drawable/ic_videocam.xml | 4 +-
app/src/main/res/drawable/ic_vlc.xml | 10 +-
app/src/main/res/layout/activity_main.xml | 12 +-
app/src/main/res/layout/activity_player.xml | 4 +-
app/src/main/res/layout/activity_settings.xml | 14 +-
.../main/res/layout/channel_search_row.xml | 6 +-
.../res/layout/channel_subscription_row.xml | 6 +-
app/src/main/res/layout/chapter_column.xml | 8 +-
app/src/main/res/layout/comments_row.xml | 28 ++--
.../main/res/layout/dialog_addtoplaylist.xml | 4 +-
.../res/layout/dialog_create_playlist.xml | 20 +--
.../res/layout/dialog_custom_instance.xml | 22 +--
.../main/res/layout/dialog_delete_account.xml | 20 +--
app/src/main/res/layout/dialog_download.xml | 12 +-
app/src/main/res/layout/dialog_login.xml | 22 +--
app/src/main/res/layout/dialog_logout.xml | 16 +--
.../layout/exo_styled_player_control_view.xml | 136 +++++++++---------
app/src/main/res/layout/fragment_channel.xml | 30 ++--
app/src/main/res/layout/fragment_home.xml | 4 +-
app/src/main/res/layout/fragment_library.xml | 4 +-
app/src/main/res/layout/fragment_playlist.xml | 12 +-
app/src/main/res/layout/fragment_search.xml | 12 +-
.../res/layout/fragment_subscriptions.xml | 4 +-
.../main/res/layout/playlist_search_row.xml | 8 +-
app/src/main/res/layout/playlists_row.xml | 16 +--
app/src/main/res/layout/replies_row.xml | 28 ++--
app/src/main/res/layout/searchhistory_row.xml | 10 +-
.../main/res/layout/searchsuggestion_row.xml | 10 +-
app/src/main/res/menu/action_bar.xml | 4 +-
app/src/main/res/menu/bottom_menu.xml | 12 +-
app/src/main/res/xml/activity_main_scene.xml | 16 +--
app/src/main/res/xml/player_scene.xml | 82 +++++------
app/src/main/res/xml/player_settings.xml | 8 +-
.../main/res/xml/sponsorblock_settings.xml | 44 +++---
90 files changed, 520 insertions(+), 520 deletions(-)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 88ea6ba64..8f5d7d3c2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -11,32 +11,32 @@
+ android:theme="@style/Theme.Purple">
+ android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
+ android:supportsPictureInPicture="true">
@@ -44,16 +44,16 @@
+ android:icon="@mipmap/ic_gradient"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_gradient_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -61,16 +61,16 @@
+ android:icon="@mipmap/ic_fire"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_fire_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -78,16 +78,16 @@
+ android:icon="@mipmap/ic_flame"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_flame_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -95,16 +95,16 @@
+ android:icon="@mipmap/ic_shaped"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_shaped_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -112,16 +112,16 @@
+ android:icon="@mipmap/ic_torch"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_torch_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -129,16 +129,16 @@
+ android:icon="@mipmap/ic_legacy"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_legacy_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
@@ -146,16 +146,16 @@
+ android:icon="@mipmap/ic_bird"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_bird_round"
+ android:supportsPictureInPicture="true"
+ android:targetActivity=".MainActivity">
diff --git a/app/src/main/res/drawable/ic_add.xml b/app/src/main/res/drawable/ic_add.xml
index 0dbf2e57a..9460f4eaa 100644
--- a/app/src/main/res/drawable/ic_add.xml
+++ b/app/src/main/res/drawable/ic_add.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_arrow_down.xml b/app/src/main/res/drawable/ic_arrow_down.xml
index 10cedc2e3..68fd4058e 100644
--- a/app/src/main/res/drawable/ic_arrow_down.xml
+++ b/app/src/main/res/drawable/ic_arrow_down.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_arrow_up_down.xml b/app/src/main/res/drawable/ic_arrow_up_down.xml
index aa33a09e8..4b0da4369 100644
--- a/app/src/main/res/drawable/ic_arrow_up_down.xml
+++ b/app/src/main/res/drawable/ic_arrow_up_down.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="160">
diff --git a/app/src/main/res/drawable/ic_aspect_ratio.xml b/app/src/main/res/drawable/ic_aspect_ratio.xml
index 4f2bff3ea..e7b7cbba1 100644
--- a/app/src/main/res/drawable/ic_aspect_ratio.xml
+++ b/app/src/main/res/drawable/ic_aspect_ratio.xml
@@ -1,9 +1,9 @@
-
+ android:height="24dp"
+ android:tint="#FFFFFF"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_bell.xml b/app/src/main/res/drawable/ic_bell.xml
index a65a68661..458ed83e0 100644
--- a/app/src/main/res/drawable/ic_bell.xml
+++ b/app/src/main/res/drawable/ic_bell.xml
@@ -4,7 +4,7 @@
android:viewportWidth="18"
android:viewportHeight="20">
+ android:fillType="evenOdd"
+ android:pathData="M8.625,0H9.375C9.5821,0 9.75,0.1679 9.75,0.375C9.75,0.5821 9.9179,0.75 10.125,0.75C10.3321,0.75 10.5,0.9179 10.5,1.125V1.875C10.5,2.4963 11.0088,3.0566 11.5685,3.3265C12.4353,3.7446 13.5132,4.5489 14.0889,5.6503C14.2067,5.8758 14.25,6.1307 14.25,6.3852V12.0512C14.25,12.9156 14.8488,13.6151 15.5614,14.1044C15.8681,14.315 16.102,14.5525 16.3642,14.8462C16.4522,14.9448 16.5,15.0728 16.5,15.2049C16.5,15.506 16.256,15.75 15.955,15.75H2.051C1.7467,15.75 1.5,15.5033 1.5,15.199C1.5,15.0704 1.5445,14.9452 1.6287,14.848C1.8916,14.5448 2.1396,14.3062 2.4619,14.0946C3.1737,13.6273 3.75,12.9293 3.75,12.0778V6.3852C3.75,6.1307 3.7933,5.8758 3.9111,5.6503C4.4868,4.5489 5.5648,3.7446 6.4316,3.3265C6.9912,3.0566 7.5,2.4963 7.5,1.875V1.125C7.5,0.9179 7.6679,0.75 7.875,0.75C8.0821,0.75 8.25,0.5821 8.25,0.375C8.25,0.1679 8.4179,0 8.625,0ZM9,19.4998C7.7574,19.4998 6.7501,18.4925 6.75,17.2499H11.25C11.2499,18.4925 10.2426,19.4998 9,19.4998ZM0.0558,7.5132C-0.1246,6.2857 0.1356,5.034 0.7902,3.9801C1.4447,2.9262 2.4513,2.1382 3.6315,1.7557L3.9552,2.7546C3.0111,3.0605 2.2058,3.691 1.6821,4.5341C1.1585,5.3772 0.9503,6.3786 1.0946,7.3605L0.0558,7.5132ZM17.1808,3.934C16.5153,2.8869 15.5006,2.1094 14.3165,1.7392L14.0032,2.7414C14.9504,3.0375 15.7623,3.6596 16.2946,4.4972C16.827,5.3348 17.0455,6.334 16.9115,7.3174L17.9519,7.4592C18.1194,6.2299 17.8463,4.981 17.1808,3.934Z" />
diff --git a/app/src/main/res/drawable/ic_bell_small.xml b/app/src/main/res/drawable/ic_bell_small.xml
index c9f18e09d..2df32bee1 100644
--- a/app/src/main/res/drawable/ic_bell_small.xml
+++ b/app/src/main/res/drawable/ic_bell_small.xml
@@ -4,7 +4,7 @@
android:viewportWidth="18"
android:viewportHeight="20">
+ android:fillType="evenOdd"
+ android:pathData="M8.625,0H9.375C9.5821,0 9.75,0.1679 9.75,0.375C9.75,0.5821 9.9179,0.75 10.125,0.75C10.3321,0.75 10.5,0.9179 10.5,1.125V1.875C10.5,2.4963 11.0088,3.0566 11.5685,3.3265C12.4353,3.7446 13.5132,4.5489 14.0889,5.6503C14.2067,5.8758 14.25,6.1307 14.25,6.3852V12.0512C14.25,12.9156 14.8488,13.6151 15.5614,14.1044C15.8681,14.315 16.102,14.5525 16.3642,14.8462C16.4522,14.9448 16.5,15.0728 16.5,15.2049C16.5,15.506 16.256,15.75 15.955,15.75H2.051C1.7467,15.75 1.5,15.5033 1.5,15.199C1.5,15.0704 1.5445,14.9452 1.6287,14.848C1.8916,14.5448 2.1396,14.3062 2.4619,14.0946C3.1737,13.6273 3.75,12.9293 3.75,12.0778V6.3852C3.75,6.1307 3.7933,5.8758 3.9111,5.6503C4.4868,4.5489 5.5648,3.7446 6.4316,3.3265C6.9912,3.0566 7.5,2.4963 7.5,1.875V1.125C7.5,0.9179 7.6679,0.75 7.875,0.75C8.0821,0.75 8.25,0.5821 8.25,0.375C8.25,0.1679 8.4179,0 8.625,0ZM9,19.4998C7.7574,19.4998 6.7501,18.4925 6.75,17.2499H11.25C11.2499,18.4925 10.2426,19.4998 9,19.4998ZM0.0558,7.5132C-0.1246,6.2857 0.1356,5.034 0.7902,3.9801C1.4447,2.9262 2.4513,2.1382 3.6315,1.7557L3.9552,2.7546C3.0111,3.0605 2.2058,3.691 1.6821,4.5341C1.1585,5.3772 0.9503,6.3786 1.0946,7.3605L0.0558,7.5132ZM17.1808,3.934C16.5153,2.8869 15.5006,2.1094 14.3165,1.7392L14.0032,2.7414C14.9504,3.0375 15.7623,3.6596 16.2946,4.4972C16.827,5.3348 17.0455,6.334 16.9115,7.3174L17.9519,7.4592C18.1194,6.2299 17.8463,4.981 17.1808,3.934Z" />
diff --git a/app/src/main/res/drawable/ic_block.xml b/app/src/main/res/drawable/ic_block.xml
index bae4d16c2..6dca0e37e 100644
--- a/app/src/main/res/drawable/ic_block.xml
+++ b/app/src/main/res/drawable/ic_block.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_campaign.xml b/app/src/main/res/drawable/ic_campaign.xml
index 9a5eb603d..7f22d42a0 100644
--- a/app/src/main/res/drawable/ic_campaign.xml
+++ b/app/src/main/res/drawable/ic_campaign.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml
index 3b3c877a9..f96401501 100644
--- a/app/src/main/res/drawable/ic_close.xml
+++ b/app/src/main/res/drawable/ic_close.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_color.xml b/app/src/main/res/drawable/ic_color.xml
index a42e26a0a..ae57a36aa 100644
--- a/app/src/main/res/drawable/ic_color.xml
+++ b/app/src/main/res/drawable/ic_color.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_delete.xml b/app/src/main/res/drawable/ic_delete.xml
index 1726235a5..05fc2abd8 100644
--- a/app/src/main/res/drawable/ic_delete.xml
+++ b/app/src/main/res/drawable/ic_delete.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_download_filled.xml b/app/src/main/res/drawable/ic_download_filled.xml
index 4e586a0eb..6d5b1302c 100644
--- a/app/src/main/res/drawable/ic_download_filled.xml
+++ b/app/src/main/res/drawable/ic_download_filled.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="300">
diff --git a/app/src/main/res/drawable/ic_empty_playlist.xml b/app/src/main/res/drawable/ic_empty_playlist.xml
index 3b7371ebc..5e92611a9 100644
--- a/app/src/main/res/drawable/ic_empty_playlist.xml
+++ b/app/src/main/res/drawable/ic_empty_playlist.xml
@@ -1,11 +1,11 @@
+ android:viewportHeight="144">
+ android:strokeWidth="1" />
diff --git a/app/src/main/res/drawable/ic_filter.xml b/app/src/main/res/drawable/ic_filter.xml
index 0761dca14..52d959093 100644
--- a/app/src/main/res/drawable/ic_filter.xml
+++ b/app/src/main/res/drawable/ic_filter.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_frame.xml b/app/src/main/res/drawable/ic_frame.xml
index a665fed39..7f0e915ba 100644
--- a/app/src/main/res/drawable/ic_frame.xml
+++ b/app/src/main/res/drawable/ic_frame.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_fullscreen_exit.xml b/app/src/main/res/drawable/ic_fullscreen_exit.xml
index 27064c626..12719f5b4 100644
--- a/app/src/main/res/drawable/ic_fullscreen_exit.xml
+++ b/app/src/main/res/drawable/ic_fullscreen_exit.xml
@@ -1,9 +1,9 @@
-
+ android:height="24dp"
+ android:tint="@android:color/white"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_grid.xml b/app/src/main/res/drawable/ic_grid.xml
index add61c29f..c37661f36 100644
--- a/app/src/main/res/drawable/ic_grid.xml
+++ b/app/src/main/res/drawable/ic_grid.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_hd.xml b/app/src/main/res/drawable/ic_hd.xml
index 752aa24d1..7c4595403 100644
--- a/app/src/main/res/drawable/ic_hd.xml
+++ b/app/src/main/res/drawable/ic_hd.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_hearted.xml b/app/src/main/res/drawable/ic_hearted.xml
index 026c4821e..604628cc2 100644
--- a/app/src/main/res/drawable/ic_hearted.xml
+++ b/app/src/main/res/drawable/ic_hearted.xml
@@ -4,6 +4,6 @@
android:viewportWidth="66.911"
android:viewportHeight="66.911">
+ android:fillColor="#E34326"
+ android:pathData="M66.911,22.831c0,-10.563 -8.558,-19.122 -19.118,-19.122c-5.658,0 -10.721,2.473 -14.223,6.377c-0.037,0.043 -0.076,0.085 -0.113,0.128c-3.5,-3.98 -8.618,-6.505 -14.334,-6.505C8.561,3.709 0.005,12.268 0,22.831c0,5.834 2.629,11.059 6.758,14.565H6.751l27.104,25.806l26.308,-25.806h-0.012C64.279,33.89 66.911,28.669 66.911,22.831z" />
diff --git a/app/src/main/res/drawable/ic_history_filled.xml b/app/src/main/res/drawable/ic_history_filled.xml
index b191e731a..253ae05ac 100644
--- a/app/src/main/res/drawable/ic_history_filled.xml
+++ b/app/src/main/res/drawable/ic_history_filled.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_home.xml b/app/src/main/res/drawable/ic_home.xml
index 7eb8f98dd..20c5ae8c5 100644
--- a/app/src/main/res/drawable/ic_home.xml
+++ b/app/src/main/res/drawable/ic_home.xml
@@ -1,9 +1,9 @@
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ android:viewportHeight="48">
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_library.xml b/app/src/main/res/drawable/ic_library.xml
index f49974c03..e623e5d3c 100644
--- a/app/src/main/res/drawable/ic_library.xml
+++ b/app/src/main/res/drawable/ic_library.xml
@@ -1,9 +1,9 @@
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ android:viewportHeight="96">
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_list.xml b/app/src/main/res/drawable/ic_list.xml
index 4ca7cd869..ed656a508 100644
--- a/app/src/main/res/drawable/ic_list.xml
+++ b/app/src/main/res/drawable/ic_list.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_login.xml b/app/src/main/res/drawable/ic_login.xml
index aff40998d..40a327adf 100644
--- a/app/src/main/res/drawable/ic_login.xml
+++ b/app/src/main/res/drawable/ic_login.xml
@@ -1,14 +1,14 @@
+ android:viewportHeight="24">
+ android:strokeLineCap="round"
+ android:strokeLineJoin="round" />
diff --git a/app/src/main/res/drawable/ic_login_filled.xml b/app/src/main/res/drawable/ic_login_filled.xml
index 3446db2fd..a4f99155a 100644
--- a/app/src/main/res/drawable/ic_login_filled.xml
+++ b/app/src/main/res/drawable/ic_login_filled.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_no_wifi.xml b/app/src/main/res/drawable/ic_no_wifi.xml
index b984b8dbc..8d8b7777a 100644
--- a/app/src/main/res/drawable/ic_no_wifi.xml
+++ b/app/src/main/res/drawable/ic_no_wifi.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_pause.xml b/app/src/main/res/drawable/ic_pause.xml
index 7e8a3e2ad..645e31d2c 100644
--- a/app/src/main/res/drawable/ic_pause.xml
+++ b/app/src/main/res/drawable/ic_pause.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_pause_filled.xml b/app/src/main/res/drawable/ic_pause_filled.xml
index 98cc2172d..39b09cf20 100644
--- a/app/src/main/res/drawable/ic_pause_filled.xml
+++ b/app/src/main/res/drawable/ic_pause_filled.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="300">
diff --git a/app/src/main/res/drawable/ic_pinned.xml b/app/src/main/res/drawable/ic_pinned.xml
index e08649fa0..5519b88fa 100644
--- a/app/src/main/res/drawable/ic_pinned.xml
+++ b/app/src/main/res/drawable/ic_pinned.xml
@@ -1,11 +1,11 @@
+ android:viewportHeight="24">
+ android:fillType="evenOdd"
+ android:pathData="M16,9V4l1,0c0.55,0 1,-0.45 1,-1v0c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3v0c0,0.55 0.45,1 1,1l1,0v5c0,1.66 -1.34,3 -3,3h0v2h5.97v7l1,1l1,-1v-7H19v-2h0C17.34,12 16,10.66 16,9z" />
diff --git a/app/src/main/res/drawable/ic_play_filled.xml b/app/src/main/res/drawable/ic_play_filled.xml
index f3e089124..952f0be6c 100644
--- a/app/src/main/res/drawable/ic_play_filled.xml
+++ b/app/src/main/res/drawable/ic_play_filled.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="485.74">
diff --git a/app/src/main/res/drawable/ic_playlist.xml b/app/src/main/res/drawable/ic_playlist.xml
index 24d17c426..c96251991 100644
--- a/app/src/main/res/drawable/ic_playlist.xml
+++ b/app/src/main/res/drawable/ic_playlist.xml
@@ -1,9 +1,9 @@
-
+ android:height="24dp"
+ android:tint="#FFFFFF"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_region.xml b/app/src/main/res/drawable/ic_region.xml
index c311f9af4..68c610189 100644
--- a/app/src/main/res/drawable/ic_region.xml
+++ b/app/src/main/res/drawable/ic_region.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_save.xml b/app/src/main/res/drawable/ic_save.xml
index 602bb91b5..6a9620b07 100644
--- a/app/src/main/res/drawable/ic_save.xml
+++ b/app/src/main/res/drawable/ic_save.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_search.xml b/app/src/main/res/drawable/ic_search.xml
index 451a03301..f13841ac2 100644
--- a/app/src/main/res/drawable/ic_search.xml
+++ b/app/src/main/res/drawable/ic_search.xml
@@ -1,9 +1,9 @@
-
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_server.xml b/app/src/main/res/drawable/ic_server.xml
index 05c9d5b44..e7cb848fa 100644
--- a/app/src/main/res/drawable/ic_server.xml
+++ b/app/src/main/res/drawable/ic_server.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_share.xml b/app/src/main/res/drawable/ic_share.xml
index 36897c94c..76837ec84 100644
--- a/app/src/main/res/drawable/ic_share.xml
+++ b/app/src/main/res/drawable/ic_share.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_skip.xml b/app/src/main/res/drawable/ic_skip.xml
index d88b792d4..1594f7d64 100644
--- a/app/src/main/res/drawable/ic_skip.xml
+++ b/app/src/main/res/drawable/ic_skip.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="32">
+ android:viewportHeight="512">
diff --git a/app/src/main/res/drawable/ic_sponsorblock.xml b/app/src/main/res/drawable/ic_sponsorblock.xml
index c16db6ea8..afe0e720b 100644
--- a/app/src/main/res/drawable/ic_sponsorblock.xml
+++ b/app/src/main/res/drawable/ic_sponsorblock.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_subscriptions.xml b/app/src/main/res/drawable/ic_subscriptions.xml
index f877314b4..10574772e 100644
--- a/app/src/main/res/drawable/ic_subscriptions.xml
+++ b/app/src/main/res/drawable/ic_subscriptions.xml
@@ -1,9 +1,9 @@
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ android:viewportHeight="48">
diff --git a/app/src/main/res/drawable/ic_thumb_up.xml b/app/src/main/res/drawable/ic_thumb_up.xml
index f55183f28..146f85cee 100644
--- a/app/src/main/res/drawable/ic_thumb_up.xml
+++ b/app/src/main/res/drawable/ic_thumb_up.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_time.xml b/app/src/main/res/drawable/ic_time.xml
index 120a2b142..fe85b1f50 100644
--- a/app/src/main/res/drawable/ic_time.xml
+++ b/app/src/main/res/drawable/ic_time.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="60">
diff --git a/app/src/main/res/drawable/ic_translate.xml b/app/src/main/res/drawable/ic_translate.xml
index 92291014a..6da4f4e5e 100644
--- a/app/src/main/res/drawable/ic_translate.xml
+++ b/app/src/main/res/drawable/ic_translate.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_trending.xml b/app/src/main/res/drawable/ic_trending.xml
index fbcf2a478..536738d66 100644
--- a/app/src/main/res/drawable/ic_trending.xml
+++ b/app/src/main/res/drawable/ic_trending.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="52">
diff --git a/app/src/main/res/drawable/ic_update.xml b/app/src/main/res/drawable/ic_update.xml
index f175850f5..ca962aa07 100644
--- a/app/src/main/res/drawable/ic_update.xml
+++ b/app/src/main/res/drawable/ic_update.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="420.83">
+ android:viewportHeight="300">
diff --git a/app/src/main/res/drawable/ic_verified.xml b/app/src/main/res/drawable/ic_verified.xml
index d7bd40fba..cc83f3eda 100644
--- a/app/src/main/res/drawable/ic_verified.xml
+++ b/app/src/main/res/drawable/ic_verified.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="24">
diff --git a/app/src/main/res/drawable/ic_video.xml b/app/src/main/res/drawable/ic_video.xml
index ca1dce23e..16fefb228 100644
--- a/app/src/main/res/drawable/ic_video.xml
+++ b/app/src/main/res/drawable/ic_video.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="512">
diff --git a/app/src/main/res/drawable/ic_videocam.xml b/app/src/main/res/drawable/ic_videocam.xml
index e91a47788..f3699e8ab 100644
--- a/app/src/main/res/drawable/ic_videocam.xml
+++ b/app/src/main/res/drawable/ic_videocam.xml
@@ -1,9 +1,9 @@
+ android:viewportHeight="28">
diff --git a/app/src/main/res/drawable/ic_vlc.xml b/app/src/main/res/drawable/ic_vlc.xml
index db03e26e9..074c57662 100644
--- a/app/src/main/res/drawable/ic_vlc.xml
+++ b/app/src/main/res/drawable/ic_vlc.xml
@@ -1,9 +1,9 @@
-
+ android:height="24dp"
+ android:tint="?attr/colorControlNormal"
+ android:viewportWidth="1000"
+ android:viewportHeight="1000">
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b30527a37..aed494ea4 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -2,21 +2,21 @@
+ tools:context=".MainActivity">
@@ -44,9 +44,9 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@android:color/transparent"
android:elevation="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- android:background="@android:color/transparent" />
+ app:layout_constraintStart_toStartOf="parent" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_player.xml b/app/src/main/res/layout/activity_player.xml
index 35f81a257..c9851ab3f 100644
--- a/app/src/main/res/layout/activity_player.xml
+++ b/app/src/main/res/layout/activity_player.xml
@@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".util.Player"
- android:background="@android:color/black">
+ android:background="@android:color/black"
+ tools:context=".util.Player">
+ android:text="@string/settings"
+ android:textSize="20sp" />
+ android:layout_height="match_parent"
+ android:orientation="vertical" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/channel_search_row.xml b/app/src/main/res/layout/channel_search_row.xml
index bd82790a1..c52c4c0cd 100644
--- a/app/src/main/res/layout/channel_search_row.xml
+++ b/app/src/main/res/layout/channel_search_row.xml
@@ -16,10 +16,10 @@
@@ -29,9 +29,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
- android:textSize="16sp"
+ android:ellipsize="end"
android:maxLines="1"
- android:ellipsize="end" />
+ android:textSize="16sp" />
@@ -35,7 +35,7 @@
android:layout_alignParentEnd="true"
android:backgroundTint="?attr/colorOnPrimary"
android:text="@string/unsubscribe"
- android:textSize="11dp"
android:textColor="?android:attr/textColorPrimary"
+ android:textSize="11dp"
app:cornerRadius="20dp" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/chapter_column.xml b/app/src/main/res/layout/chapter_column.xml
index 4f5171ea4..bc9a2f45d 100644
--- a/app/src/main/res/layout/chapter_column.xml
+++ b/app/src/main/res/layout/chapter_column.xml
@@ -1,9 +1,9 @@
+ android:layout_height="wrap_content"
+ android:layout_marginHorizontal="10dp"
+ android:orientation="vertical">
diff --git a/app/src/main/res/layout/comments_row.xml b/app/src/main/res/layout/comments_row.xml
index d764f3b71..a694c0029 100644
--- a/app/src/main/res/layout/comments_row.xml
+++ b/app/src/main/res/layout/comments_row.xml
@@ -2,8 +2,8 @@
+ android:layout_height="wrap_content"
+ android:background="?android:attr/selectableItemBackground">
+ android:paddingBottom="16dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+ android:layout_marginTop="4dp"
+ android:visibility="gone"
+ app:srcCompat="@drawable/ic_verified" />
+ android:layout_marginTop="4dp"
+ android:visibility="gone"
+ app:srcCompat="@drawable/ic_pinned" />
+ android:visibility="gone"
+ app:srcCompat="@drawable/ic_hearted" />
diff --git a/app/src/main/res/layout/dialog_addtoplaylist.xml b/app/src/main/res/layout/dialog_addtoplaylist.xml
index f8bbb2632..04e3bc172 100644
--- a/app/src/main/res/layout/dialog_addtoplaylist.xml
+++ b/app/src/main/res/layout/dialog_addtoplaylist.xml
@@ -22,8 +22,8 @@
+ android:layout_marginRight="16dp"
+ android:text="@string/addToPlaylist" />
diff --git a/app/src/main/res/layout/dialog_create_playlist.xml b/app/src/main/res/layout/dialog_create_playlist.xml
index 50c0e4780..4a78eb664 100644
--- a/app/src/main/res/layout/dialog_create_playlist.xml
+++ b/app/src/main/res/layout/dialog_create_playlist.xml
@@ -1,17 +1,17 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
@@ -29,19 +29,19 @@
+ android:gravity="right"
+ android:orientation="horizontal">
+ style="@style/CustomDialogButton"
+ android:text="@string/cancel" />
+ android:layout_marginRight="16dp"
+ android:text="@string/createPlaylist" />
diff --git a/app/src/main/res/layout/dialog_custom_instance.xml b/app/src/main/res/layout/dialog_custom_instance.xml
index 46c5d5f0b..2343e3bf5 100644
--- a/app/src/main/res/layout/dialog_custom_instance.xml
+++ b/app/src/main/res/layout/dialog_custom_instance.xml
@@ -1,17 +1,17 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
@@ -40,29 +40,29 @@
+ android:gravity="end"
+ android:orientation="horizontal">
+ style="@style/CustomDialogButton"
+ android:text="@string/cancel" />
+ android:layout_marginRight="16dp"
+ android:text="@string/addInstance" />
diff --git a/app/src/main/res/layout/dialog_delete_account.xml b/app/src/main/res/layout/dialog_delete_account.xml
index 160472415..8eee7ae87 100644
--- a/app/src/main/res/layout/dialog_delete_account.xml
+++ b/app/src/main/res/layout/dialog_delete_account.xml
@@ -1,16 +1,16 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
@@ -28,19 +28,19 @@
+ android:gravity="right"
+ android:orientation="horizontal">
+ style="@style/CustomDialogButton"
+ android:text="@string/cancel" />
+ android:layout_marginRight="16dp"
+ android:text="@string/deleteAccount" />
diff --git a/app/src/main/res/layout/dialog_download.xml b/app/src/main/res/layout/dialog_download.xml
index f4a8bf418..b77541111 100644
--- a/app/src/main/res/layout/dialog_download.xml
+++ b/app/src/main/res/layout/dialog_download.xml
@@ -1,17 +1,17 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ android:layout_marginRight="16dp"
+ android:text="@string/download" />
diff --git a/app/src/main/res/layout/dialog_login.xml b/app/src/main/res/layout/dialog_login.xml
index a5a1bdaa9..14ff19d95 100644
--- a/app/src/main/res/layout/dialog_login.xml
+++ b/app/src/main/res/layout/dialog_login.xml
@@ -1,17 +1,17 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
@@ -29,10 +29,10 @@
@@ -40,19 +40,19 @@
+ android:gravity="right"
+ android:orientation="horizontal">
+ style="@style/CustomDialogButton"
+ android:text="@string/register" />
+ android:layout_marginRight="16dp"
+ android:text="@string/login" />
diff --git a/app/src/main/res/layout/dialog_logout.xml b/app/src/main/res/layout/dialog_logout.xml
index d2a66be03..4d3bb82ad 100644
--- a/app/src/main/res/layout/dialog_logout.xml
+++ b/app/src/main/res/layout/dialog_logout.xml
@@ -1,29 +1,29 @@
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ android:text="@string/already_logged_in" />
+ style="@style/CustomDialogButton"
+ android:text="@string/logout" />
diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml
index a5b9eef0b..aff5e5020 100644
--- a/app/src/main/res/layout/exo_styled_player_control_view.xml
+++ b/app/src/main/res/layout/exo_styled_player_control_view.xml
@@ -12,8 +12,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
+