From 1b9a61df191f6d027deacd78bc34db27bf6fbc33 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Wed, 26 Dec 2018 20:11:57 +0100 Subject: [PATCH 1/7] Readme update --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 281692d..dd4fc90 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@ Beta Test on Google Play: https://play.google.com/store/apps/details?id=net.schu - [X] Change Server - [X] Search - [X] App Icon and assets -- [!] Themes / Dark mode (needs work) +- [X] Themes / Dark mode - [X] Background playback - [X] NSFW Filter option -# TODO +## TODO - [ ] Video Playback via WebRTC - [ ] Authentication / Login From 0753881e1e67596a458e852ff7a9e85635f889e1 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 29 Dec 2018 14:19:17 +0100 Subject: [PATCH 2/7] Added Licenses --- .../peertube/adapter/VideoAdapter.java | 17 +++++++++++++++++ .../fragment/VideoOptionsFragment.java | 17 +++++++++++++++++ .../peertube/helper/APIUrlHelper.java | 17 +++++++++++++++++ .../schueller/peertube/helper/Constants.java | 18 ++++++++++++++++++ .../peertube/helper/MetaDataHelper.java | 17 +++++++++++++++++ .../schueller/peertube/intents/Intents.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Account.java | 18 ++++++++++++++++++ .../net/schueller/peertube/model/Avatar.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Category.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Channel.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Config.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/File.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Language.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Licence.java | 17 +++++++++++++++++ .../schueller/peertube/model/OauthClient.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Privacy.java | 17 +++++++++++++++++ .../schueller/peertube/model/Resolution.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Server.java | 17 +++++++++++++++++ .../schueller/peertube/model/ServerList.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Token.java | 17 +++++++++++++++++ .../net/schueller/peertube/model/Video.java | 17 +++++++++++++++++ .../schueller/peertube/model/VideoList.java | 17 +++++++++++++++++ .../network/AuthenticationService.java | 17 +++++++++++++++++ .../peertube/network/GetConfigDataService.java | 17 +++++++++++++++++ .../network/GetServerListDataService.java | 17 +++++++++++++++++ .../peertube/network/GetVideoDataService.java | 17 +++++++++++++++++ .../peertube/network/RetrofitInstance.java | 17 +++++++++++++++++ .../provider/SearchSuggestionsProvider.java | 17 +++++++++++++++++ .../peertube/service/VideoPlayerService.java | 17 +++++++++++++++++ 29 files changed, 495 insertions(+) diff --git a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java index b898133..25f68e6 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java @@ -1,3 +1,20 @@ +/* + * 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; diff --git a/app/src/main/java/net/schueller/peertube/fragment/VideoOptionsFragment.java b/app/src/main/java/net/schueller/peertube/fragment/VideoOptionsFragment.java index 1ed17e0..4a73e13 100644 --- a/app/src/main/java/net/schueller/peertube/fragment/VideoOptionsFragment.java +++ b/app/src/main/java/net/schueller/peertube/fragment/VideoOptionsFragment.java @@ -1,3 +1,20 @@ +/* + * 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.fragment; import android.os.Bundle; 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 c1ed8d2..4a4c06a 100644 --- a/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java +++ b/app/src/main/java/net/schueller/peertube/helper/APIUrlHelper.java @@ -1,3 +1,20 @@ +/* + * 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.helper; import android.content.Context; diff --git a/app/src/main/java/net/schueller/peertube/helper/Constants.java b/app/src/main/java/net/schueller/peertube/helper/Constants.java index 02d03bf..e9c4ba7 100644 --- a/app/src/main/java/net/schueller/peertube/helper/Constants.java +++ b/app/src/main/java/net/schueller/peertube/helper/Constants.java @@ -1,6 +1,24 @@ +/* + * 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.helper; public class Constants { public static final String THEME_PREF_KEY = "pref_theme"; public static final String DEFAULT_THEME = "AppTheme.ORANGE"; + public static final String BACKGROUND_PLAY_PREF_KEY = "pref_background_play"; } diff --git a/app/src/main/java/net/schueller/peertube/helper/MetaDataHelper.java b/app/src/main/java/net/schueller/peertube/helper/MetaDataHelper.java index c0bc26d..7d7bbd2 100644 --- a/app/src/main/java/net/schueller/peertube/helper/MetaDataHelper.java +++ b/app/src/main/java/net/schueller/peertube/helper/MetaDataHelper.java @@ -1,3 +1,20 @@ +/* + * 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.helper; import android.content.Context; diff --git a/app/src/main/java/net/schueller/peertube/intents/Intents.java b/app/src/main/java/net/schueller/peertube/intents/Intents.java index a31edfb..2ca421b 100644 --- a/app/src/main/java/net/schueller/peertube/intents/Intents.java +++ b/app/src/main/java/net/schueller/peertube/intents/Intents.java @@ -1,3 +1,20 @@ +/* + * 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.intents; import android.content.Context; diff --git a/app/src/main/java/net/schueller/peertube/model/Account.java b/app/src/main/java/net/schueller/peertube/model/Account.java index 4b08406..54c5282 100644 --- a/app/src/main/java/net/schueller/peertube/model/Account.java +++ b/app/src/main/java/net/schueller/peertube/model/Account.java @@ -1,3 +1,21 @@ +/* + * 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.model; import java.util.Date; diff --git a/app/src/main/java/net/schueller/peertube/model/Avatar.java b/app/src/main/java/net/schueller/peertube/model/Avatar.java index 791e411..356816d 100644 --- a/app/src/main/java/net/schueller/peertube/model/Avatar.java +++ b/app/src/main/java/net/schueller/peertube/model/Avatar.java @@ -1,3 +1,20 @@ +/* + * 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.model; import java.util.Date; diff --git a/app/src/main/java/net/schueller/peertube/model/Category.java b/app/src/main/java/net/schueller/peertube/model/Category.java index 6bde429..505da79 100644 --- a/app/src/main/java/net/schueller/peertube/model/Category.java +++ b/app/src/main/java/net/schueller/peertube/model/Category.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Category { diff --git a/app/src/main/java/net/schueller/peertube/model/Channel.java b/app/src/main/java/net/schueller/peertube/model/Channel.java index c001e05..28f0aa5 100644 --- a/app/src/main/java/net/schueller/peertube/model/Channel.java +++ b/app/src/main/java/net/schueller/peertube/model/Channel.java @@ -1,3 +1,20 @@ +/* + * 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.model; import java.util.Date; diff --git a/app/src/main/java/net/schueller/peertube/model/Config.java b/app/src/main/java/net/schueller/peertube/model/Config.java index ebd770d..9aa3904 100644 --- a/app/src/main/java/net/schueller/peertube/model/Config.java +++ b/app/src/main/java/net/schueller/peertube/model/Config.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Config { diff --git a/app/src/main/java/net/schueller/peertube/model/File.java b/app/src/main/java/net/schueller/peertube/model/File.java index 9537ffc..eb426ba 100644 --- a/app/src/main/java/net/schueller/peertube/model/File.java +++ b/app/src/main/java/net/schueller/peertube/model/File.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class File { diff --git a/app/src/main/java/net/schueller/peertube/model/Language.java b/app/src/main/java/net/schueller/peertube/model/Language.java index 2c677f0..f1abc74 100644 --- a/app/src/main/java/net/schueller/peertube/model/Language.java +++ b/app/src/main/java/net/schueller/peertube/model/Language.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Language { diff --git a/app/src/main/java/net/schueller/peertube/model/Licence.java b/app/src/main/java/net/schueller/peertube/model/Licence.java index 654f160..11f8330 100644 --- a/app/src/main/java/net/schueller/peertube/model/Licence.java +++ b/app/src/main/java/net/schueller/peertube/model/Licence.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Licence { diff --git a/app/src/main/java/net/schueller/peertube/model/OauthClient.java b/app/src/main/java/net/schueller/peertube/model/OauthClient.java index 35221bc..e8044be 100644 --- a/app/src/main/java/net/schueller/peertube/model/OauthClient.java +++ b/app/src/main/java/net/schueller/peertube/model/OauthClient.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class OauthClient { diff --git a/app/src/main/java/net/schueller/peertube/model/Privacy.java b/app/src/main/java/net/schueller/peertube/model/Privacy.java index 5d2c216..6de6798 100644 --- a/app/src/main/java/net/schueller/peertube/model/Privacy.java +++ b/app/src/main/java/net/schueller/peertube/model/Privacy.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Privacy { diff --git a/app/src/main/java/net/schueller/peertube/model/Resolution.java b/app/src/main/java/net/schueller/peertube/model/Resolution.java index c969c89..815d96e 100644 --- a/app/src/main/java/net/schueller/peertube/model/Resolution.java +++ b/app/src/main/java/net/schueller/peertube/model/Resolution.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Resolution { 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 f8b1d21..4d14404 100644 --- a/app/src/main/java/net/schueller/peertube/model/Server.java +++ b/app/src/main/java/net/schueller/peertube/model/Server.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Server { diff --git a/app/src/main/java/net/schueller/peertube/model/ServerList.java b/app/src/main/java/net/schueller/peertube/model/ServerList.java index 709cdc2..941c34c 100644 --- a/app/src/main/java/net/schueller/peertube/model/ServerList.java +++ b/app/src/main/java/net/schueller/peertube/model/ServerList.java @@ -1,3 +1,20 @@ +/* + * 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.model; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/net/schueller/peertube/model/Token.java b/app/src/main/java/net/schueller/peertube/model/Token.java index 4a703ea..a4ac1f1 100644 --- a/app/src/main/java/net/schueller/peertube/model/Token.java +++ b/app/src/main/java/net/schueller/peertube/model/Token.java @@ -1,3 +1,20 @@ +/* + * 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.model; public class Token { diff --git a/app/src/main/java/net/schueller/peertube/model/Video.java b/app/src/main/java/net/schueller/peertube/model/Video.java index 377f645..11bf4ad 100644 --- a/app/src/main/java/net/schueller/peertube/model/Video.java +++ b/app/src/main/java/net/schueller/peertube/model/Video.java @@ -1,3 +1,20 @@ +/* + * 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.model; import android.content.Context; diff --git a/app/src/main/java/net/schueller/peertube/model/VideoList.java b/app/src/main/java/net/schueller/peertube/model/VideoList.java index 2748cbc..336a0cb 100644 --- a/app/src/main/java/net/schueller/peertube/model/VideoList.java +++ b/app/src/main/java/net/schueller/peertube/model/VideoList.java @@ -1,3 +1,20 @@ +/* + * 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.model; import com.google.gson.annotations.SerializedName; diff --git a/app/src/main/java/net/schueller/peertube/network/AuthenticationService.java b/app/src/main/java/net/schueller/peertube/network/AuthenticationService.java index ce55b96..898c9bd 100644 --- a/app/src/main/java/net/schueller/peertube/network/AuthenticationService.java +++ b/app/src/main/java/net/schueller/peertube/network/AuthenticationService.java @@ -1,3 +1,20 @@ +/* + * 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.network; import net.schueller.peertube.model.OauthClient; diff --git a/app/src/main/java/net/schueller/peertube/network/GetConfigDataService.java b/app/src/main/java/net/schueller/peertube/network/GetConfigDataService.java index aded270..b8a4279 100644 --- a/app/src/main/java/net/schueller/peertube/network/GetConfigDataService.java +++ b/app/src/main/java/net/schueller/peertube/network/GetConfigDataService.java @@ -1,3 +1,20 @@ +/* + * 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.network; import net.schueller.peertube.model.Config; diff --git a/app/src/main/java/net/schueller/peertube/network/GetServerListDataService.java b/app/src/main/java/net/schueller/peertube/network/GetServerListDataService.java index 5962353..bdb8a26 100644 --- a/app/src/main/java/net/schueller/peertube/network/GetServerListDataService.java +++ b/app/src/main/java/net/schueller/peertube/network/GetServerListDataService.java @@ -1,3 +1,20 @@ +/* + * 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.network; import net.schueller.peertube.model.ServerList; diff --git a/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java b/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java index 97ce8f2..cd9f2e8 100644 --- a/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java +++ b/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java @@ -1,3 +1,20 @@ +/* + * 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.network; import net.schueller.peertube.model.Video; diff --git a/app/src/main/java/net/schueller/peertube/network/RetrofitInstance.java b/app/src/main/java/net/schueller/peertube/network/RetrofitInstance.java index d8a6cd8..fc8936f 100644 --- a/app/src/main/java/net/schueller/peertube/network/RetrofitInstance.java +++ b/app/src/main/java/net/schueller/peertube/network/RetrofitInstance.java @@ -1,3 +1,20 @@ +/* + * 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.network; import retrofit2.Retrofit; diff --git a/app/src/main/java/net/schueller/peertube/provider/SearchSuggestionsProvider.java b/app/src/main/java/net/schueller/peertube/provider/SearchSuggestionsProvider.java index 2101fb4..8532e8c 100644 --- a/app/src/main/java/net/schueller/peertube/provider/SearchSuggestionsProvider.java +++ b/app/src/main/java/net/schueller/peertube/provider/SearchSuggestionsProvider.java @@ -1,3 +1,20 @@ +/* + * 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.provider; import android.content.SearchRecentSuggestionsProvider; diff --git a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java index 8eb4f14..c23c7d1 100644 --- a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java +++ b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java @@ -1,3 +1,20 @@ +/* + * 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.service; import android.app.Notification; From 36c36a3ea7f7c5efe54102a8b3e4d7bc7ddb3bbd Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 29 Dec 2018 14:19:54 +0100 Subject: [PATCH 3/7] Added Licenses --- .../activity/AppCompatPreferenceActivity.java | 18 ++++++++++++++++++ .../peertube/activity/LoginActivity.java | 18 ++++++++++++++++++ .../activity/SelectServerActivity.java | 18 ++++++++++++++++++ .../peertube/activity/SettingsActivity.java | 18 ++++++++++++++++++ .../peertube/activity/VideoListActivity.java | 18 ++++++++++++++++++ 5 files changed, 90 insertions(+) diff --git a/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java b/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java index f4ef791..b2d9461 100644 --- a/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java @@ -1,3 +1,21 @@ +/* + * 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 android.content.res.Configuration; diff --git a/app/src/main/java/net/schueller/peertube/activity/LoginActivity.java b/app/src/main/java/net/schueller/peertube/activity/LoginActivity.java index 990f8a8..4ea13ea 100644 --- a/app/src/main/java/net/schueller/peertube/activity/LoginActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/LoginActivity.java @@ -1,3 +1,21 @@ +/* + * 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 android.content.SharedPreferences; 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 5f15750..4a8789e 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SelectServerActivity.java @@ -1,3 +1,21 @@ +/* + * 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; diff --git a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java index 0cb0211..3d7352d 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java @@ -1,3 +1,21 @@ +/* + * 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 android.annotation.TargetApi; 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 67514c3..1abce71 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -1,3 +1,21 @@ +/* + * 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 android.Manifest; From f468a9998f419b9ac05c2bc3a2c78dacfca82cf4 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 29 Dec 2018 14:21:08 +0100 Subject: [PATCH 4/7] Fullscreen Button --- .../peertube/activity/VideoPlayActivity.java | 58 ++++++++++++- .../res/layout/exo_playback_control_view.xml | 84 +++++++++++-------- app/src/main/res/values/strings.xml | 4 + app/src/main/res/xml/pref_general.xml | 6 ++ 4 files changed, 116 insertions(+), 36 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index fa781a2..4f85fca 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -1,3 +1,21 @@ +/* + * 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 android.content.ComponentName; @@ -5,6 +23,7 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; +import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.net.Uri; import android.os.Bundle; @@ -38,6 +57,7 @@ import com.google.android.exoplayer2.decoder.DecoderCounters; import com.google.android.exoplayer2.ui.PlayerView; import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.video.VideoRendererEventListener; +import com.mikepenz.iconics.Iconics; import com.squareup.picasso.Picasso; import net.schueller.peertube.R; import net.schueller.peertube.fragment.VideoOptionsFragment; @@ -53,6 +73,7 @@ import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; +import static net.schueller.peertube.helper.Constants.BACKGROUND_PLAY_PREF_KEY; import static net.schueller.peertube.helper.Constants.DEFAULT_THEME; import static net.schueller.peertube.helper.Constants.THEME_PREF_KEY; @@ -64,6 +85,8 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere private PlayerView simpleExoPlayerView; private Intent videoPlayerIntent; private Context context = this; + private TextView fullscreenButton; + private Boolean isFullscreen = false; boolean mBound = false; VideoPlayerService mService; @@ -111,8 +134,24 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere simpleExoPlayerView = new PlayerView(this); simpleExoPlayerView = findViewById(R.id.video_view); - videoPlayerIntent = new Intent(this, VideoPlayerService.class); - bindService(videoPlayerIntent, mConnection, Context.BIND_AUTO_CREATE); + // Full screen Icon + fullscreenButton = findViewById(R.id.exo_fullscreen); + fullscreenButton.setText(R.string.video_expand_icon); + new Iconics.IconicsBuilder().ctx(this).on(fullscreenButton).build(); + + fullscreenButton.setOnClickListener(view -> { + Log.d(TAG, "Fullscreen"); + if (!isFullscreen) { + isFullscreen = true; + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + fullscreenButton.setText(R.string.video_compress_icon); + } else { + isFullscreen = false; + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + fullscreenButton.setText(R.string.video_expand_icon); + } + new Iconics.IconicsBuilder().ctx(this).on(fullscreenButton).build(); + }); } @@ -381,6 +420,16 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere @Override protected void onStop() { super.onStop(); + +// SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); +// +// Log.v(TAG, "" + sharedPref.getBoolean(BACKGROUND_PLAY_PREF_KEY, false)); +// +// if (!sharedPref.getBoolean(BACKGROUND_PLAY_PREF_KEY, false)) { +// Log.v(TAG, "BACKGROUND_PLAY_PREF_KEY..."); +// stopService(new Intent(this, VideoPlayerService.class)); +// } + if (mBound) { unbindService(mConnection); mBound = false; @@ -391,6 +440,11 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere @Override protected void onStart() { super.onStart(); +// +// if (!mBound) { +// videoPlayerIntent = new Intent(this, VideoPlayerService.class); +// bindService(videoPlayerIntent, mConnection, Context.BIND_AUTO_CREATE); +// } Log.v(TAG, "onStart()..."); } diff --git a/app/src/main/res/layout/exo_playback_control_view.xml b/app/src/main/res/layout/exo_playback_control_view.xml index 05296fc..8659b6f 100644 --- a/app/src/main/res/layout/exo_playback_control_view.xml +++ b/app/src/main/res/layout/exo_playback_control_view.xml @@ -1,16 +1,15 @@ - - + android:background="@null" + android:paddingTop="0dp" + android:src="@drawable/ic_action_more_vert" + android:tint="#ffffff" /> @@ -44,23 +43,28 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" - android:paddingTop="4dp" - android:orientation="horizontal"> + android:orientation="horizontal" + android:paddingTop="4dp"> - + - + - + - + - + @@ -70,7 +74,6 @@ android:layout_weight="1" /> - - + android:textColor="#FFBEBEBE" + android:textSize="14sp" /> - + android:gravity="center_vertical" + android:paddingLeft="6dp" + android:paddingRight="6dp" + android:textColor="#FFBEBEBE" + android:textSize="14sp" /> + + + @@ -116,9 +132,9 @@ + android:layout_weight="1" + app:played_color="?attr/colorPrimary" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6e367c6..d21d156 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -91,5 +91,9 @@ {faw-check} + {faw-expand} + {faw-compress} + Background Playback + If enabled, continues to play video in background. diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index 9a964c2..d287b5d 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -10,6 +10,12 @@ android:singleLine="true" android:title="@string/pref_title_peertube_server" /> + + + + + + Date: Sat, 29 Dec 2018 15:09:20 +0100 Subject: [PATCH 5/7] Fullscreen Button --- .../peertube/activity/VideoPlayActivity.java | 17 ++++++---- .../main/res/layout/activity_video_play.xml | 7 ++--- ...l_view.xml => video_playback_controls.xml} | 31 ++++++++++++------- 3 files changed, 34 insertions(+), 21 deletions(-) rename app/src/main/res/layout/{exo_playback_control_view.xml => video_playback_controls.xml} (84%) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index 4f85fca..cdfe2f0 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -35,6 +35,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.PopupMenu; import android.util.Log; +import android.util.TypedValue; import android.view.Surface; import android.view.View; import android.view.ViewGroup; @@ -54,6 +55,7 @@ import com.github.se_bastiaan.torrentstream.TorrentStream; import com.github.se_bastiaan.torrentstream.listeners.TorrentListener; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.decoder.DecoderCounters; +import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.PlayerView; import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.video.VideoRendererEventListener; @@ -134,6 +136,9 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere simpleExoPlayerView = new PlayerView(this); simpleExoPlayerView = findViewById(R.id.video_view); + simpleExoPlayerView.setControllerShowTimeoutMs(1000); + simpleExoPlayerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FIT); + // Full screen Icon fullscreenButton = findViewById(R.id.exo_fullscreen); fullscreenButton.setText(R.string.video_expand_icon); @@ -243,7 +248,7 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){ RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) simpleExoPlayerView.getLayoutParams(); params.width = ViewGroup.LayoutParams.MATCH_PARENT; - params.height = ViewGroup.LayoutParams.WRAP_CONTENT; + params.height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 250, getResources().getDisplayMetrics()); simpleExoPlayerView.setLayoutParams(params); nameView.setVisibility(View.VISIBLE); @@ -440,11 +445,11 @@ public class VideoPlayActivity extends AppCompatActivity implements VideoRendere @Override protected void onStart() { super.onStart(); -// -// if (!mBound) { -// videoPlayerIntent = new Intent(this, VideoPlayerService.class); -// bindService(videoPlayerIntent, mConnection, Context.BIND_AUTO_CREATE); -// } + + if (!mBound) { + videoPlayerIntent = new Intent(this, VideoPlayerService.class); + bindService(videoPlayerIntent, mConnection, Context.BIND_AUTO_CREATE); + } Log.v(TAG, "onStart()..."); } diff --git a/app/src/main/res/layout/activity_video_play.xml b/app/src/main/res/layout/activity_video_play.xml index 6e38fce..84808ea 100644 --- a/app/src/main/res/layout/activity_video_play.xml +++ b/app/src/main/res/layout/activity_video_play.xml @@ -18,11 +18,10 @@ android:layout_width="match_parent" android:layout_height="250dp" android:background="@color/videoBackgroundColor" + app:resize_mode="fixed_width" + app:controller_layout_id="@layout/video_playback_controls" - app:layout_constraintDimensionRatio="H,3:1" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + /> - + + + + + + Date: Sat, 29 Dec 2018 15:20:06 +0100 Subject: [PATCH 6/7] Local videos --- .../peertube/activity/VideoListActivity.java | 23 +++++++++++++++---- .../peertube/network/GetVideoDataService.java | 8 +++---- app/src/main/res/menu/menu_bottom.xml | 5 ++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index 1abce71..bef23d9 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -80,7 +80,7 @@ public class VideoListActivity extends AppCompatActivity { private int currentStart = 0; private int count = 12; private String sort = "-createdAt"; - private String filter = ""; + private String filter = null; private String searchQuery = ""; private TextView emptyView; @@ -108,7 +108,7 @@ public class VideoListActivity extends AppCompatActivity { setContentView(R.layout.activity_video_list); - filter = ""; + filter = null; createBottomBarNavigation(); @@ -260,9 +260,9 @@ public class VideoListActivity extends AppCompatActivity { Call call; if (!searchQuery.equals("")) { - call = service.searchVideosData(start, count, sort, nsfw, searchQuery); + call = service.searchVideosData(start, count, sort, nsfw, searchQuery, filter); } else { - call = service.getVideosData(start, count, sort, nsfw); + call = service.getVideosData(start, count, sort, nsfw, filter); } /*Log the URL called*/ @@ -363,6 +363,8 @@ public class VideoListActivity extends AppCompatActivity { new IconicsDrawable(this, FontAwesome.Icon.faw_home)); navMenu.findItem(R.id.navigation_trending).setIcon( new IconicsDrawable(this, FontAwesome.Icon.faw_fire)); + navMenu.findItem(R.id.navigation_local).setIcon( + new IconicsDrawable(this, FontAwesome.Icon.faw_home)); navMenu.findItem(R.id.navigation_subscriptions).setIcon( new IconicsDrawable(this, FontAwesome.Icon.faw_folder)); navMenu.findItem(R.id.navigation_account).setIcon( @@ -377,6 +379,7 @@ public class VideoListActivity extends AppCompatActivity { if (!isLoading) { sort = "-createdAt"; currentStart = 0; + filter = null; loadVideos(currentStart, count, sort, filter); } @@ -387,6 +390,18 @@ public class VideoListActivity extends AppCompatActivity { if (!isLoading) { sort = "-trending"; currentStart = 0; + filter = null; + loadVideos(currentStart, count, sort, filter); + } + + return true; + case R.id.navigation_local: + //Log.v(TAG, "navigation_trending"); + + if (!isLoading) { + sort = "-publishedAt"; + filter = "local"; + currentStart = 0; loadVideos(currentStart, count, sort, filter); } diff --git a/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java b/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java index cd9f2e8..b66b727 100644 --- a/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java +++ b/app/src/main/java/net/schueller/peertube/network/GetVideoDataService.java @@ -31,8 +31,8 @@ public interface GetVideoDataService { @Query("start") int start, @Query("count") int count, @Query("sort") String sort, - @Query("nsfw") String nsfw - //@Query("filter") String filter + @Query("nsfw") String nsfw, + @Query("filter") String filter ); @GET("videos/{id}") @@ -46,7 +46,7 @@ public interface GetVideoDataService { @Query("count") int count, @Query("sort") String sort, @Query("nsfw") String nsfw, - @Query("search") String search -// @Query("filter") String filter + @Query("search") String search, + @Query("filter") String filter ); } \ No newline at end of file diff --git a/app/src/main/res/menu/menu_bottom.xml b/app/src/main/res/menu/menu_bottom.xml index 6070ab8..2d4e290 100644 --- a/app/src/main/res/menu/menu_bottom.xml +++ b/app/src/main/res/menu/menu_bottom.xml @@ -12,6 +12,11 @@ android:title="@string/bottom_nav_title_trending" app:showAsAction="always|withText"/> + + {faw-compress} Background Playback If enabled, continues to play video in background. + Local From d3ce980acc2f12767a02a09cbb14fcda4bb9d39b Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Sat, 29 Dec 2018 15:46:21 +0100 Subject: [PATCH 7/7] Version Bump --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f9e0058..acc917f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "net.schueller.peertube" minSdkVersion 21 targetSdkVersion 28 - versionCode 1015 - versionName "1.0.15" + versionCode 1016 + versionName "1.0.16" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])