mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 09:45:44 +00:00
Add some api docs
This commit is contained in:
@@ -428,13 +428,11 @@ class TYTD.Downloader {
|
||||
var id = TYTD.GetVideoId(vid);
|
||||
|
||||
if(id == null) return null;
|
||||
Console.WriteLine(id);
|
||||
this.Muxex.Lock();
|
||||
var db = this.OpenDB();
|
||||
var res = Sqlite.Exec(db, $"SELECT * FROM videos WHERE videoId = {Sqlite.Escape(id)};");
|
||||
|
||||
var out = null;
|
||||
Console.WriteLine(res);
|
||||
if(TypeOf(res) == "List" && res.Length == 1) out = res[0];
|
||||
|
||||
|
||||
@@ -1224,7 +1222,7 @@ class TYTD.Downloader {
|
||||
|
||||
var d = $"INSERT INTO videos (videoId,title,lengthSeconds,keywords,channelId,shortDescription,viewCount,author,addDate,tytdTag) VALUES ({Sqlite.Escape(info.videoId)},{Sqlite.Escape(info.title)},{info.lengthSeconds},{keywordsStr},{Sqlite.Escape(info.channelId)},{Sqlite.Escape(info.shortDescription)},{info.viewCount},{Sqlite.Escape(info.author)},{DateTime.NowEpoch},{Sqlite.Escape(this.TYTDTag)});";
|
||||
|
||||
Console.WriteLine(Sqlite.Exec(db, d));
|
||||
Sqlite.Exec(db, d);
|
||||
Sqlite.Exec(db, $"INSERT INTO channels (channelId,title) VALUES ({Sqlite.Escape(info.channelId)},{Sqlite.Escape(info.author)});");
|
||||
Sqlite.Close(db);
|
||||
this.Mutex.Unlock();
|
||||
|
||||
Reference in New Issue
Block a user