From 643bc427a139410a172f7433b0663d95346b0ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kemal=20Oktay=20Akto=C4=9Fan?= Date: Sat, 16 Feb 2019 23:47:02 +0000 Subject: [PATCH 01/18] Translated using Weblate (Turkish) Currently translated at 100.0% (287 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/tr/ --- app/src/main/res/values-tr/strings.xml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index eab58c0..efcc734 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -1,11 +1,9 @@ PeerTube - İzleti Oynatma Etkinliği Ayarlar Oturum aç - Sunucu E-posta / Kullanıcı adı @@ -16,40 +14,30 @@ Bu şifre çok kısa Bu şifre yanlış Bu alan gereklidir - "E-posta tanımlamaları için Rehber izinleri gerekir." - - + E-posta tanımlamaları için Rehber izni verin. Arama Ayarlar Çıkış yap - Ev Eğilimler Abonelikler Hesap - 1.0.0-alpha.7 - https://troll.tv PeerTube Sunucusu - - \u0020-\u0020 \u0020 Görüntüleme \@ - - İzleti Küçük Resmi Hesap Resmi - Ahlaksız İçerik Ahlaksız içeriği göster Dil süzgeci - Gösterilmesi gereken izleti dillerini seçin. Hiçbiri seçili değilse tüm izletileri tüm dillerde gösterecek. + Tüm izletileri tüm dillerde göstermek yerine bir izleti dili seçin. URL İzleti Oynatma Etkinliği Torrent İzleti Oynatıcı Bir torrent akışı üzerinden izleti oynatma. Bu Depolama İzinlerini gerektirir. (Deneyseldir, kararlı değil!) @@ -62,12 +50,11 @@ Daha Paylaş PeerTube - Geçersiz bağlantı! + Geçersiz bağlantı. Karanlık Kipi Karanlık kipin etkinleşmesi için uygulamayı yeniden başlatın. Uygulama Teması Temanın etkinleşmesi için uygulamayı yeniden başlatın. - Abhazca Afar Afrikanca @@ -260,7 +247,6 @@ Yorubaca Zhuangca Zuluca - Kırmızı Pembe Mor @@ -284,7 +270,6 @@ Normal 1.5x 2x - {faw-play-circle} {faw-cog} {faw-check} @@ -297,18 +282,15 @@ {faw-share} {faw-download} {faw-save} - Arkaplanda Oynatma Etkinleştirilirse, arka planda izleti oynatmaya devam eder. Yerel - Hesap Rapor Karaliste Yazma izni olmadan video indirilemiyor Değerlendirme Başarısız Bu hizmeti kullanmak için giriş yapmalısınız - Paylaş İndir Gizlilik @@ -316,10 +298,8 @@ Lisans Dil Etiketler - Oynatma hızı Kalite - pref_token_access pref_token_refresh From 9ee638b868970c905cd43343712d0a1cab4d5ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sun, 17 Feb 2019 16:26:17 +0100 Subject: [PATCH 02/18] server selection, wip --- app/build.gradle | 2 + app/src/main/AndroidManifest.xml | 60 +++---- .../activity/SelectServerActivity.java | 159 ++++++++++++++---- .../peertube/activity/VideoListActivity.java | 7 + .../peertube/adapter/ServerAdapter.java | 119 +++++++++++++ .../peertube/helper/APIUrlHelper.java | 4 + .../net/schueller/peertube/model/Server.java | 6 +- .../res/layout/activity_select_server.xml | 9 - .../res/layout/activity_server_selection.xml | 34 ++++ app/src/main/res/layout/row_server.xml | 45 +++++ app/src/main/res/menu/menu_top_videolist.xml | 7 + app/src/main/res/values/strings.xml | 1 + 12 files changed, 373 insertions(+), 80 deletions(-) create mode 100644 app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java delete mode 100644 app/src/main/res/layout/activity_select_server.xml create mode 100644 app/src/main/res/layout/activity_server_selection.xml create mode 100644 app/src/main/res/layout/row_server.xml diff --git a/app/build.gradle b/app/build.gradle index 355efc8..f2382b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,4 +78,6 @@ android { dependencies { implementation 'com.android.support.constraint:constraint-layout:+' + implementation 'androidx.appcompat:appcompat:1.0.0-beta01' + implementation 'androidx.constraintlayout:constraintlayout:1.1.2' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 073b0ba..5250d9f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,73 +2,65 @@ - - - - - - - + + - - + tools:ignore="GoogleAppIndexingWarning"> + + + - + android:resource="@xml/searchable"> + android:label="@string/title_activity_login" + android:theme="@style/AppTheme.NoActionBar" /> + android:launchMode="singleTop" + android:theme="@style/AppTheme.NoActionBar" /> - - - - + + - - - - + android:theme="@style/AppTheme.NoActionBar" /> + - - \ No newline at end of file diff --git a/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java b/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java index 4a8789e..539d28f 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java @@ -1,61 +1,152 @@ -/* - * Copyright 2018 Stefan Schüller - * - * License: GPL-3.0+ - * 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. - * - * This program 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 this program. If not, see . - */ - package net.schueller.peertube.activity; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; -import android.os.Bundle; - -import net.schueller.peertube.R; -import net.schueller.peertube.model.ServerList; -import net.schueller.peertube.network.GetServerListDataService; -import net.schueller.peertube.network.RetrofitInstance; - +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.TextView; +import android.widget.Toast; + +import net.schueller.peertube.R; +import net.schueller.peertube.adapter.ServerAdapter; +import net.schueller.peertube.adapter.VideoAdapter; +import net.schueller.peertube.helper.APIUrlHelper; +import net.schueller.peertube.model.ServerList; +import net.schueller.peertube.model.VideoList; +import net.schueller.peertube.network.GetServerListDataService; +import net.schueller.peertube.network.GetVideoDataService; +import net.schueller.peertube.network.RetrofitInstance; + +import java.util.ArrayList; + public class SelectServerActivity extends AppCompatActivity { + private ServerAdapter serverAdapter; + private SwipeRefreshLayout swipeRefreshLayout; + + private int currentStart = 0; + private int count = 12; + + private TextView emptyView; + private RecyclerView recyclerView; + + private boolean isLoading = false; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.activity_select_server); + setContentView(R.layout.activity_server_selection); - // get list of peertube servers + loadList(); + } - // TODO: Get here via settings, get data from API, add to adapter and show in recycle view, upon selection fill settings field - GetServerListDataService service = RetrofitInstance.getRetrofitInstance("https://instances.joinpeertube.org/api/v1/").create(GetServerListDataService.class); - Call call = service.getInstancesData(0, 500); - call.enqueue(new Callback() { + private void loadList() { + + recyclerView = findViewById(R.id.serverRecyclerView); + swipeRefreshLayout = findViewById(R.id.serversSwipeRefreshLayout); + + emptyView = findViewById(R.id.empty_server_selection_view); + + RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(SelectServerActivity.this); + recyclerView.setLayoutManager(layoutManager); + + serverAdapter = new ServerAdapter(new ArrayList<>(), SelectServerActivity.this); + recyclerView.setAdapter(serverAdapter); + + loadServers(currentStart, count); + + recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - // response.body().getVideoArrayList(); + public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { + super.onScrollStateChanged(recyclerView, newState); } @Override - public void onFailure(@NonNull Call call, @NonNull Throwable t) { + public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { + if (dy > 0) { + // is at end of list? + if (!recyclerView.canScrollVertically(RecyclerView.FOCUS_DOWN)) { + if (!isLoading) { + currentStart = currentStart + count; + loadServers(currentStart, count); + } + } + } + + } + }); + + swipeRefreshLayout.setOnRefreshListener(() -> { + // Refresh items + if (!isLoading) { + currentStart = 0; + loadServers(currentStart, count); } }); } + + + + private void loadServers(int start, int count) { + isLoading = true; + + GetServerListDataService service = RetrofitInstance.getRetrofitInstance( + APIUrlHelper.getServerIndexUrl(SelectServerActivity.this) + ).create(GetServerListDataService.class); + + + Call call; + + call = service.getInstancesData(start, count); + + Log.d("URL Called", call.request().url() + ""); + + call.enqueue(new Callback() { + @Override + public void onResponse(@NonNull Call call, @NonNull Response response) { + + if (currentStart == 0) { + serverAdapter.clearData(); + } + + if (response.body() != null) { + serverAdapter.setData(response.body().getServerArrayList()); + } + + // no results show no results message + if (currentStart == 0 && serverAdapter.getItemCount() == 0) { + emptyView.setVisibility(View.VISIBLE); + recyclerView.setVisibility(View.GONE); + + } else { + emptyView.setVisibility(View.GONE); + recyclerView.setVisibility(View.VISIBLE); + } + + isLoading = false; + swipeRefreshLayout.setRefreshing(false); + } + + @Override + public void onFailure(@NonNull Call call, @NonNull Throwable t) { + Log.wtf("err", t.fillInStackTrace()); + Toast.makeText(SelectServerActivity.this, getString(R.string.api_error), Toast.LENGTH_SHORT).show(); + isLoading = false; + swipeRefreshLayout.setRefreshing(false); + } + }); + + } } diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index f851b73..d4950e9 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -128,6 +128,9 @@ public class VideoListActivity extends CommonActivity { menu.findItem(R.id.action_account).setIcon( new IconicsDrawable(this, FontAwesome.Icon.faw_user_circle).actionBar()); + menu.findItem(R.id.action_server_selection).setIcon( + new IconicsDrawable(this, FontAwesome.Icon.faw_server).actionBar()); + MenuItem searchMenuItem = menu.findItem(R.id.action_search); searchMenuItem.setIcon( @@ -200,6 +203,10 @@ public class VideoListActivity extends CommonActivity { this.startActivity(intentMe); } return false; + case R.id.action_server_selection: + Intent intentServer = new Intent(this, SelectServerActivity.class); + this.startActivity(intentServer); + return false; default: break; } diff --git a/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java new file mode 100644 index 0000000..0772a64 --- /dev/null +++ b/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java @@ -0,0 +1,119 @@ +/* + * Copyright 2018 Stefan Schüller + * + * License: GPL-3.0+ + * 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. + * + * This program 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 this program. If not, see . + */ +package net.schueller.peertube.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + + +import net.schueller.peertube.R; +import net.schueller.peertube.helper.APIUrlHelper; +import net.schueller.peertube.model.Server; + +import java.util.ArrayList; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + + +public class ServerAdapter extends RecyclerView.Adapter { + + + private ArrayList serverList; + private Context context; + private String baseUrl; + + public ServerAdapter(ArrayList serverList, Context context) { + this.serverList = serverList; + this.context = context; + } + + @NonNull + @Override + public AccountViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext()); + View view = layoutInflater.inflate(R.layout.row_server, parent, false); + + baseUrl = APIUrlHelper.getUrl(context); + + return new AccountViewHolder(view); + } + + @Override + public void onBindViewHolder(@NonNull AccountViewHolder holder, int position) { + + holder.name.setText(serverList.get(position).getName()); + holder.host.setText(serverList.get(position).getHost()); + holder.shortDescription.setText(serverList.get(position).getShortDescription()); +// +// +// holder.moreButton.setText(R.string.video_more_icon); +// new Iconics.IconicsBuilder().ctx(context).on(holder.moreButton).build(); +// +// holder.moreButton.setOnClickListener(v -> { +// +// PopupMenu popup = new PopupMenu(context, v); +// popup.setOnMenuItemClickListener(menuItem -> { +// switch (menuItem.getItemId()) { +// case R.id.menu_share: +// Intents.Share(context, serverList.get(position)); +// return true; +// default: +// return false; +// } +// }); +// popup.inflate(R.menu.menu_video_row_mode); +// popup.show(); +// +// }); + + } + + public void setData(ArrayList data) { + serverList.addAll(data); + this.notifyDataSetChanged(); + } + + public void clearData() { + serverList.clear(); + this.notifyDataSetChanged(); + } + + @Override + public int getItemCount() { + return serverList.size(); + } + + class AccountViewHolder extends RecyclerView.ViewHolder { + + TextView name, host, shortDescription; + + AccountViewHolder(View itemView) { + super(itemView); + name = itemView.findViewById(R.id.name); + host = itemView.findViewById(R.id.host); + shortDescription = itemView.findViewById(R.id.shortDescription); + + } + } + + +} \ No newline at end of file diff --git a/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java b/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java index 4a4c06a..b632f42 100644 --- a/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java +++ b/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java @@ -44,4 +44,8 @@ public class APIUrlHelper{ public static String getShareUrl(Context context, String videoUuid) { return APIUrlHelper.getUrl(context) + "/videos/watch/" + videoUuid; } + + public static String getServerIndexUrl(Context context) { + return "https://instances.joinpeertube.org/api/v1/"; + } } diff --git a/app/src/main/java/net/schueller/peertube/model/Server.java b/app/src/main/java/net/schueller/peertube/model/Server.java index 4d14404..77e1ed6 100644 --- a/app/src/main/java/net/schueller/peertube/model/Server.java +++ b/app/src/main/java/net/schueller/peertube/model/Server.java @@ -25,7 +25,7 @@ public class Server { private String shortDescription; private String version; private Boolean signupAllowed; - private Integer userVideoQuota; + private Double userVideoQuota; private Integer totalUsers; private Integer totalVideos; private Integer totalLocalVideos; @@ -81,11 +81,11 @@ public class Server { this.signupAllowed = signupAllowed; } - public Integer getUserVideoQuota() { + public Double getUserVideoQuota() { return userVideoQuota; } - public void setUserVideoQuota(Integer userVideoQuota) { + public void setUserVideoQuota(Double userVideoQuota) { this.userVideoQuota = userVideoQuota; } diff --git a/app/src/main/res/layout/activity_select_server.xml b/app/src/main/res/layout/activity_select_server.xml deleted file mode 100644 index 71beae8..0000000 --- a/app/src/main/res/layout/activity_select_server.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_server_selection.xml b/app/src/main/res/layout/activity_server_selection.xml new file mode 100644 index 0000000..f78ddc0 --- /dev/null +++ b/app/src/main/res/layout/activity_server_selection.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/row_server.xml b/app/src/main/res/layout/row_server.xml new file mode 100644 index 0000000..efeac65 --- /dev/null +++ b/app/src/main/res/layout/row_server.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/menu_top_videolist.xml b/app/src/main/res/menu/menu_top_videolist.xml index 121e62d..e8a536e 100644 --- a/app/src/main/res/menu/menu_top_videolist.xml +++ b/app/src/main/res/menu/menu_top_videolist.xml @@ -26,4 +26,11 @@ android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" app:showAsAction="ifRoom" /> + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8db3e6b..86c214b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -344,5 +344,6 @@ none like dislike + Select Server From 3b9b61f29555b71af3886ddebef2e9aa866efe0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Thu, 21 Feb 2019 08:33:25 +0100 Subject: [PATCH 03/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5dcb6e2..ed816a4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Thorium, a Android PeerTube Client + Thorium, an Android PeerTube Client

[![Latest release](https://img.shields.io/github/release/sschueller/peertube-android.svg)](https://github.com/sschueller/peertube-android/releases/latest) From ced2985f9cbf6f47746416a58e4123246d70ee2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Sun, 17 Feb 2019 14:22:36 +0000 Subject: [PATCH 04/18] Added translation using Weblate (Swedish) --- app/src/main/res/values-sv/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-sv/strings.xml diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml new file mode 100644 index 0000000..a6b3dae --- /dev/null +++ b/app/src/main/res/values-sv/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From d0f21cbe5bbc1ad6ba50da4ffa9ede57d4e51033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Sun, 17 Feb 2019 14:24:16 +0000 Subject: [PATCH 05/18] Added translation using Weblate (German) --- app/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-de/strings.xml diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml new file mode 100644 index 0000000..a6b3dae --- /dev/null +++ b/app/src/main/res/values-de/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 0b1b4fb9ce8cc477a8c473fd71a6c5b760586afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Sun, 17 Feb 2019 14:24:42 +0000 Subject: [PATCH 06/18] Translated using Weblate (German) Currently translated at 5.6% (16 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ --- app/src/main/res/values-de/strings.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index a6b3dae..84618d2 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1,2 +1,19 @@ - \ No newline at end of file + + Einstellungen + Anmelden + Server + Kontoname + Passwort + Anmelden + Anmelden + Ungültige E-Mail-Adresse + Suche + Abmelden + Konto + Übersicht + Lokal + Abos + Konto + PeerTube Server + \ No newline at end of file From d62b2d43c62ed4ea0c6c1b9df19e37f1bed116be Mon Sep 17 00:00:00 2001 From: Filip Bengtsson Date: Sun, 17 Feb 2019 23:05:57 +0000 Subject: [PATCH 07/18] Translated using Weblate (Swedish) Currently translated at 98.3% (282 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/sv/ --- app/src/main/res/values-sv/strings.xml | 285 ++++++++++++++++++++++++- 1 file changed, 284 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index a6b3dae..7d45284 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -1,2 +1,285 @@ - \ No newline at end of file + + Inställningar + Logga in + Server + E-post / Användarnamn + Lösenord + Logga in + Logga in + E-postadressen är inte giltig + Lösenordet är för kort + Lösenordet stämmer inte + Obligatoriskt fält + Sök + Inställningar + Logga ut + Konto + Översikt + Populärt + Nyligen tillagt + Lokalt + Prenumerationer + Konto + PeerTube-server + " Visningar" + Videominiatyr + Kontoavatar + Känsligt innehåll + Visa känsligt innehåll + Språkfilter + Välj ett språk för att inte visa videor på samtliga språk. + Torrent-videospelare + Videouppspelning via en torrent-ström. Detta kräver lagringsåtkomst. (Alfa-version, inte stabilt!) + Licens + Version + Sök på PeerTube + Sök + Inga resultat + Mer + Dela + Ogiltig webbadress. + Mörkt tema + Starta om appen för att visa med mörkt tema. + App-tema + Starta om appen för att ladda in det nya temat. + Abchaziska + Afar + Afrikaans + Akan + Albanska + Amerikanskt teckenspråk + Amhariska + Arabiska + Aragonska + Armeniska + Assamesiska + Avariska + Aymara + Azerbajdzjanska + Bambara + Basjkiriska + Baskiska + Vitryska + Bengali + Bislama + Bosniska + Brasilianskt teckenspråk + Bretonska + Brittiskt teckenspråk + Bulgariska + Burmesiska + Katalanska + Chamorro + Tjetjenska + Kinesiska + Kinesiskt teckenspråk + Tjuvasjiska + Korniska + Korsikanska + Cree + Kroatiska + Tjeckiska + Tjeckiskt teckenspråk + Danska + Danskt teckenspråk + Divehi + Nederländska + Dzongkha + Engelska + Esperanto + Estniska + Ewe + Färöiska + Fijianska + Finska + Franska + Franskt teckenspråk + Fula + Galiciska + Luganda + Georgiska + Tyska + Tyskt teckenspråk + Guaraní + Gujarati + Haitisk kreol + Hausa + Hebreiska + Herero + Hindi + Hiri motu + Ungerska + Isländska + Igbo + Indonesiska + Inuktitut + Iñupiaq + Iriska + Italienska + Japanska + Japanskt teckenspråk + Javanesiska + Grönländska + Kannada + Kanuri + Kashmiri + Kazakiska + Khmer + Kikuyu + Rwanda + Kirgiziska + Klingon + Komi + Kikongo + Koreanska + Kotava + Kwanyama + Kurdiska + Lao + Lettiska + Limburgiska + Lingala + Litauiska + Lojban + Luba-Katanga + Luxemburgiska + Makedonska + Malagassiska + Malajiska + Malayalam + Maltesiska + Manx + Maori + Marathi + Marshallesiska + Modern grekiska (1453–) + Mongoliska + Nauruanska + Navajo + Ndonga + Nepali + Nordndebele + Nordsamiska + Norska + Bokmål + Nynorska + Chichewa + Occitanska + Ojibwa + Oriya + Oromo + Ossetiska + Pakistanskt teckenspråk + Punjabi + Persiska + Polska + Portugisiska + Pashto + Quechua + Rumänska + Rätoromanska + Kirundi + Ryska + Ryskt teckenspråk + Samoanska + Sango + Sardiska + Saudiskt teckenspråk + Skotsk gäliska + Serbiska + Serbokroatiska + Shona + Nuosu + Sindhi + Singalesiska + Slovakiska + Slovenska + Somaliska + Sydafrikanskt teckenspråk + Sydndebele + Sesotho + Spanska + Sundanesiska + Swahili + SiSwati + Svenska + Svenskt teckenspråk + Tagalog + Tahitiska + Tadzjikiska + Tamil + Tatariska + Telugu + Thai + Tibetanska + Tigrinska + Tonganska + Tsonga + Setswana + Turkiska + Turkmeniska + Twi + Uiguriska + Ukrainska + Urdu + Uzbekiska + Venda + Vietnamesiska + Vallonska + Kymriska + Västfrisiska + Wolof + Xhosa + Jiddisch + Yoruba + Zhuang + Zulu + Röd + Rosa + Lila + Mörklila + Indigo + Blå + Ljusblå + Cyan + Turkos + Grön + Ljusgrön + Gulgrön + Gul + Gulorange + Orange + Mörkorange + Brun + Grå + Gråblå + 0,5× + Normal + 1,5× + + Spela upp i bakgrunden + Konto + Rapportera + Svartlista + Kan inte ladda ner video utan skrivbehörighet + Bedömningen kunde inte genomföras + Du måste logga in för att använda den här tjänsten + Dela + Ladda ner + Hantering av personuppgifter + Kategori + Licens + Språk + Taggar + Uppspelningshastighet + Kvalitet + Videor + Kanaler + Om + Konto: + Prenumeranter: + Beskrivning: + Gick med: + Någonting gick snett, försök gärna igen om en stund! + \ No newline at end of file From 3b59e386ec0cab6165b0b839f746461a3766229c Mon Sep 17 00:00:00 2001 From: Digiwizkid Date: Tue, 19 Feb 2019 05:48:10 +0000 Subject: [PATCH 08/18] Translated using Weblate (Bengali) Currently translated at 99.3% (285 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/bn/ --- app/src/main/res/values-bn/strings.xml | 28 +++----------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index 6596122..9bfb6b5 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -1,11 +1,9 @@ Thorium - VideoPlayActivity সেটিংস সাইন ইন - সার্ভার ইমেল / ইয়ুজারনেম @@ -16,37 +14,26 @@ পাসওয়ার্ড খুব ছোট ভুল পাসওয়ার্ড এটি জরুরি ফিল্ড - "Contacts permissions are needed for providing email - completions." - - + Grant contact permission for email completion. সার্চ সেটিং লগ আউট - হোম "Trending" Subscriptions একাউন্ট - 1.0.0-alpha.7 - https://troll.tv PeerTube Server - - \u0020-\u0020 \u0020Views \@ - - Video Thumbnail Account Avatar - NSFW দেখাও NSFW content will be shown if enabled. ভাষা ফিলটার @@ -63,12 +50,11 @@ আরও শেয়ার PeerTube - Invalid Url! + Invalid URL. ডার্ক মোড Restart App for Dark Mode to take effect. App Theme - Restart App for theme to take effect. - + Restart app for theme to take effect. Abkhazian Afar Afrikaans @@ -261,7 +247,6 @@ Yoruba Zhuang Zulu - লাল গোলাপি বেগুনি @@ -284,8 +269,6 @@ Normal 1.5x 2x - - {faw-check} {faw-expand} {faw-compress} @@ -295,18 +278,15 @@ {faw-share} {faw-download} {faw-save} - Background Playback If enabled, continues to play video in background. Local - একাউন্ট রিপোর্ট Blacklist Can not download video without write permission Rating Failed এই সেবা ব্যবহারের জন্য লগ ইন করুন - শেয়ার ডাউনলোড Privacy @@ -314,8 +294,6 @@ License ভাষা Tags - - pref_token_access pref_token_refresh From a5de2c5750844bfbb22ea80910fd83e0e0c8bfa0 Mon Sep 17 00:00:00 2001 From: lishoujun Date: Wed, 20 Feb 2019 15:23:20 +0000 Subject: [PATCH 09/18] Translated using Weblate (Chinese (Simplified)) Currently translated at 23.0% (66 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hans/ --- app/src/main/res/values-zh-rCN/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 87c7c7b..b6407f8 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -63,4 +63,12 @@ 视频通过一个种子下载,此选项需要存储权限(实验阶段,不稳定!) 退出 中文 + 视频播放Activity + 本字段必填 + 账户 + 最近 + 视频缩略图 + 账号头像 + Url视频播放Activity + 出故障了,请稍候再试 \ No newline at end of file From ed36a2356a64af04b36359042cc827bcf451c72b Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Sat, 23 Feb 2019 04:33:19 +0000 Subject: [PATCH 10/18] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (287 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/zh_Hant/ --- app/src/main/res/values-zh-rTW/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5d28cbe..525a0a5 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1,5 +1,6 @@ -影片播放活動 + + 影片播放活動 設定 登入 伺服器 @@ -11,8 +12,7 @@ 這個密碼太短了 這個密碼不正確 這個欄位為必填 - "聯絡人權限是電子郵件 -\n 完成功能所必須。" + 授予連絡人電子郵件完成權限。 搜尋 設定 登出 @@ -30,7 +30,7 @@ NSFW 內容 顯示 NSFW 內容 語言過濾器 - 選取要顯示的影片語言。若未選取則將會顯示所有語言的所有影片。 + 選取所要的影片語言,而不是以所有的語言顯示全部影片。 Url影片播放活動 種子影片播放器 透過種子串流播放影片。這需要儲存權限。(Alpha 版,不穩定!) @@ -45,7 +45,7 @@ 沒有結果 更多 分享 - 無效的 Url! + 無效的 URL。 深色模式 重新啟動應用程式以讓深色模式生效。 應用程式主題 From a0dd6338a36bc9d43b40751163a4490e4fc25541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Tue, 26 Feb 2019 07:22:49 +0000 Subject: [PATCH 11/18] Translated using Weblate (German) Currently translated at 12.5% (36 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/de/ --- app/src/main/res/values-de/strings.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 84618d2..372a832 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -16,4 +16,25 @@ Abos Konto PeerTube Server + VideoPlayActivity + Dieses Passwort ist zu kurz + Dieses Passwort ist falsch + Einstellungen + Aktuell + " Abrufe" + Video Vorschaubild + Konto Avatar + NSFW Inhalt + Zeigen NSFW Inhalt + Sprachfilter + Lizenz + Version + PeerTube durchsuchen + Suche + Keine Ergebnisse + Mehr + Teilen + Ungültige URL. + Dunkler Modus + Farbschema \ No newline at end of file From 3b5dd130864a78cb884572631ac8f4490a2d85ec Mon Sep 17 00:00:00 2001 From: Filip Bengtsson Date: Mon, 25 Feb 2019 09:48:52 +0000 Subject: [PATCH 12/18] Translated using Weblate (Swedish) Currently translated at 100.0% (287 of 287 strings) Translation: PeerTube/Android Translate-URL: https://hosted.weblate.org/projects/peertube/android/sv/ --- app/src/main/res/values-sv/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 7d45284..0490530 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -282,4 +282,12 @@ Beskrivning: Gick med: Någonting gick snett, försök gärna igen om en stund! + VideoPlayActivity + Ge åtkomst till kontakter för komplettering av e-postadresser. + UrlVideoPlayActivity + +\nGNU Affero General Public License v3.0 +\n +\nRättigheterna den här starka copyleft-licensen ger, ges på villkoret att det licenserade verkets källkods samtliga delar och modifikationer görs tillgänglig under samma licens, detta gäller även större verk som använder det licenserade verket. Copyright- och licensnotiser måste bevaras. Bidragsgivare ger ett uttryckligt godkännande av patenträttigheter. Källkodens samtliga delar och modifikationer måste göras tillgänglig när en modifierad version används för att tillhandahålla en service över ett nätverk. + Videor kommer fortsätta spelas i bakgrunden om detta aktiveras. \ No newline at end of file From 66eb18d1ca67d03a1f6ea611b56215e200d5aeac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sat, 2 Mar 2019 18:17:17 +0100 Subject: [PATCH 13/18] string cleanup --- app/src/main/res/values/strings.xml | 52 ++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c52eae5..35d3730 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,9 +1,10 @@ Thorium - VideoPlayActivity + VideoPlayActivity Settings Sign in + Server Email / Username @@ -15,11 +16,13 @@ This password is incorrect This field is required Grant contact permission for e-mail completion. + Search Settings Log out Account + Overview Trending @@ -28,25 +31,15 @@ Subscriptions Account - 1.0.0-alpha.7 - https://troll.tv - PeerTube Server + \u0020-\u0020 \u0020Views \@ Video Thumbnail Account Avatar - NSFW Content - Show NSFW content - Language filter - Select a video language, instead of showing all videos in all languages. UrlVideoPlayActivity - Torrent Video Player - Video playback via a torrent stream. This requires Storage Permissions. (Alpha, not stable!) - License - \nGNU Affero General Public License v3.0\n\nPermissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. - Version + Search PeerTube Search No Results @@ -54,10 +47,29 @@ Share PeerTube Invalid URL. + + + Dark Mode Restart App for Dark Mode to take effect. App Theme Restart app for theme to take effect. + Torrent Video Player + Video playback via a torrent stream. This requires Storage Permissions. (Alpha, not stable!) + License + \nGNU Affero General Public License v3.0\n\nPermissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. + Version + NSFW Content + Show NSFW content + Language filter + Select a video language, instead of showing all videos in all languages. + https://troll.tv + PeerTube Server + Background Playback + If enabled, continues to play video in background. + + + Abkhazian Afar Afrikaans @@ -250,6 +262,8 @@ Yoruba Zhuang Zulu + + Red Pink Purple @@ -269,10 +283,12 @@ Brown Gray Bluegray + 0.5x Normal 1.5x 2x + {faw-play-circle} {faw-cog} {faw-check} @@ -285,8 +301,8 @@ {faw-share} {faw-download} {faw-save} - Background Playback - If enabled, continues to play video in background. + + Account Report Blacklist @@ -310,6 +326,10 @@ Description: Joined: Something went wrong, please try later! + + Select Server + + pref_token_access pref_token_refresh @@ -320,6 +340,6 @@ none like dislike - Select Server + 1.0.0-alpha.7 \ No newline at end of file From 6274e964e465924aefd69a71666452b9dd83b32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schu=CC=88ller?= Date: Sat, 2 Mar 2019 20:13:02 +0100 Subject: [PATCH 14/18] server selection wip --- .../activity/SelectServerActivity.java | 2 +- .../peertube/adapter/ServerAdapter.java | 31 +++++- .../net/schueller/peertube/model/Server.java | 20 ++++ .../res/layout/activity_server_selection.xml | 94 ++++++++++++++----- app/src/main/res/layout/row_server.xml | 11 +++ app/src/main/res/values/strings.xml | 4 + 6 files changed, 135 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java b/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java index 539d28f..8715b15 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java @@ -59,7 +59,7 @@ public class SelectServerActivity extends AppCompatActivity { RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(SelectServerActivity.this); recyclerView.setLayoutManager(layoutManager); - serverAdapter = new ServerAdapter(new ArrayList<>(), SelectServerActivity.this); + serverAdapter = new ServerAdapter(new ArrayList<>(), this); recyclerView.setAdapter(serverAdapter); loadServers(currentStart, count); diff --git a/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java index 0772a64..2a4dcb5 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/ServerAdapter.java @@ -18,6 +18,8 @@ package net.schueller.peertube.adapter; import android.content.Context; +import android.content.SharedPreferences; +import android.preference.PreferenceManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -25,6 +27,7 @@ import android.widget.TextView; import net.schueller.peertube.R; +import net.schueller.peertube.activity.SelectServerActivity; import net.schueller.peertube.helper.APIUrlHelper; import net.schueller.peertube.model.Server; @@ -38,12 +41,12 @@ public class ServerAdapter extends RecyclerView.Adapter serverList; - private Context context; + private SelectServerActivity activity; private String baseUrl; - public ServerAdapter(ArrayList serverList, Context context) { + public ServerAdapter(ArrayList serverList, SelectServerActivity activity) { this.serverList = serverList; - this.context = context; + this.activity = activity; } @NonNull @@ -52,7 +55,7 @@ public class ServerAdapter extends RecyclerView.Adapter { + + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity); + SharedPreferences.Editor editor = sharedPref.edit(); + + editor.putString("pref_api_base", "https://" + serverList.get(position).getHost()); + editor.apply(); + + activity.finish(); + }); + // // // holder.moreButton.setText(R.string.video_more_icon); @@ -104,12 +124,13 @@ public class ServerAdapter extends RecyclerView.Adapter - - + android:layout_height="wrap_content" + android:orientation="vertical" + > - - - - - - - \ No newline at end of file + + + + + + + + +