From ca53f1b94dd67a7a9153a0ca0af1ba95c240da1f Mon Sep 17 00:00:00 2001 From: Marco Andronaco Date: Mon, 15 Jan 2024 17:11:47 +0100 Subject: [PATCH] remove useless table --- invidious/cache.go | 5 ----- invidious/queries.go | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/invidious/cache.go b/invidious/cache.go index 9c1a1a8..d817b80 100644 --- a/invidious/cache.go +++ b/invidious/cache.go @@ -28,11 +28,6 @@ func InitDB() { 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 { diff --git a/invidious/queries.go b/invidious/queries.go index 30168c9..ea203c8 100644 --- a/invidious/queries.go +++ b/invidious/queries.go @@ -12,17 +12,6 @@ CREATE TABLE IF NOT EXISTS videos ( 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 (?, ?, ?, ?, ?, ?, ?);"