add support for some peertube instances

The one used for tests, popular instances and user wanted (e.g. la quadrature du net, video.lqdn.fr, or @TheAssassin instance, media-assassinate-you.net)
This commit is contained in:
bopol 2020-04-11 20:35:04 +02:00
parent b3eadb557b
commit 929d13bfea
2 changed files with 173 additions and 141 deletions

View File

@ -158,7 +158,7 @@ dependencies {
exclude module: 'support-annotations' exclude module: 'support-annotations'
}) })
implementation 'com.github.TeamNewPipe:NewPipeExtractor:f3913e241e379adf0091319091e8f895c5fcfd07' implementation 'com.github.B0pol:NewPipeExtractor:7cae95bf09ddc59ec77b3a905a23278318ef15f7'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0' testImplementation 'org.mockito:mockito-core:2.23.0'

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="org.schabi.newpipe"> package="org.schabi.newpipe">
@ -11,12 +10,14 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/> <uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<application <application
android:banner="@mipmap/newpipe_tv_banner"
android:name=".App" android:name=".App"
android:allowBackup="true" android:allowBackup="true"
android:banner="@mipmap/newpipe_tv_banner"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:logo="@mipmap/ic_launcher" android:logo="@mipmap/ic_launcher"
@ -28,6 +29,7 @@
android:launchMode="singleTask"> android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
@ -49,13 +51,13 @@
<activity <activity
android:name=".player.BackgroundPlayerActivity" android:name=".player.BackgroundPlayerActivity"
android:launchMode="singleTask" android:label="@string/title_activity_background_player"
android:label="@string/title_activity_background_player"/> android:launchMode="singleTask" />
<activity <activity
android:name=".player.PopupVideoPlayerActivity" android:name=".player.PopupVideoPlayerActivity"
android:launchMode="singleTask" android:label="@string/title_activity_popup_player"
android:label="@string/title_activity_popup_player"/> android:launchMode="singleTask" />
<service <service
android:name=".player.PopupVideoPlayer" android:name=".player.PopupVideoPlayer"
@ -295,6 +297,36 @@
<data android:pathPrefix="/c/" /> <data android:pathPrefix="/c/" />
<data android:pathPrefix="/b/" /> <data android:pathPrefix="/b/" />
</intent-filter> </intent-filter>
<!-- PeerTube filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="framatube.org" />
<data android:host="media.assassinate-you.net" />
<data android:host="peertube.co.uk" />
<data android:host="peertube.cpy.re" />
<data android:host="peertube.mastodon.host" />
<data android:host="peertube.fr" />
<data android:host="peertube.live" />
<data android:host="peertube.video" />
<data android:host="video.ploud.fr" />
<data android:host="video.lqdn.fr" />
<data android:host="skeptikon.fr" />
<data android:pathPrefix="/accounts/" />
<data android:pathPrefix="/playlist/" />
<data android:pathPrefix="/videos/" />
<data android:pathPrefix="/video-channels/" />
</intent-filter>
</activity> </activity>
<service <service
android:name=".RouterActivity$FetcherService" android:name=".RouterActivity$FetcherService"