Code Monkey home page Code Monkey logo

mopidy-beets-local's People

Contributors

rawdlite avatar wiget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mopidy-beets-local's Issues

Track is not playable

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'

AttributeError: 'BeetsLocalLibraryProvider' object has no attribute 'lib'

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

genre query directory entry for artist with missing ID results in URI that returns all albums in genre

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

  1. Miles Davis, The New Miles Davis Quintet (Prestige: CD OJCCD-006-2)
  2. Miles Davis, Kind of Blue (Columbia: CD CD40579)
  3. John Coltrane, A Love Supreme (impulse: CD B0000610-02)

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:

  • Mopidy (2.1.0)
  • Mopidy-BeetsLocal (0.0.9)
  • Mopidy-Moped (0.7.1)
  • Mopidy-MusicBox-Webclient (2.4.0)
  • beets 1.4.5 (installed via pip)
  • python 2.7.13
  • lubuntu 17.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.