mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-06-05 21:09:11 +02:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
62af5c54aa | |||
5872f5c99f | |||
2b1a63e08b | |||
7b96cf32b3 | |||
6108bd143c | |||
0127b9bffa | |||
8dddfc5497 | |||
bf119a5808 | |||
89ade69c5f | |||
93eaec8544 | |||
ce984de339 | |||
b089ae93e1 | |||
fc95708a84 | |||
7262690999 | |||
f818c74943 | |||
d7c5a04965 | |||
257a00fa1e | |||
23875a2ceb | |||
3f1883fbbc | |||
c5269a3129 | |||
056092ac71 | |||
fd7632f001 | |||
fb83a1927d |
@ -10,8 +10,8 @@ android {
|
|||||||
|
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 14
|
versionCode 16
|
||||||
versionName "1.3.0"
|
versionName "1.4.1"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ dependencies {
|
|||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
implementation 'androidx.preference:preference:1.1.1'
|
implementation 'androidx.preference:preference:1.1.1'
|
||||||
implementation 'com.google.android.material:material:1.2.1'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
|
||||||
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||||
implementation 'androidx.navigation:navigation-fragment:2.3.0'
|
implementation 'androidx.navigation:navigation-fragment:2.3.0'
|
||||||
implementation "androidx.fragment:fragment:1.2.5"
|
implementation "androidx.fragment:fragment:1.2.5"
|
||||||
@ -119,5 +119,8 @@ dependencies {
|
|||||||
implementation 'com.github.ybq:Android-SpinKit:1.4.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'
|
||||||
|
implementation 'com.github.mancj:MaterialSearchBar:0.8.5'
|
||||||
|
|
||||||
|
implementation "io.github.kobakei:ratethisapp:1.2.0"
|
||||||
|
|
||||||
}
|
}
|
@ -1,21 +1,35 @@
|
|||||||
<resources>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name" translatable="false">TubeAcad</string>
|
<string name="app_name" translatable="false">TubeAcad</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_language_choice" translatable="false">set_video_language_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="title_home">Locale</string>
|
<string name="title_home">Locale</string>
|
||||||
<string name="title_local">Locale</string>
|
<string name="title_local">Locale</string>
|
||||||
<string name="title_discover">Découvrir</string>
|
<string name="title_discover">Découvrir</string>
|
||||||
<string name="title_notifications">Notifications</string>
|
<string name="title_notifications">Notifications</string>
|
||||||
<string name="title_instances">Instances</string>
|
|
||||||
<string name="title_recently_added">Nouveautés</string>
|
<string name="title_recently_added">Nouveautés</string>
|
||||||
<string name="title_trending">Tendances</string>
|
<string name="title_trending">Tendances</string>
|
||||||
<string name="title_account">Compte</string>
|
|
||||||
<string name="title_most_liked">Plus aimées</string>
|
<string name="title_most_liked">Plus aimées</string>
|
||||||
<string name="toast_error">Une erreur s\'est produite !</string>
|
<string name="toast_error">Une erreur s\'est produite !</string>
|
||||||
|
<string name="title_muted">Sourdine</string>
|
||||||
|
<string name="title_channel">Chaînes</string>
|
||||||
|
<string name="do_not_list">Ne pas lister</string>
|
||||||
|
<string name="blur">Estomper</string>
|
||||||
|
<string name="display">Afficher</string>
|
||||||
|
<string name="no_opinion">Pas d\'opinion</string>
|
||||||
|
<string name="instance_choice">Choisissez une instance</string>
|
||||||
|
<string name="not_valide_instance">Cette instance ne semble pas être valide !</string>
|
||||||
<string name="no_videos">Aucune vidéo !</string>
|
<string name="no_videos">Aucune vidéo !</string>
|
||||||
|
<string name="no_notifications">Aucune notification !</string>
|
||||||
<string name="favicon">Favicon</string>
|
<string name="favicon">Favicon</string>
|
||||||
<string name="open_with">Ouvrir avec</string>
|
<string name="open_with">Ouvrir avec</string>
|
||||||
|
<string name="action_playlist_edit">Modifier une liste de lecture</string>
|
||||||
<string name="close">Fermer</string>
|
<string name="close">Fermer</string>
|
||||||
<string name="upload_video">Téléverser</string>
|
<string name="upload_video">Téléverser</string>
|
||||||
<string name="bookmark_peertube_empty">Il n’y a aucune vidéo Peertube dans vos favoris !</string>
|
|
||||||
<string name="image_preview">Aperçu de l\'image</string>
|
<string name="image_preview">Aperçu de l\'image</string>
|
||||||
<string name="file_to_upload">Sélectionnez un fichier à transférer</string>
|
<string name="file_to_upload">Sélectionnez un fichier à transférer</string>
|
||||||
<string name="channel">Chaîne</string>
|
<string name="channel">Chaîne</string>
|
||||||
@ -26,144 +40,120 @@
|
|||||||
<string name="cancel">Annuler</string>
|
<string name="cancel">Annuler</string>
|
||||||
<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>
|
||||||
<!-- Date -->
|
<string name="remove_from_playlist">Supprimer de la liste de lecture</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>
|
||||||
<string name="date_day">%d j</string>
|
<string name="date_day">%d j</string>
|
||||||
|
|
||||||
<string name="number_view_video">%s vues</string>
|
<string name="number_view_video">%s vues</string>
|
||||||
<string name="duration_video">Durée : %s</string>
|
<string name="title_instance_login">Domaine de l\'instance</string>
|
||||||
|
|
||||||
<string name="toot_select_image_error">Une erreur s’est produite lors de la sélection du média !</string>
|
|
||||||
|
|
||||||
|
|
||||||
<string name="uploading">Transfert en cours, veuillez patienter …</string>
|
<string name="uploading">Transfert en cours, veuillez patienter …</string>
|
||||||
<string name="upload_video_success">La vidéo a été transférée !</string>
|
<string name="upload_video_success">La vidéo a été transférée !</string>
|
||||||
<string name="toast_cancelled">Transfert annulé !</string>
|
<string name="toast_cancelled">Transfert annulé !</string>
|
||||||
<string name="video_uploaded_action">Cliquez ici pour éditer les données de la vidéo.</string>
|
<string name="video_uploaded_action">Cliquez ici pour éditer les données de la vidéo.</string>
|
||||||
<string name="toot_select_image">Sélectionnez un média</string>
|
<string name="toot_select_image_error">Une erreur s’est produite lors de la sélection du média !</string>
|
||||||
<string name="download_file">Télécharger %1$s</string>
|
<string name="download_file">Télécharger %1$s</string>
|
||||||
|
<string name="action_privacy">Confidentialité</string>
|
||||||
|
<string name="action_logout">Déconnexion</string>
|
||||||
<string name="delete_video_confirmation">Êtes-vous sûr de vouloir supprimer cette vidéo ?</string>
|
<string name="login">Connexion</string>
|
||||||
<string name="toast_peertube_video_updated">La vidéo a été mise à jour !</string>
|
<string name="password">Mot de passe</string>
|
||||||
|
<string name="email">Courriel</string>
|
||||||
|
<string name="tags">Étiquettes</string>
|
||||||
|
<string name="validate">Valider</string>
|
||||||
|
<string name="share_with">Partager avec</string>
|
||||||
|
<string name="shared_via">Partagé via TubeLab</string>
|
||||||
|
<string name="username">Nom d’utilisateur</string>
|
||||||
|
<string name="settings">Paramètres</string>
|
||||||
|
<string name="logout_account_confirmation">Voulez-vous vraiment déconnecter le compte @%1$s@%2$s ?</string>
|
||||||
|
<string name="following">Suit</string>
|
||||||
|
<string name="followers">Abonné·e·s</string>
|
||||||
|
<string name="client_error">Impossible d’obtenir l’id du client !</string>
|
||||||
|
<string name="toast_error_loading_account">Une erreur s’est produite pendant le chargement du compte !</string>
|
||||||
|
<string name="toast_error_search">Une erreur s’est produite lors de la recherche !</string>
|
||||||
|
<string name="nothing_to_do">Aucune action ne peut être réalisée</string>
|
||||||
|
<string name="action_follow">S\'abonner</string>
|
||||||
|
<string name="action_mute">Mettre en sourdine</string>
|
||||||
|
<string name="search">Chercher</string>
|
||||||
|
<string name="delete">Supprimer</string>
|
||||||
|
<string name="action_lists_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette liste de lecture ?</string>
|
||||||
|
<string name="action_lists_delete">Supprimer la liste de lecture</string>
|
||||||
|
<string name="no_comments">Soyez le·a premier·ère à laisser un commentaire sur cette vidéo en utilisant le bouton supérieur droit !</string>
|
||||||
<string name="comment_no_allowed_peertube">Les commentaires sur cette vidéos ont été désactivés !</string>
|
<string name="comment_no_allowed_peertube">Les commentaires sur cette vidéos ont été désactivés !</string>
|
||||||
|
<string name="pickup_resolution">Choisissez une résolution</string>
|
||||||
|
|
||||||
<string name="bookmark_add_peertube">La vidéo est rajoutée aux favoris !</string>
|
<string name="bookmark_add_peertube">La vidéo est rajoutée aux favoris !</string>
|
||||||
<string name="bookmark_remove_peertube">La vidéo a été retirée de vos favoris !</string>
|
<string name="bookmark_remove_peertube">La vidéo a été retirée de vos favoris !</string>
|
||||||
|
<string name="information" tools:ignore="UnusedResources">Information</string>
|
||||||
<string name="shared_via">Partagé via TubeLab</string>
|
<string name="app_logo">Logo de l’application</string>
|
||||||
<string name="share_with">Partager avec</string>
|
<!-- languages not translated -->
|
||||||
|
<string name="subscriptions">Abonnements</string>
|
||||||
<string name="pickup_resolution">Choisissez une résolution</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="validate">Valider</string>
|
|
||||||
<string name="delete_comment">Supprimer le commentaire</string>
|
<string name="delete_comment">Supprimer le commentaire</string>
|
||||||
<string name="delete_comment_confirm">Etes-vous sûr de vouloir supprimer ce commentaire ?</string>
|
<string name="delete_comment_confirm">Etes-vous sûr de vouloir supprimer ce commentaire ?</string>
|
||||||
|
<string name="set_video_mode">Mode pour les vidéos</string>
|
||||||
|
<string name="filter">Filtrer</string>
|
||||||
<string name="toot_sent">Le message a été envoyé !</string>
|
<string name="sepia_search">Recherche sépia</string>
|
||||||
<string name="reply">Répondre</string>
|
<string name="sepia_element_nsfw">Afficher le contenu sensible</string>
|
||||||
<string name="delete">Supprimer</string>
|
<string name="sepia_element_published_date">Date de publication</string>
|
||||||
<string name="no_video_to_display">Aucune vidéo n’est disponible !</string>
|
<string name="any">Toutes</string>
|
||||||
|
<string name="today">Aujourd\'hui</string>
|
||||||
|
<string name="last_7_days">Les 7 derniers jours</string>
|
||||||
|
<string name="last_30_days">Les 30 derniers jours</string>
|
||||||
|
<string name="last_365_days">Les 365 derniers jours</string>
|
||||||
|
<string name="sepia_element_duration">Durée</string>
|
||||||
|
<string name="duration_short"><![CDATA[Courte (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Moyenne (4-10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Longue (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Afficher toutes les catégories</string>
|
||||||
|
<string name="display_all_licenses">Afficher toutes les licences</string>
|
||||||
|
<string name="display_all_languages">Afficher toutes les langues</string>
|
||||||
|
<string name="all_of_these_tags">Tous ces labels</string>
|
||||||
|
<string name="one_of_these_tags">Un de ces labels</string>
|
||||||
|
<string name="apply_filter">Appliquer le filtre</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Meilleurs résultats</item>
|
||||||
|
<item>Les plus récentes</item>
|
||||||
|
<item>Les moins récentes</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Trier par</string>
|
||||||
|
<string name="sepia_search_hint">Mot-clé, chaîne, vidéo, etc.</string>
|
||||||
|
<string name="sepia_indication">La recherche Sepia affiche les vidéos et les chaînes qui correspondent à votre recherche mais qui n\'est pas l\'éditeur, ni le propriétaire. Si vous remarquez des problèmes avec une vidéo, signalez-la aux administrateurs sur le site Web de PeerTube où la vidéo est publiée.</string>
|
||||||
<string name="my_videos">Mes vidéos</string>
|
<string name="my_videos">Mes vidéos</string>
|
||||||
<string name="title">Titre</string>
|
<string name="title">Titre</string>
|
||||||
<string name="license">Licence</string>
|
<string name="license">Licence</string>
|
||||||
<string name="category">Catégorie</string>
|
<string name="category">Catégorie</string>
|
||||||
<string name="language">Langue</string>
|
<string name="language">Langue</string>
|
||||||
<string name="description">Description</string>
|
|
||||||
<string name="tags">Étiquettes</string>
|
|
||||||
<string name="action_privacy">Confidentialité</string>
|
|
||||||
<string name="peertube_nsfw">Cette vidéo contient du contenu pour adultes</string>
|
<string name="peertube_nsfw">Cette vidéo contient du contenu pour adultes</string>
|
||||||
<string name="delete_video">Supprimer la vidéo</string>
|
|
||||||
<string name="peertube_enable_comments">Activer les commentaires</string>
|
<string name="peertube_enable_comments">Activer les commentaires</string>
|
||||||
<string name="send_comment">Envoyer un commentaire</string>
|
<string name="description">Libellé</string>
|
||||||
<string name="add_public_comment">Ajouter un commentaire public</string>
|
<string name="toast_peertube_video_updated">La vidéo a été mise à jour !</string>
|
||||||
<string name="share">Partager</string>
|
<string name="register_account">Créer un compte</string>
|
||||||
<string name="no_comments">Soyez le·a premier·ère à laisser un commentaire sur cette vidéo en utilisant le bouton supérieur droit !</string>
|
|
||||||
<string name="title_video_peertube">Titre de la vidéo</string>
|
|
||||||
<string name="set_video_mode">Mode pour les vidéos</string>
|
|
||||||
<string name="display_nsfw_videos">Afficher les vidéos sensibles</string>
|
|
||||||
<string name="action_playlist_add">Vous n\'avez aucune liste de lecture. Cliquez sur l\'icône « + » pour en ajouter une</string>
|
|
||||||
<string name="not_logged_in">Vous devez être connecté.e pour effectuer cette action !</string>
|
|
||||||
<string name="change_instance">Changer d\'instance</string>
|
|
||||||
<string name="account">Compte</string>
|
|
||||||
<string name="instance_choice">Choisissez une instance</string>
|
|
||||||
<string name="toast_error_loading_account">Une erreur s’est produite pendant le chargement du compte !</string>
|
|
||||||
<string name="profile_banner">Bannière du profil</string>
|
|
||||||
<string name="make_an_action">Faire une action</string>
|
|
||||||
<string name="go_back">Retour</string>
|
|
||||||
<string name="open_menu">Ouvrir le menu</string>
|
|
||||||
<string name="display_more">Afficher plus</string>
|
|
||||||
<string name="edit_profile">Éditer le profil</string>
|
|
||||||
<string name="followed_by">Vous suit</string>
|
|
||||||
<string name="no_channels">Aucune chaîne !</string>
|
|
||||||
<string name="following">Suit</string>
|
|
||||||
<string name="followers">Abonné·e·s</string>
|
|
||||||
<string name="title_instance_login">Domaine de l\'instance</string>
|
|
||||||
<string name="followers_count">%1$s Abonné·e·s</string>
|
|
||||||
<string name="nothing_to_do">Aucune action ne peut être réalisée</string>
|
|
||||||
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
|
||||||
<string name="action_unfollow">Se désabonner</string>
|
|
||||||
<string name="action_follow">S\'abonner</string>
|
|
||||||
<string name="search">Chercher</string>
|
|
||||||
<string name="toast_error_search">Une erreur s’est produite lors de la recherche !</string>
|
|
||||||
<string name="no_result">Aucun résultat !</string>
|
|
||||||
<string name="app_logo">Logo de l’application</string>
|
|
||||||
|
|
||||||
<string name="join_peertube">Rejoignez Peertube</string>
|
|
||||||
<string name="username">Nom d’utilisateur</string>
|
|
||||||
<string name="email_address">Adresse mèl</string>
|
<string name="email_address">Adresse mèl</string>
|
||||||
<string name="password">Mot de passe</string>
|
<string name="preview">Aperçu</string>
|
||||||
<string name="add_account">Ajouter un compte</string>
|
<string name="change_preview">Modifier l\'aperçu</string>
|
||||||
<string name="login">Connexion</string>
|
<string name="name">Nom</string>
|
||||||
<string name="client_error">Impossible d’obtenir l’id du client !</string>
|
<string name="display_more">Afficher plus</string>
|
||||||
<string name="email">Email</string>
|
<string name="no_channels">Aucune chaîne !</string>
|
||||||
<string name="email_indicator">Vous recevrez un e-mail de confirmation</string>
|
<string name="report_helper">Quelques explications concernant votre signalement…</string>
|
||||||
<string name="password_indicator">Utilisez au moins 8 caractères</string>
|
<string name="report_video">Signaler la vidéo</string>
|
||||||
<string name="password_confirm">Confirmer le mot de passe</string>
|
<string name="report">Signaler</string>
|
||||||
<string name="agreement_check_peertube">J\'ai au moins 16 ans et je suis d\'accord avec les %1$s de cette instance</string>
|
<string name="change_instance">Changer d\'instance</string>
|
||||||
<string name="sign_up">S’inscrire</string>
|
<string name="my_history">Historique</string>
|
||||||
<string name="account_created">Compte créé !</string>
|
<string name="edit">Modifier</string>
|
||||||
<string name="account_created_message">Votre compte est créé !\n\nVous allez recevoir un email de confirmation à l\'adresse <b>%1$s</b>.\n\nCliquez sur le lien présent dans le mail pour valider votre compte.</string>
|
<string name="video_settings">Réglages des vidéos</string>
|
||||||
<string name="all_field_filled">Veuillez remplir tous les champs !</string>
|
<string name="app_interface">Interface</string>
|
||||||
<string name="password_length_error">Le mot de passe doit contenir 6 caractères !</string>
|
<string name="set_cache_mode">Cache</string>
|
||||||
<string name="password_error">Les mots de passe ne sont pas identiques !</string>
|
<string name="set_video_cache_description">Définir le cache pour les vidéos (par défaut 100Mo)</string>
|
||||||
<string name="email_error">L\'e-mail ne semble pas être valide !</string>
|
<string name="set_video_quality_description">Définir une qualité par défaut pour les vidéos</string>
|
||||||
<string name="password_too_short">Le mot de passe doit contenir au moins 8 caractères</string>
|
<string name="set_quality_mode">Résolution pour les vidéos</string>
|
||||||
<string name="username_error">Le nom d\'utilisateur·rice doit être en minuscule, contenir uniquement des lettres, des chiffres, des points et des caractères de soulignement</string>
|
<string name="video_cache_value">Cache vidéo : %d Mo</string>
|
||||||
<string name="tos">conditions de service</string>
|
<string name="captions">Légendes</string>
|
||||||
<string name="server_rules">règles du serveur</string>
|
<string name="pickup_captions">Options d\'envoi</string>
|
||||||
<string name="agreement_check">J\'accepte les %1$s et les %2$s</string>
|
<string name="none">Aucune</string>
|
||||||
<string name="email_error_domain">Les adresses mails %1$s ne sont pas autorisées !</string>
|
<string name="set_video_mode_description">Permet de changer le mode de lecture pour les vidéos (normal, streaming ou via un navigateur).</string>
|
||||||
<string name="create_an_account">Créer un compte</string>
|
<string name="delete_video">Supprimer la vidéo</string>
|
||||||
<string name="action_logout">Déconnexion</string>
|
<string name="delete_video_confirmation">Êtes-vous sûr de vouloir supprimer cette vidéo ?</string>
|
||||||
<string name="logout_account_confirmation">Voulez-vous vraiment déconnecter le compte @%1$s@%2$s ?</string>
|
<string name="no_video_to_display">Aucune vidéo n’est disponible !</string>
|
||||||
|
<string name="share">Partager</string>
|
||||||
<string name="action_lists_delete">Supprimer la liste de lecture</string>
|
|
||||||
<string name="action_lists_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette liste de lecture ?</string>
|
|
||||||
<string name="action_channel_confirm_delete">Êtes-vous sûr de vouloir supprimer définitivement cette chaîne ?</string>
|
|
||||||
<string name="action_playlist_create">Créer une liste de lecture</string>
|
|
||||||
<string name="action_playlist_edit">Modifier une liste de lecture</string>
|
|
||||||
<string name="display_name">Nom d\'affichage</string>
|
|
||||||
<string name="error_channel_mandatory">Une chaîne est requise lorsque la liste de lecture est publique.</string>
|
|
||||||
<string name="error_display_name">Vous devez fournir un nom d\'affichage !</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_playlist_empty_content">Cette liste de lecture est vide.</string>
|
|
||||||
<string name="playlists">Listes de lecture</string>
|
|
||||||
|
|
||||||
|
|
||||||
<string name="peertube_comment_on_video"><![CDATA[<b>%1$s</b> a commenté votre vidéo <b>%2$s</b>]]></string>
|
<string name="peertube_comment_on_video"><![CDATA[<b>%1$s</b> a commenté votre vidéo <b>%2$s</b>]]></string>
|
||||||
<string name="peertube_follow_channel"><![CDATA[<b>%1$s</b> suit votre chaîne <b>%2$s</b>]]></string>
|
<string name="peertube_follow_channel"><![CDATA[<b>%1$s</b> suit votre chaîne <b>%2$s</b>]]></string>
|
||||||
<string name="peertube_follow_account"><![CDATA[<b>%1$s</b> suit votre compte]]></string>
|
<string name="peertube_follow_account"><![CDATA[<b>%1$s</b> suit votre compte]]></string>
|
||||||
@ -173,113 +163,97 @@
|
|||||||
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> a publié une nouvelle vidéo : <b>%2$s</b>]]></string>
|
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> a publié une nouvelle vidéo : <b>%2$s</b>]]></string>
|
||||||
<string name="peertube_video_blacklist"><![CDATA[Votre vidéo <b>%1$s</b> a été blacklisté]]></string>
|
<string name="peertube_video_blacklist"><![CDATA[Votre vidéo <b>%1$s</b> a été blacklisté]]></string>
|
||||||
<string name="peertube_video_unblacklist"><![CDATA[Votre vidéo <b>%1$s</b> n’est plus blacklisté]]></string>
|
<string name="peertube_video_unblacklist"><![CDATA[Votre vidéo <b>%1$s</b> n’est plus blacklisté]]></string>
|
||||||
<string name="peertube_video_abuse"><![CDATA[Nouvelle modération sur la vidéo : <b>%1$s</b>]]></string>
|
<string name="peertube_video_abuse"><![CDATA[Nouveau signalement pour la vidéo : <b>%1$s</b>]]></string>
|
||||||
<string name="toast_code_error">Une erreur s’est produite ! L’instance n’a retourné aucun code d\autorisation !</string>
|
<string name="add_public_comment">Ajouter un commentaire public</string>
|
||||||
<string name="subscriptions">Abonnements</string>
|
<string name="send_comment">Envoyer un commentaire</string>
|
||||||
<string name="report">Signaler</string>
|
<string name="all">Tout</string>
|
||||||
<string name="report_video">Signaler la vidéo</string>
|
<!-- end languages -->
|
||||||
|
<string name="playlists">Listes de lecture</string>
|
||||||
|
<string name="display_name">Nom d\'affichage</string>
|
||||||
|
<string name="action_playlist_add">Vous n\'avez aucune liste de lecture. Cliquez sur l\'icône « + » pour en ajouter une</string>
|
||||||
|
<string name="error_display_name">Vous devez fournir un nom d\'affichage !</string>
|
||||||
|
<string name="error_channel_mandatory">Une chaîne est requise lorsque la liste de lecture est publique.</string>
|
||||||
|
<string name="action_playlist_create">Créer une liste de lecture</string>
|
||||||
|
<string name="action_playlist_empty_content">Cette liste de lecture est vide.</string>
|
||||||
|
<string name="password_confirm">Confirmer le mot de passe</string>
|
||||||
|
<string name="agreement_check">J\'accepte les %1$s et les %2$s</string>
|
||||||
|
<string name="server_rules">règles du serveur</string>
|
||||||
|
<string name="tos">conditions de service</string>
|
||||||
|
<string name="sign_up">S’inscrire</string>
|
||||||
|
<string name="all_field_filled">Veuillez remplir tous les champs !</string>
|
||||||
|
<string name="password_error">Les mots de passe ne sont pas identiques !</string>
|
||||||
|
<string name="email_error">L\'e-mail ne semble pas être valide !</string>
|
||||||
|
<string name="email_indicator">Vous recevrez un e-mail de confirmation</string>
|
||||||
|
<string name="password_indicator">Utilisez au moins 8 caractères</string>
|
||||||
|
<string name="password_too_short">Le mot de passe doit contenir au moins 8 caractères</string>
|
||||||
|
<string name="username_error">Le nom d\'utilisateur·rice doit être en minuscule, contenir uniquement des lettres, des chiffres, des points et des caractères de soulignement</string>
|
||||||
|
<string name="account_created">Compte créé !</string>
|
||||||
|
<string name="account_created_message">Votre compte est créé !\n\nVous allez recevoir un email de confirmation à l\'adresse <b>%1$s</b>.\n\nCliquez sur le lien présent dans le mail pour valider votre compte.</string>
|
||||||
|
<string name="account">Compte</string>
|
||||||
<string name="report_account">Signaler le compte</string>
|
<string name="report_account">Signaler le compte</string>
|
||||||
<string name="report_helper">Quelques explications concernant votre signalement…</string>
|
<string-array name="settings_video_mode">
|
||||||
|
<item>Normal</item>
|
||||||
|
<item>Streaming</item>
|
||||||
|
<item>Flux direct</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="settings_video_quality">
|
||||||
|
<item>Élevée</item>
|
||||||
|
<item>Moyenne</item>
|
||||||
|
<item>Faible</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
||||||
|
<string name="title_video_peertube">Titre de la vidéo</string>
|
||||||
|
<string name="join_peertube">Rejoignez Peertube</string>
|
||||||
|
<string name="agreement_check_peertube">J\'ai au moins 16 ans et je suis d\'accord avec les %1$s de cette instance</string>
|
||||||
|
<string name="edit_profile">Éditer le profil</string>
|
||||||
|
<string name="make_an_action">Faire une action</string>
|
||||||
|
<string name="action_unfollow">Se désabonner</string>
|
||||||
|
<string name="display_nsfw_videos">Afficher les vidéos sensibles</string>
|
||||||
|
<string name="fullscreen">Vidéo plein écran</string>
|
||||||
|
<string name="bookmark_peertube_empty">Il n’y a aucune vidéo Peertube dans vos favoris !</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="modify_playlists">Vidéo dans les listes de lecture</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="action_channel_create">Créer une chaîne</string>
|
||||||
|
<string name="action_channel_edit">Modifier une chaîne</string>
|
||||||
|
<string name="email_error_domain">Les adresses mails %1$s ne sont pas autorisées !</string>
|
||||||
|
<string name="report_comment_size">Veuillez préciser les raisons.</string>
|
||||||
|
<string name="not_logged_in">Vous devez être connecté.e pour effectuer cette action !</string>
|
||||||
<string name="successful_report">Le compte a été signalé !</string>
|
<string name="successful_report">Le compte a été signalé !</string>
|
||||||
<string name="successful_report_comment">Le commentaire a été signalé !</string>
|
<string name="successful_report_comment">Le commentaire a été signalé !</string>
|
||||||
<string name="successful_video_report">La vidéo a été signalée !</string>
|
<string name="successful_video_report">La vidéo a été signalée !</string>
|
||||||
<string name="report_comment_size">Veuillez préciser les raisons.</string>
|
<string name="password_length_error">Le mot de passe doit contenir 6 caractères !</string>
|
||||||
<string name="all">Tout</string>
|
|
||||||
<string name="my_history">Historique</string>
|
|
||||||
<string name="edit_video">Modifier une vidéo</string>
|
|
||||||
<string name="settings">Paramètres</string>
|
|
||||||
|
|
||||||
|
|
||||||
<string name="video_settings">Paramètres des vidéos</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">
|
|
||||||
<item>Normal</item>
|
|
||||||
<item>Navigateur</item>
|
|
||||||
<item>Streaming</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<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="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_minimize_choice" translatable="false">set_video_minimize_choice</string>
|
|
||||||
<string name="set_video_language_choice" translatable="false">set_video_language_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-array name="settings_video_quality">
|
|
||||||
<item>Elevé</item>
|
|
||||||
<item>Moyen</item>
|
|
||||||
<item>Faible</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string name="set_video_quality_description">Permet de définir la qualité de la vidéo par défaut</string>
|
|
||||||
<string name="set_quality_mode">Résolution pour les vidéos</string>
|
|
||||||
|
|
||||||
<string name="set_video_mode_description">Permet de changer le mode de lecture pour les vidéos (normal, streaming ou via un navigateur).</string>
|
|
||||||
<string name="register_account">Créer un compte</string>
|
|
||||||
<string name="preview">Aperçu</string>
|
|
||||||
<string name="change_preview">Modifier l\'aperçu</string>
|
|
||||||
<string name="title_muted">Sourdine</string>
|
|
||||||
<string name="title_blocked">Bloqués</string>
|
|
||||||
<string name="no_muted">Aucun compte en sourdine !</string>
|
|
||||||
<string name="no_notifications">Aucune notification !</string>
|
|
||||||
<string name="action_mute">Mettre en sourdine</string>
|
|
||||||
<string name="action_unmute">Réactiver le compte</string>
|
|
||||||
<string name="muted_done">Le compte a été mis en sourdine !</string>
|
<string name="muted_done">Le compte a été mis en sourdine !</string>
|
||||||
<string name="title_channel">Chaînes</string>
|
<string name="edit_video">Modifier une vidéo</string>
|
||||||
<string name="captions">Sous-titres</string>
|
<string name="create_an_account">Créer un compte</string>
|
||||||
<string name="none">Aucun</string>
|
<string name="followers_count">%1$s Abonné·e·s</string>
|
||||||
<string name="pickup_captions">Sélectionner des sous-titres</string>
|
|
||||||
<string name="name">Nom</string>
|
|
||||||
<string name="action_channel_create">Créer une chaîne</string>
|
|
||||||
<string name="action_channel_edit">Modifier une chaîne</string>
|
|
||||||
<string name="delete_channel">Supprimer la chaîne</string>
|
|
||||||
<string name="display_list">Afficher la liste</string>
|
|
||||||
<string name="delete_list">Supprimer la liste de lecture</string>
|
|
||||||
<string name="edit">Modifier</string>
|
|
||||||
|
|
||||||
<string name="not_valide_instance">Cette instance ne semble pas être valide !</string>
|
|
||||||
|
|
||||||
<string name="developer">Développeur</string>
|
<string name="developer">Développeur</string>
|
||||||
<string name="about_vesrion">Version %1$s</string>
|
<string name="about_vesrion">Version %1$s</string>
|
||||||
<string name="about_the_app">À propos de l’application</string>
|
<string name="about_the_app">À propos de l’application</string>
|
||||||
<string name="Donate">Faire un don</string>
|
<string name="Donate">Faire un don</string>
|
||||||
<string name="source_code">Code source</string>
|
<string name="source_code">Code source</string>
|
||||||
<string name="issue_tracker">Suivi des tickets</string>
|
<string name="issue_tracker">Suivi des tickets</string>
|
||||||
|
<string name="action_instance_empty_content">Aucune instance ne correspond à ces critères</string>
|
||||||
<string name="action_instance_empty_content">No instances match these criteria</string>
|
<string name="instances_picker">Sélecteur d\'instances</string>
|
||||||
<string name="instances_picker">Instances picker</string>
|
<string name="pickup_instance">Choisissez une instance</string>
|
||||||
<string name="pickup_instance">Pickup this instance</string>
|
<string name="sensitive_video"> Vidéos sensibles</string>
|
||||||
<string name="sensitive_content">Sensitive content: %1$s</string>
|
<string name="sensitive_content">Contenu sensible : %1$s</string>
|
||||||
<string name="followers_instance">%1$s instance followers</string>
|
<string name="followers_instance">%1$s instances suiveuses</string>
|
||||||
<string name="help">Help</string>
|
<string name="help">Aide</string>
|
||||||
<string name="sensitive_video"> Sensitive videos</string>
|
<string name="pickup_categories">Sélection des catégories</string>
|
||||||
<string name="pickup_categories">Pickup categories</string>
|
<string name="pickup_languages">Sélection des langues</string>
|
||||||
|
|
||||||
<string name="do_not_list">Do not list</string>
|
|
||||||
<string name="blur">Blur</string>
|
|
||||||
<string name="display">Display</string>
|
|
||||||
<string name="no_opinion">No opinion</string>
|
|
||||||
<string name="pickup_languages">Pickup languages</string>
|
|
||||||
<string name="notification_channel_name">Mise à jour des informations</string>
|
<string name="notification_channel_name">Mise à jour des informations</string>
|
||||||
|
<string name="add_account">Ajouter un compte</string>
|
||||||
<string name="list_of_accounts">Liste des comptes</string>
|
<string name="list_of_accounts">Liste des comptes</string>
|
||||||
|
|
||||||
<string name="pause">Pause</string>
|
<string name="pause">Pause</string>
|
||||||
<string name="play">Lecture</string>
|
<string name="play">Jouer</string>
|
||||||
<string name="minimize">Réduire</string>
|
<string name="minimize">Minimiser</string>
|
||||||
<string name="fast_rewind">Retour rapide</string>
|
<string name="fast_rewind">Rembobinage rapide</string>
|
||||||
<string name="fast_forward">Avance rapide</string>
|
<string name="fast_forward">Avance rapide</string>
|
||||||
|
<string name="set_video_minimize">Minimiser la taille des vidéos</string>
|
||||||
<string name="set_video_minimize">Réduire la taille des vidéos</string>
|
<string name="set_video_minimize_description">Minimiser la taille des vidéos lorsque l\'application est en arrière-plan (Android N+)</string>
|
||||||
<string name="set_video_minimize_description">Réduit la taille des vidéos quand l\'application est en arrière plan (Android N+)</string>
|
<string name="set_video_language">Filtre de langue</string>
|
||||||
|
<string name="set_video_language_description">Filtrer les vidéos avec différentes langues</string>
|
||||||
|
|
||||||
<string name="set_video_language">Filtrer les langues</string>
|
|
||||||
<string name="set_video_language_description">Filtrer les vidéos en fonction de la langue</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,5 +1 @@
|
|||||||
- Support for m3u8 videos
|
- Corrige un bug lors de la connexion
|
||||||
- Improve loading time
|
|
||||||
- Quick menu access for videos (edit/playlist/follow/report)
|
|
||||||
- Improve menu for adding videos in playlists
|
|
||||||
- Fix an issue with pagination
|
|
@ -1 +1 @@
|
|||||||
App for all Peertube instances
|
Приложение для всех серверов Peertube
|
@ -1,5 +1 @@
|
|||||||
- Support for m3u8 videos
|
- Fix an issue with the authentication of some accounts
|
||||||
- Improve loading time
|
|
||||||
- Quick menu access for videos (edit/playlist/follow/report)
|
|
||||||
- Improve menu for adding videos in playlists
|
|
||||||
- Fix an issue with pagination
|
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Kommentar löschen</string>
|
<string name="delete_comment">Kommentar löschen</string>
|
||||||
<string name="delete_comment_confirm">Möchtest du diesen Kommentar wirklich löschen?</string>
|
<string name="delete_comment_confirm">Möchtest du diesen Kommentar wirklich löschen?</string>
|
||||||
<string name="set_video_mode">Videomodus</string>
|
<string name="set_video_mode">Videomodus</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">Eigene Videos</string>
|
<string name="my_videos">Eigene Videos</string>
|
||||||
<string name="title">Titel</string>
|
<string name="title">Titel</string>
|
||||||
<string name="license">Lizenz</string>
|
<string name="license">Lizenz</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Διαγραφή ενός σχόλιου</string>
|
<string name="delete_comment">Διαγραφή ενός σχόλιου</string>
|
||||||
<string name="delete_comment_confirm">Θέλετε να διαγράψετε αυτό το σχόλιο, στα σίγουρα;</string>
|
<string name="delete_comment_confirm">Θέλετε να διαγράψετε αυτό το σχόλιο, στα σίγουρα;</string>
|
||||||
<string name="set_video_mode">Κατάσταση λειτουργίας για τα βίντεο</string>
|
<string name="set_video_mode">Κατάσταση λειτουργίας για τα βίντεο</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">Τα βίντεο μου</string>
|
<string name="my_videos">Τα βίντεο μου</string>
|
||||||
<string name="title">Τίτλος</string>
|
<string name="title">Τίτλος</string>
|
||||||
<string name="license">Άδεια</string>
|
<string name="license">Άδεια</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Eliminar un comentario</string>
|
<string name="delete_comment">Eliminar un comentario</string>
|
||||||
<string name="delete_comment_confirm">¿Realmente deseas eliminar este comentario?</string>
|
<string name="delete_comment_confirm">¿Realmente deseas eliminar este comentario?</string>
|
||||||
<string name="set_video_mode">Aplicar el modo de video</string>
|
<string name="set_video_mode">Aplicar el modo de video</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">Mis videos</string>
|
<string name="my_videos">Mis videos</string>
|
||||||
<string name="title">Título</string>
|
<string name="title">Título</string>
|
||||||
<string name="license">Licencia</string>
|
<string name="license">Licencia</string>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?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">Locale</string>
|
<string name="title_home">Locale</string>
|
||||||
<string name="title_local">Local</string>
|
<string name="title_local">Locale</string>
|
||||||
<string name="title_discover">Découvrir</string>
|
<string name="title_discover">Découvrir</string>
|
||||||
<string name="title_notifications">Notifications</string>
|
<string name="title_notifications">Notifications</string>
|
||||||
<string name="title_recently_added">Nouveautés</string>
|
<string name="title_recently_added">Nouveautés</string>
|
||||||
@ -34,7 +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="remove_from_playlist">Supprimer de la liste de lecture</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>
|
||||||
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Supprimer le commentaire</string>
|
<string name="delete_comment">Supprimer le commentaire</string>
|
||||||
<string name="delete_comment_confirm">Etes-vous sûr de vouloir supprimer ce commentaire ?</string>
|
<string name="delete_comment_confirm">Etes-vous sûr de vouloir supprimer ce commentaire ?</string>
|
||||||
<string name="set_video_mode">Mode pour les vidéos</string>
|
<string name="set_video_mode">Mode pour les vidéos</string>
|
||||||
|
<string name="filter">Filtrer</string>
|
||||||
|
<string name="sepia_search">Recherche sépia</string>
|
||||||
|
<string name="sepia_element_nsfw">Afficher le contenu sensible</string>
|
||||||
|
<string name="sepia_element_published_date">Date de publication</string>
|
||||||
|
<string name="any">Toutes</string>
|
||||||
|
<string name="today">Aujourd\'hui</string>
|
||||||
|
<string name="last_7_days">Les 7 derniers jours</string>
|
||||||
|
<string name="last_30_days">Les 30 derniers jours</string>
|
||||||
|
<string name="last_365_days">Les 365 derniers jours</string>
|
||||||
|
<string name="sepia_element_duration">Durée</string>
|
||||||
|
<string name="duration_short"><![CDATA[Courte (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Moyenne (4-10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Longue (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Afficher toutes les catégories</string>
|
||||||
|
<string name="display_all_licenses">Afficher toutes les licences</string>
|
||||||
|
<string name="display_all_languages">Afficher toutes les langues</string>
|
||||||
|
<string name="all_of_these_tags">Tous ces labels</string>
|
||||||
|
<string name="one_of_these_tags">Un de ces labels</string>
|
||||||
|
<string name="apply_filter">Appliquer le filtre</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Meilleurs résultats</item>
|
||||||
|
<item>Les plus récentes</item>
|
||||||
|
<item>Les moins récentes</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Trier par</string>
|
||||||
|
<string name="sepia_search_hint">Mot-clé, chaîne, vidéo, etc.</string>
|
||||||
|
<string name="sepia_indication">La recherche Sepia affiche les vidéos et les chaînes qui correspondent à votre recherche mais qui n\'est pas l\'éditeur, ni le propriétaire. Si vous remarquez des problèmes avec une vidéo, signalez-la aux administrateurs sur le site Web de PeerTube où la vidéo est publiée.</string>
|
||||||
<string name="my_videos">Mes vidéos</string>
|
<string name="my_videos">Mes vidéos</string>
|
||||||
<string name="title">Titre</string>
|
<string name="title">Titre</string>
|
||||||
<string name="license">Licence</string>
|
<string name="license">Licence</string>
|
||||||
@ -105,13 +132,13 @@
|
|||||||
<string name="change_instance">Changer d\'instance</string>
|
<string name="change_instance">Changer d\'instance</string>
|
||||||
<string name="my_history">Historique</string>
|
<string name="my_history">Historique</string>
|
||||||
<string name="edit">Modifier</string>
|
<string name="edit">Modifier</string>
|
||||||
<string name="video_settings">Video settings</string>
|
<string name="video_settings">Réglages des vidéos</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">Set the cache for videos (default 100Mb)</string>
|
<string name="set_video_cache_description">Définir le cache pour les vidéos (par défaut 100Mo)</string>
|
||||||
<string name="set_video_quality_description">Define a default quality for videos</string>
|
<string name="set_video_quality_description">Définir une qualité par défaut pour les vidéos</string>
|
||||||
<string name="set_quality_mode">Resolution for videos</string>
|
<string name="set_quality_mode">Résolution pour les vidéos</string>
|
||||||
<string name="video_cache_value">Video cache: %d Mb</string>
|
<string name="video_cache_value">Cache vidéo : %d Mo</string>
|
||||||
<string name="captions">Légendes</string>
|
<string name="captions">Légendes</string>
|
||||||
<string name="pickup_captions">Options d\'envoi</string>
|
<string name="pickup_captions">Options d\'envoi</string>
|
||||||
<string name="none">Aucune</string>
|
<string name="none">Aucune</string>
|
||||||
@ -129,7 +156,7 @@
|
|||||||
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> a publié une nouvelle vidéo : <b>%2$s</b>]]></string>
|
<string name="peertube_video_from_subscription"><![CDATA[<b>%1$s</b> a publié une nouvelle vidéo : <b>%2$s</b>]]></string>
|
||||||
<string name="peertube_video_blacklist"><![CDATA[Votre vidéo <b>%1$s</b> a été blacklisté]]></string>
|
<string name="peertube_video_blacklist"><![CDATA[Votre vidéo <b>%1$s</b> a été blacklisté]]></string>
|
||||||
<string name="peertube_video_unblacklist"><![CDATA[Votre vidéo <b>%1$s</b> n’est plus blacklisté]]></string>
|
<string name="peertube_video_unblacklist"><![CDATA[Votre vidéo <b>%1$s</b> n’est plus blacklisté]]></string>
|
||||||
<string name="peertube_video_abuse"><![CDATA[New abuse report for video: <b>%1$s</b>]]></string>
|
<string name="peertube_video_abuse"><![CDATA[Nouveau signalement pour la vidéo : <b>%1$s</b>]]></string>
|
||||||
<string name="add_public_comment">Ajouter un commentaire public</string>
|
<string name="add_public_comment">Ajouter un commentaire public</string>
|
||||||
<string name="send_comment">Envoyer un commentaire</string>
|
<string name="send_comment">Envoyer un commentaire</string>
|
||||||
<string name="all">Tout</string>
|
<string name="all">Tout</string>
|
||||||
@ -160,12 +187,12 @@
|
|||||||
<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>
|
<item>Flux direct</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="settings_video_quality">
|
<string-array name="settings_video_quality">
|
||||||
<item>High</item>
|
<item>Élevée</item>
|
||||||
<item>Medium</item>
|
<item>Moyenne</item>
|
||||||
<item>Low</item>
|
<item>Faible</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
<string name="unfollow_confirm">Voulez-vous vous désabonner de ce compte ?</string>
|
||||||
<string name="title_video_peertube">Titre de la vidéo</string>
|
<string name="title_video_peertube">Titre de la vidéo</string>
|
||||||
@ -179,7 +206,7 @@
|
|||||||
<string name="bookmark_peertube_empty">Il n’y a aucune vidéo Peertube dans vos favoris !</string>
|
<string name="bookmark_peertube_empty">Il n’y 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="modify_playlists">Vidéo dans les listes de lecture</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>
|
||||||
@ -188,7 +215,7 @@
|
|||||||
<string name="report_comment_size">Veuillez préciser les raisons.</string>
|
<string name="report_comment_size">Veuillez préciser les raisons.</string>
|
||||||
<string name="not_logged_in">Vous devez être connecté.e pour effectuer cette action !</string>
|
<string name="not_logged_in">Vous devez être connecté.e pour effectuer cette action !</string>
|
||||||
<string name="successful_report">Le compte a été signalé !</string>
|
<string name="successful_report">Le compte a été signalé !</string>
|
||||||
<string name="successful_report_comment">The comment has been reported!</string>
|
<string name="successful_report_comment">Le commentaire a été signalé !</string>
|
||||||
<string name="successful_video_report">La vidéo a été signalée !</string>
|
<string name="successful_video_report">La vidéo a été signalée !</string>
|
||||||
<string name="password_length_error">Le mot de passe doit contenir 6 caractères !</string>
|
<string name="password_length_error">Le mot de passe doit contenir 6 caractères !</string>
|
||||||
<string name="muted_done">Le compte a été mis en sourdine !</string>
|
<string name="muted_done">Le compte a été mis en sourdine !</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Elimina il commento</string>
|
<string name="delete_comment">Elimina il commento</string>
|
||||||
<string name="delete_comment_confirm">Sei sicuro di voler eliminare questo commento?</string>
|
<string name="delete_comment_confirm">Sei sicuro di voler eliminare questo commento?</string>
|
||||||
<string name="set_video_mode">Modalità per i video</string>
|
<string name="set_video_mode">Modalità per i video</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">I miei video</string>
|
<string name="my_videos">I miei video</string>
|
||||||
<string name="title">Titolo</string>
|
<string name="title">Titolo</string>
|
||||||
<string name="license">Licenza</string>
|
<string name="license">Licenza</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Een opmerking verwijderen</string>
|
<string name="delete_comment">Een opmerking verwijderen</string>
|
||||||
<string name="delete_comment_confirm">Weet u zeker dat u deze opmerking wilt verwijderen?</string>
|
<string name="delete_comment_confirm">Weet u zeker dat u deze opmerking wilt verwijderen?</string>
|
||||||
<string name="set_video_mode">Modus voor video\'s</string>
|
<string name="set_video_mode">Modus voor video\'s</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">Mijn video\'s</string>
|
<string name="my_videos">Mijn video\'s</string>
|
||||||
<string name="title">Titel</string>
|
<string name="title">Titel</string>
|
||||||
<string name="license">Licentie</string>
|
<string name="license">Licentie</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Usuń komentarz</string>
|
<string name="delete_comment">Usuń komentarz</string>
|
||||||
<string name="delete_comment_confirm">Czy na pewno usuniesz ten komentarz?</string>
|
<string name="delete_comment_confirm">Czy na pewno usuniesz ten komentarz?</string>
|
||||||
<string name="set_video_mode">Tryb dla filmów wideo</string>
|
<string name="set_video_mode">Tryb dla filmów wideo</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">Moje filmy</string>
|
<string name="my_videos">Moje filmy</string>
|
||||||
<string name="title">Tytuł</string>
|
<string name="title">Tytuł</string>
|
||||||
<string name="license">Licencja</string>
|
<string name="license">Licencja</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Удалить комментарий</string>
|
<string name="delete_comment">Удалить комментарий</string>
|
||||||
<string name="delete_comment_confirm">Вы уверены, что хотите удалить этот комментарий?</string>
|
<string name="delete_comment_confirm">Вы уверены, что хотите удалить этот комментарий?</string>
|
||||||
<string name="set_video_mode">Режим для видео</string>
|
<string name="set_video_mode">Режим для видео</string>
|
||||||
|
<string name="filter">Фильтр</string>
|
||||||
|
<string name="sepia_search">Поисковик Sepia</string>
|
||||||
|
<string name="sepia_element_nsfw">Показывать деликатные видео</string>
|
||||||
|
<string name="sepia_element_published_date">Дата публикации</string>
|
||||||
|
<string name="any">Любые</string>
|
||||||
|
<string name="today">Сегодня</string>
|
||||||
|
<string name="last_7_days">Последние 7 дней</string>
|
||||||
|
<string name="last_30_days">Последние 30 дней</string>
|
||||||
|
<string name="last_365_days">Последние 365 дней</string>
|
||||||
|
<string name="sepia_element_duration">Длительность</string>
|
||||||
|
<string name="duration_short"><![CDATA[Короткие (<4 мин)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Средние (4–10 мин)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Длинные (> 10 мин)]]></string>
|
||||||
|
<string name="display_all_categories">Показать все категории</string>
|
||||||
|
<string name="display_all_licenses">Показать все лицензии</string>
|
||||||
|
<string name="display_all_languages">Показать все языки</string>
|
||||||
|
<string name="all_of_these_tags">Все с этими тегами</string>
|
||||||
|
<string name="one_of_these_tags">Один из этих тегов</string>
|
||||||
|
<string name="apply_filter">Применить фильтр</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Лучшее совпадение</item>
|
||||||
|
<item>Последние</item>
|
||||||
|
<item>Ранние</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Сортировать по</string>
|
||||||
|
<string name="sepia_search_hint">Ключевое слово, канал, видео и т. д.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search отображает видео и каналы, которые соответствуют вашему поиску, но не являются ни издателем, ни владельцем. Если вы заметили какие-либо проблемы с видео, сообщите об этом администраторам на сайте PeerTube, где это видео опубликовано.</string>
|
||||||
<string name="my_videos">Мои видео</string>
|
<string name="my_videos">Мои видео</string>
|
||||||
<string name="title">Название</string>
|
<string name="title">Название</string>
|
||||||
<string name="license">Лицензия</string>
|
<string name="license">Лицензия</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -83,6 +83,33 @@
|
|||||||
<string name="delete_comment">Delete a comment</string>
|
<string name="delete_comment">Delete a comment</string>
|
||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name" translatable="false">Tubelab</string>
|
<string name="app_name" translatable="false">Tubelab</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_language_choice" translatable="false">set_video_language_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="title_home">Home</string>
|
<string name="title_home">Home</string>
|
||||||
<string name="title_local">Local</string>
|
<string name="title_local">Local</string>
|
||||||
<string name="title_discover">Discover</string>
|
<string name="title_discover">Discover</string>
|
||||||
@ -110,6 +117,37 @@
|
|||||||
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
|
||||||
<string name="set_video_mode">Mode for videos</string>
|
<string name="set_video_mode">Mode for videos</string>
|
||||||
|
|
||||||
|
<string name="filter">Filter</string>
|
||||||
|
<string name="sepia_search">Sepia search</string>
|
||||||
|
<string name="sepia_element_nsfw">Display sensitive content</string>
|
||||||
|
<string name="sepia_element_published_date">Published date</string>
|
||||||
|
<string name="any">Any</string>
|
||||||
|
<string name="today">Today</string>
|
||||||
|
<string name="last_7_days">Last 7 days</string>
|
||||||
|
<string name="last_30_days">Last 30 days</string>
|
||||||
|
<string name="last_365_days">Last 365 days</string>
|
||||||
|
|
||||||
|
<string name="sepia_element_duration">Duration</string>
|
||||||
|
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
|
||||||
|
<string name="duration_medium"><![CDATA[Medium (4–10 min)]]></string>
|
||||||
|
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
|
||||||
|
|
||||||
|
<string name="display_all_categories">Display all categories</string>
|
||||||
|
<string name="display_all_licenses">Display all licenses</string>
|
||||||
|
<string name="display_all_languages">Display all languages</string>
|
||||||
|
|
||||||
|
<string name="all_of_these_tags">All of these tags</string>
|
||||||
|
<string name="one_of_these_tags">One of these tags</string>
|
||||||
|
<string name="apply_filter">Apply filter</string>
|
||||||
|
<string-array name="sort_by_array">
|
||||||
|
<item>Best match</item>
|
||||||
|
<item>Most recent</item>
|
||||||
|
<item>Least recent</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string name="sort_by">Sort by</string>
|
||||||
|
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
|
||||||
|
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
|
||||||
<string name="my_videos">My videos</string>
|
<string name="my_videos">My videos</string>
|
||||||
<string name="title">Title</string>
|
<string name="title">Title</string>
|
||||||
<string name="license">License</string>
|
<string name="license">License</string>
|
||||||
@ -139,11 +177,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_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_language_choice" translatable="false">set_video_language_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_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">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>
|
||||||
|
@ -90,6 +90,11 @@
|
|||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".SepiaSearchActivity"
|
||||||
|
android:configChanges="orientation|screenSize"
|
||||||
|
android:label="@string/sepia_search"
|
||||||
|
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".WebviewActivity"
|
android:name=".WebviewActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||||
|
@ -134,6 +134,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
String[] emailArray = login_uid.getText().toString().split("@");
|
String[] emailArray = login_uid.getText().toString().split("@");
|
||||||
if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) {
|
if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) {
|
||||||
Toasty.error(LoginActivity.this, getString(R.string.email_error_domain, emailArray[1])).show();
|
Toasty.error(LoginActivity.this, getString(R.string.email_error_domain, emailArray[1])).show();
|
||||||
|
connectionButton.setEnabled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
host = emailArray[1];
|
host = emailArray[1];
|
||||||
@ -141,6 +142,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
if (login_instance == null || login_instance.getText() == null || login_instance.getText().toString().trim().length() == 0) {
|
if (login_instance == null || login_instance.getText() == null || login_instance.getText().toString().trim().length() == 0) {
|
||||||
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();
|
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();
|
||||||
|
connectionButton.setEnabled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
instance = host = login_instance.getText().toString().trim().toLowerCase();
|
instance = host = login_instance.getText().toString().trim().toLowerCase();
|
||||||
@ -215,6 +217,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
} catch (Error error) {
|
} catch (Error error) {
|
||||||
Error.displayError(LoginActivity.this, error);
|
Error.displayError(LoginActivity.this, error);
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
runOnUiThread(() -> connectionButton.setEnabled(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
@ -36,6 +36,7 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
import com.kobakei.ratethisapp.RateThisApp;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@ -71,6 +72,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
Fragment active;
|
Fragment active;
|
||||||
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
|
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
|
||||||
private DisplayOverviewFragment overviewFragment;
|
private DisplayOverviewFragment overviewFragment;
|
||||||
|
|
||||||
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
|
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
|
||||||
= item -> {
|
= item -> {
|
||||||
DisplayVideosFragment displayVideosFragment = null;
|
DisplayVideosFragment displayVideosFragment = null;
|
||||||
@ -122,6 +124,22 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
navView.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||||
|
|
||||||
|
Fragment fragment = getSupportFragmentManager().findFragmentByTag("5");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
fragment = getSupportFragmentManager().findFragmentByTag("4");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
fragment = getSupportFragmentManager().findFragmentByTag("3");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
fragment = getSupportFragmentManager().findFragmentByTag("2");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
fragment = getSupportFragmentManager().findFragmentByTag("1");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
|
||||||
recentFragment = new DisplayVideosFragment();
|
recentFragment = new DisplayVideosFragment();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.RECENT);
|
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.RECENT);
|
||||||
@ -149,7 +167,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
overviewFragment = new DisplayOverviewFragment();
|
overviewFragment = new DisplayOverviewFragment();
|
||||||
|
|
||||||
active = overviewFragment;
|
if( active == null) {
|
||||||
|
active = overviewFragment;
|
||||||
|
}
|
||||||
fm.beginTransaction().add(R.id.nav_host_fragment, locaFragment, "5").hide(locaFragment).commit();
|
fm.beginTransaction().add(R.id.nav_host_fragment, locaFragment, "5").hide(locaFragment).commit();
|
||||||
|
|
||||||
if (!Helper.isLoggedIn(MainActivity.this)) {
|
if (!Helper.isLoggedIn(MainActivity.this)) {
|
||||||
@ -158,7 +178,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
fm.beginTransaction().add(R.id.nav_host_fragment, trendingFragment, "2").hide(trendingFragment).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();
|
fm.beginTransaction().add(R.id.nav_host_fragment, overviewFragment, "1").commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.setOnClickListener(v->{
|
toolbar.setOnClickListener(v->{
|
||||||
if(active instanceof DisplayVideosFragment) {
|
if(active instanceof DisplayVideosFragment) {
|
||||||
((DisplayVideosFragment) active).scrollToTop();
|
((DisplayVideosFragment) active).scrollToTop();
|
||||||
@ -207,14 +226,16 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
editor.putString(Helper.PREF_KEY_NAME, account.getUsername());
|
editor.putString(Helper.PREF_KEY_NAME, account.getUsername());
|
||||||
//Sync languages from server
|
//Sync languages from server
|
||||||
List<String> videoLanguageServer = userMe.getVideoLanguages();
|
List<String> videoLanguageServer = userMe.getVideoLanguages();
|
||||||
Set<String> videoLanguageServerSet = new TreeSet<>(videoLanguageServer);
|
if( videoLanguageServer != null) {
|
||||||
videoLanguageServerSet.addAll(videoLanguageServer);
|
Set<String> videoLanguageServerSet = new TreeSet<>(videoLanguageServer);
|
||||||
Set<String> videoLanguageLocal = sharedpreferences.getStringSet(getString(R.string.set_video_language_choice), null);
|
videoLanguageServerSet.addAll(videoLanguageServer);
|
||||||
if (videoLanguageServerSet.size() > 0 && videoLanguageLocal != null) {
|
Set<String> videoLanguageLocal = sharedpreferences.getStringSet(getString(R.string.set_video_language_choice), null);
|
||||||
videoLanguageServer.addAll(videoLanguageLocal);
|
if (videoLanguageServerSet.size() > 0 && videoLanguageLocal != null) {
|
||||||
|
videoLanguageServer.addAll(videoLanguageLocal);
|
||||||
|
}
|
||||||
|
editor.putStringSet(getString(R.string.set_video_language_choice), videoLanguageServerSet);
|
||||||
|
editor.apply();
|
||||||
}
|
}
|
||||||
editor.putStringSet(getString(R.string.set_video_language_choice), videoLanguageServerSet);
|
|
||||||
editor.apply();
|
|
||||||
}
|
}
|
||||||
} catch (Error error) {
|
} catch (Error error) {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
@ -227,6 +248,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
startInForeground();
|
startInForeground();
|
||||||
|
|
||||||
|
if(BuildConfig.google_restriction && BuildConfig.full_instances) {
|
||||||
|
RateThisApp.onCreate(this);
|
||||||
|
RateThisApp.showRateDialogIfNeeded(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startInForeground() {
|
private void startInForeground() {
|
||||||
@ -272,6 +298,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
MenuItem historyItem = menu.findItem(R.id.action_history);
|
MenuItem historyItem = menu.findItem(R.id.action_history);
|
||||||
MenuItem mostLikedItem = menu.findItem(R.id.action_most_liked);
|
MenuItem mostLikedItem = menu.findItem(R.id.action_most_liked);
|
||||||
MenuItem settingsItem = menu.findItem(R.id.action_settings);
|
MenuItem settingsItem = menu.findItem(R.id.action_settings);
|
||||||
|
MenuItem sepiaSearchItem = menu.findItem(R.id.action_sepia_search);
|
||||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||||
instanceItem.setVisible(false);
|
instanceItem.setVisible(false);
|
||||||
uploadItem.setVisible(true);
|
uploadItem.setVisible(true);
|
||||||
@ -289,6 +316,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
settingsItem.setVisible(true);
|
settingsItem.setVisible(true);
|
||||||
mostLikedItem.setVisible(false);
|
mostLikedItem.setVisible(false);
|
||||||
}
|
}
|
||||||
|
if( !BuildConfig.full_instances) {
|
||||||
|
sepiaSearchItem.setVisible(false);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +373,11 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
Intent intent = new Intent(MainActivity.this, AllPlaylistsActivity.class);
|
Intent intent = new Intent(MainActivity.this, AllPlaylistsActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
} else if (item.getItemId() == R.id.action_about) {
|
}else if(item.getItemId() == R.id.action_sepia_search) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, SepiaSearchActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
|
}else if (item.getItemId() == R.id.action_about) {
|
||||||
Intent intent = new Intent(MainActivity.this, AboutActivity.class);
|
Intent intent = new Intent(MainActivity.this, AboutActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
@ -351,6 +385,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setActive(DisplayVideosFragment displayVideosFragment){
|
||||||
|
this.active = displayVideosFragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubscriptionFragment(DisplayVideosFragment displayVideosFragment) {
|
||||||
|
this.subscriptionFragment = displayVideosFragment;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onNewIntent(Intent intent) {
|
protected void onNewIntent(Intent intent) {
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
|
@ -160,6 +160,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
private boolean isMyVideo;
|
private boolean isMyVideo;
|
||||||
private List<Comment> comments;
|
private List<Comment> comments;
|
||||||
private CommentListAdapter commentListAdapter;
|
private CommentListAdapter commentListAdapter;
|
||||||
|
private boolean sepiaSearch;
|
||||||
|
|
||||||
public static void hideKeyboard(Activity activity) {
|
public static void hideKeyboard(Activity activity) {
|
||||||
if (activity != null && activity.getWindow() != null) {
|
if (activity != null && activity.getWindow() != null) {
|
||||||
@ -198,7 +199,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
String token = sharedpreferences.getString(Helper.PREF_KEY_OAUTH_TOKEN, null);
|
||||||
if (Helper.isLoggedIn(PeertubeActivity.this)) {
|
if (Helper.isLoggedIn(PeertubeActivity.this) && !sepiaSearch) {
|
||||||
Account account = new AccountDAO(PeertubeActivity.this, db).getAccountByToken(token);
|
Account account = new AccountDAO(PeertubeActivity.this, db).getAccountByToken(token);
|
||||||
Helper.loadGiF(PeertubeActivity.this, account.getAvatar() != null ? account.getAvatar().getPath() : null, my_pp);
|
Helper.loadGiF(PeertubeActivity.this, account.getAvatar() != null ? account.getAvatar().getPath() : null, my_pp);
|
||||||
}
|
}
|
||||||
@ -224,6 +225,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
|
peertubeInstance = b.getString("peertube_instance", Helper.getLiveInstance(PeertubeActivity.this));
|
||||||
videoUuid = b.getString("video_uuid", null);
|
videoUuid = b.getString("video_uuid", null);
|
||||||
isMyVideo = b.getBoolean("isMyVideo", false);
|
isMyVideo = b.getBoolean("isMyVideo", false);
|
||||||
|
sepiaSearch = b.getBoolean("sepia_search", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -299,7 +301,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(videoUuid, max_id).observe(PeertubeActivity.this, apiresponse -> manageVIewComment(apiresponse));
|
commentViewModel.getThread(sepiaSearch?peertubeInstance:null, videoUuid, max_id).observe(PeertubeActivity.this, apiresponse -> manageVIewComment(apiresponse));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,9 +362,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(videoUuid, isMyVideo).observe(PeertubeActivity.this, this::manageVIewVideo);
|
feedsViewModel.getVideo(sepiaSearch?peertubeInstance:null, 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(videoUuid).observe(PeertubeActivity.this, this::manageCaptions);
|
captionsViewModel.getCaptions(sepiaSearch?peertubeInstance:null, videoUuid).observe(PeertubeActivity.this, this::manageCaptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void change() {
|
public void change() {
|
||||||
@ -502,7 +504,9 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
|
|
||||||
|
|
||||||
peertube = apiResponse.getPeertubes().get(0);
|
peertube = apiResponse.getPeertubes().get(0);
|
||||||
|
if( sepiaSearch) {
|
||||||
|
peertubeInstance = peertube.getAccount().getHost();
|
||||||
|
}
|
||||||
List<String> videoIds = new ArrayList<>();
|
List<String> videoIds = new ArrayList<>();
|
||||||
videoIds.add(peertube.getId());
|
videoIds.add(peertube.getId());
|
||||||
PlaylistsVM viewModel = new ViewModelProvider(this).get(PlaylistsVM.class);
|
PlaylistsVM viewModel = new ViewModelProvider(this).get(PlaylistsVM.class);
|
||||||
@ -510,7 +514,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
|
|
||||||
|
|
||||||
add_comment_read.setOnClickListener(v -> {
|
add_comment_read.setOnClickListener(v -> {
|
||||||
if (isLoggedIn(PeertubeActivity.this)) {
|
if (isLoggedIn(PeertubeActivity.this) && !sepiaSearch) {
|
||||||
add_comment_read.setVisibility(View.GONE);
|
add_comment_read.setVisibility(View.GONE);
|
||||||
add_comment_write.setVisibility(View.VISIBLE);
|
add_comment_write.setVisibility(View.VISIBLE);
|
||||||
send.setVisibility(View.VISIBLE);
|
send.setVisibility(View.VISIBLE);
|
||||||
@ -522,7 +526,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
|
|
||||||
});
|
});
|
||||||
send.setOnClickListener(v -> {
|
send.setOnClickListener(v -> {
|
||||||
if (isLoggedIn(PeertubeActivity.this)) {
|
if (isLoggedIn(PeertubeActivity.this) && !sepiaSearch) {
|
||||||
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 viewModelComment = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
PostActionsVM viewModelComment = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
||||||
@ -547,7 +551,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
|
|
||||||
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(videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
|
commentViewModel.getThread(sepiaSearch?peertubeInstance:null, videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
|
||||||
write_comment_container.setVisibility(View.VISIBLE);
|
write_comment_container.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -570,7 +574,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
initResolution();
|
initResolution();
|
||||||
|
|
||||||
peertube_like_count.setOnClickListener(v -> {
|
peertube_like_count.setOnClickListener(v -> {
|
||||||
if (isLoggedIn(PeertubeActivity.this)) {
|
if (isLoggedIn(PeertubeActivity.this) && !sepiaSearch) {
|
||||||
String newState = peertube.getMyRating().equals("like") ? "none" : "like";
|
String newState = peertube.getMyRating().equals("like") ? "none" : "like";
|
||||||
PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
||||||
viewModelLike.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));
|
||||||
@ -591,7 +595,7 @@ 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) && !sepiaSearch) {
|
||||||
String newState = peertube.getMyRating().equals("dislike") ? "none" : "dislike";
|
String newState = peertube.getMyRating().equals("dislike") ? "none" : "dislike";
|
||||||
PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
PostActionsVM viewModelLike = new ViewModelProvider(PeertubeActivity.this).get(PostActionsVM.class);
|
||||||
viewModelLike.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));
|
||||||
@ -712,7 +716,11 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||||||
|
|
||||||
Uri uri = null;
|
Uri uri = null;
|
||||||
if (which > 0) {
|
if (which > 0) {
|
||||||
uri = Uri.parse("https://" + getLiveInstance(PeertubeActivity.this) + captions.get(which - 1).getCaptionPath());
|
if( !sepiaSearch) {
|
||||||
|
uri = Uri.parse("https://" + getLiveInstance(PeertubeActivity.this) + captions.get(which - 1).getCaptionPath());
|
||||||
|
}else{
|
||||||
|
uri = Uri.parse("https://" + peertubeInstance + captions.get(which - 1).getCaptionPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
@ -934,7 +942,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(videoUuid, max_id).observe(PeertubeActivity.this, this::manageVIewComment);
|
commentViewModel.getThread(sepiaSearch?peertubeInstance:null, 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) {
|
||||||
|
@ -224,7 +224,7 @@ public class PeertubeEditUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
|
|
||||||
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeEditUploadActivity.this).get(TimelineVM.class);
|
TimelineVM feedsViewModel = new ViewModelProvider(PeertubeEditUploadActivity.this).get(TimelineVM.class);
|
||||||
feedsViewModel.getMyVideo(videoId).observe(PeertubeEditUploadActivity.this, this::manageVIewVideo);
|
feedsViewModel.getMyVideo(null, videoId).observe(PeertubeEditUploadActivity.this, this::manageVIewVideo);
|
||||||
channels = new LinkedHashMap<>();
|
channels = new LinkedHashMap<>();
|
||||||
|
|
||||||
setTitle(R.string.edit_video);
|
setTitle(R.string.edit_video);
|
||||||
|
@ -0,0 +1,414 @@
|
|||||||
|
package app.fedilab.fedilabtube;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
|
import com.mancj.materialsearchbar.MaterialSearchBar;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.client.entities.SepiaSearch;
|
||||||
|
import app.fedilab.fedilabtube.fragment.DisplaySepiaSearchFragment;
|
||||||
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
|
import mabbas007.tagsedittext.TagsEditText;
|
||||||
|
|
||||||
|
import static app.fedilab.fedilabtube.MainActivity.peertubeInformation;
|
||||||
|
import static app.fedilab.fedilabtube.PeertubeActivity.hideKeyboard;
|
||||||
|
|
||||||
|
|
||||||
|
public class SepiaSearchActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
|
||||||
|
private SepiaSearch sepiaSearchVideo, sepiaSearchChannel;
|
||||||
|
private TagsEditText sepia_element_all_of_tags, sepia_element_one_of_tags;
|
||||||
|
private MaterialSearchBar searchBar;
|
||||||
|
private ConstraintLayout filter_elements;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
setContentView(R.layout.activity_sepia_search);
|
||||||
|
|
||||||
|
sepiaSearchVideo = new SepiaSearch();
|
||||||
|
sepiaSearchChannel = new SepiaSearch();
|
||||||
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
sepiaSearchVideo.setCount(String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE)));
|
||||||
|
sepiaSearchVideo.setDurationMin(0);
|
||||||
|
sepiaSearchVideo.setDurationMax(9999999);
|
||||||
|
sepiaSearchVideo.setStart("0");
|
||||||
|
sepiaSearchVideo.setSort("-match");
|
||||||
|
if (getSupportActionBar() != null)
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
|
||||||
|
Button filter = findViewById(R.id.filter);
|
||||||
|
filter_elements = findViewById(R.id.filter_elements);
|
||||||
|
filter.setOnClickListener(view -> {
|
||||||
|
if( filter_elements.getVisibility() == View.VISIBLE) {
|
||||||
|
filter_elements.setVisibility(View.GONE);
|
||||||
|
}else{
|
||||||
|
filter_elements.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
RadioGroup sepia_element_nsfw = findViewById(R.id.sepia_element_nsfw);
|
||||||
|
sepia_element_nsfw.setOnCheckedChangeListener((group, checkedId) -> {
|
||||||
|
if (checkedId == R.id.sepia_element_nsfw_no) {
|
||||||
|
sepiaSearchVideo.setNsfw(false);
|
||||||
|
} else {
|
||||||
|
sepiaSearchVideo.setNsfw(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
RadioGroup radio_date = findViewById(R.id.radio_date);
|
||||||
|
radio_date.setOnCheckedChangeListener((group, checkedId) -> {
|
||||||
|
switch(checkedId){
|
||||||
|
case R.id.sepia_element_published_date_today:
|
||||||
|
Calendar cal = GregorianCalendar.getInstance();
|
||||||
|
cal.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
cal.set(Calendar.MINUTE, 0);
|
||||||
|
cal.set(Calendar.SECOND, 0);
|
||||||
|
cal.set(Calendar.MILLISECOND, 0);
|
||||||
|
sepiaSearchVideo.setStartDate(cal.getTime());
|
||||||
|
break;
|
||||||
|
case R.id.sepia_element_published_date_last_7_days:
|
||||||
|
cal = GregorianCalendar.getInstance();
|
||||||
|
cal.setTime(new Date());
|
||||||
|
cal.add(Calendar.DAY_OF_YEAR, -7);
|
||||||
|
sepiaSearchVideo.setStartDate(cal.getTime());
|
||||||
|
break;
|
||||||
|
case R.id.sepia_element_published_date_last_30_days:
|
||||||
|
cal = GregorianCalendar.getInstance();
|
||||||
|
cal.setTime(new Date());
|
||||||
|
cal.add(Calendar.DAY_OF_YEAR, -30);
|
||||||
|
sepiaSearchVideo.setStartDate(cal.getTime());
|
||||||
|
break;
|
||||||
|
case R.id.sepia_element_published_date_last_365_days:
|
||||||
|
cal = GregorianCalendar.getInstance();
|
||||||
|
cal.setTime(new Date());
|
||||||
|
cal.add(Calendar.DAY_OF_YEAR, -365);
|
||||||
|
sepiaSearchVideo.setStartDate(cal.getTime());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sepiaSearchVideo.setStartDate(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
RadioGroup duration = findViewById(R.id.duration);
|
||||||
|
duration.setOnCheckedChangeListener((group, checkedId) -> {
|
||||||
|
switch(checkedId){
|
||||||
|
case R.id.sepia_element_duration_short:
|
||||||
|
sepiaSearchVideo.setDurationMin(0);
|
||||||
|
sepiaSearchVideo.setDurationMax(240);
|
||||||
|
break;
|
||||||
|
case R.id.sepia_element_duration_medium:
|
||||||
|
sepiaSearchVideo.setDurationMin(240);
|
||||||
|
sepiaSearchVideo.setDurationMax(600);
|
||||||
|
break;
|
||||||
|
case R.id.sepia_element_duration_long:
|
||||||
|
sepiaSearchVideo.setDurationMin(600);
|
||||||
|
sepiaSearchVideo.setDurationMax(999999999);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sepiaSearchVideo.setDurationMin(0);
|
||||||
|
sepiaSearchVideo.setDurationMax(999999999);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Spinner sort_by = findViewById(R.id.sort_by);
|
||||||
|
ArrayAdapter<String> adapterSortBy = new ArrayAdapter<>(SepiaSearchActivity.this,
|
||||||
|
android.R.layout.simple_spinner_dropdown_item, getResources().getStringArray(R.array.sort_by_array));
|
||||||
|
sort_by.setAdapter(adapterSortBy);
|
||||||
|
sort_by.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
String orderby, channelOrderBy;
|
||||||
|
switch (position){
|
||||||
|
case 1:
|
||||||
|
orderby = "-publishedAt";
|
||||||
|
channelOrderBy = "-createdAt";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
orderby = "publishedAt";
|
||||||
|
channelOrderBy = "createdAt";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
orderby = "-match";
|
||||||
|
channelOrderBy = null;
|
||||||
|
}
|
||||||
|
sepiaSearchVideo.setSort(orderby);
|
||||||
|
sepiaSearchChannel.setSort(channelOrderBy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Spinner sepia_element_category = findViewById(R.id.sepia_element_category);
|
||||||
|
Spinner sepia_element_license = findViewById(R.id.sepia_element_license);
|
||||||
|
Spinner sepia_element_language = findViewById(R.id.sepia_element_language);
|
||||||
|
|
||||||
|
sepia_element_all_of_tags = findViewById(R.id.sepia_element_all_of_tags);
|
||||||
|
sepia_element_one_of_tags = findViewById(R.id.sepia_element_one_of_tags);
|
||||||
|
|
||||||
|
LinkedHashMap<Integer, String> categories = new LinkedHashMap<>(peertubeInformation.getCategories());
|
||||||
|
LinkedHashMap<Integer, String> licences = new LinkedHashMap<>(peertubeInformation.getLicences());
|
||||||
|
LinkedHashMap<String, String> languages = new LinkedHashMap<>(peertubeInformation.getLanguages());
|
||||||
|
LinkedHashMap<String, String> translations = new LinkedHashMap<>(peertubeInformation.getTranslations());
|
||||||
|
|
||||||
|
//Populate catgories
|
||||||
|
String[] categoriesA = new String[categories.size()+1];
|
||||||
|
categoriesA[0] = getString(R.string.display_all_categories);
|
||||||
|
Iterator<Map.Entry<Integer, String>> it = categories.entrySet().iterator();
|
||||||
|
int i = 1;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Map.Entry<Integer, String> pair = it.next();
|
||||||
|
if (translations.size() == 0 || !translations.containsKey(pair.getValue()))
|
||||||
|
categoriesA[i] = pair.getValue();
|
||||||
|
else
|
||||||
|
categoriesA[i] = translations.get(pair.getValue());
|
||||||
|
it.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapterCatgories = new ArrayAdapter<>(SepiaSearchActivity.this,
|
||||||
|
android.R.layout.simple_spinner_dropdown_item, categoriesA);
|
||||||
|
sepia_element_category.setAdapter(adapterCatgories);
|
||||||
|
|
||||||
|
|
||||||
|
//Populate licenses
|
||||||
|
String[] licensesA = new String[licences.size()+1];
|
||||||
|
licensesA[0] = getString(R.string.display_all_licenses);
|
||||||
|
it = licences.entrySet().iterator();
|
||||||
|
i = 1;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Map.Entry<Integer, String> pair = it.next();
|
||||||
|
if (translations.size() == 0 || !translations.containsKey(pair.getValue()))
|
||||||
|
licensesA[i] = pair.getValue();
|
||||||
|
else
|
||||||
|
licensesA[i] = translations.get(pair.getValue());
|
||||||
|
it.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapterLicenses = new ArrayAdapter<>(SepiaSearchActivity.this,
|
||||||
|
android.R.layout.simple_spinner_dropdown_item, licensesA);
|
||||||
|
sepia_element_license.setAdapter(adapterLicenses);
|
||||||
|
|
||||||
|
//Populate languages
|
||||||
|
String[] languagesA = new String[languages.size()+1];
|
||||||
|
languagesA[0] = getString(R.string.display_all_languages);
|
||||||
|
Iterator<Map.Entry<String, String>> itl = languages.entrySet().iterator();
|
||||||
|
i = 1;
|
||||||
|
while (itl.hasNext()) {
|
||||||
|
Map.Entry<String, String> pair = itl.next();
|
||||||
|
if (translations.size() == 0 || !translations.containsKey(pair.getValue()))
|
||||||
|
languagesA[i] = pair.getValue();
|
||||||
|
else
|
||||||
|
languagesA[i] = translations.get(pair.getValue());
|
||||||
|
itl.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
ArrayAdapter<String> adapterLanguages = new ArrayAdapter<>(SepiaSearchActivity.this,
|
||||||
|
android.R.layout.simple_spinner_dropdown_item, languagesA);
|
||||||
|
sepia_element_language.setAdapter(adapterLanguages);
|
||||||
|
|
||||||
|
|
||||||
|
sepia_element_license.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
updateLicensePosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//Manage categories
|
||||||
|
sepia_element_category.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
updateCategoryPosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Manage languages
|
||||||
|
sepia_element_language.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
updateLanguagesPosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
searchBar = findViewById(R.id.searchBar);
|
||||||
|
|
||||||
|
searchBar.setOnSearchActionListener(new MaterialSearchBar.OnSearchActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onSearchStateChanged(boolean enabled) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSearchConfirmed(CharSequence text) {
|
||||||
|
makeSearch();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onButtonClicked(int buttonCode) {
|
||||||
|
makeSearch();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Button apply_filter = findViewById(R.id.apply_filter);
|
||||||
|
apply_filter.setOnClickListener(v-> makeSearch());
|
||||||
|
|
||||||
|
searchBar.openSearch();
|
||||||
|
getWindow().setSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void makeSearch(){
|
||||||
|
hideKeyboard(SepiaSearchActivity.this);
|
||||||
|
sepiaSearchVideo.setStart("0");
|
||||||
|
if( sepia_element_one_of_tags.getTags().size() > 0 ) {
|
||||||
|
sepiaSearchVideo.setTagsOneOf(sepia_element_one_of_tags.getTags());
|
||||||
|
}else{
|
||||||
|
sepiaSearchVideo.setTagsOneOf(null);
|
||||||
|
}
|
||||||
|
if( sepia_element_all_of_tags.getTags().size() > 0 ) {
|
||||||
|
sepiaSearchVideo.setTagsAllOf(sepia_element_all_of_tags.getTags());
|
||||||
|
}else{
|
||||||
|
sepiaSearchVideo.setTagsAllOf(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
Fragment fragment = getSupportFragmentManager().findFragmentByTag("SEPIA_SEARCH");
|
||||||
|
if(fragment != null)
|
||||||
|
getSupportFragmentManager().beginTransaction().remove(fragment).commit();
|
||||||
|
filter_elements.setVisibility(View.GONE);
|
||||||
|
sepiaSearchVideo.setSearch(searchBar.getText());
|
||||||
|
DisplaySepiaSearchFragment displaySepiaSearchFragment = new DisplaySepiaSearchFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putParcelable("sepiaSearchVideo", sepiaSearchVideo);
|
||||||
|
displaySepiaSearchFragment.setArguments(bundle);
|
||||||
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
|
ft.add(R.id.container, displaySepiaSearchFragment,"SEPIA_SEARCH").commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLanguagesPosition(int position) {
|
||||||
|
LinkedHashMap<String, String> languagesCheck = new LinkedHashMap<>(peertubeInformation.getLanguages());
|
||||||
|
Iterator<Map.Entry<String, String>> it = languagesCheck.entrySet().iterator();
|
||||||
|
int i = 0;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Map.Entry<String, String> pair = it.next();
|
||||||
|
if (i == position && position > 0) {
|
||||||
|
List<String> languages = new ArrayList<>();
|
||||||
|
languages.add(pair.getKey());
|
||||||
|
sepiaSearchVideo.setBoostLanguages(languages);
|
||||||
|
break;
|
||||||
|
}else {
|
||||||
|
sepiaSearchVideo.setBoostLanguages(null);
|
||||||
|
}
|
||||||
|
it.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateCategoryPosition(int position) {
|
||||||
|
LinkedHashMap<Integer, String> categoriesCheck = new LinkedHashMap<>(peertubeInformation.getCategories());
|
||||||
|
Iterator<Map.Entry<Integer, String>> it = categoriesCheck.entrySet().iterator();
|
||||||
|
int i = 0;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Map.Entry<Integer, String> pair = it.next();
|
||||||
|
if (i == position && position > 0 ) {
|
||||||
|
List<Integer> categories = new ArrayList<>();
|
||||||
|
categories.add(pair.getKey());
|
||||||
|
sepiaSearchVideo.setCategoryOneOf(categories);
|
||||||
|
break;
|
||||||
|
}else {
|
||||||
|
sepiaSearchVideo.setCategoryOneOf(null);
|
||||||
|
}
|
||||||
|
it.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateLicensePosition(int position) {
|
||||||
|
LinkedHashMap<Integer, String> licensesCheck = new LinkedHashMap<>(peertubeInformation.getLicences());
|
||||||
|
Iterator<Map.Entry<Integer, String>> it = licensesCheck.entrySet().iterator();
|
||||||
|
int i = 0;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
Map.Entry<Integer, String> pair = it.next();
|
||||||
|
if (i == position && position > 0) {
|
||||||
|
List<Integer> licenses = new ArrayList<>();
|
||||||
|
licenses.add(pair.getKey());
|
||||||
|
sepiaSearchVideo.setLicenceOneOf(licenses);
|
||||||
|
break;
|
||||||
|
}else {
|
||||||
|
sepiaSearchVideo.setLicenceOneOf(null);
|
||||||
|
}
|
||||||
|
it.remove();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -72,6 +72,7 @@ import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.UNFO
|
|||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.CHANNEL;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.DataType.CHANNEL;
|
||||||
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.TimelineVM.TimelineType.SEPIA_SEARCH;
|
||||||
|
|
||||||
|
|
||||||
public class ShowChannelActivity extends AppCompatActivity {
|
public class ShowChannelActivity extends AppCompatActivity {
|
||||||
@ -87,6 +88,8 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
private Channel channel;
|
private Channel channel;
|
||||||
private action doAction;
|
private action doAction;
|
||||||
private String channelAcct;
|
private String channelAcct;
|
||||||
|
private boolean sepiaSearch;
|
||||||
|
private String peertubeInstance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -103,6 +106,9 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
if (b != null) {
|
if (b != null) {
|
||||||
channel = b.getParcelable("channel");
|
channel = b.getParcelable("channel");
|
||||||
channelAcct = b.getString("channelId");
|
channelAcct = b.getString("channelId");
|
||||||
|
sepiaSearch = b.getBoolean("sepia_search", false);
|
||||||
|
peertubeInstance = b.getString("peertube_instance", null);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toasty.error(ShowChannelActivity.this, getString(R.string.toast_error_loading_account), Toast.LENGTH_LONG).show();
|
Toasty.error(ShowChannelActivity.this, getString(R.string.toast_error_loading_account), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
@ -116,14 +122,14 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
|
|
||||||
ChannelsVM viewModel = new ViewModelProvider(ShowChannelActivity.this).get(ChannelsVM.class);
|
ChannelsVM viewModel = new ViewModelProvider(ShowChannelActivity.this).get(ChannelsVM.class);
|
||||||
viewModel.get(CHANNEL, channelAcct == null ? channel.getAcct() : channelAcct).observe(ShowChannelActivity.this, this::manageViewAccounts);
|
viewModel.get(sepiaSearch?peertubeInstance:null, CHANNEL, channelAcct == null ? channel.getAcct() : channelAcct).observe(ShowChannelActivity.this, this::manageViewAccounts);
|
||||||
manageChannel();
|
manageChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(@NotNull Menu menu) {
|
public boolean onCreateOptionsMenu(@NotNull Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.main_account, menu);
|
getMenuInflater().inflate(R.menu.main_account, menu);
|
||||||
if (!Helper.isLoggedIn(ShowChannelActivity.this)) {
|
if (!Helper.isLoggedIn(ShowChannelActivity.this) || sepiaSearch) {
|
||||||
menu.findItem(R.id.action_mute).setVisible(false);
|
menu.findItem(R.id.action_mute).setVisible(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -163,7 +169,7 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
|
||||||
|
|
||||||
String accountIdRelation = channel.getAcct();
|
String accountIdRelation = channel.getAcct();
|
||||||
if (isLoggedIn(ShowChannelActivity.this)) {
|
if (isLoggedIn(ShowChannelActivity.this) && !sepiaSearch) {
|
||||||
RelationshipVM viewModel = new ViewModelProvider(ShowChannelActivity.this).get(RelationshipVM.class);
|
RelationshipVM viewModel = new ViewModelProvider(ShowChannelActivity.this).get(RelationshipVM.class);
|
||||||
List<String> uids = new ArrayList<>();
|
List<String> uids = new ArrayList<>();
|
||||||
uids.add(accountIdRelation);
|
uids.add(accountIdRelation);
|
||||||
@ -239,7 +245,7 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
|
|
||||||
manageNotes(channel);
|
manageNotes(channel);
|
||||||
Helper.loadGiF(ShowChannelActivity.this, channel.getAvatar() != null ? channel.getAvatar().getPath() : null, account_pp);
|
Helper.loadGiF(ShowChannelActivity.this, sepiaSearch?peertubeInstance:null, channel.getAvatar() != null ? channel.getAvatar().getPath() : null, account_pp);
|
||||||
//Follow button
|
//Follow button
|
||||||
String target = channel.getAcct();
|
String target = channel.getAcct();
|
||||||
|
|
||||||
@ -412,21 +418,14 @@ public class ShowChannelActivity extends AppCompatActivity {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment getItem(int position) {
|
public Fragment getItem(int position) {
|
||||||
|
DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
if (position == 0) {
|
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.USER_VIDEOS);
|
||||||
DisplayVideosFragment displayVideosFragment = new DisplayVideosFragment();
|
bundle.putString("channelId", channel.getAcct());
|
||||||
bundle = new Bundle();
|
bundle.putString("peertube_instance", channel.getHost());
|
||||||
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.USER_VIDEOS);
|
bundle.putBoolean("sepia_search", sepiaSearch);
|
||||||
bundle.putString("channelId", channel.getAcct());
|
displayVideosFragment.setArguments(bundle);
|
||||||
displayVideosFragment.setArguments(bundle);
|
return displayVideosFragment;
|
||||||
return displayVideosFragment;
|
|
||||||
}
|
|
||||||
DisplayAccountsFragment displayAccountsFragment = new DisplayAccountsFragment();
|
|
||||||
bundle.putString("targetedid", channel.getId());
|
|
||||||
bundle.putString("instance", getLiveInstance(ShowChannelActivity.this));
|
|
||||||
bundle.putString("name", channel.getAcct());
|
|
||||||
displayAccountsFragment.setArguments(bundle);
|
|
||||||
return displayAccountsFragment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public interface PeertubeService {
|
|||||||
Call<WellKnownNodeinfo> getWellKnownNodeinfo();
|
Call<WellKnownNodeinfo> getWellKnownNodeinfo();
|
||||||
|
|
||||||
@GET("{nodeInfoPath}")
|
@GET("{nodeInfoPath}")
|
||||||
Call<WellKnownNodeinfo.NodeInfo> getNodeinfo(@Path("nodeInfoPath") String nodeInfoPath);
|
Call<WellKnownNodeinfo.NodeInfo> getNodeinfo(@Path(value = "nodeInfoPath", encoded = true) String nodeInfoPath);
|
||||||
|
|
||||||
@GET("{captionContent}")
|
@GET("{captionContent}")
|
||||||
Call<String> getCaptionContent(@Path("captionContent") String captionContent);
|
Call<String> getCaptionContent(@Path("captionContent") String captionContent);
|
||||||
@ -288,7 +288,7 @@ 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, @Query("count") String count);
|
Call<ChannelData> getSubscription(@Header("Authorization") String credentials, @Query("start") String maxId, @Query("count") String count);
|
||||||
|
|
||||||
@GET("users/me/subscriptions/exist")
|
@GET("users/me/subscriptions/exist")
|
||||||
Call<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);
|
||||||
|
@ -25,6 +25,7 @@ import android.os.Looper;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URL;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@ -86,7 +87,7 @@ 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);
|
private String count;
|
||||||
|
|
||||||
public RetrofitPeertubeAPI(Context context) {
|
public RetrofitPeertubeAPI(Context context) {
|
||||||
_context = context;
|
_context = context;
|
||||||
@ -310,7 +311,7 @@ public class RetrofitPeertubeAPI {
|
|||||||
return apiResponse;
|
return apiResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public APIResponse getTL(TimelineVM.TimelineType timelineType, String max_id) {
|
public APIResponse getTL(TimelineVM.TimelineType timelineType, String max_id, String forAccount) {
|
||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
PeertubeService peertubeService = init();
|
PeertubeService peertubeService = init();
|
||||||
Call<VideoData> videoCall = null;
|
Call<VideoData> videoCall = null;
|
||||||
@ -320,7 +321,11 @@ public class RetrofitPeertubeAPI {
|
|||||||
videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
|
videoCall = peertubeService.getMyVideos(getToken(), max_id, count);
|
||||||
break;
|
break;
|
||||||
case SUBSCRIBTIONS:
|
case SUBSCRIBTIONS:
|
||||||
videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter);
|
if (forAccount == null) {
|
||||||
|
videoCall = peertubeService.getSubscriptionVideos(getToken(), max_id, count, filter);
|
||||||
|
} else {
|
||||||
|
videoCall = peertubeService.getChannelVideos(forAccount, max_id, count);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MOST_LIKED:
|
case MOST_LIKED:
|
||||||
videoCall = peertubeService.getMostLikedVideos(max_id, count, filter);
|
videoCall = peertubeService.getMostLikedVideos(max_id, count, filter);
|
||||||
@ -869,13 +874,13 @@ 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, count);
|
Call<ChannelData> channelDataCall = peertubeService.getSubscription("Bearer " + token, maxId, count);
|
||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
if (accountDataCall != null) {
|
if (channelDataCall != null) {
|
||||||
try {
|
try {
|
||||||
Response<AccountData> response = accountDataCall.execute();
|
Response<ChannelData> response = channelDataCall.execute();
|
||||||
if (response.isSuccessful() && response.body() != null) {
|
if (response.isSuccessful() && response.body() != null) {
|
||||||
apiResponse.setAccounts(response.body().data);
|
apiResponse.setChannels(response.body().data);
|
||||||
} else {
|
} else {
|
||||||
setError(apiResponse, response.code(), response.errorBody());
|
setError(apiResponse, response.code(), response.errorBody());
|
||||||
}
|
}
|
||||||
@ -959,13 +964,18 @@ public class RetrofitPeertubeAPI {
|
|||||||
* @return APIResponse
|
* @return APIResponse
|
||||||
*/
|
*/
|
||||||
public WellKnownNodeinfo.NodeInfo getNodeInfo() {
|
public WellKnownNodeinfo.NodeInfo getNodeInfo() {
|
||||||
PeertubeService peertubeService = init();
|
PeertubeService peertubeService = initTranslation();
|
||||||
try {
|
try {
|
||||||
Call<WellKnownNodeinfo> wellKnownNodeinfoCall = peertubeService.getWellKnownNodeinfo();
|
Call<WellKnownNodeinfo> wellKnownNodeinfoCall = peertubeService.getWellKnownNodeinfo();
|
||||||
Response<WellKnownNodeinfo> response = wellKnownNodeinfoCall.execute();
|
Response<WellKnownNodeinfo> response = wellKnownNodeinfoCall.execute();
|
||||||
if (response.isSuccessful() && response.body() != null) {
|
if (response.isSuccessful() && response.body() != null) {
|
||||||
if (response.body().getHref() != null) {
|
int size = response.body().getLinks().size();
|
||||||
Call<WellKnownNodeinfo.NodeInfo> nodeinfo = peertubeService.getNodeinfo(response.body().getHref());
|
String url = response.body().getLinks().get(size - 1).getHref();
|
||||||
|
if (size > 0 && url != null) {
|
||||||
|
peertubeService = initTranslation();
|
||||||
|
String path = new URL(url).getPath();
|
||||||
|
path = path.replaceFirst("/", "").trim();
|
||||||
|
Call<WellKnownNodeinfo.NodeInfo> nodeinfo = peertubeService.getNodeinfo(path);
|
||||||
Response<WellKnownNodeinfo.NodeInfo> responseNodeInfo = nodeinfo.execute();
|
Response<WellKnownNodeinfo.NodeInfo> responseNodeInfo = nodeinfo.execute();
|
||||||
return responseNodeInfo.body();
|
return responseNodeInfo.body();
|
||||||
}
|
}
|
||||||
@ -994,7 +1004,6 @@ public class RetrofitPeertubeAPI {
|
|||||||
try {
|
try {
|
||||||
Response<ChannelData> response = channelDataCall.execute();
|
Response<ChannelData> response = channelDataCall.execute();
|
||||||
if (response.isSuccessful() && response.body() != null) {
|
if (response.isSuccessful() && response.body() != null) {
|
||||||
|
|
||||||
apiResponse.setChannels(response.body().data);
|
apiResponse.setChannels(response.body().data);
|
||||||
} else {
|
} else {
|
||||||
setError(apiResponse, response.code(), response.errorBody());
|
setError(apiResponse, response.code(), response.errorBody());
|
||||||
@ -1334,6 +1343,7 @@ public class RetrofitPeertubeAPI {
|
|||||||
APIResponse apiResponse = new APIResponse();
|
APIResponse apiResponse = new APIResponse();
|
||||||
try {
|
try {
|
||||||
Response<VideoData.Video> response = video.execute();
|
Response<VideoData.Video> response = video.execute();
|
||||||
|
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
List<VideoData.Video> videos = new ArrayList<>();
|
List<VideoData.Video> videos = new ArrayList<>();
|
||||||
videos.add(response.body());
|
videos.add(response.body());
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
package app.fedilab.fedilabtube.client;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
|
import app.fedilab.fedilabtube.client.entities.SepiaSearch;
|
||||||
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Response;
|
||||||
|
import retrofit2.Retrofit;
|
||||||
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
|
|
||||||
|
public class RetrofitSepiaSearchAPI {
|
||||||
|
|
||||||
|
|
||||||
|
private String finalUrl;
|
||||||
|
|
||||||
|
|
||||||
|
public RetrofitSepiaSearchAPI() {
|
||||||
|
finalUrl = "https://search.joinpeertube.org/api/v1/";
|
||||||
|
}
|
||||||
|
|
||||||
|
private SepiaSearchService init() {
|
||||||
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
|
.baseUrl(finalUrl)
|
||||||
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
|
.build();
|
||||||
|
return retrofit.create(SepiaSearchService.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return videos for a sepia search
|
||||||
|
* @param sepiaSearch SepiaSearch
|
||||||
|
* @return VideoData
|
||||||
|
*/
|
||||||
|
public VideoData getVideos(SepiaSearch sepiaSearch) {
|
||||||
|
SepiaSearchService sepiaSearchService = init();
|
||||||
|
SimpleDateFormat fmtOut = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH);
|
||||||
|
String startDate = null;
|
||||||
|
if(sepiaSearch.getStartDate() != null) {
|
||||||
|
startDate = fmtOut.format(sepiaSearch.getStartDate());
|
||||||
|
}
|
||||||
|
Call<VideoData> videoDataCall = sepiaSearchService.getVideos(
|
||||||
|
sepiaSearch.getStart(),
|
||||||
|
sepiaSearch.getCount(),
|
||||||
|
sepiaSearch.getSearch(),
|
||||||
|
sepiaSearch.getDurationMin(),
|
||||||
|
sepiaSearch.getDurationMax(),
|
||||||
|
startDate,
|
||||||
|
sepiaSearch.getBoostLanguages(),
|
||||||
|
sepiaSearch.getCategoryOneOf(),
|
||||||
|
sepiaSearch.getLicenceOneOf(),
|
||||||
|
sepiaSearch.getTagsOneOf(),
|
||||||
|
sepiaSearch.getTagsAllOf(),
|
||||||
|
sepiaSearch.isNsfw(),
|
||||||
|
sepiaSearch.getSort());
|
||||||
|
|
||||||
|
try {
|
||||||
|
Response<VideoData> response = videoDataCall.execute();
|
||||||
|
if (response.isSuccessful() && response.body() != null) {
|
||||||
|
return response.body();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package app.fedilab.fedilabtube.client;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
interface SepiaSearchService {
|
||||||
|
|
||||||
|
@GET("search/videos")
|
||||||
|
Call<VideoData> getVideos(
|
||||||
|
@Query("start") String maxId,
|
||||||
|
@Query("count") String count,
|
||||||
|
@Query("search") String search,
|
||||||
|
@Query("durationMin") int durationMin,
|
||||||
|
@Query("durationMax") int durationMax,
|
||||||
|
@Query("startDate") String startDate,
|
||||||
|
@Query("boostLanguages") List<String> languageOneOf,
|
||||||
|
@Query("categoryOneOf") List<Integer> categoryOneOf,
|
||||||
|
@Query("licenceOneOf") List<Integer> licenceOneOf,
|
||||||
|
@Query("tagsOneOf") List<String> tagsOneOf,
|
||||||
|
@Query("tagsAllOf") List<String> tagsAllOf,
|
||||||
|
@Query("nsfw") boolean nsfw,
|
||||||
|
@Query("sort") String sort
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
@GET("search/channels")
|
||||||
|
Call<ChannelData> getChannels(
|
||||||
|
@Query("search") String search,
|
||||||
|
@Query("start") String maxId,
|
||||||
|
@Query("count") String count
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
@ -77,7 +77,7 @@ public class AccountData {
|
|||||||
private String client_id;
|
private String client_id;
|
||||||
private String client_secret;
|
private String client_secret;
|
||||||
private String refresh_token;
|
private String refresh_token;
|
||||||
private boolean selected;
|
|
||||||
|
|
||||||
public Account() {
|
public Account() {
|
||||||
}
|
}
|
||||||
@ -197,14 +197,6 @@ public class AccountData {
|
|||||||
this.url = url;
|
this.url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSelected() {
|
|
||||||
return selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelected(boolean selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAcct() {
|
public String getAcct() {
|
||||||
return name + "@" + host;
|
return name + "@" + host;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ public class ChannelData {
|
|||||||
@SerializedName("viewsPerDay")
|
@SerializedName("viewsPerDay")
|
||||||
private List<ViewsPerDay> viewsPerDays;
|
private List<ViewsPerDay> viewsPerDays;
|
||||||
private String acct;
|
private String acct;
|
||||||
|
private boolean selected;
|
||||||
|
|
||||||
public Channel() {
|
public Channel() {
|
||||||
}
|
}
|
||||||
@ -243,6 +244,14 @@ public class ChannelData {
|
|||||||
this.viewsPerDays = viewsPerDays;
|
this.viewsPerDays = viewsPerDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSelected() {
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelected(boolean selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -0,0 +1,217 @@
|
|||||||
|
package app.fedilab.fedilabtube.client.entities;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class SepiaSearch implements Parcelable {
|
||||||
|
|
||||||
|
@SerializedName("start")
|
||||||
|
private String start;
|
||||||
|
@SerializedName("count")
|
||||||
|
private String count;
|
||||||
|
@SerializedName("search")
|
||||||
|
private String search;
|
||||||
|
@SerializedName("durationMax")
|
||||||
|
private int durationMax;
|
||||||
|
@SerializedName("durationMin")
|
||||||
|
private int durationMin;
|
||||||
|
@SerializedName("startDate")
|
||||||
|
private Date startDate;
|
||||||
|
@SerializedName("boostLanguages")
|
||||||
|
private List<String> boostLanguages;
|
||||||
|
@SerializedName("categoryOneOf")
|
||||||
|
private List<Integer> categoryOneOf;
|
||||||
|
@SerializedName("licenceOneOf")
|
||||||
|
private List<Integer> licenceOneOf;
|
||||||
|
@SerializedName("tagsOneOf")
|
||||||
|
private List<String> tagsOneOf;
|
||||||
|
@SerializedName("tagsAllOf")
|
||||||
|
private List<String> tagsAllOf;
|
||||||
|
@SerializedName("nsfw")
|
||||||
|
private boolean nsfw;
|
||||||
|
@SerializedName("sort")
|
||||||
|
private String sort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getStart() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStart(String start) {
|
||||||
|
this.start = start;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(String count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSearch() {
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearch(String search) {
|
||||||
|
this.search = search;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDurationMax() {
|
||||||
|
return durationMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDurationMax(int durationMax) {
|
||||||
|
this.durationMax = durationMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDurationMin() {
|
||||||
|
return durationMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDurationMin(int durationMin) {
|
||||||
|
this.durationMin = durationMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(Date startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getBoostLanguages() {
|
||||||
|
return boostLanguages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoostLanguages(List<String> boostLanguages) {
|
||||||
|
this.boostLanguages = boostLanguages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getCategoryOneOf() {
|
||||||
|
return categoryOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryOneOf(List<Integer> categoryOneOf) {
|
||||||
|
this.categoryOneOf = categoryOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getLicenceOneOf() {
|
||||||
|
return licenceOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLicenceOneOf(List<Integer> licenceOneOf) {
|
||||||
|
this.licenceOneOf = licenceOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getTagsOneOf() {
|
||||||
|
return tagsOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagsOneOf(List<String> tagsOneOf) {
|
||||||
|
this.tagsOneOf = tagsOneOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getTagsAllOf() {
|
||||||
|
return tagsAllOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTagsAllOf(List<String> tagsAllOf) {
|
||||||
|
this.tagsAllOf = tagsAllOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNsfw() {
|
||||||
|
return nsfw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNsfw(boolean nsfw) {
|
||||||
|
this.nsfw = nsfw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(String sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
dest.writeString(this.start);
|
||||||
|
dest.writeString(this.count);
|
||||||
|
dest.writeString(this.search);
|
||||||
|
dest.writeInt(this.durationMax);
|
||||||
|
dest.writeInt(this.durationMin);
|
||||||
|
dest.writeLong(this.startDate != null ? this.startDate.getTime() : -1);
|
||||||
|
dest.writeStringList(this.boostLanguages);
|
||||||
|
dest.writeList(this.categoryOneOf);
|
||||||
|
dest.writeList(this.licenceOneOf);
|
||||||
|
dest.writeStringList(this.tagsOneOf);
|
||||||
|
dest.writeStringList(this.tagsAllOf);
|
||||||
|
dest.writeByte(this.nsfw ? (byte) 1 : (byte) 0);
|
||||||
|
dest.writeString(this.sort);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SepiaSearch() {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected SepiaSearch(Parcel in) {
|
||||||
|
this.start = in.readString();
|
||||||
|
this.count = in.readString();
|
||||||
|
this.search = in.readString();
|
||||||
|
this.durationMax = in.readInt();
|
||||||
|
this.durationMin = in.readInt();
|
||||||
|
long tmpStartDate = in.readLong();
|
||||||
|
this.startDate = tmpStartDate == -1 ? null : new Date(tmpStartDate);
|
||||||
|
this.boostLanguages = in.createStringArrayList();
|
||||||
|
this.categoryOneOf = new ArrayList<>();
|
||||||
|
in.readList(this.categoryOneOf, Integer.class.getClassLoader());
|
||||||
|
this.licenceOneOf = new ArrayList<>();
|
||||||
|
in.readList(this.licenceOneOf, Integer.class.getClassLoader());
|
||||||
|
this.tagsOneOf = in.createStringArrayList();
|
||||||
|
this.tagsAllOf = in.createStringArrayList();
|
||||||
|
this.nsfw = in.readByte() != 0;
|
||||||
|
this.sort = in.readString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<SepiaSearch> CREATOR = new Creator<SepiaSearch>() {
|
||||||
|
@Override
|
||||||
|
public SepiaSearch createFromParcel(Parcel source) {
|
||||||
|
return new SepiaSearch(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SepiaSearch[] newArray(int size) {
|
||||||
|
return new SepiaSearch[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -17,27 +17,44 @@ package app.fedilab.fedilabtube.client.entities;
|
|||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "RedundantSuppression"})
|
@SuppressWarnings({"unused", "RedundantSuppression"})
|
||||||
public class WellKnownNodeinfo {
|
public class WellKnownNodeinfo {
|
||||||
@SerializedName("reel")
|
|
||||||
private String reel;
|
|
||||||
@SerializedName("href")
|
|
||||||
private String href;
|
|
||||||
|
|
||||||
public String getReel() {
|
|
||||||
return reel;
|
@SerializedName("links")
|
||||||
|
private List<NodeInfoLinks> links;
|
||||||
|
|
||||||
|
public List<NodeInfoLinks> getLinks() {
|
||||||
|
return links;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReel(String reel) {
|
public void setLinks(List<NodeInfoLinks> links) {
|
||||||
this.reel = reel;
|
this.links = links;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getHref() {
|
public static class NodeInfoLinks {
|
||||||
return href;
|
@SerializedName("reel")
|
||||||
}
|
private String reel;
|
||||||
|
@SerializedName("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
public void setHref(String href) {
|
public String getReel() {
|
||||||
this.href = href;
|
return reel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReel(String reel) {
|
||||||
|
this.reel = reel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class NodeInfo {
|
public static class NodeInfo {
|
||||||
|
@ -31,18 +31,18 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import app.fedilab.fedilabtube.R;
|
import app.fedilab.fedilabtube.R;
|
||||||
import app.fedilab.fedilabtube.client.data.AccountData.Account;
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
import app.fedilab.fedilabtube.helper.Helper;
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
|
|
||||||
|
|
||||||
public class AccountsHorizontalListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class AccountsHorizontalListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
|
||||||
EventListener listener;
|
EventListener listener;
|
||||||
private List<Account> accounts;
|
private List<ChannelData.Channel> channels;
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public AccountsHorizontalListAdapter(List<Account> accounts, EventListener listener) {
|
public AccountsHorizontalListAdapter(List<ChannelData.Channel> channels, EventListener listener) {
|
||||||
this.accounts = accounts;
|
this.channels = channels;
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,17 +57,17 @@ public class AccountsHorizontalListAdapter extends RecyclerView.Adapter<Recycler
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) {
|
||||||
final AccountsHorizontalListAdapter.ViewHolder holder = (AccountsHorizontalListAdapter.ViewHolder) viewHolder;
|
final AccountsHorizontalListAdapter.ViewHolder holder = (AccountsHorizontalListAdapter.ViewHolder) viewHolder;
|
||||||
final Account account = accounts.get(position);
|
final ChannelData.Channel channel = channels.get(position);
|
||||||
|
|
||||||
if (account.getDisplayName() != null && !account.getDisplayName().trim().equals(""))
|
if (channel.getDisplayName() != null && !channel.getDisplayName().trim().equals(""))
|
||||||
holder.account_dn.setText(account.getDisplayName());
|
holder.account_dn.setText(channel.getDisplayName());
|
||||||
else
|
else
|
||||||
holder.account_dn.setText(account.getUsername().replace("@", ""));
|
holder.account_dn.setText(channel.getName().replace("@", ""));
|
||||||
|
|
||||||
//Profile picture
|
//Profile picture
|
||||||
Helper.loadGiF(context, account.getAvatar() != null ? account.getAvatar().getPath() : null, holder.account_pp, 270);
|
Helper.loadGiF(context, channel.getAvatar() != null ? channel.getAvatar().getPath() : null, holder.account_pp, 270);
|
||||||
|
|
||||||
if (account.isSelected()) {
|
if (channel.isSelected()) {
|
||||||
holder.main_container.setBackgroundColor(ColorUtils.setAlphaComponent(ContextCompat.getColor(context, Helper.getColorAccent()), 50));
|
holder.main_container.setBackgroundColor(ColorUtils.setAlphaComponent(ContextCompat.getColor(context, Helper.getColorAccent()), 50));
|
||||||
} else {
|
} else {
|
||||||
holder.main_container.setBackgroundColor(Color.TRANSPARENT);
|
holder.main_container.setBackgroundColor(Color.TRANSPARENT);
|
||||||
@ -82,7 +82,7 @@ public class AccountsHorizontalListAdapter extends RecyclerView.Adapter<Recycler
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return accounts.size();
|
return channels.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -106,16 +106,16 @@ public class AccountsHorizontalListAdapter extends RecyclerView.Adapter<Recycler
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Account account = accounts.get(getAdapterPosition());
|
ChannelData.Channel channel = channels.get(getAdapterPosition());
|
||||||
listener.click(account.getId());
|
listener.click(channel.getAcct());
|
||||||
for (Account acc : accounts) {
|
for (ChannelData.Channel acc : channels) {
|
||||||
if (acc.getId().compareTo(account.getId()) == 0) {
|
if (acc.getId().compareTo(channel.getId()) == 0) {
|
||||||
acc.setSelected(true);
|
acc.setSelected(true);
|
||||||
} else {
|
} else {
|
||||||
acc.setSelected(false);
|
acc.setSelected(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
notifyItemRangeChanged(0, accounts.size());
|
notifyItemRangeChanged(0, channels.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ import es.dmoral.toasty.Toasty;
|
|||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.FOLLOW;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.FOLLOW;
|
||||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.UNFOLLOW;
|
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.UNFOLLOW;
|
||||||
import static app.fedilab.fedilabtube.viewmodel.TimelineVM.TimelineType.MY_VIDEOS;
|
import static app.fedilab.fedilabtube.viewmodel.TimelineVM.TimelineType.MY_VIDEOS;
|
||||||
|
import static app.fedilab.fedilabtube.viewmodel.TimelineVM.TimelineType.SEPIA_SEARCH;
|
||||||
|
|
||||||
|
|
||||||
public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
@ -67,13 +68,17 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
private List<VideoData.Video> videos;
|
private List<VideoData.Video> videos;
|
||||||
private Context context;
|
private Context context;
|
||||||
private TimelineVM.TimelineType timelineType;
|
private TimelineVM.TimelineType timelineType;
|
||||||
|
private boolean sepiaSearch;
|
||||||
|
|
||||||
public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType) {
|
|
||||||
|
public PeertubeAdapter(List<VideoData.Video> videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch) {
|
||||||
this.videos = videos;
|
this.videos = videos;
|
||||||
this.timelineType = timelineType;
|
this.timelineType = timelineType;
|
||||||
|
this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public PeertubeAdapter(List<VideoData.Video> videos) {
|
public PeertubeAdapter(List<VideoData.Video> videos) {
|
||||||
this.videos = videos;
|
this.videos = videos;
|
||||||
}
|
}
|
||||||
@ -93,7 +98,9 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
final PeertubeAdapter.ViewHolder holder = (PeertubeAdapter.ViewHolder) viewHolder;
|
final PeertubeAdapter.ViewHolder holder = (PeertubeAdapter.ViewHolder) viewHolder;
|
||||||
final VideoData.Video video = videos.get(position);
|
final VideoData.Video video = videos.get(position);
|
||||||
|
|
||||||
|
if( video == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, "");
|
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, "");
|
||||||
|
|
||||||
@ -107,15 +114,20 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
ownVideos = video.getAccount() != null && video.getAccount().getId() != null && video.getAccount().getHost().compareTo(Helper.getLiveInstance(context)) == 0 && video.getAccount().getId().compareTo(userId) == 0;
|
ownVideos = video.getAccount() != null && video.getAccount().getId() != null && video.getAccount().getHost().compareTo(Helper.getLiveInstance(context)) == 0 && video.getAccount().getId().compareTo(userId) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String instance = null;
|
||||||
|
if( sepiaSearch) {
|
||||||
|
instance = video.getAccount().getHost();
|
||||||
|
}
|
||||||
|
|
||||||
holder.peertube_account_name.setText(video.getChannel().getAcct());
|
holder.peertube_account_name.setText(video.getChannel().getAcct());
|
||||||
Helper.loadGiF(context, video.getChannel().getAvatar() != null ? video.getChannel().getAvatar().getPath() : null, holder.peertube_profile);
|
Helper.loadGiF(context, instance, video.getChannel().getAvatar() != null ? video.getChannel().getAvatar().getPath() : null, holder.peertube_profile);
|
||||||
|
|
||||||
holder.peertube_title.setText(video.getName());
|
holder.peertube_title.setText(video.getName());
|
||||||
holder.peertube_duration.setText(Helper.secondsToString(video.getDuration()));
|
holder.peertube_duration.setText(Helper.secondsToString(video.getDuration()));
|
||||||
holder.peertube_date.setText(String.format(" - %s", Helper.dateDiff(context, video.getCreatedAt())));
|
holder.peertube_date.setText(String.format(" - %s", Helper.dateDiff(context, video.getCreatedAt())));
|
||||||
holder.peertube_views.setText(context.getString(R.string.number_view_video, Helper.withSuffix(video.getViews())));
|
holder.peertube_views.setText(context.getString(R.string.number_view_video, Helper.withSuffix(video.getViews())));
|
||||||
|
|
||||||
Helper.loadGiF(context, video.getThumbnailPath(), holder.peertube_video_image);
|
Helper.loadGiF(context, instance, video.getThumbnailPath(), holder.peertube_video_image);
|
||||||
|
|
||||||
//For Overview Videos: boolean values for displaying title is managed in the fragment
|
//For Overview Videos: boolean values for displaying title is managed in the fragment
|
||||||
if (video.isHasTitle()) {
|
if (video.isHasTitle()) {
|
||||||
@ -138,6 +150,10 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
Intent intent = new Intent(context, ShowChannelActivity.class);
|
Intent intent = new Intent(context, ShowChannelActivity.class);
|
||||||
Bundle b = new Bundle();
|
Bundle b = new Bundle();
|
||||||
b.putParcelable("channel", video.getChannel());
|
b.putParcelable("channel", video.getChannel());
|
||||||
|
b.putBoolean("sepia_search", sepiaSearch);
|
||||||
|
if( sepiaSearch) {
|
||||||
|
b.putString("peertube_instance", video.getAccount().getHost());
|
||||||
|
}
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
@ -245,6 +261,10 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
b.putString("video_id", video.getId());
|
b.putString("video_id", video.getId());
|
||||||
b.putString("video_uuid", video.getUuid());
|
b.putString("video_uuid", video.getUuid());
|
||||||
b.putBoolean("isMyVideo", ownVideos);
|
b.putBoolean("isMyVideo", ownVideos);
|
||||||
|
b.putBoolean("sepia_search", sepiaSearch);
|
||||||
|
if( sepiaSearch) {
|
||||||
|
b.putString("peertube_instance", video.getAccount().getHost());
|
||||||
|
}
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
@ -254,6 +274,10 @@ public class PeertubeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
|
|||||||
b.putString("video_id", video.getId());
|
b.putString("video_id", video.getId());
|
||||||
b.putString("video_uuid", video.getUuid());
|
b.putString("video_uuid", video.getUuid());
|
||||||
b.putBoolean("isMyVideo", ownVideos);
|
b.putBoolean("isMyVideo", ownVideos);
|
||||||
|
b.putBoolean("sepia_search", sepiaSearch);
|
||||||
|
if( sepiaSearch) {
|
||||||
|
b.putString("peertube_instance", video.getAccount().getHost());
|
||||||
|
}
|
||||||
intent.putExtras(b);
|
intent.putExtras(b);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,329 @@
|
|||||||
|
package app.fedilab.fedilabtube.fragment;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.BuildConfig;
|
||||||
|
import app.fedilab.fedilabtube.R;
|
||||||
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
|
import app.fedilab.fedilabtube.client.entities.SepiaSearch;
|
||||||
|
import app.fedilab.fedilabtube.drawer.AccountsHorizontalListAdapter;
|
||||||
|
import app.fedilab.fedilabtube.drawer.PeertubeAdapter;
|
||||||
|
import app.fedilab.fedilabtube.helper.Helper;
|
||||||
|
import app.fedilab.fedilabtube.viewmodel.SepiaSearchVM;
|
||||||
|
import es.dmoral.toasty.Toasty;
|
||||||
|
|
||||||
|
import static app.fedilab.fedilabtube.viewmodel.TimelineVM.TimelineType.SEPIA_SEARCH;
|
||||||
|
|
||||||
|
|
||||||
|
public class DisplaySepiaSearchFragment extends Fragment implements AccountsHorizontalListAdapter.EventListener {
|
||||||
|
|
||||||
|
|
||||||
|
private LinearLayoutManager mLayoutManager;
|
||||||
|
private GridLayoutManager gLayoutManager;
|
||||||
|
private boolean flag_loading;
|
||||||
|
private Context context;
|
||||||
|
private PeertubeAdapter peertubeAdapater;
|
||||||
|
private List<VideoData.Video> peertubes;
|
||||||
|
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
||||||
|
private boolean firstLoad;
|
||||||
|
private SwipeRefreshLayout swipeRefreshLayout;
|
||||||
|
private SharedPreferences sharedpreferences;
|
||||||
|
private TextView textviewNoActionText;
|
||||||
|
private View rootView;
|
||||||
|
private RecyclerView lv_status;
|
||||||
|
private SepiaSearchVM viewModelSearch;
|
||||||
|
|
||||||
|
public DisplaySepiaSearchFragment() {
|
||||||
|
}
|
||||||
|
|
||||||
|
private SepiaSearch sepiaSearchVideo;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
rootView = inflater.inflate(R.layout.fragment_video, container, false);
|
||||||
|
|
||||||
|
|
||||||
|
peertubes = new ArrayList<>();
|
||||||
|
context = getContext();
|
||||||
|
Bundle bundle = this.getArguments();
|
||||||
|
if (bundle != null) {
|
||||||
|
sepiaSearchVideo = bundle.getParcelable("sepiaSearchVideo");
|
||||||
|
}
|
||||||
|
lv_status = rootView.findViewById(R.id.lv_status);
|
||||||
|
flag_loading = true;
|
||||||
|
firstLoad = true;
|
||||||
|
|
||||||
|
assert context != null;
|
||||||
|
sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
swipeRefreshLayout = rootView.findViewById(R.id.swipeContainer);
|
||||||
|
|
||||||
|
mainLoader = rootView.findViewById(R.id.loader);
|
||||||
|
nextElementLoader = rootView.findViewById(R.id.loading_next_status);
|
||||||
|
textviewNoAction = rootView.findViewById(R.id.no_action);
|
||||||
|
textviewNoActionText = rootView.findViewById(R.id.no_action_text);
|
||||||
|
mainLoader.setVisibility(View.VISIBLE);
|
||||||
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
peertubeAdapater = new PeertubeAdapter(this.peertubes, SEPIA_SEARCH, true);
|
||||||
|
lv_status.setAdapter(peertubeAdapater);
|
||||||
|
|
||||||
|
|
||||||
|
if (!Helper.isTablet(context)) {
|
||||||
|
mLayoutManager = new LinearLayoutManager(context);
|
||||||
|
lv_status.setLayoutManager(mLayoutManager);
|
||||||
|
} else {
|
||||||
|
gLayoutManager = new GridLayoutManager(context, 2);
|
||||||
|
int spanCount = (int) Helper.convertDpToPixel(2, context);
|
||||||
|
int spacing = (int) Helper.convertDpToPixel(5, context);
|
||||||
|
lv_status.addItemDecoration(new GridSpacingItemDecoration(spanCount, spacing, true));
|
||||||
|
lv_status.setLayoutManager(gLayoutManager);
|
||||||
|
}
|
||||||
|
viewModelSearch = new ViewModelProvider(DisplaySepiaSearchFragment.this).get(SepiaSearchVM.class);
|
||||||
|
swipeRefreshLayout.setOnRefreshListener(this::pullToRefresh);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lv_status.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
|
if (mLayoutManager != null) {
|
||||||
|
int firstVisibleItem = mLayoutManager.findFirstVisibleItemPosition();
|
||||||
|
if (dy > 0) {
|
||||||
|
int visibleItemCount = mLayoutManager.getChildCount();
|
||||||
|
int totalItemCount = mLayoutManager.getItemCount();
|
||||||
|
if (firstVisibleItem + visibleItemCount == totalItemCount && context != null) {
|
||||||
|
if (!flag_loading) {
|
||||||
|
flag_loading = true;
|
||||||
|
loadTimeline();
|
||||||
|
nextElementLoader.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (gLayoutManager != null) {
|
||||||
|
int firstVisibleItem = gLayoutManager.findFirstVisibleItemPosition();
|
||||||
|
if (dy > 0) {
|
||||||
|
int visibleItemCount = gLayoutManager.getChildCount();
|
||||||
|
int totalItemCount = gLayoutManager.getItemCount();
|
||||||
|
if (firstVisibleItem + visibleItemCount == totalItemCount && context != null) {
|
||||||
|
if (!flag_loading) {
|
||||||
|
flag_loading = true;
|
||||||
|
loadTimeline();
|
||||||
|
nextElementLoader.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
loadTimeline();
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (swipeRefreshLayout != null) {
|
||||||
|
swipeRefreshLayout.setEnabled(false);
|
||||||
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
|
swipeRefreshLayout.clearAnimation();
|
||||||
|
}
|
||||||
|
if (getActivity() != null) {
|
||||||
|
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (imm != null && getView() != null) {
|
||||||
|
imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle saveInstance) {
|
||||||
|
super.onCreate(saveInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(@NotNull Context context) {
|
||||||
|
super.onAttach(context);
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void manageVIewVideos(VideoData videoData) {
|
||||||
|
//hide loaders
|
||||||
|
mainLoader.setVisibility(View.GONE);
|
||||||
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
|
//handle other API error
|
||||||
|
if (videoData == null || videoData.data == null) {
|
||||||
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
||||||
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
|
flag_loading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int previousPosition = this.peertubes.size();
|
||||||
|
int videoPerPage = sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE);
|
||||||
|
sepiaSearchVideo.setStart(String.valueOf(Integer.parseInt(sepiaSearchVideo.getStart())+ videoPerPage));
|
||||||
|
|
||||||
|
if(!BuildConfig.google_restriction) {
|
||||||
|
this.peertubes.addAll(videoData.data);
|
||||||
|
}else{
|
||||||
|
for(VideoData.Video video: videoData.data) {
|
||||||
|
if ( video.getName() == null || !video.getName().toLowerCase().contains("youtube") || !video.getName().toLowerCase().contains("download")) {
|
||||||
|
this.peertubes.add(video);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//If no item were inserted previously the adapter is created
|
||||||
|
if (previousPosition == 0) {
|
||||||
|
peertubeAdapater = new PeertubeAdapter(this.peertubes, SEPIA_SEARCH, true);
|
||||||
|
lv_status.setAdapter(peertubeAdapater);
|
||||||
|
} else
|
||||||
|
peertubeAdapater.notifyItemRangeInserted(previousPosition, videoData.data.size());
|
||||||
|
|
||||||
|
//remove handlers
|
||||||
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
|
textviewNoAction.setVisibility(View.GONE);
|
||||||
|
if (firstLoad && (videoData.data== null || videoData.data.size() == 0)) {
|
||||||
|
textviewNoActionText.setText(R.string.no_video_to_display);
|
||||||
|
textviewNoAction.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
flag_loading = false;
|
||||||
|
firstLoad = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
if (lv_status != null) {
|
||||||
|
try {
|
||||||
|
lv_status.setAdapter(null);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onDestroyView();
|
||||||
|
rootView = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
swipeRefreshLayout.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void scrollToTop() {
|
||||||
|
if (mLayoutManager != null) {
|
||||||
|
mLayoutManager.scrollToPositionWithOffset(0, 0);
|
||||||
|
} else if (gLayoutManager != null) {
|
||||||
|
gLayoutManager.scrollToPositionWithOffset(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void pullToRefresh() {
|
||||||
|
int size = peertubes.size();
|
||||||
|
peertubes.clear();
|
||||||
|
peertubes = new ArrayList<>();
|
||||||
|
peertubeAdapater.notifyItemRangeRemoved(0, size);
|
||||||
|
loadTimeline();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void click(String forAccount) {
|
||||||
|
pullToRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadTimeline() {
|
||||||
|
viewModelSearch.sepiaSearch(sepiaSearchVideo).observe(this.requireActivity(), this::manageVIewVideos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static class GridSpacingItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
|
||||||
|
private int spanCount;
|
||||||
|
private int spacing;
|
||||||
|
private boolean includeEdge;
|
||||||
|
|
||||||
|
public GridSpacingItemDecoration(int spanCount, int spacing, boolean includeEdge) {
|
||||||
|
this.spanCount = spanCount;
|
||||||
|
this.spacing = spacing;
|
||||||
|
this.includeEdge = includeEdge;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getItemOffsets(@NotNull Rect outRect, @NotNull View view, RecyclerView parent, @NotNull RecyclerView.State state) {
|
||||||
|
int position = parent.getChildAdapterPosition(view);
|
||||||
|
int column = position % spanCount;
|
||||||
|
|
||||||
|
if (includeEdge) {
|
||||||
|
outRect.left = spacing - column * spacing / spanCount;
|
||||||
|
outRect.right = (column + 1) * spacing / spanCount;
|
||||||
|
|
||||||
|
if (position < spanCount) {
|
||||||
|
outRect.top = spacing;
|
||||||
|
}
|
||||||
|
outRect.bottom = spacing;
|
||||||
|
} else {
|
||||||
|
outRect.left = column * spacing / spanCount;
|
||||||
|
outRect.right = spacing - (column + 1) * spacing / spanCount;
|
||||||
|
if (position >= spanCount) {
|
||||||
|
outRect.top = spacing;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -29,8 +29,10 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@ -44,10 +46,12 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import app.fedilab.fedilabtube.BuildConfig;
|
||||||
|
import app.fedilab.fedilabtube.MainActivity;
|
||||||
import app.fedilab.fedilabtube.R;
|
import app.fedilab.fedilabtube.R;
|
||||||
import app.fedilab.fedilabtube.client.APIResponse;
|
import app.fedilab.fedilabtube.client.APIResponse;
|
||||||
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
||||||
import app.fedilab.fedilabtube.client.data.AccountData.Account;
|
import app.fedilab.fedilabtube.client.data.ChannelData;
|
||||||
import app.fedilab.fedilabtube.client.data.VideoData;
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
import app.fedilab.fedilabtube.client.data.VideoPlaylistData;
|
import app.fedilab.fedilabtube.client.data.VideoPlaylistData;
|
||||||
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
|
import app.fedilab.fedilabtube.client.entities.PlaylistExist;
|
||||||
@ -73,7 +77,7 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
private AccountsHorizontalListAdapter accountsHorizontalListAdapter;
|
private AccountsHorizontalListAdapter accountsHorizontalListAdapter;
|
||||||
private String max_id, max_id_accounts;
|
private String max_id, max_id_accounts;
|
||||||
private List<VideoData.Video> peertubes;
|
private List<VideoData.Video> peertubes;
|
||||||
private List<Account> accounts;
|
private List<ChannelData.Channel> channels;
|
||||||
private TimelineVM.TimelineType type;
|
private TimelineVM.TimelineType type;
|
||||||
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
private RelativeLayout mainLoader, nextElementLoader, textviewNoAction;
|
||||||
private boolean firstLoad;
|
private boolean firstLoad;
|
||||||
@ -93,7 +97,8 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
private Map<String, Boolean> relationship;
|
private Map<String, Boolean> relationship;
|
||||||
private Map<String, List<PlaylistExist>> playlists;
|
private Map<String, List<PlaylistExist>> playlists;
|
||||||
private String playlistId;
|
private String playlistId;
|
||||||
|
private String remoteInstance;
|
||||||
|
private boolean sepiaSearch;
|
||||||
public DisplayVideosFragment() {
|
public DisplayVideosFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,12 +109,14 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
|
|
||||||
|
|
||||||
peertubes = new ArrayList<>();
|
peertubes = new ArrayList<>();
|
||||||
accounts = new ArrayList<>();
|
channels = new ArrayList<>();
|
||||||
context = getContext();
|
context = getContext();
|
||||||
Bundle bundle = this.getArguments();
|
Bundle bundle = this.getArguments();
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
search_peertube = bundle.getString("search_peertube", null);
|
search_peertube = bundle.getString("search_peertube", null);
|
||||||
channelId = bundle.getString("channelId", null);
|
channelId = bundle.getString("channelId", null);
|
||||||
|
remoteInstance = bundle.getString("peertube_instance", null);
|
||||||
|
sepiaSearch = bundle.getBoolean("sepia_search", false);
|
||||||
type = (TimelineVM.TimelineType) bundle.get(Helper.TIMELINE_TYPE);
|
type = (TimelineVM.TimelineType) bundle.get(Helper.TIMELINE_TYPE);
|
||||||
playlistId = bundle.getString("playlistId", null);
|
playlistId = bundle.getString("playlistId", null);
|
||||||
}
|
}
|
||||||
@ -119,7 +126,6 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
RecyclerView lv_accounts = rootView.findViewById(R.id.lv_accounts);
|
RecyclerView lv_accounts = rootView.findViewById(R.id.lv_accounts);
|
||||||
Button display_all = rootView.findViewById(R.id.display_all);
|
Button display_all = rootView.findViewById(R.id.display_all);
|
||||||
top_account_container = rootView.findViewById(R.id.top_account_container);
|
top_account_container = rootView.findViewById(R.id.top_account_container);
|
||||||
max_id = null;
|
|
||||||
max_id_accounts = null;
|
max_id_accounts = null;
|
||||||
flag_loading = true;
|
flag_loading = true;
|
||||||
firstLoad = true;
|
firstLoad = true;
|
||||||
@ -136,12 +142,12 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
mainLoader.setVisibility(View.VISIBLE);
|
mainLoader.setVisibility(View.VISIBLE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
|
|
||||||
peertubeAdapater = new PeertubeAdapter(this.peertubes, type);
|
peertubeAdapater = new PeertubeAdapter(this.peertubes, type, sepiaSearch);
|
||||||
peertubeAdapater.playlistListener = this;
|
peertubeAdapater.playlistListener = this;
|
||||||
peertubeAdapater.relationShipListener = this;
|
peertubeAdapater.relationShipListener = this;
|
||||||
lv_status.setAdapter(peertubeAdapater);
|
lv_status.setAdapter(peertubeAdapater);
|
||||||
|
|
||||||
accountsHorizontalListAdapter = new AccountsHorizontalListAdapter(this.accounts, this);
|
accountsHorizontalListAdapter = new AccountsHorizontalListAdapter(this.channels, this);
|
||||||
LinearLayoutManager layoutManager
|
LinearLayoutManager layoutManager
|
||||||
= new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
|
= new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
|
||||||
lv_accounts.setLayoutManager(layoutManager);
|
lv_accounts.setLayoutManager(layoutManager);
|
||||||
@ -159,7 +165,7 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
viewModelAccounts = new ViewModelProvider(DisplayVideosFragment.this).get(AccountsVM.class);
|
viewModelAccounts = new ViewModelProvider(DisplayVideosFragment.this).get(AccountsVM.class);
|
||||||
viewModelFeeds = new ViewModelProvider(DisplayVideosFragment.this).get(TimelineVM.class);
|
viewModelFeeds = new ViewModelProvider(DisplayVideosFragment.this).get(TimelineVM.class);
|
||||||
viewModelSearch = new ViewModelProvider(DisplayVideosFragment.this).get(SearchVM.class);
|
viewModelSearch = new ViewModelProvider(DisplayVideosFragment.this).get(SearchVM.class);
|
||||||
swipeRefreshLayout.setOnRefreshListener(this::pullToRefresh);
|
swipeRefreshLayout.setOnRefreshListener(() -> pullToRefresh(true));
|
||||||
|
|
||||||
lv_accounts.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
lv_accounts.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
@ -233,7 +239,7 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
loadTimeline(max_id);
|
loadTimeline(max_id);
|
||||||
display_all.setOnClickListener(v -> {
|
display_all.setOnClickListener(v -> {
|
||||||
forAccount = null;
|
forAccount = null;
|
||||||
pullToRefresh();
|
pullToRefresh(false);
|
||||||
});
|
});
|
||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
@ -282,13 +288,13 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
|
|
||||||
|
|
||||||
private void manageViewAccounts(APIResponse apiResponse) {
|
private void manageViewAccounts(APIResponse apiResponse) {
|
||||||
if (apiResponse != null && apiResponse.getAccounts() != null && apiResponse.getAccounts().size() > 0) {
|
if (apiResponse != null && apiResponse.getChannels() != null && apiResponse.getChannels().size() > 0) {
|
||||||
if (top_account_container.getVisibility() == View.GONE) {
|
if (top_account_container.getVisibility() == View.GONE) {
|
||||||
top_account_container.setVisibility(View.VISIBLE);
|
top_account_container.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
int previousPosition = accounts.size();
|
int previousPosition = channels.size();
|
||||||
accounts.addAll(apiResponse.getAccounts());
|
channels.addAll(apiResponse.getChannels());
|
||||||
accountsHorizontalListAdapter.notifyItemRangeInserted(previousPosition, apiResponse.getAccounts().size());
|
accountsHorizontalListAdapter.notifyItemRangeInserted(previousPosition, apiResponse.getChannels().size());
|
||||||
if (max_id_accounts == null) {
|
if (max_id_accounts == null) {
|
||||||
max_id_accounts = "0";
|
max_id_accounts = "0";
|
||||||
}
|
}
|
||||||
@ -329,10 +335,20 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
apiResponse.getPeertubes().add(v.getVideo());
|
apiResponse.getPeertubes().add(v.getVideo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.peertubes.addAll(apiResponse.getPeertubes());
|
if(!BuildConfig.google_restriction) {
|
||||||
|
this.peertubes.addAll(apiResponse.getPeertubes());
|
||||||
|
}else{
|
||||||
|
for(VideoData.Video video: apiResponse.getPeertubes()) {
|
||||||
|
if ( video.getName() == null || !video.getName().toLowerCase().contains("youtube") || !video.getName().toLowerCase().contains("download")) {
|
||||||
|
this.peertubes.add(video);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//If no item were inserted previously the adapter is created
|
//If no item were inserted previously the adapter is created
|
||||||
if (previousPosition == 0) {
|
if (previousPosition == 0) {
|
||||||
peertubeAdapater = new PeertubeAdapter(this.peertubes, type);
|
peertubeAdapater = new PeertubeAdapter(this.peertubes, type, sepiaSearch);
|
||||||
peertubeAdapater.playlistListener = DisplayVideosFragment.this;
|
peertubeAdapater.playlistListener = DisplayVideosFragment.this;
|
||||||
peertubeAdapater.relationShipListener = DisplayVideosFragment.this;
|
peertubeAdapater.relationShipListener = DisplayVideosFragment.this;
|
||||||
lv_status.setAdapter(peertubeAdapater);
|
lv_status.setAdapter(peertubeAdapater);
|
||||||
@ -351,7 +367,9 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
if (Helper.isLoggedIn(context)) {
|
if (Helper.isLoggedIn(context)) {
|
||||||
List<String> uids = new ArrayList<>();
|
List<String> uids = new ArrayList<>();
|
||||||
for (VideoData.Video video : apiResponse.getPeertubes()) {
|
for (VideoData.Video video : apiResponse.getPeertubes()) {
|
||||||
uids.add(video.getChannel().getName() + "@" + video.getChannel().getHost());
|
if( video != null) {
|
||||||
|
uids.add(video.getChannel().getName() + "@" + video.getChannel().getHost());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (uids.size() > 0 && !DisplayVideosFragment.this.isDetached()) {
|
if (uids.size() > 0 && !DisplayVideosFragment.this.isDetached()) {
|
||||||
try {
|
try {
|
||||||
@ -363,7 +381,9 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
|
|
||||||
List<String> videoIds = new ArrayList<>();
|
List<String> videoIds = new ArrayList<>();
|
||||||
for (VideoData.Video video : apiResponse.getPeertubes()) {
|
for (VideoData.Video video : apiResponse.getPeertubes()) {
|
||||||
videoIds.add(video.getId());
|
if( video != null) {
|
||||||
|
videoIds.add(video.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (videoIds.size() > 0 && !DisplayVideosFragment.this.isDetached()) {
|
if (videoIds.size() > 0 && !DisplayVideosFragment.this.isDetached()) {
|
||||||
try {
|
try {
|
||||||
@ -385,7 +405,9 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
}
|
}
|
||||||
playlists.putAll(apiResponse.getVideoExistPlaylist());
|
playlists.putAll(apiResponse.getVideoExistPlaylist());
|
||||||
for (VideoData.Video video : peertubes) {
|
for (VideoData.Video video : peertubes) {
|
||||||
video.setPlaylistExists(playlists.get(video.getId()));
|
if( video != null) {
|
||||||
|
video.setPlaylistExists(playlists.get(video.getId()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -428,25 +450,44 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void pullToRefresh() {
|
public void pullToRefresh(boolean reload) {
|
||||||
int size = peertubes.size();
|
if( type == TimelineVM.TimelineType.SUBSCRIBTIONS && reload) {
|
||||||
peertubes.clear();
|
Fragment fragment = ((AppCompatActivity)context).getSupportFragmentManager().findFragmentByTag("2");
|
||||||
peertubes = new ArrayList<>();
|
if(fragment != null) {
|
||||||
max_id = "0";
|
if( context instanceof MainActivity) {
|
||||||
peertubeAdapater.notifyItemRangeRemoved(0, size);
|
FragmentManager fm = ((MainActivity) context).getSupportFragmentManager();
|
||||||
if (forAccount == null) {
|
fm.beginTransaction().remove(fragment).commit();
|
||||||
for (Account account : accounts) {
|
DisplayVideosFragment subscriptionFragment = new DisplayVideosFragment();
|
||||||
account.setSelected(false);
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putSerializable(Helper.TIMELINE_TYPE, TimelineVM.TimelineType.SUBSCRIBTIONS);
|
||||||
|
subscriptionFragment.setArguments(bundle);
|
||||||
|
((MainActivity) context).setActive(subscriptionFragment);
|
||||||
|
((MainActivity) context).setSubscriptionFragment(subscriptionFragment);
|
||||||
|
fm.beginTransaction().add(R.id.nav_host_fragment, subscriptionFragment, "2").commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
accountsHorizontalListAdapter.notifyItemRangeRemoved(0, accounts.size());
|
|
||||||
|
}else {
|
||||||
|
int size = peertubes.size();
|
||||||
|
peertubes.clear();
|
||||||
|
peertubes = new ArrayList<>();
|
||||||
|
max_id = "0";
|
||||||
|
peertubeAdapater.notifyItemRangeRemoved(0, size);
|
||||||
|
if (forAccount == null) {
|
||||||
|
for (ChannelData.Channel channel : channels) {
|
||||||
|
channel.setSelected(false);
|
||||||
|
}
|
||||||
|
accountsHorizontalListAdapter.notifyItemRangeRemoved(0, channels.size());
|
||||||
|
}
|
||||||
|
loadTimeline("0");
|
||||||
}
|
}
|
||||||
loadTimeline("0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void click(String forAccount) {
|
public void click(String forAccount) {
|
||||||
this.forAccount = forAccount;
|
this.forAccount = forAccount;
|
||||||
pullToRefresh();
|
pullToRefresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -457,12 +498,11 @@ public class DisplayVideosFragment extends Fragment implements AccountsHorizonta
|
|||||||
private void loadTimeline(String max_id) {
|
private void loadTimeline(String max_id) {
|
||||||
if (search_peertube == null) { //Not a Peertube search
|
if (search_peertube == null) { //Not a Peertube search
|
||||||
if (type == TimelineVM.TimelineType.USER_VIDEOS) {
|
if (type == TimelineVM.TimelineType.USER_VIDEOS) {
|
||||||
viewModelFeeds.getVideosInChannel(channelId, max_id).observe(this.requireActivity(), this::manageVIewVideos);
|
viewModelFeeds.getVideosInChannel(sepiaSearch?remoteInstance:null, channelId, max_id).observe(this.requireActivity(), this::manageVIewVideos);
|
||||||
} else if (type == TimelineVM.TimelineType.VIDEOS_IN_PLAYLIST) {
|
} else if (type == TimelineVM.TimelineType.VIDEOS_IN_PLAYLIST) {
|
||||||
|
|
||||||
viewModelFeeds.loadVideosInPlaylist(playlistId, max_id).observe(this.requireActivity(), this::manageVIewVideos);
|
viewModelFeeds.loadVideosInPlaylist(playlistId, max_id).observe(this.requireActivity(), this::manageVIewVideos);
|
||||||
} else {
|
} else {
|
||||||
viewModelFeeds.getVideos(type, max_id).observe(this.requireActivity(), this::manageVIewVideos);
|
viewModelFeeds.getVideos(type, max_id, forAccount).observe(this.requireActivity(), this::manageVIewVideos);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
viewModelSearch.getVideos(max_id, search_peertube).observe(this.requireActivity(), this::manageVIewVideos);
|
viewModelSearch.getVideos(max_id, search_peertube).observe(this.requireActivity(), this::manageVIewVideos);
|
||||||
|
@ -72,7 +72,7 @@ public class Helper {
|
|||||||
public static final int RELOAD_MYVIDEOS = 10;
|
public static final int RELOAD_MYVIDEOS = 10;
|
||||||
public static final String SET_VIDEO_MODE = "set_video_mode";
|
public static final String SET_VIDEO_MODE = "set_video_mode";
|
||||||
public static final String SET_QUALITY_MODE = "set_quality_mode";
|
public static final String SET_QUALITY_MODE = "set_quality_mode";
|
||||||
public static final String TIMELINE_TYPE = Helper.TIMELINE_TYPE;
|
public static final String TIMELINE_TYPE = "timeline_type";
|
||||||
public static final int VIDEO_MODE_NORMAL = 0;
|
public static final int VIDEO_MODE_NORMAL = 0;
|
||||||
public static final int VIDEO_MODE_STREAMING = 2;
|
public static final int VIDEO_MODE_STREAMING = 2;
|
||||||
public static final int VIDEO_MODE_WEBVIEW = 1;
|
public static final int VIDEO_MODE_WEBVIEW = 1;
|
||||||
@ -370,7 +370,16 @@ public class Helper {
|
|||||||
loadGiF(context, url, imageView, 10);
|
loadGiF(context, url, imageView, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void loadGiF(final Context context, String instance, String url, final ImageView imageView) {
|
||||||
|
loadGif(context, instance, url, imageView, 10);
|
||||||
|
}
|
||||||
|
|
||||||
public static void loadGiF(final Context context, String url, final ImageView imageView, int round) {
|
public static void loadGiF(final Context context, String url, final ImageView imageView, int round) {
|
||||||
|
loadGif(context, null, url, imageView, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("SameParameterValue")
|
||||||
|
private static void loadGif(final Context context, String instance, String url, final ImageView imageView, int round) {
|
||||||
if (url == null || url.trim().toLowerCase().compareTo("null") == 0) {
|
if (url == null || url.trim().toLowerCase().compareTo("null") == 0) {
|
||||||
Glide.with(imageView.getContext())
|
Glide.with(imageView.getContext())
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
@ -380,7 +389,7 @@ public class Helper {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (url.startsWith("/")) {
|
if (url.startsWith("/")) {
|
||||||
url = Helper.getLiveInstance(context) + url;
|
url = instance!=null?instance+ url:Helper.getLiveInstance(context) + url;
|
||||||
}
|
}
|
||||||
if (!url.startsWith("http")) {
|
if (!url.startsWith("http")) {
|
||||||
url = "https://" + url;
|
url = "https://" + url;
|
||||||
|
@ -35,18 +35,23 @@ public class CaptionsVM extends AndroidViewModel {
|
|||||||
super(application);
|
super(application);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getCaptions(String videoId) {
|
public LiveData<APIResponse> getCaptions(String instance, String videoId) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
loadCaptions(videoId);
|
loadCaptions(instance, videoId);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadCaptions(String videoId) {
|
private void loadCaptions(String instance, String videoId) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI peertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
APIResponse apiResponse = peertubeAPI.getCaptions(videoId);
|
if( instance == null) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
}else{
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
|
APIResponse apiResponse = retrofitPeertubeAPI.getCaptions(videoId);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
mainHandler.post(myRunnable);
|
mainHandler.post(myRunnable);
|
||||||
|
@ -43,13 +43,19 @@ public class ChannelsVM extends AndroidViewModel {
|
|||||||
super(application);
|
super(application);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> get(RetrofitPeertubeAPI.DataType type, String element) {
|
public LiveData<APIResponse> get(String instance, RetrofitPeertubeAPI.DataType type, String element) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
getChannels(type, element);
|
getChannels(instance, type, element);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getChannels(RetrofitPeertubeAPI.DataType type, String element) {
|
public LiveData<APIResponse> get(RetrofitPeertubeAPI.DataType type, String element) {
|
||||||
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
|
getChannels(null, type, element);
|
||||||
|
return apiResponseMutableLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getChannels(String instance, RetrofitPeertubeAPI.DataType type, String element) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
String finalElement = element;
|
String finalElement = element;
|
||||||
@ -61,7 +67,12 @@ public class ChannelsVM extends AndroidViewModel {
|
|||||||
AccountData.Account account = new AccountDAO(_mContext, db).getAccountByToken(token);
|
AccountData.Account account = new AccountDAO(_mContext, db).getAccountByToken(token);
|
||||||
finalElement = account.getUsername() + "@" + account.getHost();
|
finalElement = account.getUsername() + "@" + account.getHost();
|
||||||
}
|
}
|
||||||
RetrofitPeertubeAPI retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
|
if( instance == null ) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
} else {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
APIResponse apiResponse = retrofitPeertubeAPI.getChannelData(type, finalElement);
|
APIResponse apiResponse = retrofitPeertubeAPI.getChannelData(type, finalElement);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
|
@ -35,9 +35,9 @@ public class CommentVM extends AndroidViewModel {
|
|||||||
super(application);
|
super(application);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getThread(String videoId, String max_Id) {
|
public LiveData<APIResponse> getThread(String instance, String videoId, String max_Id) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
getThreadComments(videoId, max_Id);
|
getThreadComments(instance, videoId, max_Id);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,12 +48,17 @@ public class CommentVM extends AndroidViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void getThreadComments(String videoId, String max_id) {
|
private void getThreadComments(String instance, String videoId, String max_id) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI api = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
APIResponse apiResponse = api.getComments(CommentVM.action.GET_THREAD, videoId, null, max_id);
|
if( instance == null) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
}else{
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
|
APIResponse apiResponse = retrofitPeertubeAPI.getComments(CommentVM.action.GET_THREAD, videoId, null, max_id);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
mainHandler.post(myRunnable);
|
mainHandler.post(myRunnable);
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
package app.fedilab.fedilabtube.viewmodel;
|
||||||
|
/* Copyright 2020 Thomas Schneider
|
||||||
|
*
|
||||||
|
* This file is a part of TubeLab
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
* see <http://www.gnu.org/licenses>. */
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.lifecycle.AndroidViewModel;
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import app.fedilab.fedilabtube.client.RetrofitSepiaSearchAPI;
|
||||||
|
import app.fedilab.fedilabtube.client.data.VideoData;
|
||||||
|
import app.fedilab.fedilabtube.client.entities.SepiaSearch;
|
||||||
|
|
||||||
|
|
||||||
|
public class SepiaSearchVM extends AndroidViewModel {
|
||||||
|
private MutableLiveData<VideoData> apiResponseMutableLiveData;
|
||||||
|
|
||||||
|
public SepiaSearchVM(@NonNull Application application) {
|
||||||
|
super(application);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveData<VideoData> sepiaSearch(SepiaSearch sepiaSearch) {
|
||||||
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
|
getVideos(sepiaSearch);
|
||||||
|
return apiResponseMutableLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getVideos(SepiaSearch sepiaSearch) {
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
VideoData videoData = new RetrofitSepiaSearchAPI().getVideos(sepiaSearch);
|
||||||
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(videoData);
|
||||||
|
mainHandler.post(myRunnable);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -38,9 +38,9 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
super(application);
|
super(application);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getVideos(TimelineType action, String max_id) {
|
public LiveData<APIResponse> getVideos(TimelineType action, String max_id, String forAccount) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
loadVideos(action, max_id);
|
loadVideos(action, max_id, forAccount);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,9 +51,9 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public LiveData<APIResponse> getVideo(String videoId, boolean isMyVideo) {
|
public LiveData<APIResponse> getVideo(String instance, String videoId, boolean isMyVideo) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
getSingle(videoId, isMyVideo);
|
getSingle(instance, videoId, isMyVideo);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,23 +63,35 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getMyVideo(String videoId) {
|
public LiveData<APIResponse> getMyVideo(String instance, String videoId) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
getSingle(videoId, true);
|
getSingle(instance, videoId, true);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveData<APIResponse> getVideosInChannel(String channelId, String max_id) {
|
public LiveData<APIResponse> getVideosInChannel(String channelId, String max_id) {
|
||||||
apiResponseMutableLiveData = new MutableLiveData<>();
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
loadVideosForChannel(channelId, max_id);
|
loadVideosForChannel(null, channelId, max_id);
|
||||||
return apiResponseMutableLiveData;
|
return apiResponseMutableLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadVideosForChannel(String channelId, String max_id) {
|
|
||||||
|
public LiveData<APIResponse> getVideosInChannel(String instance, String channelId, String max_id) {
|
||||||
|
apiResponseMutableLiveData = new MutableLiveData<>();
|
||||||
|
loadVideosForChannel(instance, channelId, max_id);
|
||||||
|
return apiResponseMutableLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadVideosForChannel(String instance, String channelId, String max_id) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
|
if( instance == null) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
}else {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
APIResponse apiResponse = retrofitPeertubeAPI.getVideosForChannel(channelId, max_id);
|
APIResponse apiResponse = retrofitPeertubeAPI.getVideosForChannel(channelId, max_id);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
@ -90,13 +102,18 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getSingle(String videoId, boolean myVideo) {
|
private void getSingle(String instance, String videoId, boolean myVideo) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
RetrofitPeertubeAPI retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
RetrofitPeertubeAPI retrofitPeertubeAPI;
|
||||||
|
if( instance == null) {
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext);
|
||||||
|
}else{
|
||||||
|
retrofitPeertubeAPI = new RetrofitPeertubeAPI(_mContext, instance, null);
|
||||||
|
}
|
||||||
APIResponse apiResponse = retrofitPeertubeAPI.getVideos(videoId, myVideo);
|
APIResponse apiResponse = retrofitPeertubeAPI.getVideos(videoId, myVideo);
|
||||||
if (Helper.isLoggedIn(_mContext) && !myVideo) {
|
if (Helper.isLoggedIn(_mContext) && !myVideo && instance == null) {
|
||||||
if (apiResponse.getPeertubes() != null && apiResponse.getPeertubes().size() > 0 && apiResponse.getPeertubes().get(0) != null) {
|
if (apiResponse.getPeertubes() != null && apiResponse.getPeertubes().size() > 0 && apiResponse.getPeertubes().get(0) != null) {
|
||||||
APIResponse response = new RetrofitPeertubeAPI(_mContext).getRating(videoId);
|
APIResponse response = new RetrofitPeertubeAPI(_mContext).getRating(videoId);
|
||||||
if (response != null)
|
if (response != null)
|
||||||
@ -128,7 +145,7 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadVideos(TimelineType timeline, String max_id) {
|
private void loadVideos(TimelineType timeline, String max_id, String forAccount) {
|
||||||
Context _mContext = getApplication().getApplicationContext();
|
Context _mContext = getApplication().getApplicationContext();
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
@ -136,7 +153,7 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
if (timeline == null)
|
if (timeline == null)
|
||||||
return;
|
return;
|
||||||
APIResponse apiResponse;
|
APIResponse apiResponse;
|
||||||
apiResponse = retrofitPeertubeAPI.getTL(timeline, max_id);
|
apiResponse = retrofitPeertubeAPI.getTL(timeline, max_id, forAccount);
|
||||||
Handler mainHandler = new Handler(Looper.getMainLooper());
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
||||||
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
Runnable myRunnable = () -> apiResponseMutableLiveData.setValue(apiResponse);
|
||||||
mainHandler.post(myRunnable);
|
mainHandler.post(myRunnable);
|
||||||
@ -172,6 +189,7 @@ public class TimelineVM extends AndroidViewModel {
|
|||||||
MOST_LIKED,
|
MOST_LIKED,
|
||||||
HISTORY,
|
HISTORY,
|
||||||
RECENT,
|
RECENT,
|
||||||
VIDEOS_IN_PLAYLIST
|
VIDEOS_IN_PLAYLIST,
|
||||||
|
SEPIA_SEARCH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
app/src/main/res/drawable/ic_baseline_arrow_drop_down_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_arrow_drop_down_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="@color/white">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M7,10l5,5 5,-5z"/>
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_baseline_search_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_search_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||||
|
</vector>
|
370
app/src/main/res/layout/activity_sepia_search.xml
Normal file
370
app/src/main/res/layout/activity_sepia_search.xml
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
Copyright 2020 Thomas Schneider
|
||||||
|
|
||||||
|
This file is a part of TubeLab
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||||
|
GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||||
|
see <http://www.gnu.org/licenses>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:TagsEditText="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context=".SepiaSearchActivity">
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
app:theme="@style/ThemeOverlay.AppCompat.Light">
|
||||||
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
app:contentScrim="?attr/colorPrimary"
|
||||||
|
app:expandedTitleMarginEnd="64dp"
|
||||||
|
app:expandedTitleMarginStart="48dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_marginStart="@dimen/fab_margin"
|
||||||
|
android:layout_marginEnd="@dimen/fab_margin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:id="@+id/header"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
<com.mancj.materialsearchbar.MaterialSearchBar
|
||||||
|
style="@style/MaterialSearchBarLight"
|
||||||
|
app:mt_speechMode="false"
|
||||||
|
app:mt_hint="@string/sepia_search_hint"
|
||||||
|
app:mt_maxSuggestionsCount="10"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:animateLayoutChanges="false"
|
||||||
|
android:id="@+id/searchBar" />
|
||||||
|
<TextView
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/searchBar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="?attr/colorAccent"
|
||||||
|
android:id="@+id/explanations"
|
||||||
|
android:text="@string/sepia_indication"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/filter"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/filter"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
||||||
|
android:drawableEnd="@drawable/ic_baseline_arrow_drop_down_24"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/sort_by"
|
||||||
|
android:text="@string/sort_by"
|
||||||
|
android:labelFor="@+id/sort_by"/>
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sort_by"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/explanations"
|
||||||
|
/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/filter_elements"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/header"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_nsfw"
|
||||||
|
android:text="@string/sepia_element_nsfw"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:id="@+id/sepia_element_nsfw_label"
|
||||||
|
/>
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/sepia_element_nsfw"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw_label"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_nsfw_yes"
|
||||||
|
android:text="@string/yes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_nsfw_no"
|
||||||
|
android:text="@string/no"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_published_date"
|
||||||
|
android:text="@string/sepia_element_published_date"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:id="@+id/sepia_element_published_date_label"
|
||||||
|
/>
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:id="@+id/sepia_element_published_date"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date_label"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/radio_date"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_published_date_any"
|
||||||
|
android:text="@string/any"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_published_date_today"
|
||||||
|
android:text="@string/today"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_published_date_last_7_days"
|
||||||
|
android:text="@string/last_7_days"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_published_date_last_30_days"
|
||||||
|
android:text="@string/last_30_days"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_published_date_last_365_days"
|
||||||
|
android:text="@string/last_365_days"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RadioGroup>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_duration"
|
||||||
|
android:text="@string/sepia_element_duration"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:id="@+id/sepia_element_duration_label"
|
||||||
|
/>
|
||||||
|
<HorizontalScrollView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:id="@+id/sepia_element_duration"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration_label"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/duration"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_duration_any"
|
||||||
|
android:text="@string/any"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_duration_short"
|
||||||
|
android:text="@string/duration_short"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_duration_medium"
|
||||||
|
android:text="@string/duration_medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/sepia_element_duration_long"
|
||||||
|
android:text="@string/duration_long"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RadioGroup>
|
||||||
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_category"
|
||||||
|
android:text="@string/category"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:id="@+id/sepia_element_category_label"
|
||||||
|
/>
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category_label"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_category_label"
|
||||||
|
android:id="@+id/sepia_element_category"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_license"
|
||||||
|
android:text="@string/license"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category"
|
||||||
|
android:id="@+id/sepia_element_license_label"
|
||||||
|
/>
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/category"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_license_label"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_license_label"
|
||||||
|
android:id="@+id/sepia_element_license"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_language"
|
||||||
|
android:text="@string/language"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_license"
|
||||||
|
android:id="@+id/sepia_element_language_label"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/category"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_language_label"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/sepia_element_language_label"
|
||||||
|
android:id="@+id/sepia_element_language"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_all_of_tags"
|
||||||
|
android:text="@string/all_of_these_tags"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_language"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:id="@+id/sepia_element_all_of_tags_label"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<mabbas007.tagsedittext.TagsEditText
|
||||||
|
android:id="@+id/sepia_element_all_of_tags"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags_label"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="2"
|
||||||
|
android:minLines="2"
|
||||||
|
TagsEditText:allowSpaceInTag="true"
|
||||||
|
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
|
||||||
|
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
|
||||||
|
TagsEditText:tagsTextColor="?colorAccent"
|
||||||
|
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:labelFor="@+id/sepia_element_one_of_tags"
|
||||||
|
android:text="@string/one_of_these_tags"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:id="@+id/sepia_element_one_of_tags_label"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<mabbas007.tagsedittext.TagsEditText
|
||||||
|
android:id="@+id/sepia_element_one_of_tags"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags_label"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="2"
|
||||||
|
android:minLines="2"
|
||||||
|
TagsEditText:allowSpaceInTag="true"
|
||||||
|
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
|
||||||
|
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
|
||||||
|
TagsEditText:tagsTextColor="?colorAccent"
|
||||||
|
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/apply_filter"
|
||||||
|
style="@style/Base.Widget.AppCompat.Button.Colored"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/apply_filter"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_marginStart="@dimen/fab_margin"
|
||||||
|
android:layout_marginEnd="@dimen/fab_margin"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
android:id="@+id/container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
/>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -19,55 +19,41 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:paddingTop="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:orientation="horizontal">
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
<ImageView
|
||||||
android:layout_marginRight="5dp"
|
android:id="@+id/peertube_notif_pp"
|
||||||
android:divider="?android:dividerHorizontal"
|
android:layout_width="50dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_height="50dp"
|
||||||
android:orientation="vertical"
|
android:layout_gravity="top"
|
||||||
android:paddingTop="10dp"
|
android:contentDescription="@string/profile_picture" />
|
||||||
android:showDividers="end">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:layout_marginBottom="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/peertube_notif_pp"
|
android:id="@+id/peertube_notif_date"
|
||||||
android:layout_width="50dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="top" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1"
|
android:gravity="end"
|
||||||
android:orientation="vertical">
|
android:textAlignment="viewEnd" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/peertube_notif_date"
|
android:id="@+id/peertube_notif_message"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="end"
|
android:layout_marginStart="10dp"
|
||||||
android:textAlignment="viewEnd" />
|
android:autoLink="web" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/peertube_notif_message"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:autoLink="web" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
android:icon="@drawable/ic_baseline_settings_24"
|
android:icon="@drawable/ic_baseline_settings_24"
|
||||||
android:title="@string/settings"
|
android:title="@string/settings"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_sepia_search"
|
||||||
|
android:icon="@drawable/ic_baseline_search_24"
|
||||||
|
android:title="@string/sepia_search"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_about"
|
android:id="@+id/action_about"
|
||||||
android:icon="@drawable/ic_baseline_info_24"
|
android:icon="@drawable/ic_baseline_info_24"
|
||||||
|
@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||||
def nav_version = "2.3.0"
|
def nav_version = "2.3.0"
|
||||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Reference in New Issue
Block a user