]> kaliko git repositories - mpd-sima.git/log
mpd-sima.git
2 years agoCatch uncaught socket.timeout (OSError subclass).
kaliko [Thu, 10 Feb 2022 16:17:49 +0000 (17:17 +0100)]
Catch uncaught socket.timeout (OSError subclass).

Wrap first call of MPD._reset_cache in try/catch, but I don't understand
why...

During first connection, player cache is populated with MPD._reset_cache
Even though the connection to MPD succeed, we can receive a socket.timeout if
the proxy is not reachable (MPD server in satellite mode request another
MPD server for music library requests, for instance during _reset_cache).

The issue here is the OSError (socket.timeout) is not raised as it
should be, ie. wrapped in PlayerError within MPD.__getattr__.
MPD._reset_cache is calling list('artist'), which is actually going
through MPD.__getattr__, but when OSError is raised is is not
wrapped in PlayerError.

Launching mpd-sima against an MPD server on the same host but with a
database proxy over the network can trigger this socket.timeout:
  * Start MPD
  * Shutdown internet link
  * Start mpd-sima

2 years agodoc: Fixed typo
kaliko [Wed, 9 Feb 2022 13:53:14 +0000 (14:53 +0100)]
doc: Fixed typo

2 years agoBump version
kaliko [Wed, 9 Feb 2022 13:52:24 +0000 (14:52 +0100)]
Bump version

2 years agoReleasing 0.18.1 0.18.1
kaliko [Mon, 7 Feb 2022 17:57:56 +0000 (18:57 +0100)]
Releasing 0.18.1

2 years agoCleanup plugin class
kaliko [Fri, 21 Jan 2022 13:08:10 +0000 (14:08 +0100)]
Cleanup plugin class

2 years agoBetter log level when trying without mbid
kaliko [Fri, 21 Jan 2022 09:49:18 +0000 (10:49 +0100)]
Better log level when trying without mbid

2 years agoFixed typo in Changelog
kaliko [Tue, 28 Dec 2021 09:27:54 +0000 (10:27 +0100)]
Fixed typo in Changelog

2 years agoFixed wrong exception
kaliko [Fri, 24 Dec 2021 08:19:36 +0000 (09:19 +0100)]
Fixed wrong exception

3 years agodoc: Add reference to "Configuration examples"
kaliko [Sat, 4 Dec 2021 11:25:35 +0000 (12:25 +0100)]
doc: Add reference to "Configuration examples"

3 years agoCleanup some imports
kaliko [Sat, 4 Dec 2021 11:24:59 +0000 (12:24 +0100)]
Cleanup some imports

3 years agodoc: publish html target uses setuptools build
kaliko [Sat, 4 Dec 2021 11:22:40 +0000 (12:22 +0100)]
doc: publish html target uses setuptools build

Use setuptools to build html to have version set.

3 years agodoc: Add missig daemon section in all_settings.cfg
kaliko [Tue, 23 Nov 2021 16:50:50 +0000 (17:50 +0100)]
doc: Add missig daemon section in all_settings.cfg

Fixed some typo/format

3 years agoUpdate lastfm web API
kaliko [Tue, 23 Nov 2021 09:51:55 +0000 (10:51 +0100)]
Update lastfm web API

3 years agoSet max_art default value to 20
kaliko [Tue, 23 Nov 2021 09:49:44 +0000 (10:49 +0100)]
Set max_art default value to 20

3 years agodoc: Fixed migration glitch
kaliko [Mon, 22 Nov 2021 16:13:03 +0000 (17:13 +0100)]
doc: Fixed migration glitch

3 years agodoc: Merge manual in sphinx build
kaliko [Mon, 22 Nov 2021 15:02:54 +0000 (16:02 +0100)]
doc: Merge manual in sphinx build

3 years agodoc: Add publish target
kaliko [Thu, 18 Nov 2021 11:44:12 +0000 (12:44 +0100)]
doc: Add publish target

3 years agodoc: Fixed filter
kaliko [Tue, 16 Nov 2021 13:38:55 +0000 (14:38 +0100)]
doc: Fixed filter

Even it is a valid MPD filter, drop external enclosing parentheses

3 years agodoc: Minor content changes
kaliko [Tue, 16 Nov 2021 12:43:48 +0000 (13:43 +0100)]
doc: Minor content changes

