all repos — fixyoutube-go @ ca53f1b94dd67a7a9153a0ca0af1ba95c240da1f

A better way to embed YouTube videos everywhere (inspired by FixTweet).

remove useless table
Marco Andronaco andronacomarco@gmail.com
Mon, 15 Jan 2024 17:11:47 +0100
commit

ca53f1b94dd67a7a9153a0ca0af1ba95c240da1f

parent

5dacd81acbedefff9ee292127e188e1052e7e540

2 files changed, 0 insertions(+), 16 deletions(-)

jump to
M invidious/cache.goinvidious/cache.go

@@ -28,11 +28,6 @@ if err != nil {

logger.Errorf("%q: %s\n", err, createQueryVideos) return } - _, err = db.Exec(createQueryFormats) - if err != nil { - logger.Errorf("%q: %s\n", err, createQueryFormats) - return - } } func CacheVideoDB(v Video) error {
M invidious/queries.goinvidious/queries.go

@@ -12,17 +12,6 @@ timestamp DATETIME DEFAULT (datetime('now')),

expire DATETIME NOT NULL );` -const createQueryFormats = ` -CREATE TABLE IF NOT EXISTS formats ( - videoId TEXT, - name TEXT, - height TEXT NOT NULL, - width TEXT NOT NULL, - url TEXT, - PRIMARY KEY (videoId, name), - FOREIGN KEY(videoId) REFERENCES videos(videoId) -);` - const getVideoQuery = "SELECT * FROM videos WHERE videoId = (?);" const cacheVideoQuery = "INSERT OR REPLACE INTO videos (videoId, title, description, uploader, duration, url, expire) VALUES (?, ?, ?, ?, ?, ?, ?);"