This commit is contained in:
Aleksandr Kadykov 2024-08-27 13:57:43 -04:00 committed by GitHub
commit 0b914ad70f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -310,7 +310,9 @@ struct Invidious::User
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="))
user.watched.uniq!