Compare commits

...

4 Commits

Author SHA1 Message Date
Aleksandr Kadykov
4d314dd69c
Merge 6bcc2177b0 into 4782a67038 2024-09-07 11:20:52 +00:00
Aleksandr Kadykov
6bcc2177b0
Merge branch 'iv-org:master' into newpipe-history-import 2024-09-07 11:20:49 +00:00
kadykov
8fa119f939
Merge branch 'iv-org:master' into newpipe-history-import 2024-06-01 10:42:57 +00:00
kadykov
cb731b9548
Use stream_history as a watch history source 2024-03-02 21:27:46 +00:00

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!