Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
3175199
Add fast-rewind/forward buttons in layout
TheLastGimbus Apr 14, 2020
63afacc
Add listeners in activity
TheLastGimbus Apr 14, 2020
1975973
Update progress bar on fast forward/rewind
TheLastGimbus Apr 25, 2020
929d13b
add support for some peertube instances
B0pol Apr 11, 2020
0a984ca
remove duplicate host in manifest
B0pol May 5, 2020
55027a9
bump extractor version
B0pol May 11, 2020
4c6f723
Translated using Weblate (Dutch)
May 29, 2020
0cff10e
Translated using Weblate (Dutch)
May 29, 2020
bef579e
Translated using Weblate (Dutch)
May 29, 2020
16d4fa0
Translated using Weblate (English)
TotalCaesar659 May 24, 2020
27bf390
Translated using Weblate (Japanese)
AioiLight May 26, 2020
5f2d2a6
Translated using Weblate (Portuguese)
SantosSi May 25, 2020
e8cf71f
Translated using Weblate (Esperanto)
B0pol May 28, 2020
73b72ab
Translated using Weblate (Arabic)
May 23, 2020
7d98a70
Translated using Weblate (Turkish)
emintufan May 24, 2020
0baa5a2
Translated using Weblate (Polish)
WaldiSt May 23, 2020
123bdbd
Translated using Weblate (Persian)
ahangarha May 26, 2020
927ea72
Translated using Weblate (Portuguese (Brazil))
Sam-Oak May 25, 2020
57c9b29
Translated using Weblate (Chinese (Simplified))
May 24, 2020
ee2a159
Translated using Weblate (Norwegian Bokmål)
comradekingu May 26, 2020
3984fc0
Translated using Weblate (Nepali)
May 24, 2020
e43fdf5
Merge branch 'origin/dev' into Weblate.
weblate May 29, 2020
6b0381b
avoid duplicate: use openUrlInBrowser instead of openWebsite
B0pol May 31, 2020
596eb4a
Merge branch 'dev' into playlist_peertube
B0pol May 31, 2020
b3db8c9
Do not remove items generating errors form queue
Stypox May 31, 2020
3ae71c7
Translated using Weblate (Hungarian)
notramo May 31, 2020
c3c8d80
Translated using Weblate (Czech)
zeritti May 30, 2020
4063221
Translated using Weblate (Albanian)
AnXh3L0 May 30, 2020
3e83f9f
Merge branch 'origin/dev' into Weblate.
weblate Jun 1, 2020
a4d8388
Translated using Weblate (Indonesian)
zmni Jun 3, 2020
903308d
Translated using Weblate (Polish)
WaldiSt Jun 2, 2020
e68e787
Translated using Weblate (Korean)
pitachips Jun 4, 2020
145e0a0
Update to ExoPlayer 2.11.5
Jun 6, 2020
1f23c81
Merge pull request #3698 from B0pol/openWebsite
TobiGr Jun 6, 2020
3e70050
Fix search crash: adapter array index out of bounds
Stypox Jun 7, 2020
7092577
Translated using Weblate (Spanish)
FredMan95 Jun 6, 2020
7714751
Translated using Weblate (Finnish)
Jun 7, 2020
c70968d
Merge branch 'origin/dev' into Weblate.
weblate Jun 8, 2020
5b8fc25
Translated using Weblate (Arabic)
Jun 8, 2020
d9ce25a
Translated using Weblate (Finnish)
Jun 8, 2020
1fa609e
Translated using Weblate (Malayalam)
theophinetheodore Jun 9, 2020
19334b4
Translated using Weblate (Malayalam)
theophinetheodore Jun 9, 2020
e34f666
set an OnLongClickListener
adinilfeld Jun 10, 2020
b537539
allowed user to copy video title to clipboard (from detail screen)
adinilfeld Jun 10, 2020
267e114
added a copyToClipboard method to ShareUtils, and modified CommentsMi…
adinilfeld Jun 10, 2020
caa000f
Merge pull request #3759 from Stypox/fix-search
wb9688 Jun 11, 2020
0d29e66
removed unnecessary setLongClickable
adinilfeld Jun 11, 2020
59e0c10
inverted if-else statement
adinilfeld Jun 11, 2020
17d1346
made ClipboardManager final
adinilfeld Jun 11, 2020
7d6e226
Update status color to match toolbar color
eames-palmer Jun 12, 2020
9ef7688
Merge pull request #3772 from adinilfeld/copy-video-title
TobiGr Jun 13, 2020
6c6ee41
Translated using Weblate (German)
nautilusx Jun 12, 2020
ae4d9c7
Translated using Weblate (Spanish)
FredMan95 Jun 10, 2020
367e625
Translated using Weblate (Turkish)
Jun 13, 2020
858111e
Translated using Weblate (Bengali (Bangladesh))
Oymate Jun 11, 2020
cf6ee26
Merge branch 'origin/dev' into Weblate.
weblate Jun 14, 2020
36b4134
Remove speed buttons from bottom menu
TheLastGimbus Jun 14, 2020
72af51f
Add speed button to top bar
TheLastGimbus Jun 14, 2020
abe77c4
Change to final
TheLastGimbus Jun 14, 2020
63e167b
Add buttons also in landscape mode
TheLastGimbus Jun 14, 2020
e6fe6fd
Merge pull request #3437 from TheLastGimbus/fast-rewind-forward-in-ba…
wb9688 Jun 15, 2020
5cfd8bb
Merge pull request #3704 from Stypox/keep-failed-streams
wb9688 Jun 15, 2020
58e177b
Added translation using Weblate (Kabyle)
Jun 17, 2020
2816889
Merge branch 'origin/dev' into Weblate.
weblate Jun 17, 2020
33266a9
fixes enqueue resuming paused videos
Jun 18, 2020
746cab9
Added translation using Weblate (Arabic (Libya))
araby-os Jun 18, 2020
487c9eb
Translated using Weblate (Slovak)
marulinko Jun 17, 2020
a470a4a
Translated using Weblate (Swedish)
secondlnl Jun 17, 2020
1275b26
Translated using Weblate (Kabyle)
Jun 17, 2020
76bb1fd
Translated using Weblate (Arabic (Libya))
araby-os Jun 18, 2020
c9a1eb5
Added translation using Weblate (Javanese)
BlueJek Jun 21, 2020
2ecf804
Translated using Weblate (Javanese)
BlueJek Jun 21, 2020
33f3a4f
Translated using Weblate (French)
VeryTastyTomato Jun 23, 2020
8c823f3
Added translation using Weblate (Central Kurdish)
jwtiyar Jun 24, 2020
0a57a8a
2.11.6
Redirion Jun 25, 2020
039b47b
Translated using Weblate (Central Kurdish)
jwtiyar Jun 24, 2020
fe4516e
Merge pull request #3752 from Redirion/exoupdate
TobiGr Jun 26, 2020
e03d970
Merge pull request #3406 from B0pol/playlist_peertube
TobiGr Jun 26, 2020
d910091
Merge pull request #3787 from budde25/fix-popup-queue
TobiGr Jun 27, 2020
c029929
Fix queue channel name color for some devices
Stypox Jun 27, 2020
c24dfc6
Add search for subscription picker in the feed group dialog
mauriciocolli Apr 5, 2020
9f3b356
Fix subscription picker items flickering in the feed group dialog
mauriciocolli Apr 5, 2020
2e6e75c
Add filter to the feed group dialog to show only ungrouped subscriptions
mauriciocolli Apr 9, 2020
a7e8f50
Do not include Checkstyle in any APK
wb9688 Jun 28, 2020
3de5afc
Add Markdown export of crash logs
TobiGr Jun 28, 2020
16ae90d
Translated using Weblate (German)
SantosSi Jun 27, 2020
078ae15
Translated using Weblate (Ukrainian)
anonimQwerty Jun 28, 2020
26c5f69
Translated using Weblate (Asturian)
enolp Jun 27, 2020
4e8407e
Translated using Weblate (Norwegian Bokmål)
comradekingu Jun 28, 2020
720c8c3
Merge branch 'origin/dev' into Weblate.
weblate Jun 29, 2020
e14ba48
Update non-service status bar colors to match toolbar colors
eames-palmer Jun 30, 2020
952b636
Added translation using Weblate (Bengali (India))
digiwizkid Jun 30, 2020
b63f687
Translated using Weblate (Bengali (Bangladesh))
digiwizkid Jun 30, 2020
0d7028a
Translated using Weblate (Bengali (India))
digiwizkid Jun 30, 2020
38c79bb
Fix audio/video desync caused by floating point cumulative errors
Stypox Jun 30, 2020
c2b4a44
Merge pull request #3828 from wb9688/checkstyle-fix
TobiGr Jun 30, 2020
d0b5345
Merge pull request #3822 from Stypox/fix-queue-colors
TobiGr Jun 30, 2020
734680b
Merge pull request #3373 from mauriciocolli/feed-add-search-sub-list
TobiGr Jun 30, 2020
5e9dce7
Merge pull request #3774 from eames-palmer/status-bar-color
Stypox Jul 1, 2020
00529fe
Added translation using Weblate (Afrikaans)
BenjaminForster Jul 2, 2020
f9890e2
Translated using Weblate (Polish)
WaldiSt Jul 1, 2020
5bd4093
Translated using Weblate (Croatian)
milotype Jul 1, 2020
a91a657
Translated using Weblate (Bengali (India))
digiwizkid Jul 2, 2020
e9aafc2
Merge branch 'origin/dev' into Weblate.
weblate Jul 2, 2020
9516d9d
Merge pull request #3837 from Stypox/audio-sync
TobiGr Jul 2, 2020
f128751
update invidious instances
B0pol Jul 2, 2020
07cead7
Merge pull request #3404 from mauriciocolli/feed-add-filter-sub-list
TobiGr Jul 2, 2020
1b4313f
update extractor version
B0pol Jul 2, 2020
073f5c2
Translated using Weblate (Finnish)
Jul 2, 2020
93570b2
Merge branch 'origin/dev' into Weblate.
weblate Jul 2, 2020
452977a
Drop "writing/muxed by" metadata
kapodamy Jul 3, 2020
faa6cb5
Merge pull request #3841 from B0pol/update_inv_instances
TobiGr Jul 3, 2020
b2d78d3
update WebMWriter.java
kapodamy Jul 3, 2020
dfc27b2
Add playlist tab to main page
Royosef Apr 30, 2020
13c0fde
Final declarations, naming & redundant code
Royosef May 2, 2020
2482125
Fix style issues
Stypox Jun 28, 2020
8cc2192
Move local/remote playlist merge() to PlaylistLocalItem class
Stypox Jul 4, 2020
d751434
add privacytools.io peertube instance to manifest
B0pol Jul 4, 2020
1daa654
Merge pull request #3845 from B0pol/peertube_instance
TobiGr Jul 5, 2020
248e2d7
Merge pull request #3506 from Royosef/PlaylistTab
Stypox Jul 5, 2020
4194ac2
Display search suggestion: did you mean & showing result for
Royosef Apr 20, 2020
0711650
Fix search suggestions not working on resume
Royosef Jun 6, 2020
ccd82fb
Improve search suggestion code
wb9688 Jun 28, 2020
20e828b
Improve suggestion panel
Stypox Jul 4, 2020
13a0d1d
Replace search query without searching on suggestion panel long click
Stypox Jul 4, 2020
8120b6a
checkstyle's amend
kapodamy Jul 6, 2020
d8f29bd
Translated using Weblate (Nepali)
Jul 6, 2020
5874ed7
Translated using Weblate (Nepali)
Jul 6, 2020
8fac3e8
Translated using Weblate (German)
nautilusx Jul 4, 2020
84aef8b
Translated using Weblate (French)
B0pol Jul 3, 2020
c09f2ad
Translated using Weblate (Russian)
mesnevi Jul 4, 2020
e817307
Translated using Weblate (Japanese)
AioiLight Jul 3, 2020
a7ea2fc
Translated using Weblate (Portuguese)
SantosSi Jul 3, 2020
ef5f181
Translated using Weblate (Turkish)
emintufan Jul 4, 2020
c07b34e
Translated using Weblate (Polish)
WaldiSt Jul 3, 2020
42092e3
Translated using Weblate (Portuguese (Brazil))
Sam-Oak Jul 3, 2020
a074203
Translated using Weblate (Chinese (Simplified))
Jul 3, 2020
4e9b652
Translated using Weblate (Chinese (Traditional))
s8321414 Jul 3, 2020
3369618
Translated using Weblate (Hebrew)
yarons Jul 5, 2020
a067c95
Translated using Weblate (Norwegian Bokmål)
comradekingu Jul 3, 2020
e2ead01
Translated using Weblate (Nepali)
Jul 6, 2020
5d7e62c
Translated using Weblate (Bengali (India))
digiwizkid Jul 5, 2020
af098aa
Merge pull request #3843 from kapodamy/drop-writting-application-meta…
TobiGr Jul 6, 2020
ff4e6b1
Merge pull request #3579 from TobiGr/error_md_export
TobiGr Jul 6, 2020
dbd809b
Merge remote-tracking branch 'Weblate/dev' into dev
TobiGr Jul 7, 2020
b96d171
Highlight search suggestion
TobiGr Jul 7, 2020
f4a4172
Merge pull request #3471 from Royosef/DisplaySearchSuggestion
TobiGr Jul 7, 2020
dd57e24
Use getNextPage() instead of getNextPageUrl()
wb9688 Apr 15, 2020
e183fc6
Bump NPE version
wb9688 Jul 7, 2020
e12e6dd
Merge pull request #3441 from wb9688/nextpage
TobiGr Jul 7, 2020
110b3a6
Add some new languages to the language selector
TobiGr Jul 7, 2020
713c53d
add bengali (india) and arabic (lybia)
B0pol Jul 8, 2020
7ede2da
Merge pull request #3861 from TeamNewPipe/languages
TobiGr Jul 8, 2020
085f026
Fix Linter (translations)
TobiGr Jul 11, 2020
c2a0125
Use %1$d instead of %1$s in deleted_downloads string
TobiGr Jul 11, 2020
2d909b0
Remove untranslatable translations
TobiGr Jul 11, 2020
c9fafbe
Add changelog
TobiGr Jul 8, 2020
d088d43
Release NewPipe 0.19.6 (951)
TobiGr Jul 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
resValue "string", "app_name", "NewPipe"
minSdkVersion 19
targetSdkVersion 29
versionCode 950
versionName "0.19.5"
versionCode 951
versionName "0.19.6"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -84,13 +84,18 @@ ext {
checkstyleVersion = '8.32'
stethoVersion = '1.5.1'
leakCanaryVersion = '2.2'
exoPlayerVersion = '2.11.4'
exoPlayerVersion = '2.11.6'
androidxLifecycleVersion = '2.2.0'
androidxRoomVersion = '2.2.5'
groupieVersion = '2.8.0'
markwonVersion = '4.3.1'
}

