FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.63k stars 861 forks source link

[Feature Request]: User's 'watching' statistics #6181

Open enrrari opened 4 days ago

enrrari commented 4 days ago

Guidelines

Problem Description

Not really a problem. Just a proposal. Seeing as FreeTube already has the user data locally (if enabled), such as history and subscriptions, one interesting possible feature could be statistics regarding what the user watches most, perhaps akin to Spotify's “Your Sound Capsule”, maybe an end-of-year function akin to Spotify's “Wrapped”.

Proposed Solution

One proposed implementation could be checking history for the videos and channels that show up most for a given time period, such as a given month or year (for something akin to Wrapped). Then, a page could be displayed to the user with information such as their Top 5 Channels and Top 5 Videos (or however many you see fit) for the time period, and maybe even how long they spent watching. If an end-of-year “Wrapped”-like feature were to be made, such could be made to show up when the date is that of December of a given year.

Alternatives Considered

An alternative is for the user to create a script that does something similar with the same history and subscription files. I myself have developed a Bash script that uses Freetube's history and subscription files, along with Invidious API, to craft CSV files that can be analysed in a LibreOffice Calc sheet, but not exactly with the aforementioned purposes in mind.

Issue Labels

new feature

Additional Information

No response

absidue commented 4 days ago

FreeTube wouldn't be able to provide something as detailed as one of those wrapped things from music services, considering that it saves minimal information about the watched videos and if you watch a video multiple times FreeTube only remembers the most recent time.

Not saying something like that isn't technically possible, it would just be a lot more limited than with music services and it would have to have a massive disclaimer about inaccuracy. We definitely would not be implementing something that abuses the Invidious API that much, if something were to be added it would have to be based purely on the saved data.

absidue commented 4 days ago

Additionally please do not abuse the Invidious API with that many requests, as you will be directly contributing to the instance getting blocked by YouTube. Unless it is your own Invidious instance.

enrrari commented 12 hours ago

Apologies. I shall take more care regarding the Invidious API. I'll look into the docs, see if there's any way to optimise its use (or I'll just drop the use altogether. Not a must-have in my life, I reckon).

As for the wrapped suggestion, yeah. Didn't occur to me the fact that history "bumps up" older videos when rewatched (i.e. only "remembers" a video once). Can always add a "most watched channels", based on the channels behind videos in history (i.e. group history by channel, count by channel). But it's mainly just a silly idea I had. Nothing mind-blowing or a must-have. Just thought, if the info is there, you could infer something from it. But I forgot the minimal storage of information.