3 years agodoc: Use default theme
kaliko [Tue, 16 Nov 2021 12:37:16 +0000 (13:37 +0100)]
doc: Use default theme

3 years agodoc: Fixed missing namespace
kaliko [Sun, 14 Nov 2021 17:52:23 +0000 (18:52 +0100)]
doc: Fixed missing namespace

3 years agodoc: Add queue plugins examples
kaliko [Sun, 14 Nov 2021 17:51:40 +0000 (18:51 +0100)]
doc: Add queue plugins examples

3 years agodoc: Update sphinx config, add user documentation
kaliko [Mon, 7 Jun 2021 12:22:44 +0000 (14:22 +0200)]
doc: Update sphinx config, add user documentation

Also add SimaDB module documentation

3 years agodoc: Update sphinx config and add sima.mpdclient.MPD
kaliko [Fri, 15 May 2020 11:54:15 +0000 (13:54 +0200)]
doc: Update sphinx config and add sima.mpdclient.MPD

3 years agoRemove echonest doc
kaliko [Thu, 7 May 2020 06:38:36 +0000 (08:38 +0200)]
Remove echonest doc

3 years agoUsing bootstrap theme
kaliko [Mon, 1 May 2017 16:13:22 +0000 (18:13 +0200)]
Using bootstrap theme

3 years agoMoved dev doc to sub folder
kaliko [Sat, 14 Nov 2015 19:14:24 +0000 (20:14 +0100)]
Moved dev doc to sub folder

3 years agoAdd cache/echonest to sphinx doc.
kaliko [Sat, 14 Nov 2015 16:58:00 +0000 (17:58 +0100)]
Add cache/echonest to sphinx doc.

3 years agoMerged meta and track, switched to classic theme
kaliko [Wed, 11 Nov 2015 22:23:43 +0000 (23:23 +0100)]
Merged meta and track, switched to classic theme

3 years agoAdd sphinx build
kaliko [Wed, 11 Nov 2015 12:24:59 +0000 (13:24 +0100)]
Add sphinx build

3 years agoUpdate venv installer
kaliko [Sat, 20 Nov 2021 08:49:28 +0000 (09:49 +0100)]
Update venv installer

Require python 3.6

3 years agoRemove bad heuristic to infer artist aliases
kaliko [Fri, 19 Nov 2021 14:26:28 +0000 (15:26 +0100)]
Remove bad heuristic to infer artist aliases

3 years agoFixed wording in manual
kaliko [Thu, 18 Nov 2021 12:56:48 +0000 (13:56 +0100)]
Fixed wording in manual

3 years agoBump version
kaliko [Thu, 18 Nov 2021 12:56:25 +0000 (13:56 +0100)]
Bump version

3 years agoReleasing 0.18.0 0.18.0
kaliko [Tue, 16 Nov 2021 15:57:23 +0000 (16:57 +0100)]
Releasing 0.18.0

3 years agoFixed help message typo
kaliko [Tue, 16 Nov 2021 15:42:58 +0000 (16:42 +0100)]
Fixed help message typo

3 years agoRemove obsolete simadb_cli
kaliko [Tue, 16 Nov 2021 15:32:32 +0000 (16:32 +0100)]
Remove obsolete simadb_cli

3 years agoAdd some space padding in log format
kaliko [Tue, 16 Nov 2021 14:39:42 +0000 (15:39 +0100)]
Add some space padding in log format

Allows to align debug log message with mpdclient.py file

3 years agoMore robust Tags plugin MPD filter configuration
kaliko [Tue, 16 Nov 2021 14:24:52 +0000 (15:24 +0100)]
More robust Tags plugin MPD filter configuration

Remove external enclosing parentheses in user defined MPD filter, for
instance when there is more than one expression:
    ((genre == 'rock' ) AND (date =~ '198.')).

Even though it's a valid MPD filter, forge_filter will enclose it
properly. We do not want to through a syntax error at users since it's a
valid MPD filter, hence trying to transparently reformat the filter.

filter = ((genre == 'rock' ) AND (date =~ '198.'))

  and

filter = (genre == 'rock' ) AND (date =~ '198.')

Will work the same, producing the valid MPD filter:

    ((genre == 'Punk') AND (date =~ '198[2-9]+') AND (artist != ''))

