lotan / rhythmbox-ampache

Rhythmbox plugin to stream music from Ampache
GNU General Public License v2.0
21 stars 7 forks source link

Cannot fetch music #24

Closed BoBeR182 closed 4 years ago

BoBeR182 commented 4 years ago

System: Arch Ampache: 4.1.1 Rhythmbox: 3.4.4 Plugin: ca46005

Traceback (most recent call last):
  File "/usr/lib/rhythmbox/plugins/ampache/AmpacheBrowser.py", line 454, in playlists_cb
    parser.feed(contents)
  File "/usr/lib/python3.8/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "/build/python/src/Python-3.8.2/Modules/pyexpat.c", line 459, in EndElement
  File "/usr/lib/python3.8/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/usr/lib/rhythmbox/plugins/ampache/AmpacheBrowser.py", line 75, in endElement
    self.__id,
AttributeError: 'PlaylistsHandler' object has no attribute '_PlaylistsHandler__id'
lotan commented 4 years ago

Can you please load the playlist URI in a browser and inspect the response. It'll come up a bit earlier in the rhythmbox logs and looks similar to

(08:47:46) [0x562819e83380] [AmpacheBrowser.handshake_cb] /usr/lib/rhythmbox/plugins/ampache/AmpacheBrowser.py:1094: downloading playlists: https://my.url.com/ampache/server/xml.server.php?action=playlists&auth=<auth_hash>

If you don't know what to do with it, refer to

https://github.com/ampache/ampache/wiki/XML-API#result

If you want me to have a look at it, post it here. Ensure if you run a public ampache instance to mask out the auth tag.

BoBeR182 commented 4 years ago
<root>
<total_count>15</total_count>
<playlist id="smart_14">
<name>Album 1*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_13">
<name>Album 2*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_12">
<name>Album 3*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_11">
<name>Album 4*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_10">
<name>Album 5*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_9">
<name>Artist 1*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_8">
<name>Artist 2*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_7">
<name>Artist 3*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_6">
<name>Artist 4*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_5">
<name>Artist 5*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_19">
<name>Song 1*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_18">
<name>Song 2*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_17">
<name>Song 3*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_16">
<name>Song 4*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
<playlist id="smart_15">
<name>Song 5*</name>
<owner>public</owner>
<items>5000</items>
<type>public</type>
</playlist>
</root>
lotan commented 4 years ago

Right. I had an older version of ampache installed. They since changed from numerical IDs to alphanumerical ones. I'll need a bit to upgrade...

Thanks for the data.

BoBeR182 commented 4 years ago

Is there a development branch I can test?

lotan commented 4 years ago

Current master HEAD should work now. I'd be greatful for an update.

BoBeR182 commented 4 years ago

Works closing.