1
0
mirror of https://framagit.org/tom79/fedilab-tube synced 2025-06-05 21:09:11 +02:00

36 Commits
1.2.0 ... 1.3.0

Author SHA1 Message Date
641a616c96 Change readme + fix titles 2020-10-08 18:46:18 +02:00
fc051d8d1d Merge branch 'develop' of https://framagit.org/tom79/fedilab-tube into develop 2020-10-08 18:44:30 +02:00
b8bec4f357 Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!17
2020-10-08 18:44:22 +02:00
fe78c8bf7e New Crowdin updates 2020-10-08 18:44:21 +02:00
42caaa9dc9 Fix titles 2020-10-08 18:35:35 +02:00
74d6cb8041 Prepare release 1.3.0 2020-10-08 18:30:47 +02:00
7678da2bb6 Change description + fix pagination 2020-10-08 18:13:04 +02:00
e771153f35 Some changes 2020-10-08 17:16:42 +02:00
e96b9f7f02 Some fixes 2020-10-08 16:21:14 +02:00
0604ac9ba8 Merge remote-tracking branch 'origin/develop' into develop 2020-10-07 17:46:25 +02:00
bd0c59a69e Improve menu for videos 2020-10-07 17:46:15 +02:00
0a84b75518 typo error 2020-10-07 09:25:58 +02:00
c4b49b58cf typo error 2020-10-07 09:25:41 +02:00
afbb27896e Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!16
2020-10-07 08:53:17 +02:00
e0ff6c0ac3 New Crowdin updates 2020-10-07 08:53:17 +02:00
4d7c7e88bb typo error 2020-10-06 19:02:25 +02:00
7eef023277 some fixes 2020-10-06 18:49:15 +02:00
6a762a8fd6 some fixes 2020-10-06 17:11:25 +02:00
752e3d50c1 some fixes 2020-10-06 16:05:34 +02:00
8377f9bb8a Merge branch 'develop' into new_feature
# Conflicts:
#	app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java
#	app/src/main/java/app/fedilab/fedilabtube/helper/Helper.java
2020-10-06 15:32:04 +02:00
5ff06a29d2 Merge branch 'develop' of https://framagit.org/tom79/fedilab-tube into develop
 Conflicts:
	app/build.gradle
2020-10-06 15:30:53 +02:00
50aeb075b1 test 2020-10-06 15:30:15 +02:00
79ff617d67 Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!15
2020-10-06 14:09:02 +02:00
5de8524f2a New Crowdin updates 2020-10-06 14:09:02 +02:00
6164ff9163 change versionCode 2020-10-05 14:43:18 +02:00
6e8b304b63 Fix crashes 2020-10-05 14:34:22 +02:00
3be0cd727f Fix crashes 2020-10-05 14:34:01 +02:00
451dd53230 Merge remote-tracking branch 'origin/develop' into develop 2020-10-04 17:51:15 +02:00
34c1222fbc Code clean 2020-10-04 17:51:09 +02:00
ccf2fc877b Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!14
2020-10-04 17:26:04 +02:00
10a496c299 New Crowdin updates 2020-10-04 17:26:04 +02:00
ba1bfd1f9c Change loader 2020-10-04 17:25:08 +02:00
b9622da6c6 Merge remote-tracking branch 'origin/develop' into develop 2020-10-04 14:01:11 +02:00
b3e9100c2f Fix inverted strings 2020-10-04 13:53:07 +02:00
fb0e87397d Merge branch 'l10n_develop' into 'develop'
New Crowdin updates

See merge request tom79/fedilab-tube!13
2020-10-04 13:51:25 +02:00
bed1bb634b New Crowdin updates 2020-10-04 13:51:25 +02:00
136 changed files with 1164 additions and 1074 deletions

View File