3 years agoFixed wrong use of musicpd for tagtypes command (Closes #60)
kaliko [Tue, 16 Nov 2021 13:32:18 +0000 (14:32 +0100)]
Fixed wrong use of musicpd for tagtypes command (Closes #60)

3 years agoCleanup code
kaliko [Tue, 16 Nov 2021 10:52:04 +0000 (11:52 +0100)]
Cleanup code

Update Exceptions (cf. 3b4178f)
Add copyright header
Better error message

3 years agoRevert previous refactoring around Exceptions
kaliko [Tue, 16 Nov 2021 10:23:42 +0000 (11:23 +0100)]
Revert previous refactoring around Exceptions

Mainly 774e755 and part of 94c7b5c

PlayerError is musicpd.MPDError a different family of exceptions not to
be merged in MPDSimaException, as initially implemented in a978d29.

3 years agoman: Fixed and build mpd_sima.cfg.5 manual
kaliko [Sun, 14 Nov 2021 18:13:41 +0000 (19:13 +0100)]
man: Fixed and build mpd_sima.cfg.5 manual

3 years agoUpdate bash completion (Closes #61)
kaliko [Sun, 7 Nov 2021 17:16:21 +0000 (18:16 +0100)]
Update bash completion (Closes #61)

3 years agoCheck Tags config onmy when it is configured as internal plugin
kaliko [Sun, 7 Nov 2021 17:15:00 +0000 (18:15 +0100)]
Check Tags config onmy when it is configured as internal plugin

3 years agoFixed unhandled exception in monitor (idle MPD command)
kaliko [Fri, 29 Oct 2021 11:55:15 +0000 (13:55 +0200)]
Fixed unhandled exception in monitor (idle MPD command)

Socket timeout was handled but musicpd exception raised on server lost
was not. For instance ConnectionError: "Connection lost while reading
line" was not catch.

3 years agoci: Add missing dependencies
kaliko [Mon, 25 Oct 2021 09:29:24 +0000 (11:29 +0200)]
ci: Add missing dependencies

3 years agoCatch forgotten exception in mpdclient (Closes #59)
kaliko [Mon, 25 Oct 2021 09:20:01 +0000 (11:20 +0200)]
Catch forgotten exception in mpdclient (Closes #59)

3 years agoMainly use literal for list/dict and f-strings when possible
kaliko [Sat, 2 Oct 2021 13:23:04 +0000 (15:23 +0200)]
Mainly use literal for list/dict and f-strings when possible

3 years agoBig cleanup, pyling warning, style, error
kaliko [Sat, 2 Oct 2021 11:11:10 +0000 (13:11 +0200)]
Big cleanup, pyling warning, style, error

3 years agoInit genre attribute in Track object
kaliko [Sat, 2 Oct 2021 11:09:51 +0000 (13:09 +0200)]
Init genre attribute in Track object

3 years agoSome refactoring around Exceptions
kaliko [Sat, 2 Oct 2021 11:09:01 +0000 (13:09 +0200)]
Some refactoring around Exceptions

3 years agoSimplified first loop iteration detection
kaliko [Sat, 2 Oct 2021 10:50:03 +0000 (12:50 +0200)]
Simplified first loop iteration detection

3 years agoClean some linter warnings and errors
kaliko [Fri, 1 Oct 2021 18:29:57 +0000 (20:29 +0200)]
Clean some linter warnings and errors

3 years agoci: Fixed unittest
kaliko [Thu, 30 Sep 2021 18:02:47 +0000 (20:02 +0200)]
ci: Fixed unittest

3 years agoci: Fixed unittest
kaliko [Thu, 30 Sep 2021 17:52:25 +0000 (19:52 +0200)]
ci: Fixed unittest

3 years agoDeal with lost connection (Closes #53)
kaliko [Thu, 30 Sep 2021 17:15:10 +0000 (19:15 +0200)]
Deal with lost connection (Closes #53)

3 years agoAdd more info in crash report (Closes #56)
kaliko [Thu, 30 Sep 2021 17:03:51 +0000 (19:03 +0200)]
Add more info in crash report (Closes #56)

3 years agoUpdate dead http link
kaliko [Thu, 30 Sep 2021 13:19:43 +0000 (15:19 +0200)]
Update dead http link

3 years agoConfigure SAST in
kaliko [Fri, 23 Jul 2021 14:17:32 +0000 (16:17 +0200)]
Configure SAST in

3 years agoMore robust MPD client (start addressing #53)
kaliko [Mon, 5 Jul 2021 08:19:58 +0000 (10:19 +0200)]
More robust MPD client (start addressing #53)

This actually closes the issue but I believe the client does not
currently detect half-opened connection, for instance router
reboot|crash|host roaming.

3 years agoCleanup Exceptions
kaliko [Sun, 4 Jul 2021 17:26:15 +0000 (19:26 +0200)]
Cleanup Exceptions

3 years agoFixed crash when player.search_track returns nothing
kaliko [Tue, 29 Jun 2021 07:44:22 +0000 (09:44 +0200)]
Fixed crash when player.search_track returns nothing

3 years agoFixed double quote error, missing escape character (Closes #52)
kaliko [Fri, 18 Jun 2021 10:38:06 +0000 (12:38 +0200)]
Fixed double quote error, missing escape character (Closes #52)

3 years agoFixed crash when player.find_tracks returns nothing
kaliko [Thu, 17 Jun 2021 11:48:57 +0000 (13:48 +0200)]
Fixed crash when player.find_tracks returns nothing

With the block list, player.find_tracks might return an empty list.

3 years agoRemove to_add attibute
kaliko [Thu, 17 Jun 2021 11:46:53 +0000 (13:46 +0200)]
Remove to_add attibute

3 years agoMPD client: Tries to resolve MusicBrainzArtistID when possible (fixed b36c71a)
kaliko [Tue, 8 Jun 2021 18:39:15 +0000 (20:39 +0200)]
MPD client: Tries to resolve MusicBrainzArtistID when possible (fixed b36c71a)

3 years agodoc: Update docstrings
kaliko [Tue, 8 Jun 2021 15:12:04 +0000 (17:12 +0200)]
doc: Update docstrings

3 years agoMPD client: Tries to resolve MusicBrainzArtistID when possible.
kaliko [Tue, 8 Jun 2021 14:46:40 +0000 (16:46 +0200)]
MPD client: Tries to resolve MusicBrainzArtistID when possible.

3 years agoPlayerError inherit from MPDError instead of plain Exception
kaliko [Tue, 8 Jun 2021 14:30:01 +0000 (16:30 +0200)]
PlayerError inherit from MPDError instead of plain Exception

3 years agoBetter debug message, complete a comment
kaliko [Tue, 8 Jun 2021 11:34:46 +0000 (13:34 +0200)]
Better debug message, complete a comment

3 years agoUse Track Album attribute to avoid missing album name
kaliko [Mon, 7 Jun 2021 19:02:09 +0000 (21:02 +0200)]
Use Track Album attribute to avoid missing album name

Track.Album as a fallback is name is not provided.

3 years agoFixed bad implementation of blocklist for albums
kaliko [Mon, 7 Jun 2021 13:09:06 +0000 (15:09 +0200)]
Fixed bad implementation of blocklist for albums

3 years agodoc: Update docstrings
kaliko [Mon, 7 Jun 2021 12:34:14 +0000 (14:34 +0200)]
doc: Update docstrings

3 years agoman: Fixed error in XDG env. var.
kaliko [Mon, 7 Jun 2021 12:31:29 +0000 (14:31 +0200)]
man: Fixed error in XDG env. var.

3 years agoFixed issue with multivalued musicbrainz_artistid (Closes #47)
kaliko [Mon, 7 Jun 2021 12:28:32 +0000 (14:28 +0200)]
Fixed issue with multivalued musicbrainz_artistid (Closes #47)

3 years agoUpdate Changelog
kaliko [Sat, 5 Jun 2021 05:43:06 +0000 (07:43 +0200)]
Update Changelog

3 years agoUpdate Changelog, end sqlite rewrite phase (closes #45, #49, #33)
kaliko [Fri, 4 Jun 2021 17:27:44 +0000 (19:27 +0200)]
Update Changelog, end sqlite rewrite phase (closes #45, #49, #33)

3 years agosimadb: More consistent use of albumartist info in fetch_albums_history
kaliko [Fri, 4 Jun 2021 14:22:09 +0000 (16:22 +0200)]
simadb: More consistent use of albumartist info in fetch_albums_history

fetch_albums_history() returns a list of Album objects with an Artist
attribute set to albumartist (if provided, else falls back to artist).
We want an Album view of history.

fetch_albums_history(needle) returns a list of Album objects with
Artist attribute set to artist (in this case we want album played for
artist == needle). Here we want the artist view on album history.

3 years agosimadb: Fixed timezone, record play timestamp as UTC (Closes #51)
kaliko [Fri, 4 Jun 2021 14:18:18 +0000 (16:18 +0200)]
simadb: Fixed timezone, record play timestamp as UTC (Closes #51)

Convert all utcnow() to now(timezone.utc)

3 years agoUse MusicBrainz_albumid for album search (Closes #30)
kaliko [Fri, 4 Jun 2021 09:18:56 +0000 (11:18 +0200)]
Use MusicBrainz_albumid for album search (Closes #30)

3 years agoRewrote blocklist feature with the new simadb API
kaliko [Thu, 3 Jun 2021 14:36:48 +0000 (16:36 +0200)]
Rewrote blocklist feature with the new simadb API

3 years agoImproved filter_track plugin method
kaliko [Thu, 3 Jun 2021 09:01:06 +0000 (11:01 +0200)]
Improved filter_track plugin method

3 years agosimadb: Expose file in view_bl
kaliko [Thu, 3 Jun 2021 08:57:24 +0000 (10:57 +0200)]
simadb: Expose file in view_bl

It permits to build a Track object for comparison

3 years agoArtist object changes
kaliko [Wed, 2 Jun 2021 16:08:03 +0000 (18:08 +0200)]
Artist object changes

Use name for albumartist if albumartist is not provided.

3 years agoAdd Album property to Track objects
kaliko [Wed, 2 Jun 2021 15:41:40 +0000 (17:41 +0200)]
Add Album property to Track objects

3 years agoDo not limit valid UUID to version 4
kaliko [Wed, 2 Jun 2021 15:31:16 +0000 (17:31 +0200)]
Do not limit valid UUID to version 4

3 years agosimadb: Fixed early connection close
kaliko [Mon, 10 May 2021 09:05:14 +0000 (11:05 +0200)]
simadb: Fixed early connection close

3 years agoUpdate manual
kaliko [Sun, 9 May 2021 16:17:34 +0000 (18:17 +0200)]
Update manual

3 years agosimadb: Propagate add option
kaliko [Sun, 9 May 2021 09:55:35 +0000 (11:55 +0200)]
simadb: Propagate add option

3 years agoAdd blocklist commands, remove simadb_cli
kaliko [Sun, 9 May 2021 09:48:57 +0000 (11:48 +0200)]
Add blocklist commands, remove simadb_cli

Move all command to a subparser

3 years agoMPD client: Remove useless check on use_mbid
kaliko [Thu, 6 May 2021 09:32:29 +0000 (11:32 +0200)]
MPD client: Remove useless check on use_mbid

3 years agoUse os.getenv instead of os.environ.get
kaliko [Wed, 5 May 2021 18:20:01 +0000 (20:20 +0200)]
Use os.getenv instead of os.environ.get

3 years agoAdd abstract unix socket support for MPD connection
kaliko [Wed, 5 May 2021 16:30:45 +0000 (18:30 +0200)]
Add abstract unix socket support for MPD connection

Add unittests for env var parsing

3 years agoFixed test_config
kaliko [Wed, 5 May 2021 15:58:12 +0000 (17:58 +0200)]
Fixed test_config

568365b introduced a file acces control on db_file

3 years agosimadb: do not fetch NULL genre
kaliko [Tue, 4 May 2021 18:37:34 +0000 (20:37 +0200)]
simadb: do not fetch NULL genre

3 years agoAdd new database replacement code.
kaliko [Tue, 4 May 2021 18:21:13 +0000 (20:21 +0200)]
Add new database replacement code.

In case a previous database is loaded, it is renamed with a prefix
"-old-version-backup" in the same directory. No migration managed.

3 years agoUpdate simadb API
kaliko [Tue, 4 May 2021 13:37:44 +0000 (15:37 +0200)]
Update simadb API

3 years agoUpdate file access controls
kaliko [Tue, 4 May 2021 13:15:53 +0000 (15:15 +0200)]
Update file access controls

3 years agoUse new sqlite module
kaliko [Mon, 3 May 2021 11:40:49 +0000 (13:40 +0200)]
Use new sqlite module