configurations {
checkstyle
ktlint
}

checkstyle {
configFile rootProject.file('checkstyle.xml')
ignoreFailures false
Expand All @@ -106,8 +111,7 @@ task runCheckstyle(type: Checkstyle) {
exclude '**/BuildConfig.java'
exclude 'main/java/us/shandian/giga/**'

// empty classpath
classpath = files()
classpath = configurations.checkstyle

showViolations true

Expand All @@ -117,10 +121,6 @@ task runCheckstyle(type: Checkstyle) {
}
}

configurations {
ktlint
}

task runKtlint(type: JavaExec) {
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
Expand All @@ -143,7 +143,7 @@ dependencies {
implementation "frankiesardo:icepick:${icepickVersion}"
kapt "frankiesardo:icepick-processor:${icepickVersion}"

debugImplementation "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
ktlint "com.pinterest:ktlint:0.35.0"

debugImplementation "com.facebook.stetho:stetho:${stethoVersion}"
Expand All @@ -163,7 +163,7 @@ dependencies {
exclude module: 'support-annotations'
}

implementation 'com.github.TeamNewPipe:NewPipeExtractor:bda83fe6a5b9a8a0751669fbc444fa49d72d0d2f'
implementation 'com.github.TeamNewPipe:NewPipeExtractor:a70cb0283ffc3bba2709815673a5a7940aab0a3a'

implementation "com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751"
implementation "org.jsoup:jsoup:1.13.1"
Expand Down
326 changes: 180 additions & 146 deletions app/src/main/AndroidManifest.xml

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions app/src/main/java/org/schabi/newpipe/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
Expand Down Expand Up @@ -127,12 +125,6 @@ protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}

if (getSupportFragmentManager() != null
&& getSupportFragmentManager().getBackStackEntryCount() == 0) {
initFragments();
Expand Down
16 changes: 5 additions & 11 deletions app/src/main/java/org/schabi/newpipe/about/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.schabi.newpipe.about;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MenuItem;
Expand All @@ -26,6 +24,7 @@
import org.schabi.newpipe.util.ThemeHelper;

import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
import static org.schabi.newpipe.util.ShareUtils.openUrlInBrowser;

public class AboutActivity extends AppCompatActivity {
/**
Expand Down Expand Up @@ -143,28 +142,23 @@ public View onCreateView(final LayoutInflater inflater, final ViewGroup containe

View githubLink = rootView.findViewById(R.id.github_link);
githubLink.setOnClickListener(nv ->
openWebsite(context.getString(R.string.github_url), context));
openUrlInBrowser(context, context.getString(R.string.github_url)));

View donationLink = rootView.findViewById(R.id.donation_link);
donationLink.setOnClickListener(v ->
openWebsite(context.getString(R.string.donation_url), context));
openUrlInBrowser(context, context.getString(R.string.donation_url)));

View websiteLink = rootView.findViewById(R.id.website_link);
websiteLink.setOnClickListener(nv ->
openWebsite(context.getString(R.string.website_url), context));
openUrlInBrowser(context, context.getString(R.string.website_url)));

View privacyPolicyLink = rootView.findViewById(R.id.privacy_policy_link);
privacyPolicyLink.setOnClickListener(v ->
openWebsite(context.getString(R.string.privacy_policy_url), context));
openUrlInBrowser(context, context.getString(R.string.privacy_policy_url)));

return rootView;
}

private void openWebsite(final String url, final Context context) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(intent);
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
package org.schabi.newpipe.database.playlist;

import org.schabi.newpipe.database.LocalItem;
import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public interface PlaylistLocalItem extends LocalItem {
String getOrderingName();

static List<PlaylistLocalItem> merge(
final List<PlaylistMetadataEntry> localPlaylists,
final List<PlaylistRemoteEntity> remotePlaylists) {
final List<PlaylistLocalItem> items = new ArrayList<>(
localPlaylists.size() + remotePlaylists.size());
items.addAll(localPlaylists);
items.addAll(remotePlaylists);

Collections.sort(items, (left, right) -> {
final String on1 = left.getOrderingName();
final String on2 = right.getOrderingName();
if (on1 == null) {
return on2 == null ? 0 : 1;
} else {
return on2 == null ? -1 : on1.compareToIgnoreCase(on2);
}
});

return items;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,45 @@ abstract class SubscriptionDAO : BasicDAO<SubscriptionEntity> {
@Query("SELECT * FROM subscriptions ORDER BY name COLLATE NOCASE ASC")
abstract override fun getAll(): Flowable<List<SubscriptionEntity>>

@Query("""
SELECT * FROM subscriptions

WHERE name LIKE '%' || :filter || '%'

ORDER BY name COLLATE NOCASE ASC
""")
abstract fun getSubscriptionsFiltered(filter: String): Flowable<List<SubscriptionEntity>>

@Query("""
SELECT * FROM subscriptions s

LEFT JOIN feed_group_subscription_join fgs
ON s.uid = fgs.subscription_id

WHERE (fgs.subscription_id IS NULL OR fgs.group_id = :currentGroupId)

ORDER BY name COLLATE NOCASE ASC
""")
abstract fun getSubscriptionsOnlyUngrouped(
currentGroupId: Long
): Flowable<List<SubscriptionEntity>>

@Query("""
SELECT * FROM subscriptions s

LEFT JOIN feed_group_subscription_join fgs
ON s.uid = fgs.subscription_id

WHERE (fgs.subscription_id IS NULL OR fgs.group_id = :currentGroupId)
AND s.name LIKE '%' || :filter || '%'

ORDER BY name COLLATE NOCASE ASC
""")
abstract fun getSubscriptionsOnlyUngroupedFiltered(
currentGroupId: Long,
filter: String
): Flowable<List<SubscriptionEntity>>

@Query("SELECT * FROM subscriptions WHERE url LIKE :url AND service_id = :serviceId")
abstract fun getSubscriptionFlowable(serviceId: Int, url: String): Flowable<List<SubscriptionEntity>>

Expand Down Expand Up @@ -52,7 +91,7 @@ abstract class SubscriptionDAO : BasicDAO<SubscriptionEntity> {
entity.uid = uidFromInsert
} else {
val subscriptionIdFromDb = getSubscriptionIdInternal(entity.serviceId, entity.url)
?: throw IllegalStateException("Subscription cannot be null just after insertion.")
?: throw IllegalStateException("Subscription cannot be null just after insertion.")
entity.uid = subscriptionIdFromDb

update(entity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,55 @@ public ChannelInfoItem toChannelInfoItem() {
item.setDescription(getDescription());
return item;
}


// TODO: Remove these generated methods by migrating this class to a data class from Kotlin.
@Override
@SuppressWarnings("EqualsReplaceableByObjectsCall")
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

final SubscriptionEntity that = (SubscriptionEntity) o;

if (uid != that.uid) {
return false;
}
if (serviceId != that.serviceId) {
return false;
}
if (!url.equals(that.url)) {
return false;
}
if (name != null ? !name.equals(that.name) : that.name != null) {
return false;
}
if (avatarUrl != null ? !avatarUrl.equals(that.avatarUrl) : that.avatarUrl != null) {
return false;
}
if (subscriberCount != null
? !subscriberCount.equals(that.subscriberCount)
: that.subscriberCount != null) {
return false;
}
return description != null
? description.equals(that.description)
: that.description == null;
}

@Override
public int hashCode() {
int result = (int) (uid ^ (uid >>> 32));
result = 31 * result + serviceId;
result = 31 * result + url.hashCode();
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (avatarUrl != null ? avatarUrl.hashCode() : 0);
result = 31 * result + (subscriberCount != null ? subscriberCount.hashCode() : 0);
result = 31 * result + (description != null ? description.hashCode() : 0);
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ public boolean onLongClick(final View v) {
case R.id.detail_controls_download:
NavigationHelper.openDownloads(getActivity());
break;

case R.id.detail_uploader_root_layout:
if (TextUtils.isEmpty(currentInfo.getSubChannelUrl())) {
Log.w(TAG,
Expand All @@ -488,6 +487,9 @@ public boolean onLongClick(final View v) {
openChannel(currentInfo.getUploaderUrl(), currentInfo.getUploaderName());
}
break;
case R.id.detail_title_root_layout:
ShareUtils.copyToClipboard(getContext(), videoTitleTextView.getText().toString());
break;
}

return true;
Expand Down Expand Up @@ -583,6 +585,7 @@ protected void initViews(final View rootView, final Bundle savedInstanceState) {
protected void initListeners() {
super.initListeners();

videoTitleRoot.setOnLongClickListener(this);
uploaderRootLayout.setOnClickListener(this);
uploaderRootLayout.setOnLongClickListener(this);
videoTitleRoot.setOnClickListener(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.ListInfo;
import org.schabi.newpipe.extractor.Page;
import org.schabi.newpipe.util.Constants;
import org.schabi.newpipe.views.NewPipeRecyclerView;

Expand All @@ -30,7 +31,7 @@ public abstract class BaseListInfoFragment<I extends ListInfo>
protected String url;

protected I currentInfo;
protected String currentNextPageUrl;
protected Page currentNextPage;
protected Disposable currentWorker;

@Override
Expand Down Expand Up @@ -78,15 +79,15 @@ public void onDestroy() {
public void writeTo(final Queue<Object> objectsToSave) {
super.writeTo(objectsToSave);
objectsToSave.add(currentInfo);
objectsToSave.add(currentNextPageUrl);
objectsToSave.add(currentNextPage);
}

@Override
@SuppressWarnings("unchecked")
public void readFrom(@NonNull final Queue<Object> savedObjects) throws Exception {
super.readFrom(savedObjects);
currentInfo = (I) savedObjects.poll();
currentNextPageUrl = (String) savedObjects.poll();
currentNextPage = (Page) savedObjects.poll();
}

/*//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -130,7 +131,7 @@ public void startLoading(final boolean forceLoad) {
.subscribe((@NonNull I result) -> {
isLoading.set(false);
currentInfo = result;
currentNextPageUrl = result.getNextPageUrl();
currentNextPage = result.getNextPage();
handleResult(result);
}, (@NonNull Throwable throwable) -> onError(throwable));
}
Expand Down Expand Up @@ -182,15 +183,15 @@ private void allowDownwardFocusScroll() {
@Override
public void handleNextItems(final ListExtractor.InfoItemsPage result) {
super.handleNextItems(result);
currentNextPageUrl = result.getNextPageUrl();
currentNextPage = result.getNextPage();
infoListAdapter.addInfoItemList(result.getItems());

showListFooter(hasMoreItems());
}

@Override
protected boolean hasMoreItems() {
return !TextUtils.isEmpty(currentNextPageUrl);
return Page.isValid(currentNextPage);
}

/*//////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ private void updateSubscribeButton(final boolean isSubscribed) {

@Override
protected Single<ListExtractor.InfoItemsPage> loadMoreItemsLogic() {
return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextPageUrl);
return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextPage);
}

@Override
Expand Down Expand Up @@ -555,7 +555,7 @@ private PlayQueue getPlayQueue(final int index) {
}
}
return new ChannelPlayQueue(currentInfo.getServiceId(), currentInfo.getUrl(),
currentInfo.getNextPageUrl(), streamItems, index);
currentInfo.getNextPage(), streamItems, index);
}

@Override
Expand Down
Loading