@ -70,7 +70,7 @@ Si vous connectez votre compte, vous pourrez interagir avec les vidéos :
#### TubeLab (coming soon) #### TubeLab
[Fdroid](https://f-droid.org/packages/app.fedilab.tubelab/) [Fdroid](https://f-droid.org/packages/app.fedilab.tubelab/)

View File

@ -10,8 +10,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 12 versionCode 14
versionName "1.2.0" versionName "1.3.0"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -116,7 +116,7 @@ dependencies {
implementation "net.gotev:uploadservice-okhttp:3.5.2" implementation "net.gotev:uploadservice-okhttp:3.5.2"
implementation "com.google.code.gson:gson:2.8.6" implementation "com.google.code.gson:gson:2.8.6"
implementation 'androidx.media:media:1.2.0' implementation 'androidx.media:media:1.2.0'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

View File

@ -64,6 +64,8 @@
<string name="fullscreen">Vidéo plein écran</string> <string name="fullscreen">Vidéo plein écran</string>
<string name="remove_from_playlist">Supprimer de la liste de lecture</string>
<string name="comment">Commenter</string> <string name="comment">Commenter</string>
<string name="validate">Valider</string> <string name="validate">Valider</string>
<string name="delete_comment">Supprimer le commentaire</string> <string name="delete_comment">Supprimer le commentaire</string>
@ -191,15 +193,16 @@
<string name="video_settings">Paramètres des vidéos</string> <string name="video_settings">Paramètres des vidéos</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="modify_playlists">Vidéo dans les listes de lecture</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item> <item>Normal</item>
<item>Streaming</item>
<item>Navigateur</item> <item>Navigateur</item>
<item>Streaming</item>
</string-array> </string-array>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string> <string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string>
<string name="video_cache_value">Cache pour les vidéos: %d Mo</string> <string name="video_cache_value">Cache pour les vidéos: %d Mo</string>
<string name="set_video_mode_choice" translatable="false">set_video_mode_choice</string> <string name="set_video_mode_choice" translatable="false">set_video_mode_choice</string>
<string name="set_video_minimize_choice" translatable="false">set_video_minimize_choice</string> <string name="set_video_minimize_choice" translatable="false">set_video_minimize_choice</string>

View File

@ -15,4 +15,7 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="progress" parent="SpinKitView.Circle" />
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
</resources> </resources>

View File

@ -1,4 +1,5 @@
- Force le mode paysage lors du passage en mode plein écran - Support for m3u8 videos
- Modifier la valeur du cache pour les vidéos - Improve loading time
- Définir la résolution par défaut pour les vidéos - Quick menu access for videos (edit/playlist/follow/report)
- Correction de bugs - Improve menu for adding videos in playlists
- Fix an issue with pagination

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab ist eine Peertube-App für akademische Instanzen. App for all Peertube instances

View File

@ -1 +1 @@
Το TubeLab είναι μια εφαρμογή για τις ακαδημαϊκές υποστάσεις Peertube. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab es una aplicación de Peertube para instancias académicas. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab è un'applicazione Peertube per le istanze accademiche. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab is een Peertube-toepassing voor academische instanties. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab jest aplikacją Peertube dla instancji akademickich. App for all Peertube instances

View File

@ -1 +1 @@
O TubeLab é uma aplicação Peertube para instâncias acadêmicas. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab - это приложение Peertube для образовательных экземпляров. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1 +1 @@
TubeLab est une application Peertube pour les instances académiques. App for all Peertube instances

View File

@ -1,5 +1,5 @@
- Force landscape view when switching in full screen - Support for m3u8 videos
- Sync languages with the instance - Improve loading time
- Change default cache for videos (settings) - Quick menu access for videos (edit/playlist/follow/report)
- Set default resolution for videos (settings) - Improve menu for adding videos in playlists
- Some bug fixes. - Fix an issue with pagination

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Herunterladen</string> <string name="download">Herunterladen</string>
<string name="profile_picture">Profilbild</string> <string name="profile_picture">Profilbild</string>
<string name="update_video">Video aktualisieren</string> <string name="update_video">Video aktualisieren</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d en</string> <string name="date_seconds">%d en</string>
<string name="date_minutes">%d en</string> <string name="date_minutes">%d en</string>
<string name="date_hours">%d en</string> <string name="date_hours">%d en</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>WebView</item> <item>WebView</item>
<item>Direkter Datenstrom</item> <item>Direkter Datenstrom</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">Keine Videos in den Favoriten!</string> <string name="bookmark_peertube_empty">Keine Videos in den Favoriten!</string>
<string name="delete_channel">Kanal entfernen</string> <string name="delete_channel">Kanal entfernen</string>
<string name="action_channel_confirm_delete">Möchtest du diesen Kanal wirklich löschen?</string> <string name="action_channel_confirm_delete">Möchtest du diesen Kanal wirklich löschen?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Keine stummgeschalteten Accounts!</string> <string name="no_muted">Keine stummgeschalteten Accounts!</string>
<string name="error_display_name_channel">Du musst einen Namen und einen Anzeigenamen für diesen Kanal definieren!</string> <string name="error_display_name_channel">Du musst einen Namen und einen Anzeigenamen für diesen Kanal definieren!</string>
<string name="action_channel_create">Kanal erstellen</string> <string name="action_channel_create">Kanal erstellen</string>

View File

@ -34,6 +34,7 @@
<string name="download">Λήψη</string> <string name="download">Λήψη</string>
<string name="profile_picture">Εικόνα προφίλ</string> <string name="profile_picture">Εικόνα προφίλ</string>
<string name="update_video">Ενημέρωση του βίντεο</string> <string name="update_video">Ενημέρωση του βίντεο</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d δευτ</string> <string name="date_seconds">%d δευτ</string>
<string name="date_minutes">%d λεπ</string> <string name="date_minutes">%d λεπ</string>
<string name="date_hours">%d ώρ</string> <string name="date_hours">%d ώρ</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -162,6 +163,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Webview</item> <item>Webview</item>
<item>Άμεση ροή</item> <item>Άμεση ροή</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -180,6 +182,7 @@
<string name="bookmark_peertube_empty">Δεν υπάρχουν βίντεο στα αγαπημένα σας!</string> <string name="bookmark_peertube_empty">Δεν υπάρχουν βίντεο στα αγαπημένα σας!</string>
<string name="delete_channel">Αφαίρεση καναλιού</string> <string name="delete_channel">Αφαίρεση καναλιού</string>
<string name="action_channel_confirm_delete">Θέλετε σίγουρα να διαγραφεί αυτό το κανάλι;</string> <string name="action_channel_confirm_delete">Θέλετε σίγουρα να διαγραφεί αυτό το κανάλι;</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Δεν υπάρχουν σιγασμένοι λογαριασμοί!</string> <string name="no_muted">Δεν υπάρχουν σιγασμένοι λογαριασμοί!</string>
<string name="error_display_name_channel">Πρέπει να ορίσετε ένα όνομα και ένα όνομα εμφάνισης για αυτό το κανάλι!</string> <string name="error_display_name_channel">Πρέπει να ορίσετε ένα όνομα και ένα όνομα εμφάνισης για αυτό το κανάλι!</string>
<string name="action_channel_create">Δημιουργία καναλιού</string> <string name="action_channel_create">Δημιουργία καναλιού</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Descargar</string> <string name="download">Descargar</string>
<string name="profile_picture">Imagen del perfil</string> <string name="profile_picture">Imagen del perfil</string>
<string name="update_video">Actualizar vídeo</string> <string name="update_video">Actualizar vídeo</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Webview</item> <item>Webview</item>
<item>Corriente Directa</item> <item>Corriente Directa</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">No hay videos en tus favoritos!</string> <string name="bookmark_peertube_empty">No hay videos en tus favoritos!</string>
<string name="delete_channel">Quitar el canal</string> <string name="delete_channel">Quitar el canal</string>
<string name="action_channel_confirm_delete">Estas seguro de borrar permanentemente este canal?</string> <string name="action_channel_confirm_delete">Estas seguro de borrar permanentemente este canal?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Nada de cuentas mutables!</string> <string name="no_muted">Nada de cuentas mutables!</string>
<string name="error_display_name_channel">Debes definir un nombre y un nombre de pantalla para este canal!</string> <string name="error_display_name_channel">Debes definir un nombre y un nombre de pantalla para este canal!</string>
<string name="action_channel_create">Crear un canal</string> <string name="action_channel_create">Crear un canal</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Télécharger</string> <string name="download">Télécharger</string>
<string name="profile_picture">Photo du profil</string> <string name="profile_picture">Photo du profil</string>
<string name="update_video">Mettre à jour la vidéo</string> <string name="update_video">Mettre à jour la vidéo</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d min</string> <string name="date_minutes">%d min</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -159,6 +160,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item> <item>Normal</item>
<item>Streaming</item> <item>Streaming</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -177,6 +179,7 @@
<string name="bookmark_peertube_empty">Il ny a aucune vidéo Peertube dans vos favoris !</string> <string name="bookmark_peertube_empty">Il ny a aucune vidéo Peertube dans vos favoris !</string>
<string name="delete_channel">Supprimer la chaîne</string> <string name="delete_channel">Supprimer la chaîne</string>
<string name="action_channel_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette chaîne ?</string> <string name="action_channel_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette chaîne ?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Aucun compte en sourdine !</string> <string name="no_muted">Aucun compte en sourdine !</string>
<string name="error_display_name_channel">Vous devez fournir un nom d\'affichage et un nom pour la chaîne!</string> <string name="error_display_name_channel">Vous devez fournir un nom d\'affichage et un nom pour la chaîne!</string>
<string name="action_channel_create">Créer une chaîne</string> <string name="action_channel_create">Créer une chaîne</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Scarica</string> <string name="download">Scarica</string>
<string name="profile_picture">Immagine di profilo</string> <string name="profile_picture">Immagine di profilo</string>
<string name="update_video">Aggiorna video</string> <string name="update_video">Aggiorna video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Webview</item> <item>Webview</item>
<item>Stream diretto</item> <item>Stream diretto</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">Non c\'è nessun video nei tuoi favoriti!</string> <string name="bookmark_peertube_empty">Non c\'è nessun video nei tuoi favoriti!</string>
<string name="delete_channel">Rimuovi Canale</string> <string name="delete_channel">Rimuovi Canale</string>
<string name="action_channel_confirm_delete">Sei sicuro di voler eliminare definitivamente questo canale?</string> <string name="action_channel_confirm_delete">Sei sicuro di voler eliminare definitivamente questo canale?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Nessun account silenziato!</string> <string name="no_muted">Nessun account silenziato!</string>
<string name="error_display_name_channel">Devi definire un nome e un nome visualizzato per questo canale!</string> <string name="error_display_name_channel">Devi definire un nome e un nome visualizzato per questo canale!</string>
<string name="action_channel_create">Creare un canale</string> <string name="action_channel_create">Creare un canale</string>

View File

@ -34,6 +34,7 @@
<string name="download">ダウンロード</string> <string name="download">ダウンロード</string>
<string name="profile_picture">プロフィール画像</string> <string name="profile_picture">プロフィール画像</string>
<string name="update_video">動画をアップロード</string> <string name="update_video">動画をアップロード</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d 秒</string> <string name="date_seconds">%d 秒</string>
<string name="date_minutes">%d 分</string> <string name="date_minutes">%d 分</string>
<string name="date_hours">%d 時間</string> <string name="date_hours">%d 時間</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profiel foto</string> <string name="profile_picture">Profiel foto</string>
<string name="update_video">Video bijwerken</string> <string name="update_video">Video bijwerken</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Webview</item> <item>Webview</item>
<item>Directe stroom</item> <item>Directe stroom</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">Er zijn geen video\'s in uw favorieten!</string> <string name="bookmark_peertube_empty">Er zijn geen video\'s in uw favorieten!</string>
<string name="delete_channel">Verwijder kanaal</string> <string name="delete_channel">Verwijder kanaal</string>
<string name="action_channel_confirm_delete">Weet u zeker dat u dit kanaal permanent zult verwijderen?</string> <string name="action_channel_confirm_delete">Weet u zeker dat u dit kanaal permanent zult verwijderen?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Geen gedempte rekeningen!</string> <string name="no_muted">Geen gedempte rekeningen!</string>
<string name="error_display_name_channel">U moet een naam en een weergavenaam voor dit kanaal definiëren!</string> <string name="error_display_name_channel">U moet een naam en een weergavenaam voor dit kanaal definiëren!</string>
<string name="action_channel_create">Creëer een kanaal</string> <string name="action_channel_create">Creëer een kanaal</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Pobierz</string> <string name="download">Pobierz</string>
<string name="profile_picture">Zdjęcie profilowe</string> <string name="profile_picture">Zdjęcie profilowe</string>
<string name="update_video">Aktualizacja wideo</string> <string name="update_video">Aktualizacja wideo</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Webview</item> <item>Webview</item>
<item>Strumień bezpośredni</item> <item>Strumień bezpośredni</item>
<item>Direct stream</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>High</item> <item>High</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">Nie ma żadnych filmów w twoich ulubionych!</string> <string name="bookmark_peertube_empty">Nie ma żadnych filmów w twoich ulubionych!</string>
<string name="delete_channel">Usuń kanał</string> <string name="delete_channel">Usuń kanał</string>
<string name="action_channel_confirm_delete">Czy na pewno na stałe usuniesz ten kanał?</string> <string name="action_channel_confirm_delete">Czy na pewno na stałe usuniesz ten kanał?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">Nie ma wyciszonych kont!</string> <string name="no_muted">Nie ma wyciszonych kont!</string>
<string name="error_display_name_channel">Musisz zdefiniować nazwę i nazwę wyświetlania dla tego kanału!</string> <string name="error_display_name_channel">Musisz zdefiniować nazwę i nazwę wyświetlania dla tego kanału!</string>
<string name="action_channel_create">Stwórz kanał</string> <string name="action_channel_create">Stwórz kanał</string>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<string name="title_home">Главная страница</string> <string name="title_home">Главная</string>
<string name="title_local">Local</string> <string name="title_local">Локальные</string>
<string name="title_discover">Подборка</string> <string name="title_discover">Подборка</string>
<string name="title_notifications">Уведомления</string> <string name="title_notifications">Уведомления</string>
<string name="title_recently_added">Недавно добавленные</string> <string name="title_recently_added">По добавлению</string>
<string name="title_trending">Популярные</string> <string name="title_trending">Популярные</string>
<string name="title_most_liked">Много лайков</string> <string name="title_most_liked">Много лайков</string>
<string name="toast_error">Упс! Произошла ошибка!</string> <string name="toast_error">Упс! Произошла ошибка!</string>
<string name="title_muted">Беззвучный</string> <string name="title_muted">Беззвучный</string>
<string name="title_channel">Каналы</string> <string name="title_channel">Каналы</string>
<string name="do_not_list">Не показывать</string> <string name="do_not_list">Скрыто</string>
<string name="blur">Размыть</string> <string name="blur">Размыть</string>
<string name="display">Показать</string> <string name="display">Показать</string>
<string name="no_opinion">Не выбрано</string> <string name="no_opinion">Не выбрано</string>
@ -23,7 +23,7 @@
<string name="action_playlist_edit">Редактировать плейлист</string> <string name="action_playlist_edit">Редактировать плейлист</string>
<string name="close">Закрыть</string> <string name="close">Закрыть</string>
<string name="upload_video">Загрузить</string> <string name="upload_video">Загрузить</string>
<string name="image_preview">Предпросмотр</string> <string name="image_preview">Предпросмотр изображения</string>
<string name="file_to_upload">Выберите файл для загрузки</string> <string name="file_to_upload">Выберите файл для загрузки</string>
<string name="channel">Канал</string> <string name="channel">Канал</string>
<string name="videos">Видео</string> <string name="videos">Видео</string>
@ -34,11 +34,12 @@
<string name="download">Скачать</string> <string name="download">Скачать</string>
<string name="profile_picture">Изображение профиля</string> <string name="profile_picture">Изображение профиля</string>
<string name="update_video">Обновить видео</string> <string name="update_video">Обновить видео</string>
<string name="date_seconds">%d с</string> <string name="remove_from_playlist">Удалить из плейлиста</string>
<string name="date_minutes">%d м</string> <string name="date_seconds">%d сек.</string>
<string name="date_hours">%d ч</string> <string name="date_minutes">%d мин.</string>
<string name="date_day">%d д</string> <string name="date_hours">%d час.</string>
<string name="number_view_video">%s просмотров</string> <string name="date_day">%d д.</string>
<string name="number_view_video">Просмотры: %s</string>
<string name="title_instance_login">Хост экземпляра</string> <string name="title_instance_login">Хост экземпляра</string>
<string name="uploading">Загрузка, пожалуйста, подождите…</string> <string name="uploading">Загрузка, пожалуйста, подождите…</string>
<string name="upload_video_success">Видео было загружено!</string> <string name="upload_video_success">Видео было загружено!</string>
@ -104,17 +105,17 @@
<string name="change_instance">Выберите другой экземпляр</string> <string name="change_instance">Выберите другой экземпляр</string>
<string name="my_history">История</string> <string name="my_history">История</string>
<string name="edit">Редактировать</string> <string name="edit">Редактировать</string>
<string name="video_settings">Video settings</string> <string name="video_settings">Настройки видео</string>
<string name="app_interface">Interface</string> <string name="app_interface">Интерфейс</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Кэш</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Определите кеш для видео (по умолчанию 100 Мб)</string>
<string name="set_video_quality_description">Определить качество видео по умолчанию</string> <string name="set_video_quality_description">Определить качество видео по умолчанию</string>
<string name="set_quality_mode">Разрешение для видео</string> <string name="set_quality_mode">Разрешение для видео</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Видео кэш: %d Мб</string>
<string name="captions">Субтитры</string> <string name="captions">Субтитры</string>
<string name="pickup_captions">Выбрать субтитры</string> <string name="pickup_captions">Выбрать субтитры</string>
<string name="none">Ничто</string> <string name="none">Ничто</string>
<string name="set_video_mode_description">Позволяет изменить режим воспроизведения видео (по умолчанию, потоковой или через браузер).</string> <string name="set_video_mode_description">Позволяет изменить режим воспроизведения видео (по умолчанию потоковый или через браузер).</string>
<string name="delete_video">Удалить видео</string> <string name="delete_video">Удалить видео</string>
<string name="delete_video_confirmation">Вы уверены, что хотите удалить это видео?</string> <string name="delete_video_confirmation">Вы уверены, что хотите удалить это видео?</string>
<string name="no_video_to_display">Нет видео для отображения!</string> <string name="no_video_to_display">Нет видео для отображения!</string>
@ -126,8 +127,8 @@
<string name="peertube_video_import_success"><![CDATA[Ваше видео <b>%1$s</b> успешно импортировано]]></string> <string name="peertube_video_import_success"><![CDATA[Ваше видео <b>%1$s</b> успешно импортировано]]></string>
<string name="peertube_video_import_error"><![CDATA[При импорте вашего видео <b>%1$s</b> произошла ошибка]]></string> <string name="peertube_video_import_error"><![CDATA[При импорте вашего видео <b>%1$s</b> произошла ошибка]]></string>
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> опубликовал новое видео: <b>%2$s</b>]]></string> <string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> опубликовал новое видео: <b>%2$s</b>]]></string>
<string name="peertube_video_blacklist"><![CDATA[Ваше видео <b>%1$s</b> занесено в черный список]]></string> <string name="peertube_video_blacklist"><![CDATA[Ваше видео <b>%1$s</b> занесено в чёрный список]]></string>
<string name="peertube_video_unblacklist"><![CDATA[Ваше видео <b>%1$s</b> удалено из черного списка]]></string> <string name="peertube_video_unblacklist"><![CDATA[Ваше видео <b>%1$s</b> удалено из чёрного списка]]></string>
<string name="peertube_video_abuse"><![CDATA[Новый отчёт о нарушении для видео: <b>%1$s</b>]]></string> <string name="peertube_video_abuse"><![CDATA[Новый отчёт о нарушении для видео: <b>%1$s</b>]]></string>
<string name="add_public_comment">Добавить публичный комментарий</string> <string name="add_public_comment">Добавить публичный комментарий</string>
<string name="send_comment">Оставить комментарий</string> <string name="send_comment">Оставить комментарий</string>
@ -163,6 +164,7 @@
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Веб-просмотр</item> <item>Веб-просмотр</item>
<item>Прямой поток</item> <item>Прямой поток</item>
<item>Прямой поток</item>
</string-array> </string-array>
<string-array name="settings_video_quality"> <string-array name="settings_video_quality">
<item>Высокое</item> <item>Высокое</item>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">В избранном нет видео!</string> <string name="bookmark_peertube_empty">В избранном нет видео!</string>
<string name="delete_channel">Удалить канал</string> <string name="delete_channel">Удалить канал</string>
<string name="action_channel_confirm_delete">Вы уверены что хотите безвозвратно удалить этот канал?</string> <string name="action_channel_confirm_delete">Вы уверены что хотите безвозвратно удалить этот канал?</string>
<string name="modify_playlists">Видео в плейлисте</string>
<string name="no_muted">Нет заблокированных аккаунтов!</string> <string name="no_muted">Нет заблокированных аккаунтов!</string>
<string name="error_display_name_channel">Вы должны указать имя и отображаемое имя для этого канала!</string> <string name="error_display_name_channel">Вы должны указать имя и отображаемое имя для этого канала!</string>
<string name="action_channel_create">Создать канал</string> <string name="action_channel_create">Создать канал</string>
@ -207,17 +210,17 @@
<string name="pickup_instance">Выбрать этот экземпляр</string> <string name="pickup_instance">Выбрать этот экземпляр</string>
<string name="sensitive_video"> Неприличные видео</string> <string name="sensitive_video"> Неприличные видео</string>
<string name="sensitive_content">Неприличный контент: %1$s</string> <string name="sensitive_content">Неприличный контент: %1$s</string>
<string name="followers_instance">%1$s подписчиков у экземпляра</string> <string name="followers_instance">Подписчиков у экземпляра: %1$s</string>
<string name="help">Помощь</string> <string name="help">Помощь</string>
<string name="pickup_categories">Выбрать категории</string> <string name="pickup_categories">Выбрать категории</string>
<string name="pickup_languages">Выбрать языки</string> <string name="pickup_languages">Выбрать языки</string>
<string name="notification_channel_name">Информация об обновлении</string> <string name="notification_channel_name">Обновить данные</string>
<string name="add_account">Добавление аккаунта</string> <string name="add_account">Добавление аккаунта</string>
<string name="list_of_accounts">Список аккаунтов</string> <string name="list_of_accounts">Список аккаунтов</string>
<string name="pause">Пауза</string> <string name="pause">Пауза</string>
<string name="play">Воспроизвести</string> <string name="play">Воспроизвести</string>
<string name="minimize">Свернуть</string> <string name="minimize">Свернуть</string>
<string name="fast_rewind">Быстрое перемотка</string> <string name="fast_rewind">Быстрая перемотка</string>
<string name="fast_forward">Перемотка вперед</string> <string name="fast_forward">Перемотка вперед</string>
<string name="set_video_minimize">Вид свёрнутого видео</string> <string name="set_video_minimize">Вид свёрнутого видео</string>
<string name="set_video_minimize_description">Уменьшить размер видео, когда приложение находится в фоновом режиме (Android N+)</string> <string name="set_video_minimize_description">Уменьшить размер видео, когда приложение находится в фоновом режиме (Android N+)</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -148,6 +148,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -34,6 +34,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
<string name="date_hours">%d h</string> <string name="date_hours">%d h</string>
@ -107,7 +108,7 @@
<string name="video_settings">Video settings</string> <string name="video_settings">Video settings</string>
<string name="app_interface">Interface</string> <string name="app_interface">Interface</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -161,6 +162,7 @@
<string name="account">Account</string> <string name="account">Account</string>
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -181,6 +183,7 @@
<string name="bookmark_peertube_empty">There are no videos in your favourites!</string> <string name="bookmark_peertube_empty">There are no videos in your favourites!</string>
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>
<string name="action_channel_create">Create a channel</string> <string name="action_channel_create">Create a channel</string>

View File

