-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show radio icon as uploader avatar in Youtube mixes #3243
Conversation
This isn't for the InfoItem, you'll have to do that in PlaylistMiniInfoItemHolder. Also INFINITY should be separate from MORE_THAN_100_ITEMS imho. |
8734abf
to
0341e6a
Compare
@wb9688 done, and updated APK. Use |
app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
Outdated
Show resolved
Hide resolved
@Stypox the -2 appears in the saved playlists too |
@XiangRongLin: Like I said above, that's fixed in #3240 |
0341e6a
to
9411b8e
Compare
Updated apk that also fixes the problem with PlaylistInfoItem: app-debug_2.zip |
app/src/main/java/org/schabi/newpipe/info_list/holder/PlaylistMiniInfoItemHolder.java
Outdated
Show resolved
Hide resolved
Another apk: app-debug_3.zip |
I think this PR is good now, however it depends on the YT mix NPE PR, which hasn't been reviewed yet. |
@XiangRongLin @TobiGr here I detected the uploader url is Youtube and replaced the image with the radio, while also hiding the white border. What do you think? |
@Stypox looks good to me 👍 |
The radio icon looks weird, cut off from the bottom two vertices as it is. Is that unavoidable? |
@opusforlife2: That's because avatars are round. We could make the radio icon smaller though, or maybe programatically replace the circle with a normal image view in this case. |
I saw that, but I didn't think it was really a problem |
app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
Outdated
Show resolved
Hide resolved
@opusforlife fixed; @TobiGr fixed; |
While testing, I found that Newpipe doesn't show private videos in the playlist, but counts them in the tally. For example: https://www.youtube.com/playlist?list=PL3CB4CB7A114C1070 Invidious shows the private videos in the playlist. Newpipe should as well. |
Wait, what is the reason for showing "100+"? Searching for "huge playlist" on Youtube gives a 5000 video playlist. Search for the same on Youtube Music using wb9688's apk shows the same playlist having 100+ videos. |
@opusforlife2: NewPipe loads the count at the search screen from the service's search results page. When you search for a playlist at music.youtube.com, you'll see 100+ in the search results. Once you click on the playlist in NewPipe, it will indeed be loaded from youtube.com, where it does show the actual count. |
Alright. I get that. But I still don't know what problem this PR is addressing. "huge playlist" still shows the 5000 video one in this apk. |
@opusforlife2 this PR introduces the constants, even though only two of them are really used (unknown and infinite). I put the third one (100+) in here, too, because @wb9688 needed it for his yt music PR and the change was very strictly related to this one, so I was better off just putting related things together ;-). |
Oh. 🤦♂
I was testing this PR's apk when I should have been looking at the YT Music apk. I can indeed see that the 5000 video playlist shows as 100+ when the search is directed towards the YT Music front end. |
652a7de
to
1a278bf
Compare
18a2057
to
c289550
Compare
c289550
to
a18ebf6
Compare
YouTube mixes have YouTube as a creator, though YouTube's logo is not safe to use as it is a trademark (better safe than sorry)
3ec079b
to
c221033
Compare
I tested this and it works on API 19, API 29 (TV) and API 30 |
Shows "100+ videos" when the stream count of a playlist isListExtractor.ITEM_COUNT_MORE_THAN_100
and shows "∞ videos" when the stream count of a playlist isListExtractor.ITEM_COUNT_INFINITE
.Uses the global
utils.Localization.localizeStreamCount()
function everywhere, i.e. inPlaylistFragment
,PlaylistInfoItem
andChannelMiniInfoItem
to correctly localize the item count (before it was not used in Playlist-related classes).Now only does as described in the title. As discussed below using YouTube's logo is too risky, so we are using a radio icon instead.
Depends on TeamNewPipe/NewPipeExtractor#280 @XiangRongLin