FreeTubeApp / FreeTube

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

[Feature Request]: Improvements to History #6022

Closed m3thm4th closed 3 weeks ago

m3thm4th commented 3 weeks ago

Guidelines

Problem Description

Right now History shows video upload dates and videos watched more than once are brought to the latest position

Proposed Solution

The date displayed should be that of when the video was watched (and thus added to history), instead of the video upload date.

If the video is watched again another day it should not be moved, but it should be displayed for as many days it was watched.

Alternatives Considered

Some use cases would make having several entries in History undesirable (e.g. users who watch the same 10 hours music video for several days), for this reason a setting should be added to be able to display each video in History only once (the latest day it was watched) hiding previous entries, or as many times (days) it was watched (unhide them).

Issue Labels

display more information to user, ease of use improvement, improvement to existing feature, new optional setting, visual improvement

Additional Information

No response

absidue commented 3 weeks ago

Duplicate of #5200

absidue commented 3 weeks ago

No, because this issue covers sorting (same as the other issue) and saving multiple history entries, something that FreeTube currently doesn't do and we won't be adding because of the associated performance problems and complexity that would introduce.

jlvivero commented 3 weeks ago

isn't it already sorting by time watched here src/datastore/handlers/base.js

class History {
  static find() {
    return db.history.findAsync({}).sort({ timeWatched: -1 })
  }

I guess the proposed solution is to keep the order as when you first watched it and not update again (so to keep a state and only add new watched videos)

for the use case mentioned though, instead of the proposed solution why not have a stop tracking option in the history?

just a property that makes it so that it doesn't call the update to the history


  static upsert(record) {
    return db.history.updateAsync({ videoId: record.videoId }, record, { upsert: true })
  }

if that function never gets called then the time will always be the same and the history search will take no performance hit

possible issue I see would be that you'd' have to add that value to the database and that means in a way breaking compatibility, but you can always make it so that it's nullable, and have the application treat null as false (basically keep updating as normal). (also I see that it's basically a mongodb instance so mongodb should allow for adding properties without breaking stuff)

it would be opt in (you would have to manually change the value per video) or have a general setting again opt in

so the logic would first check if the setting is there and if it is it will not call the update, if it's there it would check if the video has that property as true if it does it also skips the update, otherwise it just does what it does now.

absidue commented 3 weeks ago

You can just turn off the watch history if you don't want new history entries to be created, it won't delete your existing entries if you turn it off.

absidue commented 3 weeks ago

Neither of which will be happening, which you would know if you had read my first comment in this thread.

@m3thm4th Please stop arguing on every single issue, you have already received a warning from one of the other maintainers about opening multiple duplicates and other false reports. This is your last warning.