@ -36,7 +36,7 @@
<string name="download">Download</string> <string name="download">Download</string>
<string name="profile_picture">Profile picture</string> <string name="profile_picture">Profile picture</string>
<string name="update_video">Update video</string> <string name="update_video">Update video</string>
<string name="remove_from_playlist">Remove from playlist</string>
<string name="date_seconds">%d s</string> <string name="date_seconds">%d s</string>
<string name="date_minutes">%d m</string> <string name="date_minutes">%d m</string>
@ -145,7 +145,7 @@
<string name="set_video_quality_choice" translatable="false">set_video_quality_choice</string> <string name="set_video_quality_choice" translatable="false">set_video_quality_choice</string>
<string name="set_video_cache_choice" translatable="false">set_video_cache_choice</string> <string name="set_video_cache_choice" translatable="false">set_video_cache_choice</string>
<string name="set_cache_mode">Cache</string> <string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string> <string name="set_video_cache_description">Set the cache for videos (default 100Mb)</string>
<string name="set_video_quality_description">Define a default quality for videos</string> <string name="set_video_quality_description">Define a default quality for videos</string>
<string name="set_quality_mode">Resolution for videos</string> <string name="set_quality_mode">Resolution for videos</string>
<string name="video_cache_value">Video cache: %d Mb</string> <string name="video_cache_value">Video cache: %d Mb</string>
@ -206,6 +206,7 @@
<string name="report_account">Report account</string> <string name="report_account">Report account</string>
<string-array name="settings_video_mode"> <string-array name="settings_video_mode">
<item>Normal</item>
<item>Webview</item> <item>Webview</item>
<item>Direct stream</item> <item>Direct stream</item>
</string-array> </string-array>
@ -234,6 +235,7 @@
<string name="delete_channel">Remove channel</string> <string name="delete_channel">Remove channel</string>
<string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string> <string name="action_channel_confirm_delete">Are you sure to permanently delete this channel?</string>
<string name="modify_playlists">Video in playlists</string>
<string name="no_muted">No muted accounts!</string> <string name="no_muted">No muted accounts!</string>
<string name="error_display_name_channel">You must define a name and a display name for this channel!</string> <string name="error_display_name_channel">You must define a name and a display name for this channel!</string>

View File

@ -14,4 +14,8 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark_full</item> <item name="colorPrimaryDark">@color/colorPrimaryDark_full</item>
<item name="colorAccent">@color/colorAccent_full</item> <item name="colorAccent">@color/colorAccent_full</item>
</style> </style>
<style name="progress" parent="SpinKitView.Circle" />
<style name="progressBottom" parent="SpinKitView.ThreeBounce" />
</resources> </resources>

View File

@ -86,7 +86,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<activity <activity
android:name=".MyVideosActivity" android:name=".VideosTimelineActivity"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />

View File

