mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-09 15:02:14 +05:30
Use stream_history
as a watch history source
This commit is contained in:
parent
e8a36985af
commit
cb731b9548
@ -310,7 +310,9 @@ struct Invidious::User
|
|||||||
|
|
||||||
db = DB.open("sqlite3://" + tempfile.path)
|
db = DB.open("sqlite3://" + tempfile.path)
|
||||||
|
|
||||||
user.watched += db.query_all("SELECT url FROM streams", as: String)
|
user.watched += db.query_all(
|
||||||
|
"SELECT s.url FROM streams s JOIN stream_history sh ON s.uid = sh.stream_id",
|
||||||
|
as: String)
|
||||||
.map(&.lchop("https://www.youtube.com/watch?v="))
|
.map(&.lchop("https://www.youtube.com/watch?v="))
|
||||||
|
|
||||||
user.watched.uniq!
|
user.watched.uniq!
|
||||||
|
Loading…
Reference in New Issue
Block a user