Skip to content

Commit f119a36

Browse files
watermelon42TobiGr
authored andcommitted
Added support for importing Soundcloud likes as a new tab before About in a user's channel.
The likes are also retrieved in the feed if the user is subscribed to.
1 parent f3c20d4 commit f119a36

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ dependencies {
214214
// the corresponding commit hash, since JitPack sometimes deletes artifacts.
215215
// If there’s already a git hash, just add more of it to the end (or remove a letter)
216216
// to cause jitpack to regenerate the artifact.
217-
implementation 'com.github.TeamNewPipe.NewPipeExtractor:NewPipeExtractor:v0.24.6'
217+
implementation 'com.github.TeamNewPipe.NewPipeExtractor:NewPipeExtractor:v0.24.7'
218218
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
219219

220220
/** Checkstyle **/

app/src/main/java/org/schabi/newpipe/util/ChannelTabHelper.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static boolean isStreamsTab(final String tab) {
2424
switch (tab) {
2525
case ChannelTabs.VIDEOS:
2626
case ChannelTabs.TRACKS:
27+
case ChannelTabs.LIKES:
2728
case ChannelTabs.SHORTS:
2829
case ChannelTabs.LIVESTREAMS:
2930
return true;
@@ -62,6 +63,8 @@ private static int getShowTabKey(final String tab) {
6263
return R.string.show_channel_tabs_playlists;
6364
case ChannelTabs.ALBUMS:
6465
return R.string.show_channel_tabs_albums;
66+
case ChannelTabs.LIKES:
67+
return R.string.show_channel_tabs_likes;
6568
default:
6669
return -1;
6770
}
@@ -78,6 +81,8 @@ private static int getFetchFeedTabKey(final String tab) {
7881
return R.string.fetch_channel_tabs_shorts;
7982
case ChannelTabs.LIVESTREAMS:
8083
return R.string.fetch_channel_tabs_livestreams;
84+
case ChannelTabs.LIKES:
85+
return R.string.fetch_channel_tabs_likes;
8186
default:
8287
return -1;
8388
}
@@ -100,6 +105,8 @@ public static int getTranslationKey(final String tab) {
100105
return R.string.channel_tab_playlists;
101106
case ChannelTabs.ALBUMS:
102107
return R.string.channel_tab_albums;
108+
case ChannelTabs.LIKES:
109+
return R.string.channel_tab_likes;
103110
default:
104111
return R.string.unknown_content;
105112
}

app/src/main/res/values/settings_keys.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@
294294
<string name="show_channel_tabs_channels">show_channel_tabs_channels</string>
295295
<string name="show_channel_tabs_playlists">show_channel_tabs_playlists</string>
296296
<string name="show_channel_tabs_albums">show_channel_tabs_albums</string>
297+
<string name="show_channel_tabs_likes">show_channel_tabs_likes</string>
297298
<string name="show_channel_tabs_about">show_channel_tabs_about</string>
298299
<string-array name="show_channel_tabs_value_list">
299300
<item>@string/show_channel_tabs_videos</item>
@@ -303,6 +304,7 @@
303304
<item>@string/show_channel_tabs_channels</item>
304305
<item>@string/show_channel_tabs_playlists</item>
305306
<item>@string/show_channel_tabs_albums</item>
307+
<item>@string/show_channel_tabs_likes</item>
306308
<item>@string/show_channel_tabs_about</item>
307309
</string-array>
308310
<string-array name="show_channel_tabs_description_list">
@@ -313,6 +315,7 @@
313315
<item>@string/channel_tab_channels</item>
314316
<item>@string/channel_tab_playlists</item>
315317
<item>@string/channel_tab_albums</item>
318+
<item>@string/channel_tab_likes</item>
316319
<item>@string/channel_tab_about</item>
317320
</string-array>
318321
<string name="show_search_suggestions_key">show_search_suggestions</string>
@@ -390,17 +393,20 @@
390393
<string name="fetch_channel_tabs_tracks">fetch_channel_tabs_tracks</string>
391394
<string name="fetch_channel_tabs_shorts">fetch_channel_tabs_shorts</string>
392395
<string name="fetch_channel_tabs_livestreams">fetch_channel_tabs_livestreams</string>
396+
<string name="fetch_channel_tabs_likes">fetch_channel_tabs_likes</string>
393397
<string-array name="feed_fetch_channel_tabs_value_list">
394398
<item>@string/fetch_channel_tabs_videos</item>
395399
<item>@string/fetch_channel_tabs_tracks</item>
396400
<item>@string/fetch_channel_tabs_shorts</item>
397401
<item>@string/fetch_channel_tabs_livestreams</item>
402+
<item>@string/fetch_channel_tabs_likes</item>
398403
</string-array>
399404
<string-array name="feed_fetch_channel_tabs_description_list">
400405
<item>@string/channel_tab_videos</item>
401406
<item>@string/channel_tab_tracks</item>
402407
<item>@string/channel_tab_shorts</item>
403408
<item>@string/channel_tab_livestreams</item>
409+
<item>@string/channel_tab_likes</item>
404410
</string-array>
405411

406412
<string name="import_export_data_path">import_export_data_path</string>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@
828828
<string name="channel_tab_channels">Channels</string>
829829
<string name="channel_tab_playlists">Playlists</string>
830830
<string name="channel_tab_albums">Albums</string>
831+
<string name="channel_tab_likes">Likes</string>
831832
<string name="channel_tab_about">About</string>
832833
<string name="show_channel_tabs">Channel tabs</string>
833834
<string name="show_channel_tabs_summary">What tabs are shown on the channel pages</string>

0 commit comments

Comments
 (0)