@ -195,7 +195,7 @@ public class AllPlaylistsActivity extends AppCompatActivity {
Toasty.error(AllPlaylistsActivity.this, getString(R.string.error_channel_mandatory), Toast.LENGTH_LONG).show(); Toasty.error(AllPlaylistsActivity.this, getString(R.string.error_channel_mandatory), Toast.LENGTH_LONG).show();
} else { } else {
if (privacyToSend != null) { if (privacyToSend != null) {
playlistElement.setPrivacy((int) privacyItem.getId()); playlistElement.setPrivacy(privacyItem.getId());
} }
new Thread(() -> { new Thread(() -> {
String playlistId; String playlistId;
@ -310,7 +310,7 @@ public class AllPlaylistsActivity extends AppCompatActivity {
if (playlistToEdit != null) { if (playlistToEdit != null) {
Item privacy = playlistToEdit.getPrivacy(); Item privacy = playlistToEdit.getPrivacy();
if (privacy.getId() > 0) { if (privacy.getId() > 0) {
set_upload_privacy.setSelection((int) privacy.getId() - 1); set_upload_privacy.setSelection(privacy.getId() - 1);
} }
} else { } else {
set_upload_privacy.setSelection(2); set_upload_privacy.setSelection(2);
@ -345,7 +345,7 @@ public class AllPlaylistsActivity extends AppCompatActivity {
Item privacy = playlistToEdit.getPrivacy(); Item privacy = playlistToEdit.getPrivacy();
if (privacy.getId() > 0) { if (privacy.getId() > 0) {
set_upload_privacy.setSelection((int) privacy.getId() - 1); set_upload_privacy.setSelection(privacy.getId() - 1);
} }
} }

View File

@ -32,13 +32,8 @@ import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView; import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.navigation.NavController; import androidx.fragment.app.Fragment;
import androidx.navigation.NavGraph; import androidx.fragment.app.FragmentManager;
import androidx.navigation.NavInflater;
import androidx.navigation.Navigation;
import androidx.navigation.fragment.NavHostFragment;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.bottomnavigation.BottomNavigationView;
@ -56,6 +51,8 @@ import app.fedilab.fedilabtube.client.entities.PeertubeInformation;
import app.fedilab.fedilabtube.client.entities.Token; import app.fedilab.fedilabtube.client.entities.Token;
import app.fedilab.fedilabtube.client.entities.UserMe; import app.fedilab.fedilabtube.client.entities.UserMe;
import app.fedilab.fedilabtube.client.entities.WellKnownNodeinfo; import app.fedilab.fedilabtube.client.entities.WellKnownNodeinfo;
import app.fedilab.fedilabtube.fragment.DisplayOverviewFragment;
import app.fedilab.fedilabtube.fragment.DisplayVideosFragment;
import app.fedilab.fedilabtube.helper.Helper; import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.services.RetrieveInfoService; import app.fedilab.fedilabtube.services.RetrieveInfoService;
import app.fedilab.fedilabtube.sqlite.AccountDAO; import app.fedilab.fedilabtube.sqlite.AccountDAO;
@ -70,6 +67,48 @@ public class MainActivity extends AppCompatActivity {
public static PeertubeInformation peertubeInformation; public static PeertubeInformation peertubeInformation;
public static int PICK_INSTANCE = 5641; public static int PICK_INSTANCE = 5641;
final FragmentManager fm = getSupportFragmentManager();
Fragment active;
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
private DisplayOverviewFragment overviewFragment;
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= item -> {
DisplayVideosFragment displayVideosFragment = null;
switch (item.getItemId()) {
case R.id.navigation_subscription:
displayVideosFragment = subscriptionFragment;
setTitle(R.string.subscriptions);
break;
case R.id.navigation_trending:
setTitle(R.string.title_trending);
displayVideosFragment = trendingFragment;
break;
case R.id.navigation_most_liked:
setTitle(R.string.title_most_liked);
displayVideosFragment = mostLikedFragment;
break;
case R.id.navigation_recently_added:
setTitle(R.string.title_recently_added);
displayVideosFragment = recentFragment;
break;
case R.id.navigation_local:
setTitle(R.string.title_local);
displayVideosFragment = locaFragment;
break;
case R.id.navigation_discover:
setTitle(R.string.title_discover);
fm.beginTransaction().hide(active).show(overviewFragment).commit();
active = overviewFragment;
return true;
}
if (displayVideosFragment != null) {
fm.beginTransaction().hide(active).show(displayVideosFragment).commit();
active = displayVideosFragment;
return true;
} else {
return false;
}
};
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -80,6 +119,56 @@ public class MainActivity extends AppCompatActivity {
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
BottomNavigationView navView = findViewById(R.id.nav_view); BottomNavigationView navView = findViewById(R.id.nav_view);
navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
recentFragment = new DisplayVideosFragment();
Bundle bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.RECENT);
recentFragment.setArguments(bundle);
locaFragment = new DisplayVideosFragment();
bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.LOCAL);
locaFragment.setArguments(bundle);
trendingFragment = new DisplayVideosFragment();
bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.TRENDING);
trendingFragment.setArguments(bundle);
subscriptionFragment = new DisplayVideosFragment();
bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.SUBSCRIBTIONS);
subscriptionFragment.setArguments(bundle);
mostLikedFragment = new DisplayVideosFragment();
bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.MOST_LIKED);
mostLikedFragment.setArguments(bundle);
overviewFragment = new DisplayOverviewFragment();
active = overviewFragment;
fm.beginTransaction().add(R.id.nav_host_fragment, locaFragment, "5").hide(locaFragment).commit();
if (!Helper.isLoggedIn(MainActivity.this)) {
fm.beginTransaction().add(R.id.nav_host_fragment, recentFragment, "4").hide(recentFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, mostLikedFragment, "3").hide(mostLikedFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, trendingFragment, "2").hide(trendingFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, overviewFragment, "1").commit();
}
toolbar.setOnClickListener(v->{
if(active instanceof DisplayVideosFragment) {
((DisplayVideosFragment) active).scrollToTop();
}else if(active instanceof DisplayOverviewFragment) {
((DisplayOverviewFragment) active).scrollToTop();
}
});
setTitle(R.string.title_discover);
if (Helper.isLoggedIn(MainActivity.this)) { if (Helper.isLoggedIn(MainActivity.this)) {
navView.inflateMenu(R.menu.bottom_nav_menu_connected); navView.inflateMenu(R.menu.bottom_nav_menu_connected);
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
@ -102,6 +191,14 @@ public class MainActivity extends AppCompatActivity {
runOnUiThread(() -> Helper.logoutCurrentUser(MainActivity.this, account)); runOnUiThread(() -> Helper.logoutCurrentUser(MainActivity.this, account));
return; return;
} }
runOnUiThread(() -> {
//To avoid a token issue with subscriptions, adding fragment is done when the token is refreshed.
fm.beginTransaction().add(R.id.nav_host_fragment, recentFragment, "4").hide(recentFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, trendingFragment, "3").hide(trendingFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, subscriptionFragment, "2").hide(subscriptionFragment).commit();
fm.beginTransaction().add(R.id.nav_host_fragment, overviewFragment, "1").commit();
});
UserMe userMe = new RetrofitPeertubeAPI(MainActivity.this, instance, token.getAccess_token()).verifyCredentials(); UserMe userMe = new RetrofitPeertubeAPI(MainActivity.this, instance, token.getAccess_token()).verifyCredentials();
if (userMe != null && userMe.getAccount() != null) { if (userMe != null && userMe.getAccount() != null) {
new AccountDAO(MainActivity.this, db).updateAccount(userMe.getAccount()); new AccountDAO(MainActivity.this, db).updateAccount(userMe.getAccount());
@ -128,41 +225,9 @@ public class MainActivity extends AppCompatActivity {
} else { } else {
navView.inflateMenu(R.menu.bottom_nav_menu); navView.inflateMenu(R.menu.bottom_nav_menu);
} }
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
AppBarConfiguration appBarConfiguration;
//Bottom menu won't be the same if the user is authenticated
//When the user is authenticated, the subscription entry will be added and the local one removed.
if (Helper.isLoggedIn(MainActivity.this)) {
appBarConfiguration = new AppBarConfiguration.Builder(
R.id.navigation_discover, R.id.navigation_subscription, R.id.navigation_trending, R.id.navigation_local, R.id.navigation_recently_added)
.build();
} else {
appBarConfiguration = new AppBarConfiguration.Builder(
R.id.navigation_discover, R.id.navigation_trending, R.id.navigation_most_liked, R.id.navigation_recently_added, R.id.navigation_home)
.build();
}
startInForeground(); startInForeground();
NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
if (navHostFragment != null) {
NavInflater inflater = navHostFragment.getNavController().getNavInflater();
NavGraph graph;
//the menu is inflated for authenticated or not authenticated account
if (Helper.isLoggedIn(MainActivity.this)) {
graph = inflater.inflate(R.navigation.mobile_navigation_connected);
} else {
graph = inflater.inflate(R.navigation.mobile_navigation);
}
navHostFragment.getNavController().setGraph(graph);
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController);
}
}
}
private void startInForeground() { private void startInForeground() {
Intent notificationIntent = new Intent(this, RetrieveInfoService.class); Intent notificationIntent = new Intent(this, RetrieveInfoService.class);
@ -254,21 +319,21 @@ public class MainActivity extends AppCompatActivity {
startActivity(intent); startActivity(intent);
return true; return true;
} else if (item.getItemId() == R.id.action_myvideos) { } else if (item.getItemId() == R.id.action_myvideos) {
Intent intent = new Intent(MainActivity.this, MyVideosActivity.class); Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.MY_VIDEOS); bundle.putSerializable("type", TimelineVM.TimelineType.MY_VIDEOS);
intent.putExtras(bundle); intent.putExtras(bundle);
startActivity(intent); startActivity(intent);
return true; return true;
} else if (item.getItemId() == R.id.action_history) { } else if (item.getItemId() == R.id.action_history) {
Intent intent = new Intent(MainActivity.this, MyVideosActivity.class); Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.HISTORY); bundle.putSerializable("type", TimelineVM.TimelineType.HISTORY);
intent.putExtras(bundle); intent.putExtras(bundle);
startActivity(intent); startActivity(intent);
return true; return true;
} else if (item.getItemId() == R.id.action_most_liked) { } else if (item.getItemId() == R.id.action_most_liked) {
Intent intent = new Intent(MainActivity.this, MyVideosActivity.class); Intent intent = new Intent(MainActivity.this, VideosTimelineActivity.class);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("type", TimelineVM.TimelineType.MOST_LIKED); bundle.putSerializable("type", TimelineVM.TimelineType.MOST_LIKED);
intent.putExtras(bundle); intent.putExtras(bundle);

View File

@ -72,6 +72,7 @@ import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.MergingMediaSource; import com.google.android.exoplayer2.source.MergingMediaSource;
import com.google.android.exoplayer2.source.ProgressiveMediaSource; import com.google.android.exoplayer2.source.ProgressiveMediaSource;
import com.google.android.exoplayer2.source.SingleSampleMediaSource; import com.google.android.exoplayer2.source.SingleSampleMediaSource;
import com.google.android.exoplayer2.source.hls.HlsMediaSource;
import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection; import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.trackselection.TrackSelector; import com.google.android.exoplayer2.trackselection.TrackSelector;
@ -80,13 +81,14 @@ import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.exoplayer2.ui.PlayerView; import com.google.android.exoplayer2.ui.PlayerView;
import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ -96,7 +98,7 @@ import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.data.AccountData.Account; import app.fedilab.fedilabtube.client.data.AccountData.Account;
import app.fedilab.fedilabtube.client.data.CaptionData.Caption; import app.fedilab.fedilabtube.client.data.CaptionData.Caption;
import app.fedilab.fedilabtube.client.data.CommentData.Comment; import app.fedilab.fedilabtube.client.data.CommentData.Comment;
import app.fedilab.fedilabtube.client.data.PlaylistData.Playlist; import app.fedilab.fedilabtube.client.data.PlaylistData;
import app.fedilab.fedilabtube.client.data.VideoData; import app.fedilab.fedilabtube.client.data.VideoData;
import app.fedilab.fedilabtube.client.entities.File; import app.fedilab.fedilabtube.client.entities.File;
import app.fedilab.fedilabtube.client.entities.ItemStr; import app.fedilab.fedilabtube.client.entities.ItemStr;
@ -125,13 +127,12 @@ import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPO
import static app.fedilab.fedilabtube.helper.Helper.getAttColor; import static app.fedilab.fedilabtube.helper.Helper.getAttColor;
import static app.fedilab.fedilabtube.helper.Helper.getLiveInstance; import static app.fedilab.fedilabtube.helper.Helper.getLiveInstance;
import static app.fedilab.fedilabtube.helper.Helper.isLoggedIn; import static app.fedilab.fedilabtube.helper.Helper.isLoggedIn;
import static app.fedilab.fedilabtube.viewmodel.PlaylistsVM.action.GET_PLAYLISTS;
public class PeertubeActivity extends AppCompatActivity implements CommentListAdapter.AllCommentRemoved { public class PeertubeActivity extends AppCompatActivity implements CommentListAdapter.AllCommentRemoved {
public static String video_id; public static String video_id;
private String peertubeInstance, videoId; private String peertubeInstance, videoUuid;
private FullScreenMediaController.fullscreen fullscreen; private FullScreenMediaController.fullscreen fullscreen;
private RelativeLayout loader; private RelativeLayout loader;
private TextView peertube_view_count, peertube_playlist, peertube_bookmark, peertube_like_count, peertube_dislike_count, peertube_description, peertube_title, more_actions; private TextView peertube_view_count, peertube_playlist, peertube_bookmark, peertube_like_count, peertube_dislike_count, peertube_description, peertube_title, more_actions;
@ -148,9 +149,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
private ImageView send; private ImageView send;
private TextView add_comment_read; private TextView add_comment_read;
private EditText add_comment_write; private EditText add_comment_write;
private List<String> playlistForVideo; private Map<String, List<PlaylistExist>> playlists;
private List<Playlist> playlists;
private PlaylistsVM playlistsViewModel;
private boolean playInMinimized; private boolean playInMinimized;
private boolean onStopCalled; private boolean onStopCalled;
private List<Caption> captions; private List<Caption> captions;
@ -158,7 +157,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
private String max_id; private String max_id;
private RecyclerView lv_comments; private RecyclerView lv_comments;
private boolean flag_loading; private boolean flag_loading;
private boolean isMyVideo;
private List<Comment> comments; private List<Comment> comments;
private CommentListAdapter commentListAdapter; private CommentListAdapter commentListAdapter;
@ -220,25 +219,20 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL); mode = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL);
playlistForVideo = new ArrayList<>();
playlistsViewModel = new ViewModelProvider(PeertubeActivity.this).get(PlaylistsVM.class);
if (Helper.isLoggedIn(PeertubeActivity.this)) {
playlistsViewModel.manage(GET_PLAYLISTS, null, null).observe(PeertubeActivity.this, apiResponse -> manageVIewPlaylists(GET_PLAYLISTS, apiResponse));
}
Bundle b = getIntent().getExtras(); Bundle b = getIntent().getExtras();
if (b != null) { if (b != null) {
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this)); peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
videoId = b.getString("video_id", null); videoUuid = b.getString("video_uuid", null);
isMyVideo = b.getBoolean("isMyVideo", false);
} }
playInMinimized = sharedpreferences.getBoolean(getString(R.string.set_video_minimize_choice), true); playInMinimized = sharedpreferences.getBoolean(getString(R.string.set_video_minimize_choice), true);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N
&& !getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)) { && !getPackageManager().hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)) {
playInMinimized = false; playInMinimized = false;
} }
if (mode != Helper.VIDEO_MODE_WEBVIEW && mode != Helper.VIDEO_MODE_NORMAL)
mode = Helper.VIDEO_MODE_NORMAL;
if (mode == Helper.VIDEO_MODE_WEBVIEW) { if (mode == Helper.VIDEO_MODE_WEBVIEW) {
webview_video.setVisibility(View.VISIBLE); webview_video.setVisibility(View.VISIBLE);
playerView.setVisibility(View.GONE); playerView.setVisibility(View.GONE);
@ -274,7 +268,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
webview_video.getSettings().setAppCacheEnabled(true); webview_video.getSettings().setAppCacheEnabled(true);
webview_video.getSettings().setMediaPlaybackRequiresUserGesture(false); webview_video.getSettings().setMediaPlaybackRequiresUserGesture(false);
webview_video.setWebViewClient(new MastalabWebViewClient(PeertubeActivity.this)); webview_video.setWebViewClient(new MastalabWebViewClient(PeertubeActivity.this));
webview_video.loadUrl("https://" + peertubeInstance + "/videos/embed/" + videoId); webview_video.loadUrl("https://" + peertubeInstance + "/videos/embed/" + videoUuid);
} else { } else {
webview_video.setVisibility(View.GONE); webview_video.setVisibility(View.GONE);
playerView.setVisibility(View.VISIBLE); playerView.setVisibility(View.VISIBLE);
@ -305,7 +299,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
if (firstVisibleItem + visibleItemCount == totalItemCount) { if (firstVisibleItem + visibleItemCount == totalItemCount) {
if (!flag_loading) { if (!flag_loading) {
CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class); CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class);
commentViewModel.getThread(videoId, max_id).observe(PeertubeActivity.this, apiresponse -> manageVIewComment(apiresponse)); commentViewModel.getThread(videoUuid, max_id).observe(PeertubeActivity.this, apiresponse -> manageVIewComment(apiresponse));
} }
} }
} }
@ -344,7 +338,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
Bundle b = intent.getExtras(); Bundle b = intent.getExtras();
if (b != null) { if (b != null) {
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this)); peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
videoId = b.getString("video_id", null); videoUuid = b.getString("video_uuid", null);
playVideo(); playVideo();
} }
} }
@ -366,9 +360,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube_playlist.setVisibility(View.VISIBLE); peertube_playlist.setVisibility(View.VISIBLE);
peertube_bookmark.setVisibility(View.GONE); peertube_bookmark.setVisibility(View.GONE);
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeActivity.this).get(TimelineVM.class); TimelineVM feedsViewModel = new ViewModelProvider(PeertubeActivity.this).get(TimelineVM.class);
feedsViewModel.getVideo(videoId).observe(PeertubeActivity.this, this::manageVIewVideo); feedsViewModel.getVideo(videoUuid, isMyVideo).observe(PeertubeActivity.this, this::manageVIewVideo);
CaptionsVM captionsViewModel = new ViewModelProvider(PeertubeActivity.this).get(CaptionsVM.class); CaptionsVM captionsViewModel = new ViewModelProvider(PeertubeActivity.this).get(CaptionsVM.class);
captionsViewModel.getCaptions(videoId).observe(PeertubeActivity.this, this::manageCaptions); captionsViewModel.getCaptions(videoUuid).observe(PeertubeActivity.this, this::manageCaptions);
} }
public void change() { public void change() {
@ -509,6 +503,11 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube = apiResponse.getPeertubes().get(0); peertube = apiResponse.getPeertubes().get(0);
List<String> videoIds = new ArrayList<>();
videoIds.add(peertube.getId());
PlaylistsVM viewModel = new ViewModelProvider(this).get(PlaylistsVM.class);
viewModel.videoExists(videoIds).observe(this, this::manageVIewPlaylist);
add_comment_read.setOnClickListener(v -> { add_comment_read.setOnClickListener(v -> {
if (isLoggedIn(PeertubeActivity.this)) { if (isLoggedIn(PeertubeActivity.this)) {
@ -526,8 +525,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
if (isLoggedIn(PeertubeActivity.this)) { if (isLoggedIn(PeertubeActivity.this)) {
String comment = add_comment_write.getText().toString(); String comment = add_comment_write.getText().toString();
if (comment.trim().length() > 0) { if (comment.trim().length() > 0) {
PostActionsVM viewModel = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class); PostActionsVM viewModelComment = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
viewModel.comment(ADD_COMMENT, peertube.getId(), null, comment).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(ADD_COMMENT, apiResponse1)); viewModelComment.comment(ADD_COMMENT, peertube.getId(), null, comment).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(ADD_COMMENT, apiResponse1));
add_comment_write.setText(""); add_comment_write.setText("");
add_comment_read.setVisibility(View.VISIBLE); add_comment_read.setVisibility(View.VISIBLE);
add_comment_write.setVisibility(View.GONE); add_comment_write.setVisibility(View.GONE);
@ -541,61 +540,14 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube_playlist.setOnClickListener(v -> { peertube_playlist.setOnClickListener(v -> {
if (playlists != null && videoId != null) { PlaylistsVM viewModelOwnerPlaylist = new ViewModelProvider(PeertubeActivity.this).get(PlaylistsVM.class);
PopupMenu popup = new PopupMenu(PeertubeActivity.this, peertube_playlist); viewModelOwnerPlaylist.manage(PlaylistsVM.action.GET_PLAYLISTS, null, null).observe(PeertubeActivity.this, this::manageVIewPlaylists);
for (Playlist playlist : playlists) {
String title = null;
boolean isPresent = false;
String elementId = null;
for (String playlistId : playlistForVideo) {
if (playlist.getId().compareTo(playlistId) == 0) {
title = "" + playlist.getDisplayName();
isPresent = true;
elementId = playlistId;
break;
}
}
if (title == null) {
title = playlist.getDisplayName();
}
MenuItem item = popup.getMenu().add(0, 0, Menu.NONE, title);
boolean finalIsPresent = isPresent;
String finalElementId = elementId;
item.setOnMenuItemClickListener(item1 -> {
item1.setShowAsAction(MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
item1.setActionView(new View(PeertubeActivity.this));
item1.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem item1) {
return false;
}
@Override
public boolean onMenuItemActionCollapse(MenuItem item1) {
return false;
}
});
if (finalIsPresent) {
item1.setTitle(playlist.getDisplayName());
playlistsViewModel.manage(PlaylistsVM.action.DELETE_VIDEOS, playlist, finalElementId).observe(PeertubeActivity.this, apiResponse3 -> manageVIewPlaylists(PlaylistsVM.action.DELETE_VIDEOS, apiResponse3));
playlistForVideo.remove(playlist.getId());
} else {
item1.setTitle("" + playlist.getDisplayName());
playlistsViewModel.manage(PlaylistsVM.action.ADD_VIDEOS, playlist, videoId).observe(PeertubeActivity.this, apiResponse3 -> manageVIewPlaylists(PlaylistsVM.action.ADD_VIDEOS, apiResponse3));
playlistForVideo.add(playlist.getId());
}
return false;
});
popup.show();
}
}
}); });
no_action_text = findViewById(R.id.no_action_text); no_action_text = findViewById(R.id.no_action_text);
if (peertube.isCommentsEnabled()) { if (peertube.isCommentsEnabled()) {
CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class); CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class);
commentViewModel.getThread(videoId, max_id).observe(PeertubeActivity.this, this::manageVIewComment); commentViewModel.getThread(videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
write_comment_container.setVisibility(View.VISIBLE); write_comment_container.setVisibility(View.VISIBLE);
} else { } else {
@ -620,8 +572,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube_like_count.setOnClickListener(v -> { peertube_like_count.setOnClickListener(v -> {
if (isLoggedIn(PeertubeActivity.this)) { if (isLoggedIn(PeertubeActivity.this)) {
String newState = peertube.getMyRating().equals("like") ? "none" : "like"; String newState = peertube.getMyRating().equals("like") ? "none" : "like";
PostActionsVM viewModel = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class); PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
viewModel.post(RATEVIDEO, peertube.getId(), newState).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(RATEVIDEO, apiResponse1)); viewModelLike.post(RATEVIDEO, peertube.getId(), newState).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(RATEVIDEO, apiResponse1));
peertube.setMyRating(newState); peertube.setMyRating(newState);
int count = Integer.parseInt(peertube_like_count.getText().toString()); int count = Integer.parseInt(peertube_like_count.getText().toString());
if (newState.compareTo("none") == 0) { if (newState.compareTo("none") == 0) {
@ -641,8 +593,8 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube_dislike_count.setOnClickListener(v -> { peertube_dislike_count.setOnClickListener(v -> {
if (isLoggedIn(PeertubeActivity.this)) { if (isLoggedIn(PeertubeActivity.this)) {
String newState = peertube.getMyRating().equals("dislike") ? "none" : "dislike"; String newState = peertube.getMyRating().equals("dislike") ? "none" : "dislike";
PostActionsVM viewModel = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class); PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
viewModel.post(RATEVIDEO, peertube.getId(), newState).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(RATEVIDEO, apiResponse1)); viewModelLike.post(RATEVIDEO, peertube.getId(), newState).observe(PeertubeActivity.this, apiResponse1 -> manageVIewPostActions(RATEVIDEO, apiResponse1));
peertube.setMyRating(newState); peertube.setMyRating(newState);
int count = Integer.parseInt(peertube_dislike_count.getText().toString()); int count = Integer.parseInt(peertube_dislike_count.getText().toString());
if (newState.compareTo("none") == 0) { if (newState.compareTo("none") == 0) {
@ -665,21 +617,28 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB); int video_cache = sharedpreferences.getInt(Helper.SET_VIDEO_CACHE, Helper.DEFAULT_VIDEO_CACHE_MB);
ProgressiveMediaSource videoSource; ProgressiveMediaSource videoSource;
if (video_cache == 0) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, null), null);
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
} else {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
}
player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this); player = ExoPlayerFactory.newSimpleInstance(PeertubeActivity.this);
playerView.setPlayer(player); playerView.setPlayer(player);
loader.setVisibility(View.GONE); loader.setVisibility(View.GONE);
player.prepare(videoSource);
if (apiResponse.getPeertubes().get(0).getFiles() != null && apiResponse.getPeertubes().get(0).getFiles().size() > 0) {
if (video_cache == 0) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, null), null);
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
} else {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
}
player.prepare(videoSource);
} else {
HlsMediaSource hlsMediaSource = new HlsMediaSource.Factory(new DefaultHttpDataSourceFactory(System.getProperty("http.agent")))
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getStreamingPlaylists().get(0).getPlaylistUrl()));
player.prepare(hlsMediaSource);
}
player.setPlayWhenReady(true); player.setPlayWhenReady(true);
} }
@ -773,34 +732,35 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
Format.NO_VALUE, Format.NO_VALUE,
itemsKeyLanguage[which]); itemsKeyLanguage[which]);
if (video_cache == 0) {
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
Util.getUserAgent(PeertubeActivity.this, null), null);
videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
if (uri != null)
subtitleSource = new SingleSampleMediaSource.Factory(dataSourceFactory).createMediaSource(uri, subtitleFormat, C.TIME_UNSET);
// subtitleSource = new SingleSampleMediaSource(uri, dataSourceFactory, subtitleFormat, C.TIME_UNSET);
} else { if (apiResponse.getPeertubes().get(0).getFiles() != null && apiResponse.getPeertubes().get(0).getFiles().size() > 0) {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this); if (video_cache == 0) {
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory) DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this))); Util.getUserAgent(PeertubeActivity.this, null), null);
if (uri != null) videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
subtitleSource = new SingleSampleMediaSource.Factory(cacheDataSourceFactory).createMediaSource(uri, subtitleFormat, C.TIME_UNSET); .createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
// subtitleSource = new SingleSampleMediaSource(uri, cacheDataSourceFactory, subtitleFormat, C.TIME_UNSET); if (uri != null)
subtitleSource = new SingleSampleMediaSource.Factory(dataSourceFactory).createMediaSource(uri, subtitleFormat, C.TIME_UNSET);
} else {
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
.createMediaSource(Uri.parse(apiResponse.getPeertubes().get(0).getFileUrl(null, PeertubeActivity.this)));
if (uri != null)
subtitleSource = new SingleSampleMediaSource.Factory(cacheDataSourceFactory).createMediaSource(uri, subtitleFormat, C.TIME_UNSET);
}
playerView.setPlayer(player);
if (which > 0 && subtitleSource != null) {
MergingMediaSource mergedSource =
new MergingMediaSource(videoSource, subtitleSource);
player.prepare(mergedSource);
} else {
player.prepare(videoSource);
}
player.seekTo(0, position);
player.setPlayWhenReady(true);
} }
playerView.setPlayer(player);
if (which > 0 && subtitleSource != null) {
MergingMediaSource mergedSource =
new MergingMediaSource(videoSource, subtitleSource);
player.prepare(mergedSource);
} else {
player.prepare(videoSource);
}
player.seekTo(0, position);
player.setPlayWhenReady(true);
dialog.dismiss(); dialog.dismiss();
}); });
@ -974,7 +934,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
if (peertube.isCommentsEnabled() && statusAction == ADD_COMMENT) { if (peertube.isCommentsEnabled() && statusAction == ADD_COMMENT) {
CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class); CommentVM commentViewModel = new ViewModelProvider(PeertubeActivity.this).get(CommentVM.class);
commentViewModel.getThread(videoId, max_id).observe(PeertubeActivity.this, this::manageVIewComment); commentViewModel.getThread(videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
} else if (statusAction == RetrofitPeertubeAPI.ActionType.REPORT_ACCOUNT) { } else if (statusAction == RetrofitPeertubeAPI.ActionType.REPORT_ACCOUNT) {
Toasty.success(PeertubeActivity.this, getString(R.string.successful_report), Toasty.LENGTH_LONG).show(); Toasty.success(PeertubeActivity.this, getString(R.string.successful_report), Toasty.LENGTH_LONG).show();
} else if (statusAction == RetrofitPeertubeAPI.ActionType.REPORT_VIDEO) { } else if (statusAction == RetrofitPeertubeAPI.ActionType.REPORT_VIDEO) {
@ -1035,8 +995,12 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
private void initResolution() { private void initResolution() {
PlayerControlView controlView = playerView.findViewById(R.id.exo_controller); PlayerControlView controlView = playerView.findViewById(R.id.exo_controller);
resolution = controlView.findViewById(R.id.resolution); resolution = controlView.findViewById(R.id.resolution);
resolution.setText(String.format("%s", Helper.defaultFile(PeertubeActivity.this, peertube.getFiles()).getResolutions().getLabel())); if (peertube.getFiles() != null && peertube.getFiles().size() > 0) {
resolution.setOnClickListener(v -> displayResolution()); resolution.setText(String.format("%s", Helper.defaultFile(PeertubeActivity.this, peertube.getFiles()).getResolutions().getLabel()));
resolution.setOnClickListener(v -> displayResolution());
} else {
resolution.setVisibility(View.GONE);
}
} }
private void changeColor() { private void changeColor() {
@ -1068,27 +1032,86 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
peertube_dislike_count.setCompoundDrawablesWithIntrinsicBounds(null, thumbDown, null, null); peertube_dislike_count.setCompoundDrawablesWithIntrinsicBounds(null, thumbDown, null, null);
} }
public void manageVIewPlaylists(PlaylistsVM.action actionType, APIResponse apiResponse) { public void manageVIewPlaylists(APIResponse apiResponse) {
if (actionType == GET_PLAYLISTS && apiResponse != null) { if (apiResponse.getError() != null) {
playlists = apiResponse.getPlaylists(); return;
playlistsViewModel.videoExists(videoId).observe(PeertubeActivity.this, this::manageVIewVideosExist); }
if (apiResponse.getPlaylists() != null && apiResponse.getPlaylists().size() > 0) {
androidx.appcompat.app.AlertDialog.Builder builder = new androidx.appcompat.app.AlertDialog.Builder(PeertubeActivity.this);
builder.setTitle(R.string.modify_playlists);
List<PlaylistData.Playlist> ownerPlaylists = apiResponse.getPlaylists();
if( ownerPlaylists == null){
return;
}
String[] label = new String[ownerPlaylists.size()];
boolean[] checked = new boolean[ownerPlaylists.size()];
int i = 0;
List<PlaylistExist> playlistsForVideo = playlists.get(peertube.getId());
for (PlaylistData.Playlist playlist : ownerPlaylists) {
checked[i] = false;
if (playlistsForVideo != null) {
for (PlaylistExist playlistExist : playlistsForVideo) {
if (playlistExist != null && playlistExist.getPlaylistId().compareTo(playlist.getId()) == 0) {
checked[i] = true;
break;
}
}
}
label[i] = playlist.getDisplayName();
i++;
}
builder.setMultiChoiceItems(label, checked, (dialog, which, isChecked) -> {
PlaylistsVM playlistsViewModel = new ViewModelProvider(PeertubeActivity.this).get(PlaylistsVM.class);
if (isChecked) { //Add to playlist
playlistsViewModel.manage(PlaylistsVM.action.ADD_VIDEOS, ownerPlaylists.get(which), peertube.getUuid()).observe(PeertubeActivity.this, apiResponse3 -> addElement(ownerPlaylists.get(which).getId(), peertube.getId(), apiResponse3));
} else { //Remove from playlist
String elementInPlaylistId = null;
for (PlaylistExist playlistExist : peertube.getPlaylistExists()) {
if (playlistExist.getPlaylistId().compareTo(ownerPlaylists.get(which).getId()) == 0) {
elementInPlaylistId = playlistExist.getPlaylistElementId();
}
}
playlistsViewModel.manage(PlaylistsVM.action.DELETE_VIDEOS, ownerPlaylists.get(which), elementInPlaylistId);
playlists.remove(peertube.getId());
}
});
builder.setPositiveButton(R.string.close, (dialog, which) -> dialog.dismiss());
androidx.appcompat.app.AlertDialog dialog = builder.create();
dialog.show();
}
}
public void manageVIewPlaylist(APIResponse apiResponse) {
if (apiResponse.getError() != null || apiResponse.getVideoExistPlaylist() == null) {
return;
}
if (playlists == null) {
playlists = new HashMap<>();
}
playlists.putAll(apiResponse.getVideoExistPlaylist());
peertube.setPlaylistExists(playlists.get(peertube.getId()));
}
public void addElement(String playlistId, String videoId, APIResponse apiResponse) {
if (apiResponse != null && apiResponse.getActionReturn() != null) {
PlaylistExist playlistExist = new PlaylistExist();
playlistExist.setPlaylistId(playlistId);
playlistExist.setPlaylistElementId(apiResponse.getActionReturn());
List<PlaylistExist> playlistExistList = playlists.get(videoId);
if (playlistExistList == null) {
playlistExistList = new ArrayList<>();
}
playlistExistList.add(playlistExist);
playlists.put(videoId, playlistExistList);
} }
} }
public void manageVIewVideosExist(APIResponse apiResponse) {
if (apiResponse.getError() == null && apiResponse.getVideoExistPlaylist() != null) {
Map<String, List<PlaylistExist>> videoIds = apiResponse.getVideoExistPlaylist();
Iterator<Map.Entry<String, List<PlaylistExist>>> it = videoIds.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, List<PlaylistExist>> pair = it.next();
List<PlaylistExist> playlistExistVideo = pair.getValue();
for (PlaylistExist playlistExist : playlistExistVideo) {
playlistForVideo.add(playlistExist.getPlaylistId());
}
it.remove();
}
}
}
@Override @Override
public void onAllCommentRemoved() { public void onAllCommentRemoved() {

View File

@ -457,12 +457,12 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
videoParams.setDescription(description); videoParams.setDescription(description);
videoParams.setNsfw(isNSFW1); videoParams.setNsfw(isNSFW1);
videoParams.setCommentsEnabled(commentEnabled1); videoParams.setCommentsEnabled(commentEnabled1);
videoParams.setCategory((int) finalCategoryToSend.getId()); videoParams.setCategory(finalCategoryToSend.getId());
videoParams.setLicence(String.valueOf(finalLicenseToSend.getId())); videoParams.setLicence(String.valueOf(finalLicenseToSend.getId()));
videoParams.setLanguage(finalLanguageToSend.getId()); videoParams.setLanguage(finalLanguageToSend.getId());
videoParams.setChannelId(channelToSendId); videoParams.setChannelId(channelToSendId);
videoParams.setPrivacy((int) finalPrivacyToSend.getId()); videoParams.setPrivacy(finalPrivacyToSend.getId());
List<String> tags = p_video_tags.getTags(); List<String> tags = p_video_tags.getTags();
videoParams.setTags(tags); videoParams.setTags(tags);
set_upload_submit.setEnabled(false); set_upload_submit.setEnabled(false);
@ -671,7 +671,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
set_upload_submit.setEnabled(true); set_upload_submit.setEnabled(true);
} }
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public void manageVIewPostActions(RetrofitPeertubeAPI.ActionType statusAction, APIResponse apiResponse) { public void manageVIewPostActions(RetrofitPeertubeAPI.ActionType statusAction, APIResponse apiResponse) {
Intent intent = new Intent(PeertubeEditUploadActivity.this, MainActivity.class); Intent intent = new Intent(PeertubeEditUploadActivity.this, MainActivity.class);
intent.putExtra(Helper.INTENT_ACTION, Helper.RELOAD_MYVIDEOS); intent.putExtra(Helper.INTENT_ACTION, Helper.RELOAD_MYVIDEOS);

View File

@ -16,46 +16,21 @@ package app.fedilab.fedilabtube;
import android.os.Bundle; import android.os.Bundle;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider; import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import java.util.ArrayList; import app.fedilab.fedilabtube.client.data.PlaylistData;
import java.util.List; import app.fedilab.fedilabtube.fragment.DisplayVideosFragment;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.client.APIResponse; import app.fedilab.fedilabtube.viewmodel.TimelineVM;
import app.fedilab.fedilabtube.client.data.PlaylistData.Playlist;
import app.fedilab.fedilabtube.client.data.VideoData.Video;
import app.fedilab.fedilabtube.client.data.VideoPlaylistData;
import app.fedilab.fedilabtube.drawer.PeertubeAdapter;
import app.fedilab.fedilabtube.viewmodel.PlaylistsVM;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
import static app.fedilab.fedilabtube.viewmodel.PlaylistsVM.action.GET_LIST_VIDEOS;
public class PlaylistsActivity extends AppCompatActivity { public class PlaylistsActivity extends AppCompatActivity {
LinearLayoutManager mLayoutManager;
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
private SwipeRefreshLayout swipeRefreshLayout;
private boolean swiped;
private List<Video> peertubes;
private String max_id;
private Playlist playlist;
private boolean firstLoad;
private boolean flag_loading;
private PeertubeAdapter peertubeAdapter;
private PlaylistsVM viewModel;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -65,72 +40,30 @@ public class PlaylistsActivity extends AppCompatActivity {
setContentView(R.layout.activity_playlists); setContentView(R.layout.activity_playlists);
peertubes = new ArrayList<>();
RecyclerView lv_playlist = findViewById(R.id.lv_playlist);
mainLoader = findViewById(R.id.loader);
nextElementLoader = findViewById(R.id.loading_next_status);
textviewNoAction = findViewById(R.id.no_action);
mainLoader.setVisibility(View.VISIBLE);
swipeRefreshLayout = findViewById(R.id.swipeContainer);
max_id = null; PlaylistData.Playlist playlist;
flag_loading = true;
firstLoad = true;
swiped = false;
mainLoader.setVisibility(View.VISIBLE);
nextElementLoader.setVisibility(View.GONE);
peertubeAdapter = new PeertubeAdapter(this.peertubes);
lv_playlist.setAdapter(peertubeAdapter);
mLayoutManager = new LinearLayoutManager(PlaylistsActivity.this);
lv_playlist.setLayoutManager(mLayoutManager);
Bundle b = getIntent().getExtras(); Bundle b = getIntent().getExtras();
if (b != null) { if (b != null) {
playlist = b.getParcelable("playlist"); playlist = b.getParcelable("playlist");
if (playlist == null) {
return;
}
} else { } else {
Toasty.error(PlaylistsActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show(); Toasty.error(PlaylistsActivity.this, getString(R.string.toast_error), Toast.LENGTH_LONG).show();
return; return;
} }
if (getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle(playlist.getDisplayName()); setTitle(playlist.getDisplayName());
if (savedInstanceState == null) {
DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment();
Bundle bundle = new Bundle();
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.VIDEOS_IN_PLAYLIST);
bundle.putSerializable("playlistId", playlist.getId());
displayVideosFragment.setArguments(bundle);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(R.id.nav_host_fragment, displayVideosFragment).commit();
}
viewModel = new ViewModelProvider(PlaylistsActivity.this).get(PlaylistsVM.class);
lv_playlist.addOnScrollListener(new RecyclerView.OnScrollListener() {
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
int firstVisibleItem = mLayoutManager.findFirstVisibleItemPosition();
if (dy > 0) {
int visibleItemCount = mLayoutManager.getChildCount();
int totalItemCount = mLayoutManager.getItemCount();
if (firstVisibleItem + visibleItemCount == totalItemCount) {
if (!flag_loading) {
flag_loading = true;
viewModel.manage(GET_LIST_VIDEOS, playlist, null).observe(PlaylistsActivity.this, apiResponse -> manageVIewPlaylists(PlaylistsVM.action.GET_LIST_VIDEOS, apiResponse));
nextElementLoader.setVisibility(View.VISIBLE);
}
} else {
nextElementLoader.setVisibility(View.GONE);
}
}
}
});
swipeRefreshLayout.setOnRefreshListener(() -> {
max_id = null;
firstLoad = true;
flag_loading = true;
swiped = true;
viewModel.manage(GET_LIST_VIDEOS, playlist, null).observe(PlaylistsActivity.this, apiResponse -> manageVIewPlaylists(PlaylistsVM.action.GET_LIST_VIDEOS, apiResponse));
});
viewModel.manage(GET_LIST_VIDEOS, playlist, null).observe(PlaylistsActivity.this, apiResponse -> manageVIewPlaylists(PlaylistsVM.action.GET_LIST_VIDEOS, apiResponse));
} }
@ -143,45 +76,4 @@ public class PlaylistsActivity extends AppCompatActivity {
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
} }
public void manageVIewPlaylists(PlaylistsVM.action actionType, APIResponse apiResponse) {
mainLoader.setVisibility(View.GONE);
nextElementLoader.setVisibility(View.GONE);
if (apiResponse.getError() != null) {
Toasty.error(PlaylistsActivity.this, apiResponse.getError().getError(), Toast.LENGTH_LONG).show();
swipeRefreshLayout.setRefreshing(false);
swiped = false;
flag_loading = false;
return;
}
if (actionType == GET_LIST_VIDEOS) {
int previousPosition = this.peertubes.size();
List<VideoPlaylistData.VideoPlaylist> videoPlaylists = apiResponse.getVideoPlaylist();
List<Video> videos = new ArrayList<>();
for (VideoPlaylistData.VideoPlaylist v : videoPlaylists) {
videos.add(v.getVideo());
}
max_id = apiResponse.getMax_id();
flag_loading = (max_id == null);
if (!swiped && firstLoad && videos.size() == 0)
textviewNoAction.setVisibility(View.VISIBLE);
else
textviewNoAction.setVisibility(View.GONE);
if (swiped) {
if (previousPosition > 0) {
this.peertubes.subList(0, previousPosition).clear();
peertubeAdapter.notifyItemRangeRemoved(0, previousPosition);
}
swiped = false;
}
if (videos.size() > 0) {
this.peertubes.addAll(videos);
peertubeAdapter.notifyItemRangeInserted(previousPosition, videos.size());
}
swipeRefreshLayout.setRefreshing(false);
firstLoad = false;
}
}
} }

View File

@ -81,7 +81,7 @@ public class ShowAccountActivity extends AppCompatActivity {
private ViewPager mPager; private ViewPager mPager;
private TabLayout tabLayout; private TabLayout tabLayout;
private TextView account_note, subscriber_count; private TextView account_note, subscriber_count;
private List<Map<String, Boolean>> relationship; private Map<String, Boolean> relationship;
private ImageView account_pp; private ImageView account_pp;
private TextView account_dn; private TextView account_dn;
private Channel channel; private Channel channel;
@ -312,7 +312,7 @@ public class ShowAccountActivity extends AppCompatActivity {
} }
account_follow.setEnabled(true); account_follow.setEnabled(true);
boolean isFollowing = relationship.get(0).get(channel.getAcct()); boolean isFollowing = relationship.get(channel.getAcct());
if (isFollowing) { if (isFollowing) {
account_follow.setText(R.string.action_unfollow); account_follow.setText(R.string.action_unfollow);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

View File

@ -81,7 +81,7 @@ public class ShowChannelActivity extends AppCompatActivity {
private ViewPager mPager; private ViewPager mPager;
private TabLayout tabLayout; private TabLayout tabLayout;
private TextView account_note, subscriber_count; private TextView account_note, subscriber_count;
private List<Map<String, Boolean>> relationship; private Map<String, Boolean> relationship;
private ImageView account_pp; private ImageView account_pp;
private TextView account_dn; private TextView account_dn;
private Channel channel; private Channel channel;
@ -311,7 +311,7 @@ public class ShowChannelActivity extends AppCompatActivity {
} }
account_follow.setEnabled(true); account_follow.setEnabled(true);
boolean isFollowing = relationship.get(0).get(channel.getAcct()); boolean isFollowing = relationship.get(channel.getAcct());
if (isFollowing) { if (isFollowing) {
account_follow.setText(R.string.action_unfollow); account_follow.setText(R.string.action_unfollow);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@ -416,7 +416,7 @@ public class ShowChannelActivity extends AppCompatActivity {
if (position == 0) { if (position == 0) {
DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment(); DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment();
bundle = new Bundle(); bundle = new Bundle();
bundle.putSerializable("timelineType", TimelineVM.TimelineType.USER_VIDEOS); bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.USER_VIDEOS);
bundle.putString("channelId", channel.getAcct()); bundle.putString("channelId", channel.getAcct());
displayVideosFragment.setArguments(bundle); displayVideosFragment.setArguments(bundle);
return displayVideosFragment; return displayVideosFragment;

View File

@ -21,10 +21,11 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import app.fedilab.fedilabtube.fragment.DisplayVideosFragment; import app.fedilab.fedilabtube.fragment.DisplayVideosFragment;
import app.fedilab.fedilabtube.helper.Helper;
import app.fedilab.fedilabtube.viewmodel.TimelineVM; import app.fedilab.fedilabtube.viewmodel.TimelineVM;
public class MyVideosActivity extends AppCompatActivity { public class VideosTimelineActivity extends AppCompatActivity {
private TimelineVM.TimelineType type; private TimelineVM.TimelineType type;
@ -43,8 +44,6 @@ public class MyVideosActivity extends AppCompatActivity {
if (type == TimelineVM.TimelineType.MY_VIDEOS) { if (type == TimelineVM.TimelineType.MY_VIDEOS) {
setTitle(R.string.my_videos); setTitle(R.string.my_videos);
} else if (type == TimelineVM.TimelineType.SUBSCRIBTIONS) {
setTitle(R.string.subscriptions);
} else if (type == TimelineVM.TimelineType.HISTORY) { } else if (type == TimelineVM.TimelineType.HISTORY) {
setTitle(R.string.my_history); setTitle(R.string.my_history);
} else if (type == TimelineVM.TimelineType.MOST_LIKED) { } else if (type == TimelineVM.TimelineType.MOST_LIKED) {
@ -54,7 +53,7 @@ public class MyVideosActivity extends AppCompatActivity {
if (savedInstanceState == null) { if (savedInstanceState == null) {
DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment(); DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("type", type); bundle.putSerializable(Helper.TIMELINE_TYPE, type);
displayVideosFragment.setArguments(bundle); displayVideosFragment.setArguments(bundle);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(R.id.container, displayVideosFragment).commit(); ft.add(R.id.container, displayVideosFragment).commit();

View File

@ -49,7 +49,7 @@ public class APIResponse {
private List<NotificationData.Notification> peertubeNotifications = null; private List<NotificationData.Notification> peertubeNotifications = null;
private List<PlaylistData.Playlist> playlists = null; private List<PlaylistData.Playlist> playlists = null;
private List<String> domains = null; private List<String> domains = null;
private List<Map<String, Boolean>> relationships = null; private Map<String, Boolean> relationships = null;
private List<CaptionData.Caption> captions = null; private List<CaptionData.Caption> captions = null;
private Error error = null; private Error error = null;
private String since_id, max_id; private String since_id, max_id;
@ -152,11 +152,11 @@ public class APIResponse {
this.statusCode = statusCode; this.statusCode = statusCode;
} }
public List<Map<String, Boolean>> getRelationships() { public Map<String, Boolean> getRelationships() {
return relationships; return relationships;
} }
public void setRelationships(List<Map<String, Boolean>> relationships) { public void setRelationships(Map<String, Boolean> relationships) {
this.relationships = relationships; this.relationships = relationships;
} }

View File

@ -55,8 +55,9 @@ import retrofit2.http.Path;
import retrofit2.http.Query; import retrofit2.http.Query;
import retrofit2.http.QueryMap; import retrofit2.http.QueryMap;
@SuppressWarnings({"unused", "RedundantSuppression"})
public interface PeertubeService { public interface PeertubeService {
@GET("instances") @GET("instances")
Call<InstanceData> getInstances(@QueryMap Map<String, String> params, @Query("nsfwPolicy[]") String nsfwPolicy, @Query("categoriesOr[]") List<Integer> categories, @Query("languagesOr[]") List<String> languages); Call<InstanceData> getInstances(@QueryMap Map<String, String> params, @Query("nsfwPolicy[]") String nsfwPolicy, @Query("categoriesOr[]") List<Integer> categories, @Query("languagesOr[]") List<String> languages);
@ -116,7 +117,7 @@ public interface PeertubeService {
//Timelines Authenticated //Timelines Authenticated
//Subscriber timeline //Subscriber timeline
@GET("users/me/subscriptions/videos?sort=-publishedAt") @GET("users/me/subscriptions/videos?sort=-publishedAt")
Call<VideoData> getSubscriptionVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("languageOneOf") List<String> languageOneOf); Call<VideoData> getSubscriptionVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
//Overview videos //Overview videos
@GET("overviews/videos") @GET("overviews/videos")
@ -124,31 +125,31 @@ public interface PeertubeService {
//Most liked videos //Most liked videos
@GET("videos?sort=-likes") @GET("videos?sort=-likes")
Call<VideoData> getMostLikedVideos(@Query("start") String maxId, @Query("languageOneOf") List<String> languageOneOf); Call<VideoData> getMostLikedVideos(@Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
//Most liked videos //Most liked videos
@GET("videos?sort=-trending") @GET("videos?sort=-trending")
Call<VideoData> getTrendingVideos(@Query("start") String maxId, @Query("languageOneOf") List<String> languageOneOf); Call<VideoData> getTrendingVideos(@Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
//Recently added videos //Recently added videos
@GET("videos?sort=-publishedAt") @GET("videos?sort=-publishedAt")
Call<VideoData> getRecentlyAddedVideos(@Query("start") String maxId, @Query("languageOneOf") List<String> languageOneOf); Call<VideoData> getRecentlyAddedVideos(@Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
//Local videos //Local videos
@GET("videos?sort=-publishedAt&filter=local") @GET("videos?sort=-publishedAt&filter=local")
Call<VideoData> getLocalVideos(@Query("start") String maxId, @Query("languageOneOf") List<String> languageOneOf); Call<VideoData> getLocalVideos(@Query("start") String maxId, @Query("count") String count, @Query("languageOneOf") List<String> languageOneOf);
//History //History
@GET("users/me/history/videos") @GET("users/me/history/videos")
Call<VideoData> getHistory(@Header("Authorization") String credentials, @Query("start") String maxId); Call<VideoData> getHistory(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
//Search //Search
@GET("search/videos") @GET("search/videos")
Call<VideoData> searchVideos(@Query("search") String search, @Query("start") String maxId); Call<VideoData> searchVideos(@Query("search") String search, @Query("start") String maxId, @Query("count") String count);
//Get notifications //Get notifications
@GET("users/me/notifications") @GET("users/me/notifications")
Call<NotificationData> getNotifications(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("since_id") String sinceId); Call<NotificationData> getNotifications(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count, @Query("since_id") String sinceId);
//Get/Post/Update/Delete video //Get/Post/Update/Delete video
//Get a video //Get a video
@ -160,11 +161,11 @@ public interface PeertubeService {
//Get my video //Get my video
@GET("users/me/videos?sort=-publishedAt") @GET("users/me/videos?sort=-publishedAt")
Call<VideoData> getMyVideos(@Header("Authorization") String credentials, @Query("start") String maxId); Call<VideoData> getMyVideos(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
//Get my video //Get my video
@GET("accounts/{name}/videos?sort=-publishedAt") @GET("accounts/{name}/videos?sort=-publishedAt")
Call<VideoData.Video> getVideosForAccount(@Query("start") String maxId); Call<VideoData.Video> getVideosForAccount(@Query("start") String maxId, @Query("count") String count);
@Multipart @Multipart
@PUT("videos/{id}") @PUT("videos/{id}")
@ -211,7 +212,7 @@ public interface PeertubeService {
Call<ChannelData> getAllChannels(); Call<ChannelData> getAllChannels();
@GET("video-channels/{channelHandle}/videos") @GET("video-channels/{channelHandle}/videos")
Call<VideoData> getChannelVideos(@Path("channelHandle") String channelHandle, @Query("start") String maxId); Call<VideoData> getChannelVideos(@Path("channelHandle") String channelHandle, @Query("start") String maxId, @Query("count") String count);
@POST("video-channels") @POST("video-channels")
Call<ChannelData.ChannelCreation> addChannel(@Header("Authorization") String credentials, @Body ChannelParams channelParams); Call<ChannelData.ChannelCreation> addChannel(@Header("Authorization") String credentials, @Body ChannelParams channelParams);
@ -235,10 +236,10 @@ public interface PeertubeService {
Call<PlaylistData.Playlist> getPlaylist(@Path("id") String id); Call<PlaylistData.Playlist> getPlaylist(@Path("id") String id);
@GET("video-playlists/{id}/videos") @GET("video-playlists/{id}/videos")
Call<VideoPlaylistData> getVideosPlayList(@Header("Authorization") String credentials, @Path("id") String id); Call<VideoPlaylistData> getVideosPlayList(@Header("Authorization") String credentials, @Path("id") String id, @Query("start") String maxId, @Query("count") String count);
@GET("users/me/video-playlists/videos-exist") @GET("users/me/video-playlists/videos-exist")
Call<Map<String, List<PlaylistExist>>> getVideoExistsInPlaylist(@Header("Authorization") String credentials, @Query("videoIds") String videoIds); Call<Map<String, List<PlaylistExist>>> getVideoExistsInPlaylist(@Header("Authorization") String credentials, @Query("videoIds") List<String> videoIds);
@Multipart @Multipart
@POST("video-playlists") @POST("video-playlists")
@ -287,13 +288,10 @@ public interface PeertubeService {
//Subscribe/Unsubscribe //Subscribe/Unsubscribe
//subscribers //subscribers
@GET("users/me/subscriptions") @GET("users/me/subscriptions")
Call<AccountData> getSubscription(@Header("Authorization") String credentials, @Query("start") String maxId); Call<AccountData> getSubscription(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
@GET("users/me/subscriptions/exist") @GET("users/me/subscriptions/exist")
Call<List<Map<String, Boolean>>> getSubscriptionsExist(@Header("Authorization") String credentials, @Query("uris") List<String> uris); Call<Map<String, Boolean>> getSubscriptionsExist(@Header("Authorization") String credentials, @Query("uris") List<String> uris);
@GET("users/me/subscriptions/exist")
Call<Map<String, Boolean>> getSubscriptionExists(@Header("Authorization") String credentials, @Query("uris") String uris);
@FormUrlEncoded @FormUrlEncoded
@POST("users/me/subscriptions") @POST("users/me/subscriptions")
@ -305,7 +303,7 @@ public interface PeertubeService {
//Mute/Unmute //Mute/Unmute
//Muted accounts //Muted accounts
@GET("users/me/blocklist/accounts") @GET("users/me/blocklist/accounts")
Call<BlockData> getMuted(@Header("Authorization") String credentials, @Query("start") String maxId); Call<BlockData> getMuted(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
@FormUrlEncoded @FormUrlEncoded
@POST("users/me/blocklist/accounts") @POST("users/me/blocklist/accounts")
@ -327,7 +325,7 @@ public interface PeertubeService {
//Comment //Comment
@GET("videos/{id}/comment-threads") @GET("videos/{id}/comment-threads")
Call<CommentData> getComments(@Path("id") String id, @Query("start") String maxId); Call<CommentData> getComments(@Path("id") String id, @Query("start") String maxId, @Query("count") String count);
@GET("videos/{id}/comment-threads/{threadId}") @GET("videos/{id}/comment-threads/{threadId}")
Call<CommentData> getReplies(@Path("id") String id, @Path("threadId") String threadId); Call<CommentData> getReplies(@Path("id") String id, @Path("threadId") String threadId);

View File

@ -78,6 +78,7 @@ import retrofit2.Response;
import retrofit2.Retrofit; import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.gson.GsonConverterFactory;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class RetrofitPeertubeAPI { public class RetrofitPeertubeAPI {
private String finalUrl; private String finalUrl;
@ -85,11 +86,14 @@ public class RetrofitPeertubeAPI {
private String instance; private String instance;
private String token; private String token;
private Set<String> selection; private Set<String> selection;
private String count = String.valueOf(Helper.VIDEOS_PER_PAGE);
public RetrofitPeertubeAPI(Context context) { public RetrofitPeertubeAPI(Context context) {
_context = context; _context = context;
instance = Helper.getLiveInstance(context); instance = Helper.getLiveInstance(context);
finalUrl = "https://" + Helper.getLiveInstance(context) + "/api/v1/"; finalUrl = "https://" + Helper.getLiveInstance(context) + "/api/v1/";
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE));
} }
public RetrofitPeertubeAPI(Context context, String instance, String token) { public RetrofitPeertubeAPI(Context context, String instance, String token) {
@ -97,6 +101,8 @@ public class RetrofitPeertubeAPI {
this.instance = instance; this.instance = instance;
this.token = token; this.token = token;
finalUrl = "https://" + instance + "/api/v1/"; finalUrl = "https://" + instance + "/api/v1/";
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE));
} }
public static void updateCredential(Activity activity, String token, String client_id, String client_secret, String refresh_token, String host) { public static void updateCredential(Activity activity, String token, String client_id, String client_secret, String refresh_token, String host) {
@ -231,7 +237,8 @@ public class RetrofitPeertubeAPI {
public APIResponse getNotifications(String max_id, String since_id) { public APIResponse getNotifications(String max_id, String since_id) {
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<NotificationData> notificationsCall = peertubeService.getNotifications("Bearer " + token, max_id, since_id);
Call<NotificationData> notificationsCall = peertubeService.getNotifications("Bearer " + token, max_id, "20", since_id);
try { try {
Response<NotificationData> response = notificationsCall.execute(); Response<NotificationData> response = notificationsCall.execute();
if (response.isSuccessful() && response.body() != null) { if (response.isSuccessful() && response.body() != null) {
@ -284,7 +291,7 @@ public class RetrofitPeertubeAPI {
public APIResponse getVideosForChannel(String channelId, String max_id) { public APIResponse getVideosForChannel(String channelId, String max_id) {
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<VideoData> videoCall = peertubeService.getChannelVideos(channelId, max_id); Call<VideoData> videoCall = peertubeService.getChannelVideos(channelId, max_id, count);
if (videoCall != null) { if (videoCall != null) {
try { try {
Response<VideoData> response = videoCall.execute(); Response<VideoData> response = videoCall.execute();
@ -310,25 +317,25 @@ public class RetrofitPeertubeAPI {
ArrayList<String> filter = selection != null ? new ArrayList<>(selection) : null; ArrayList<String> filter = selection != null ? new ArrayList<>(selection) : null;
switch (timelineType) { switch (timelineType) {
case MY_VIDEOS: case MY_VIDEOS:
videoCall = peertubeService.getMyVideos(getToken(), max_id); videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
break; break;
case SUBSCRIBTIONS: case SUBSCRIBTIONS:
videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, filter); videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter);
break; break;
case MOST_LIKED: case MOST_LIKED:
videoCall = peertubeService.getMostLikedVideos(max_id, filter); videoCall = peertubeService.getMostLikedVideos(max_id, count, filter);
break; break;
case LOCAL: case LOCAL:
videoCall = peertubeService.getLocalVideos(max_id, filter); videoCall = peertubeService.getLocalVideos(max_id, count, filter);
break; break;
case TRENDING: case TRENDING:
videoCall = peertubeService.getTrendingVideos(max_id, filter); videoCall = peertubeService.getTrendingVideos(max_id, count, filter);
break; break;
case HISTORY: case HISTORY:
videoCall = peertubeService.getHistory(getToken(), max_id); videoCall = peertubeService.getHistory(getToken(), max_id, count);
break; break;
case RECENT: case RECENT:
videoCall = peertubeService.getRecentlyAddedVideos(max_id, filter); videoCall = peertubeService.getRecentlyAddedVideos(max_id, count, filter);
break; break;
} }
if (videoCall != null) { if (videoCall != null) {
@ -378,21 +385,19 @@ public class RetrofitPeertubeAPI {
/** /**
* Check if users via their uris are following the authenticated user * Retrieves playlists for a video *synchronously*
* *
* @param uris List<String> * @param videoIds List<String> ids of videos
* @return APIResponse * @return APIResponse
*/ */
public APIResponse isFollowing(String uris) { public APIResponse getVideosExist(List<String> videoIds) {
APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<Map<String, Boolean>> followingCall = peertubeService.getSubscriptionExists(getToken(), uris); APIResponse apiResponse = new APIResponse();
try { try {
Response<Map<String, Boolean>> response = followingCall.execute(); Call<Map<String, List<PlaylistExist>>> videoExistsInPlaylist = peertubeService.getVideoExistsInPlaylist(getToken(), videoIds);
if (response.isSuccessful()) { Response<Map<String, List<PlaylistExist>>> response = videoExistsInPlaylist.execute();
List<Map<String, Boolean>> relations = new ArrayList<>(); if (response.isSuccessful() && response.body() != null) {
relations.add(response.body()); apiResponse.setVideoExistPlaylist(response.body());
apiResponse.setRelationships(relations);
} else { } else {
setError(apiResponse, response.code(), response.errorBody()); setError(apiResponse, response.code(), response.errorBody());
} }
@ -402,6 +407,7 @@ public class RetrofitPeertubeAPI {
return apiResponse; return apiResponse;
} }
/** /**
* Check if users via their uris are following the authenticated user * Check if users via their uris are following the authenticated user
* *
@ -411,9 +417,9 @@ public class RetrofitPeertubeAPI {
public APIResponse areFollowing(List<String> uris) { public APIResponse areFollowing(List<String> uris) {
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<List<Map<String, Boolean>>> followingCall = peertubeService.getSubscriptionsExist(getToken(), uris); Call<Map<String, Boolean>> followingCall = peertubeService.getSubscriptionsExist(getToken(), uris);
try { try {
Response<List<Map<String, Boolean>>> response = followingCall.execute(); Response<Map<String, Boolean>> response = followingCall.execute();
if (response.isSuccessful()) { if (response.isSuccessful()) {
apiResponse.setRelationships(response.body()); apiResponse.setRelationships(response.body());
} else { } else {
@ -543,10 +549,14 @@ public class RetrofitPeertubeAPI {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
String lang = null; String lang = Locale.getDefault().getLanguage();
if (PeertubeInformation.langueMapped.containsKey(Locale.getDefault().getLanguage())) if (lang.contains("-")) {
lang = PeertubeInformation.langueMapped.get(Locale.getDefault().getLanguage()); if (!lang.split("-")[0].trim().toLowerCase().startsWith("zh")) {
lang = lang.split("-")[0];
} else {
lang = lang.split("-")[0] + "-" + lang.split("-")[1].toUpperCase();
}
}
Call<Map<String, String>> translations = initTranslation().getTranslations(lang); Call<Map<String, String>> translations = initTranslation().getTranslations(lang);
try { try {
Response<Map<String, String>> response = translations.execute(); Response<Map<String, String>> response = translations.execute();
@ -556,7 +566,23 @@ public class RetrofitPeertubeAPI {
Error error = new Error(); Error error = new Error();
error.setStatusCode(response.code()); error.setStatusCode(response.code());
if (response.errorBody() != null) { if (response.errorBody() != null) {
error.setError(response.errorBody().string()); translations = initTranslation().getTranslations("en");
try {
response = translations.execute();
if (response.isSuccessful()) {
peertubeInformation.setTranslations(response.body());
} else {
error = new Error();
error.setStatusCode(response.code());
if (response.errorBody() != null) {
error.setError(response.errorBody().string());
} else {
error.setError(_context.getString(R.string.toast_error));
}
}
} catch (IOException e) {
e.printStackTrace();
}
} else { } else {
error.setError(_context.getString(R.string.toast_error)); error.setError(_context.getString(R.string.toast_error));
} }
@ -610,7 +636,7 @@ public class RetrofitPeertubeAPI {
*/ */
public APIResponse searchPeertube(String query, String max_id) { public APIResponse searchPeertube(String query, String max_id) {
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<VideoData> searchVideosCall = peertubeService.searchVideos(query, max_id); Call<VideoData> searchVideosCall = peertubeService.searchVideos(query, max_id, count);
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
try { try {
Response<VideoData> response = searchVideosCall.execute(); Response<VideoData> response = searchVideosCall.execute();
@ -815,7 +841,7 @@ public class RetrofitPeertubeAPI {
*/ */
public APIResponse getMuted(String maxId) { public APIResponse getMuted(String maxId) {
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<BlockData> accountDataCall = peertubeService.getMuted("Bearer " + token, maxId); Call<BlockData> accountDataCall = peertubeService.getMuted("Bearer " + token, maxId, count);
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
if (accountDataCall != null) { if (accountDataCall != null) {
try { try {
@ -843,7 +869,7 @@ public class RetrofitPeertubeAPI {
*/ */
public APIResponse getSubscribtions(String maxId) { public APIResponse getSubscribtions(String maxId) {
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
Call<AccountData> accountDataCall = peertubeService.getSubscription("Bearer " + token, maxId); Call<AccountData> accountDataCall = peertubeService.getSubscription("Bearer " + token, maxId, count);
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
if (accountDataCall != null) { if (accountDataCall != null) {
try { try {
@ -1054,30 +1080,6 @@ public class RetrofitPeertubeAPI {
} }
/**
* Retrieves playlists for a video *synchronously*
*
* @param videoIds List<String> ids of videos
* @return APIResponse
*/
public APIResponse getVideosExist(String videoIds) {
PeertubeService peertubeService = init();
APIResponse apiResponse = new APIResponse();
try {
Call<Map<String, List<PlaylistExist>>> videoExistsInPlaylist = peertubeService.getVideoExistsInPlaylist(getToken(), videoIds);
Response<Map<String, List<PlaylistExist>>> response = videoExistsInPlaylist.execute();
if (response.isSuccessful() && response.body() != null) {
apiResponse.setVideoExistPlaylist(response.body());
} else {
setError(apiResponse, response.code(), response.errorBody());
}
} catch (IOException e) {
e.printStackTrace();
}
return apiResponse;
}
/** /**
* Retrieves playlist *synchronously* * Retrieves playlist *synchronously*
* *
@ -1086,12 +1088,11 @@ public class RetrofitPeertubeAPI {
* @param videoId String id of the video * @param videoId String id of the video
* @return APIResponse * @return APIResponse
*/ */
public APIResponse playlistAction(PlaylistsVM.action type, String playlistId, String videoId, String acct) { public APIResponse playlistAction(PlaylistsVM.action type, String playlistId, String videoId, String acct, String max_id) {
PeertubeService peertubeService = init(); PeertubeService peertubeService = init();
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
try { try {
if (type == PlaylistsVM.action.GET_PLAYLIST_INFO) { if (type == PlaylistsVM.action.GET_PLAYLIST_INFO) {
Call<PlaylistData.Playlist> playlistCall = peertubeService.getPlaylist(playlistId); Call<PlaylistData.Playlist> playlistCall = peertubeService.getPlaylist(playlistId);
Response<PlaylistData.Playlist> response = playlistCall.execute(); Response<PlaylistData.Playlist> response = playlistCall.execute();
@ -1109,10 +1110,11 @@ public class RetrofitPeertubeAPI {
if (response.isSuccessful() && response.body() != null) { if (response.isSuccessful() && response.body() != null) {
apiResponse.setPlaylists(response.body().data); apiResponse.setPlaylists(response.body().data);
} else { } else {
setError(apiResponse, response.code(), response.errorBody()); setError(apiResponse, response.code(), response.errorBody());
} }
} else if (type == PlaylistsVM.action.GET_LIST_VIDEOS) { } else if (type == PlaylistsVM.action.GET_LIST_VIDEOS) {
Call<VideoPlaylistData> videosPlayList = peertubeService.getVideosPlayList(getToken(), playlistId); Call<VideoPlaylistData> videosPlayList = peertubeService.getVideosPlayList(getToken(), playlistId, max_id, count);
Response<VideoPlaylistData> response = videosPlayList.execute(); Response<VideoPlaylistData> response = videosPlayList.execute();
if (response.isSuccessful() && response.body() != null) { if (response.isSuccessful() && response.body() != null) {
apiResponse.setVideoPlaylist(response.body().data); apiResponse.setVideoPlaylist(response.body().data);
@ -1178,7 +1180,7 @@ public class RetrofitPeertubeAPI {
APIResponse apiResponse = new APIResponse(); APIResponse apiResponse = new APIResponse();
try { try {
if (type == CommentVM.action.GET_THREAD) { if (type == CommentVM.action.GET_THREAD) {
Call<CommentData> commentsCall = peertubeService.getComments(videoId, max_id); Call<CommentData> commentsCall = peertubeService.getComments(videoId, max_id, count);
Response<CommentData> response = commentsCall.execute(); Response<CommentData> response = commentsCall.execute();
if (response.isSuccessful() && response.body() != null) { if (response.isSuccessful() && response.body() != null) {
apiResponse.setComments(response.body().data); apiResponse.setComments(response.body().data);

View File

@ -25,7 +25,7 @@ import java.util.List;
import app.fedilab.fedilabtube.client.entities.Avatar; import app.fedilab.fedilabtube.client.entities.Avatar;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class AccountData { public class AccountData {
@SerializedName("total") @SerializedName("total")

View File

@ -19,6 +19,7 @@ import com.google.gson.annotations.SerializedName;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class BlockData { public class BlockData {
@SerializedName("total") @SerializedName("total")

View File

@ -20,7 +20,7 @@ import java.util.List;
import app.fedilab.fedilabtube.client.entities.ItemStr; import app.fedilab.fedilabtube.client.entities.ItemStr;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class CaptionData { public class CaptionData {
@SerializedName("total") @SerializedName("total")

View File

@ -27,7 +27,7 @@ import app.fedilab.fedilabtube.client.entities.Avatar;
import app.fedilab.fedilabtube.client.entities.ItemStr; import app.fedilab.fedilabtube.client.entities.ItemStr;
import app.fedilab.fedilabtube.client.entities.ViewsPerDay; import app.fedilab.fedilabtube.client.entities.ViewsPerDay;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class ChannelData { public class ChannelData {
@SerializedName("total") @SerializedName("total")

View File

@ -19,7 +19,7 @@ import com.google.gson.annotations.SerializedName;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class CommentData { public class CommentData {
@SerializedName("total") @SerializedName("total")

View File

@ -7,7 +7,7 @@ import com.google.gson.annotations.SerializedName;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class InstanceData { public class InstanceData {
@SerializedName("total") @SerializedName("total")

View File

@ -23,7 +23,7 @@ import app.fedilab.fedilabtube.client.entities.VideoBlacklist;
* *
* You should have received a copy of the GNU General Public License along with TubeLab; if not, * You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */ * see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class NotificationData { public class NotificationData {
@SerializedName("total") @SerializedName("total")

View File

@ -24,7 +24,7 @@ import java.util.List;
import app.fedilab.fedilabtube.client.entities.Item; import app.fedilab.fedilabtube.client.entities.Item;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class PlaylistData { public class PlaylistData {
@SerializedName("total") @SerializedName("total")

View File

@ -30,11 +30,12 @@ import app.fedilab.fedilabtube.client.data.AccountData.Account;
import app.fedilab.fedilabtube.client.entities.File; import app.fedilab.fedilabtube.client.entities.File;
import app.fedilab.fedilabtube.client.entities.Item; import app.fedilab.fedilabtube.client.entities.Item;
import app.fedilab.fedilabtube.client.entities.ItemStr; import app.fedilab.fedilabtube.client.entities.ItemStr;
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
import app.fedilab.fedilabtube.client.entities.StreamingPlaylists; import app.fedilab.fedilabtube.client.entities.StreamingPlaylists;
import app.fedilab.fedilabtube.helper.Helper; import app.fedilab.fedilabtube.helper.Helper;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class VideoData { public class VideoData {
@SerializedName("total") @SerializedName("total")
@ -129,6 +130,7 @@ public class VideoData {
private boolean hasTitle = false; private boolean hasTitle = false;
private String title; private String title;
private titleType titleType; private titleType titleType;
private List<PlaylistExist> playlistExists;
public Video() { public Video() {
} }
@ -182,24 +184,34 @@ public class VideoData {
public String getFileUrl(String resolution, Context context) { public String getFileUrl(String resolution, Context context) {
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
boolean streamService = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL) == Helper.VIDEO_MODE_STREAMING; boolean streamService = sharedpreferences.getInt(Helper.SET_VIDEO_MODE, Helper.VIDEO_MODE_NORMAL) == Helper.VIDEO_MODE_STREAMING;
if (resolution != null) { if (files != null && files.size() > 0) {
for (File file : files) { if (resolution != null) {
if (file.getResolutions().getLabel().compareTo(resolution) == 0) { for (File file : files) {
if (streamService) { if (file.getResolutions().getLabel().compareTo(resolution) == 0) {
return file.getMagnetUri(); if (streamService) {
} else { return file.getMagnetUri();
return file.getFileUrl(); } else {
return file.getFileUrl();
}
} }
} }
} }
} File file = Helper.defaultFile(context, files);
if (streamService) { if (file != null) {
return Helper.defaultFile(context, files).getMagnetUri(); if (streamService) {
} else { return file.getMagnetUri();
return Helper.defaultFile(context, files).getFileUrl(); } else {
return file.getFileUrl();
}
} else {
return null;
}
} else if (streamingPlaylists != null && streamingPlaylists.size() > 0) {
return streamingPlaylists.get(0).getPlaylistUrl();
} }
return null;
} }
public String getTorrentUrl(String resolution, Context context) { public String getTorrentUrl(String resolution, Context context) {
@ -545,6 +557,14 @@ public class VideoData {
this.titleType = titleType; this.titleType = titleType;
} }
public List<PlaylistExist> getPlaylistExists() {
return playlistExists;
}
public void setPlaylistExists(List<PlaylistExist> playlistExists) {
this.playlistExists = playlistExists;
}
@Override @Override
public int describeContents() { public int describeContents() {
return 0; return 0;

View File

@ -20,7 +20,7 @@ import com.google.gson.annotations.SerializedName;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class VideoPlaylistData { public class VideoPlaylistData {
@SerializedName("total") @SerializedName("total")

View File

@ -14,7 +14,7 @@ package app.fedilab.fedilabtube.client.entities;
* *
* You should have received a copy of the GNU General Public License along with TubeLab; if not, * You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */ * see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class AccountCreation { public class AccountCreation {
private String username; private String username;

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Actor { public class Actor {
@SerializedName("type") @SerializedName("type")
private String type; private String type;

View File

@ -16,7 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class ActorFollow { public class ActorFollow {
@SerializedName("id") @SerializedName("id")

View File

@ -21,7 +21,7 @@ import java.util.Date;
* *
* You should have received a copy of the GNU General Public License along with TubeLab; if not, * You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */ * see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class Avatar implements Parcelable { public class Avatar implements Parcelable {

View File

@ -16,7 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class CaptionsParams { public class CaptionsParams {
@SerializedName("captionLanguage") @SerializedName("captionLanguage")

View File

@ -16,7 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class ChannelParams { public class ChannelParams {
@SerializedName("displayName") @SerializedName("displayName")

View File

@ -22,6 +22,7 @@ import android.widget.Toast;
import app.fedilab.fedilabtube.R; import app.fedilab.fedilabtube.R;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Error extends Throwable { public class Error extends Throwable {
private String error = null; private String error = null;

View File

@ -3,7 +3,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class File { public class File {
@SerializedName("fileDownloadUrl") @SerializedName("fileDownloadUrl")

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import java.util.List; import java.util.List;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class InstanceParams { public class InstanceParams {
private boolean healthy = true; private boolean healthy = true;

View File

@ -19,6 +19,7 @@ import android.os.Parcelable;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Item implements Parcelable { public class Item implements Parcelable {
public static final Parcelable.Creator<Item> CREATOR = new Parcelable.Creator<Item>() { public static final Parcelable.Creator<Item> CREATOR = new Parcelable.Creator<Item>() {

View File

@ -19,7 +19,7 @@ import android.os.Parcelable;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class ItemStr implements Parcelable { public class ItemStr implements Parcelable {
public static final Creator<ItemStr> CREATOR = new Creator<ItemStr>() { public static final Creator<ItemStr> CREATOR = new Creator<ItemStr>() {

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class NotificationSettings { public class NotificationSettings {
@SerializedName("abuseAsModerator") @SerializedName("abuseAsModerator")

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Oauth { public class Oauth {
@SerializedName("client_id") @SerializedName("client_id")

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class OauthParams { public class OauthParams {

View File

@ -21,7 +21,7 @@ import java.util.List;
import app.fedilab.fedilabtube.client.data.ChannelData.Channel; import app.fedilab.fedilabtube.client.data.ChannelData.Channel;
import app.fedilab.fedilabtube.client.data.VideoData.Video; import app.fedilab.fedilabtube.client.data.VideoData.Video;
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused", "RedundantSuppression"})
public class OverviewVideo { public class OverviewVideo {
@SerializedName("categories") @SerializedName("categories")

View File

@ -14,33 +14,11 @@ package app.fedilab.fedilabtube.client.entities;
* You should have received a copy of the GNU General Public License along with TubeLab; if not, * You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */ * see <http://www.gnu.org/licenses>. */
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class PeertubeInformation { public class PeertubeInformation {
public static final Map<String, String> langueMapped;
static {
Map<String, String> aMap = new LinkedHashMap<>();
aMap.put("ca", "ca-ES");
aMap.put("de", "de-DE");
aMap.put("en", "en-US");
aMap.put("es", "es-ES");
aMap.put("eo", "eo");
aMap.put("eu", "eu-ES");
aMap.put("fr", "fr-FR");
aMap.put("oc", "oc");
aMap.put("pt", "pt-BR");
aMap.put("sv", "sv-SE");
aMap.put("cs", "cs-CZ");
aMap.put("zh-CN", "zh-Hans-CN");
aMap.put("zh-TW", "zh-Hans-TW");
langueMapped = aMap;
}
private Map<Integer, String> categories; private Map<Integer, String> categories;
private Map<String, String> languages; private Map<String, String> languages;
private Map<Integer, String> licences; private Map<Integer, String> licences;

View File

@ -17,6 +17,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class PlaylistParams { public class PlaylistParams {
@SerializedName("displayName") @SerializedName("displayName")

View File

@ -16,7 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class Rating { public class Rating {
@SerializedName("videoId") @SerializedName("videoId")

View File

@ -18,7 +18,7 @@ import java.util.List;
* *
* You should have received a copy of the GNU General Public License along with TubeLab; if not, * You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */ * see <http://www.gnu.org/licenses>. */
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class Report { public class Report {
@SerializedName("reason") @SerializedName("reason")

View File

@ -18,7 +18,7 @@ import com.google.gson.annotations.SerializedName;
import java.util.List; import java.util.List;
@SuppressWarnings("unused") @SuppressWarnings({"unused", "RedundantSuppression"})
public class StreamingPlaylists { public class StreamingPlaylists {
@SerializedName("id") @SerializedName("id")

View File

@ -16,6 +16,7 @@ package app.fedilab.fedilabtube.client.entities;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class Token { public class Token {
@SerializedName("access_token") @SerializedName("access_token")

View File

@ -22,6 +22,7 @@ import java.util.List;
import app.fedilab.fedilabtube.client.data.AccountData.Account; import app.fedilab.fedilabtube.client.data.AccountData.Account;
import app.fedilab.fedilabtube.client.data.ChannelData; import app.fedilab.fedilabtube.client.data.ChannelData;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class UserMe { public class UserMe {
@SerializedName("account") @SerializedName("account")

View File

@ -18,6 +18,7 @@ import com.google.gson.annotations.SerializedName;
import app.fedilab.fedilabtube.client.data.VideoData; import app.fedilab.fedilabtube.client.data.VideoData;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class VideoAbuse { public class VideoAbuse {
@SerializedName("id") @SerializedName("id")

View File

@ -18,6 +18,7 @@ import com.google.gson.annotations.SerializedName;
import app.fedilab.fedilabtube.client.data.VideoData; import app.fedilab.fedilabtube.client.data.VideoData;
@SuppressWarnings({"unused", "RedundantSuppression"})
public class VideoBlacklist { public class VideoBlacklist {
@SerializedName("id") @SerializedName("id")

Some files were not shown because too many files have changed in this diff Show More