So guys I promised that I would think about a proper way of implementing feeds for subscriptions.
Here is my suggestion.

Like in a typical RSS app you would see the new/unseen videos of a channel by an Indicator in each item.


New Videos of a subscribed channel will be highlighted.
Believe it or not, but some preparation work has already been done regarding this topic ;)
So when @karyogamy designed the Database he created the two tables Stream and StreamHistory. By applying __Stream \ StreamHistory__ you can find the so called Orphanes. These are streams that are not yet in the history but still listed in the streams table. @karyogamy Maybe these can be used to indicate not yet seen videos.
Since time on youtube videos is a little complicated to parse the NewPipe Extractor always returned the creation time of a video as a String not as a number. This however makes it complicated if you want to track the time for a feed database. Luckily @mauriciocolli created the time ago parser project with which is possible to convert the Youtube time ago strings into rough time estimations.
Also for some youtube channels a RSS feed is available, however wee still need a fallback because not all channels have RSS.
long instead.Maybe simple marking of a channel with new videos by the gray color in first picture (like on the last picture, where new, unseen videos shown) will be enough. Practically, it isn't so important the number of unseen videos.
For me it would be. However I think the UI part isn't that complicated once behind everything is settled, so I guess even the other screens would not be a problem.
The subscription Window
Like in a typical RSS app you would see the new/unseen videos of a channel by an Indicator in each item.
The problem using the subscription page to show the unwatched streams is that in order to get that number, a network call has to occur to check if there are newer videos from that channel, which can get costly with increasing subscription count. Of course, we can show outdated data, but I'm not sure how useful that would be.
Orphanes
Maybe these can be used to indicate not yet seen videos.
It should be sufficient to create a call in the StreamHistoryDAO to return the view history for a particular stream id and have another method in the history manager to check if the stream have any history.
The StreamEntity needs to get a row with the creation date.
Which creation date? The day which the video was uploaded or the stream entry was first created? If it's the latter, then it's probably better to keep this data in StreamState table, since StreamEntity contains only passive metadata and shouldn't hold anything info created by the user.
New Videos of a subscribed channel will be highlighted.
Highlighting indicates selection, which might not be a good choice for new videos. Perhaps we can have a separate list for only the new videos, especially in the future we might parse and display subscription's playlists, which will need UI for separating listing anyways.
馃槏 thank you all for this work 馃憤
First of all, thank you for this amazing work!馃憤
I have a few questions/suggestions regarding this:
Very cool @theScrabi, especially for the feed window this is an important improvement. :rocket:
Some design feedback:
And 3 more videos from ContraPoints. That way if there is one very prolific channel you are subscribed to, it doesn鈥檛 completely take over your feed.What do you think?
Amazing! I have been hoping for this since I downloaded NewPipe :)
Very nice! Will the feed window be a tab just like the subscriptions tab? (will the replace the feed tab that is now in place)
@TomJansen #1461 As soon as this is merged you can chose your tabs to your will.
@karyogamy I know it's cost full, but in my opinion its not an argument against having such a way of getting info, because we are already fetching the data from all of these channels.
If we want to update our subscreption feed we can maybe create some checks like:
I know its ugly, but in my opinion better than having nothing :) ... ore YTs new "we know better what you like" subscription policy.
@theScrabi Did you think about adding an optional login option, then we could fetch subscriptions&recommended videos directly from youtube? I dont know if it's possible, but with microG it seems doable?
@theScrabi maybe a refresh button? Or a pull down to refresh?
@theScrabi Did you think about adding an optional login option, then we could fetch subscriptions&recommended videos directly from youtube
Login to google will not come. This would go against the original scope of NewPipe.
@theScrabi maybe a refresh button? Or a pull down to refresh?
yes.
manuel update, with a warning if phone is not chared/in wifi
In that case this should be fine, so long as the users have a way to disable/defer full subscription update, especially during app startup. IIRC, each subscription on youtube takes about 160kb, so it really adds up quickly.
Showing outdated data is at least better than nothing =D
Showing outdated data is at least better than nothing =D
right, and say what you want but I guess one update per day ... for yt that's enough.
Just ordering the feed by date is the one thing that would make NewPipe the ultimate YouTube app for me.
@theScrabi do you have any comments on my feedback above?
Nope. You bring up some good ideas.
@theScrabi ok, cool. Happy to help with any design / UX questions, will watch this issue, and feel free to cc me on stuff. :)
This would be a great step forward for the app! I'd love to see it happen, and have added an encouragement bounty :-)
Thanks for all the work to make this such a good app already -- it's greatly appreciated here.
I really think this would be a great feature in the app, and I will also try to help (if I can). How do you plan to implement the feed? My idea would be to go over each channel and look up its latest 2 or 3 videos and then make a list of all the videos sorted by time and show it in the feed. I don't that would be optimal, but it would work.
Love the app's goals but there is no way I can switch to an app that doesn't show me the most recently uploaded video. I added a 20$ bounty in the hope it helps a little bit in getting it done.
Love the app's goals but there is no way I can switch to an app that doesn't show me the most recently uploaded video. I added a 20$ bounty in the hope it helps a little bit in getting it done.
It might be that their data model doesn't readily allow for that functionality, but seeing as how SkyTube (https://github.com/ram-on/SkyTube) is able to show you a chronological feed of your subscriptions it must be possible.
seeing as how SkyTube (https://github.com/ram-on/SkyTube) is able to show you a chronological feed of your subscriptions it must be possible.
They said it, SkyTube uses the youtube API which provides that information, NewPipe won't. I'm ok with that, it's a bit harder, but they seem to have plans so I'm not worried.
Also for some youtube channels a RSS feed is available, however wee still need a fallback because not all channels have RSS.
Could you provide an example? I have not encountered this. RSS feeds appear to be provided for all channels, including those that are region-blocked, for example kananishinoSMEJ. RSS, channel page.
Recently Invidious has implemented support for push notifications provided by YouTube, which uses PubSubHubbub to send notifications to an HTTP server. This is much faster than polling but requires a server that notifications can be sent to.
For pushing notifications to clients, there's an open issue here: omarroth/invidious#469 that may be of interest. Polling is absolutely a valid option, but I expect the above proposal would be much faster and friendlier for mobile devices, since you wouldn't need to pull all channels in a user's feed.
Rethink after #2309.
Most helpful comment
Very cool @theScrabi, especially for the feed window this is an important improvement. :rocket:
Some design feedback:
Subscriptions
Feeds
And 3 more videos from ContraPoints. That way if there is one very prolific channel you are subscribed to, it doesn鈥檛 completely take over your feed.Channel
What do you think?