From b2c93eace6851ea01db6431e1f958b243fc82ca7 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 29 Nov 2018 15:14:20 +0100 Subject: [PATCH 1/4] [Translation] Strings translated to french --- app/src/main/res/values-fr/strings.xml | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/src/main/res/values-fr/strings.xml diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml new file mode 100644 index 0000000..75d7cde --- /dev/null +++ b/app/src/main/res/values-fr/strings.xml @@ -0,0 +1,58 @@ + + PeerTube + + VideoPlayActivity + Paramètres + Connexion + + + Serveur + Email + Mot de passe (optionnel) + Connexion + Connexion + Cette adresse mail n\'est pas valide + Ce mot de passe est trop court + Ce mot de passe est incorrect + Ce champs est requis + "L\'autorisation sur les contacts est requise pour la complétion des adresses email." + + + + Rechercher + Paramètres + + + Accueil + Tendances + Abonnements + Compte + + + 1.0.0-alpha.7 + + https://troll.tv + PeerTube Server + + + + \u0020-\u0020 + \u0020Views + \@ + + + Miniature vidéo + Avatar compte + + Afficher le contenu adulte + Le contenu adulte sera affiché si activé + UrlVideoPlayActivity + Lecteur Vidéo Torrent + Lecture de vidéo via un flux torrent + Licence + \nGNU Affero General Public License v3.0\n\nPermissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. + Version + Rechercher sur PeerTube + Rechercher + + From deb4e7b5264a2eff0244dd5bb60e28ca7268edf6 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 30 Nov 2018 11:25:42 +0100 Subject: [PATCH 2/4] [Bugfix] Screen doesn't turn off when playing a video --- app/src/main/res/layout/activity_video_play.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/activity_video_play.xml b/app/src/main/res/layout/activity_video_play.xml index 491dd50..0e736ec 100644 --- a/app/src/main/res/layout/activity_video_play.xml +++ b/app/src/main/res/layout/activity_video_play.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:keepScreenOn="true" tools:context="net.schueller.peertube.activity.VideoPlayActivity"> Date: Sun, 2 Dec 2018 14:40:44 +0100 Subject: [PATCH 3/4] - Moved permissions to only ask when required --- app/build.gradle | 4 +- .../peertube/activity/VideoListActivity.java | 83 ++++++++++--------- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 45 insertions(+), 44 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a30218b..8a0ce83 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "net.schueller.peertube" minSdkVersion 23 targetSdkVersion 28 - versionCode 103 - versionName "1.0.3" + versionCode 104 + versionName "1.0.4" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index 31a09c1..c1c785d 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -63,44 +63,44 @@ public class VideoListActivity extends AppCompatActivity { private BottomNavigationViewEx.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener = item -> { - switch (item.getItemId()) { - case R.id.navigation_home: - //Log.v(TAG, "navigation_home"); + switch (item.getItemId()) { + case R.id.navigation_home: + //Log.v(TAG, "navigation_home"); - if (!isLoading) { - sort = "-createdAt"; - currentStart = 0; - loadVideos(currentStart, count, sort, filter); - } - - return true; - case R.id.navigation_trending: - //Log.v(TAG, "navigation_trending"); - - if (!isLoading) { - sort = "-trending"; - currentStart = 0; - loadVideos(currentStart, count, sort, filter); - } - - return true; - case R.id.navigation_subscriptions: - //Log.v(TAG, "navigation_subscriptions"); - Toast.makeText(VideoListActivity.this, "Subscriptions Not Implemented", Toast.LENGTH_SHORT).show(); - - return false; - - case R.id.navigation_account: - //Log.v(TAG, "navigation_account"); - Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show(); - - Intent intent = new Intent(this, LoginActivity.class); - this.startActivity(intent); - - return false; + if (!isLoading) { + sort = "-createdAt"; + currentStart = 0; + loadVideos(currentStart, count, sort, filter); } + + return true; + case R.id.navigation_trending: + //Log.v(TAG, "navigation_trending"); + + if (!isLoading) { + sort = "-trending"; + currentStart = 0; + loadVideos(currentStart, count, sort, filter); + } + + return true; + case R.id.navigation_subscriptions: + //Log.v(TAG, "navigation_subscriptions"); + Toast.makeText(VideoListActivity.this, "Subscriptions Not Implemented", Toast.LENGTH_SHORT).show(); + return false; - }; + + case R.id.navigation_account: + //Log.v(TAG, "navigation_account"); + Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show(); + + Intent intent = new Intent(this, LoginActivity.class); + this.startActivity(intent); + + return false; + } + return false; + }; @Override protected void onCreate(Bundle savedInstanceState) { @@ -214,7 +214,7 @@ public class VideoListActivity extends AppCompatActivity { if (dy > 0) { // is at end of list? - if(!recyclerView.canScrollVertically(RecyclerView.FOCUS_DOWN)){ + if (!recyclerView.canScrollVertically(RecyclerView.FOCUS_DOWN)) { if (!isLoading) { currentStart = currentStart + count; loadVideos(currentStart, count, sort, filter); @@ -279,8 +279,8 @@ public class VideoListActivity extends AppCompatActivity { /** * Force android to not use SSLv3 - * -// * @param callingActivity Activity + *

+ * // * @param callingActivity Activity */ // private void updateAndroidSecurityProvider(Activity callingActivity) { // try { @@ -293,12 +293,13 @@ public class VideoListActivity extends AppCompatActivity { // Log.e("SecurityException", "Google Play Services not available."); // } // } - @Override protected void onResume() { super.onResume(); - - if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { + // only check when we actually need the permission + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); + if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED && + sharedPref.getBoolean("pref_torrent_player", false)) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0); } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 92814a4..67a3b60 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -49,7 +49,7 @@ NSFW content will be shown if enabled. UrlVideoPlayActivity Torrent Video Player - Videos playback via a torrent stream + Video playback via a torrent stream. This requires Storage Permissions. License \nGNU Affero General Public License v3.0\n\nPermissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. Version From 7120a360913e2c51f2647eec22c5ddfa8e1bf381 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sun, 2 Dec 2018 14:44:34 +0100 Subject: [PATCH 4/4] - Remove unavailable feature --- .../net/schueller/peertube/activity/VideoListActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index c1c785d..6a921bc 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -94,8 +94,8 @@ public class VideoListActivity extends AppCompatActivity { //Log.v(TAG, "navigation_account"); Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show(); - Intent intent = new Intent(this, LoginActivity.class); - this.startActivity(intent); +// Intent intent = new Intent(this, LoginActivity.class); +// this.startActivity(intent); return false; }