]> git.ktnx.net Git - mpd-feeder.git/log
mpd-feeder.git
2 years agomove Options in a stand-alone module
Damyan Ivanov [Thu, 11 Nov 2021 21:12:53 +0000 (21:12 +0000)]
move Options in a stand-alone module

2 years agoshow counts of available songs/albums/artist
Damyan Ivanov [Thu, 11 Nov 2021 20:12:03 +0000 (20:12 +0000)]
show counts of available songs/albums/artist

for now in log_level=debug

2 years agoconnect to the DB early when in feeder mode
Damyan Ivanov [Thu, 11 Nov 2021 20:11:05 +0000 (20:11 +0000)]
connect to the DB early when in feeder mode

this way any problems in the connection will show at startup instead
of later when a new song needs to be queued

2 years agofix two instances of hanging open statements
Damyan Ivanov [Thu, 11 Nov 2021 20:06:45 +0000 (20:06 +0000)]
fix two instances of hanging open statements

when a cursor is exhausted with while (sth->fetch) {...} there is no
problem. Single row fetches, however need an explicit sth->finish or
the cursor remains open. this is not a big problem, but it is annoying
to see the warnings when the statement is reused (due to caching) or the
connection is shut down

2 years agofix filtering on album last queue time
Damyan Ivanov [Thu, 11 Nov 2021 20:04:58 +0000 (20:04 +0000)]
fix filtering on album last queue time

joining on the full PK of albums table avoids multiple matches
and erroneous extra results

2 years agofix filling album information
Damyan Ivanov [Thu, 11 Nov 2021 20:03:47 +0000 (20:03 +0000)]
fix filling album information

some songs have Artist, some have AlbumArtist. mpd-feeder prefers the
later, but takes the former too

2 years agokey artists by AlbumArtists
Damyan Ivanov [Thu, 11 Nov 2021 15:11:26 +0000 (15:11 +0000)]
key artists by AlbumArtists

removes a favouring of compilation albums

perhaps en even better approach would be to consider both AlbumArtist
and Artist

2 years agoinclude wanted playlist size when reporting its current state
Damyan Ivanov [Thu, 11 Nov 2021 14:47:06 +0000 (14:47 +0000)]
include wanted playlist size when reporting its current state

2 years agodump configuration to STDERR on SIGUSR1
Damyan Ivanov [Thu, 11 Nov 2021 14:46:46 +0000 (14:46 +0000)]
dump configuration to STDERR on SIGUSR1

2 years agoparse wanted playlist length as an integer
Damyan Ivanov [Thu, 11 Nov 2021 14:46:05 +0000 (14:46 +0000)]
parse wanted playlist length as an integer

2 years agoinitially, log only errors
Damyan Ivanov [Thu, 11 Nov 2021 14:44:57 +0000 (14:44 +0000)]
initially, log only errors

no need to always see details on command line/options parsing

2 years agore-exec on SIGHUP, picking up configuration file changes
Damyan Ivanov [Thu, 11 Nov 2021 14:43:57 +0000 (14:43 +0000)]
re-exec on SIGHUP, picking up configuration file changes

my first approach was to just re-read the config, but could not make
the idle/playlist loop  behave. it gets stuck with responses getting
lost and eventually is disconnected my MPD due to timeout

re-exec works, but there is a (very small) chance of missing a database
update between disconnection and re-connection to MPD.

2 years agodebug--
Damyan Ivanov [Thu, 11 Nov 2021 12:40:18 +0000 (12:40 +0000)]
debug--

2 years agoimplement {add,del}-unwanted-artist commands
Damyan Ivanov [Thu, 11 Nov 2021 12:37:15 +0000 (12:37 +0000)]
implement {add,del}-unwanted-artist commands

2 years agorename unwanted artist/album tables
Damyan Ivanov [Thu, 11 Nov 2021 12:35:37 +0000 (12:35 +0000)]
rename unwanted artist/album tables

2 years agodo not print Pg errors, RaiseError=>1 is enough
Damyan Ivanov [Thu, 11 Nov 2021 12:34:07 +0000 (12:34 +0000)]
do not print Pg errors, RaiseError=>1 is enough

2 years agopostpone db update for when it is really needed
Damyan Ivanov [Thu, 11 Nov 2021 11:15:38 +0000 (11:15 +0000)]
postpone db update for when it is really needed

would help lower the load when massive changes to the db are made

the db will be updated when a new song needs to be queued, and until
that need arises the db may be changed again

the (not that big) delay for db update when new song is needed is not
a problem, because it is about keeping the playlist full -- not an
urgent need

2 years agomake database update a synchronous operation
Damyan Ivanov [Thu, 11 Nov 2021 11:08:04 +0000 (11:08 +0000)]
make database update a synchronous operation

when someone calls for it, they rely that after the call to ->update_db
returns the database is fresh

there are tree callers - 'single', 'one-shot' and the database update
notification

2 years agomore on-demand connections
Damyan Ivanov [Thu, 11 Nov 2021 10:57:20 +0000 (10:57 +0000)]
more on-demand connections

2 years agorework command line handling - commands are commands, options are --options
Damyan Ivanov [Thu, 11 Nov 2021 10:39:08 +0000 (10:39 +0000)]
rework command line handling - commands are commands, options are --options

also, initializa connections only if/when needed

2 years agoLog::Any, proper idle looping
Damyan Ivanov [Thu, 11 Nov 2021 09:43:26 +0000 (09:43 +0000)]
Log::Any, proper idle looping

could not make Net::Async::MPD->idle work as expected, and the "manual"
method seems reliable

2 years agofix handling of database info
Damyan Ivanov [Thu, 11 Nov 2021 09:26:45 +0000 (09:26 +0000)]
fix handling of database info

2 years agoproper mpd connection initialization
Damyan Ivanov [Thu, 11 Nov 2021 09:25:27 +0000 (09:25 +0000)]
proper mpd connection initialization

2 years agomake feeder->mpd accessible
Damyan Ivanov [Thu, 11 Nov 2021 09:24:55 +0000 (09:24 +0000)]
make feeder->mpd accessible

2 years agodeclare used modules
Damyan Ivanov [Thu, 11 Nov 2021 09:24:18 +0000 (09:24 +0000)]
declare used modules

2 years agoadded --skip-db-update option
Damyan Ivanov [Thu, 11 Nov 2021 09:23:28 +0000 (09:23 +0000)]
added --skip-db-update option

skips initial database update

2 years agofix interval handling when finding suitable songs
Damyan Ivanov [Thu, 11 Nov 2021 09:22:15 +0000 (09:22 +0000)]
fix interval handling when finding suitable songs

2 years agofixed SQL param numbers
Damyan Ivanov [Thu, 11 Nov 2021 09:20:17 +0000 (09:20 +0000)]
fixed SQL param numbers

2 years agofixed database connection string
Damyan Ivanov [Thu, 11 Nov 2021 09:19:56 +0000 (09:19 +0000)]
fixed database connection string

2 years agoinitial source import
Damyan Ivanov [Wed, 10 Nov 2021 06:20:21 +0000 (06:20 +0000)]
initial source import

option/config parsing works, perhaps the db interactions too