From 744b004c547dab563ead08fa0da87dabf6e537e9 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 11 Nov 2021 12:35:37 +0000 Subject: [PATCH] rename unwanted artist/album tables --- bin/mpd-feeder | 4 ++-- sql/pgsql/init.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/mpd-feeder b/bin/mpd-feeder index 9397654..be0fc2c 100755 --- a/bin/mpd-feeder +++ b/bin/mpd-feeder @@ -293,8 +293,8 @@ JOIN albums al ON al.album=s.album WHERE (s.last_queued IS NULL OR s.last_queued < CURRENT_TIMESTAMP - (? || ' seconds')::interval) AND (ar.last_queued IS NULL OR ar.last_queued < CURRENT_TIMESTAMP - (? || ' seconds')::interval) AND (al.last_queued IS NULL OR al.last_queued < CURRENT_TIMESTAMP - (? || ' seconds')::interval) - AND NOT EXISTS (SELECT 1 FROM blacklisted_artists bar WHERE bar.artist = s.artist) - AND NOT EXISTS (SELECT 1 FROM blacklisted_albums bal WHERE bal.album = s.album) + AND NOT EXISTS (SELECT 1 FROM unwanted_artists uar WHERE uar.artist = s.artist) + AND NOT EXISTS (SELECT 1 FROM unwanted_albums ual WHERE ual.album = s.album) ORDER BY random() LIMIT ? SQL diff --git a/sql/pgsql/init.sql b/sql/pgsql/init.sql index 74598fd..8cdce3d 100644 --- a/sql/pgsql/init.sql +++ b/sql/pgsql/init.sql @@ -22,13 +22,13 @@ create table artists( last_queued timestamp with time zone, generation bigint not null); -create table blacklisted_albums( +create table unwanted_albums( artist text not null, album text not null, generation bigint not null, primary key(album,artist)); -create table blacklisted_artists( +create table unwanted_artists( artist text not null primary key, generation bigint not null ); -- 2.39.5