rawdlite / mopidy-beets-local Goto Github PK
View Code? Open in Web Editor NEWAccess a local beets library from mopidy via beets native api
License: Apache License 2.0
Access a local beets library from mopidy via beets native api
License: Apache License 2.0
Trying to use mopidy-beets-local. I fixed some python 2/3 issues, but got stuck on below problem.
The file plays through gst without problems:
gst-launch-1.0 playbin uri=file:///volume1/audio/_audio2sort/MP3/claris.mp3
Running mopidy 3.0.2 and beets 1.5.0.
ERROR 2020-07-29 01:32:35,230 [10547:MainThread] mopidy.audio.gst
GStreamer error: Could not open resource for reading.
WARNING 2020-07-29 01:32:35,257 [10547:Audio-2] mopidy.audio.actor
Setting GStreamer state to GST_STATE_PLAYING failed
WARNING 2020-07-29 01:32:35,258 [10547:Core-4] mopidy.core.tracklist
Track is not playable: beetslocal:track:13:b'/volume1/audio/_audio2sort/MP3/claris.mp3'
spammed with
WARNING get_distinct called field: artist, Query: {}
ERROR BeetsLocalBackend backend caused an exception.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/mopidy/core/library.py", line 19, in _backend_error_handling
yield
File "/usr/local/lib/python2.7/site-packages/mopidy/core/library.py", line 142, in get_distinct
values = future.get()
File "/usr/local/lib/python2.7/site-packages/pykka/threading.py", line 52, in get
compat.reraise(*self._data['exc_info'])
File "/usr/local/lib/python2.7/site-packages/pykka/compat.py", line 12, in reraise
exec('raise tp, value, tb')
File "/usr/local/lib/python2.7/site-packages/pykka/actor.py", line 201, in _actor_loop
response = self._handle_receive(message)
File "/usr/local/lib/python2.7/site-packages/pykka/actor.py", line 295, in _handle_receive
return callee(*message['args'], **message['kwargs'])
File "/usr/local/lib/python2.7/site-packages/mopidy_beetslocal/library.py", line 183, in get_distinct
result = self._browse_artist(query)
File "/usr/local/lib/python2.7/site-packages/mopidy_beetslocal/library.py", line 219, in _browse_artist
return self._query_beets_db(statement)
File "/usr/local/lib/python2.7/site-packages/mopidy_beetslocal/library.py", line 228, in _query_beets_db
with self.lib.transaction() as tx:
AttributeError: 'BeetsLocalLibraryProvider' object has no attribute 'lib'
when connecting with ncmpcpp
When an album is missing a MusicBrainz artist ID, and that artist is included in the results of a genre query, the directory entry corresponding to that artist in the query results has a URI that returns all albums in the genre, regardless of artist.
For example, if I import the following albums into an empty library
and because there is not an exact match for The New Miles Davis Quintet in the MusicBrainz results, I select "use as is" on import, that album will not have an associated MusicBrainz artist ID.
The beets-local request/response for a jazz genre query is then:
{
"id": 12,
"jsonrpc": "2.0",
"method": "core.library.browse",
"params": {
"uri": "beetslocal:genre?genre=Jazz"
}
}
{
"id": 12,
"jsonrpc": "2.0",
"result": [
{
"__model__": "Ref",
"name": "John Coltrane",
"type": "directory",
"uri": "beetslocal:artist?genre=Jazz&artist=b625448e-bf4a-41c3-a421-72ad46cdb831"
},
{
"__model__": "Ref",
"name": "Miles Davis",
"type": "directory",
"uri": "beetslocal:artist?genre=Jazz&artist="
},
{
"__model__": "Ref",
"name": "Miles Davis",
"type": "directory",
"uri": "beetslocal:artist?genre=Jazz&artist=561d854a-6a28-4aa7-8c99-323e6ce46c2a"
}
]
}
The URI included in the first entry for Miles Davis has an artist query param with no value. When this URI is requested when the user clicks on this artist entry in the Moped or Musicbox web UI, the result is a response that includes all of the albums in the genre:
{
"id": 13,
"jsonrpc": "2.0",
"method": "core.library.browse",
"params": {
"uri": "beetslocal:artist?genre=Jazz&artist="
}
}
{
"id": 13,
"jsonrpc": "2.0",
"result": [
{
"__model__": "Ref",
"name": "A Love Supreme",
"type": "album",
"uri": "beetslocal:album?album=3"
},
{
"__model__": "Ref",
"name": "Kind of Blue",
"type": "album",
"uri": "beetslocal:album?album=2"
},
{
"__model__": "Ref",
"name": "The New Miles Davis Quintet",
"type": "album",
"uri": "beetslocal:album?album=1"
}
]
}
The query/response results are the same with Moped and Musicbox Webclient.
Since beets supports imports without re-tagging, and I encountered the problem of no suitable match twice in a sample of approximately 12 albums, it would be beneficial if beet-local was able to handle this scenario.
Software versions:
pip
)The Project resources links in the readme all point to https://github.com/rawdlite/mopidy-beetslocal instead of https://github.com/rawdlite/mopidy-beets-local. Found when trying to get to the source code from https://pypi.python.org/pypi/Mopidy-BeetsLocal
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.