Open hennegwath opened 11 years ago
Hi,
There's nothing to do, loading too much items consumes too much memory and because MPD returns artists unsorted, plugin is sorting them (again in memory) and I am not speaking about XBMC list items it self (which is just another copy of artists in memory). Solution could be redoing addon to usual audio addon - not a script. I am currently trying to work on it.
Sorry ATM
I think sonata is written in python too, maybe you could look at their code to reduce overhead.
Or one could do the "getting artists" in background. At least Ario does so. It populates the displayed library while you can use all it's features. But I think it's written in C and Gtk or so...
Henning
I've pushed initial version of new addon implemented completelly different way, check it out. WDYT?
Data are loaded only when needed, addon is stateless, no caching, no polling.
Use install.sh or note that addon is no longer called scrpit.mpdc but plugin.audio.mpdc. So both versions can live side-by-side.
I was testing it on my pi, and loading artists takes almost same time as in old implementation,
Hi, I also tested your new apha on my Pi. The startup is multiple (est. 20x) times faster. Maybe U need a big collection in order to get a big difference ( e.g. 5k unique audio files).
Regards
Hello,
great to hear that! So it looks like I'll continue with this approach and deprecate previous (now in official repo) addon.
Thanks
Hi, nice to hear this. I also found out that running either version of the client seems to put some load on MPD. E.g. HD Audio files are often (each 2 secs.) interrupted when connecting a client on XBMC to MPD. This does not happen with other clients (tried with auremo). Maybe it has something to do with polling the status too often (the Raspberry has a RL weak CPU).
Happy coding
new version (now in master branch only) does not do any polling, it "just" opens new connection, asks mostly for status or some listing (depends what you actually do), it should resolve your issue.
Hi - not sure if you still work on this add-on but it's great. I have 6000+ artists and 30000+ songs in my MPD installation. This makes startup of the add-on quite slow (when it loads artists etc). Would it be possible to make the "Artists" and "Files" tabs optional so that they don't need to be populated? Also, would you consider a "Lyrics" tab that could download LRC files and display the lyrics for the current song? Thanks again.
Hi, I've modified the 2.0.8 version to match your needs. So there a new setting "Show artists and files" which controls display of artist and file tab. The new 2.0.9 will be up in a few hours. The Lyrics tab is far away for my programming skill, so sorry can't do that.
Greetings
Hi - thanks for the quick action on the option to suppress the artists and files tabs. I can't seem to locate v2.0.9 in github or the Kodi addon repository. Do you know if it is available yet? Thanks again.
Hi,
no, not yet online. You can look for my fork, the ready to use ZIP File for Kodi is downloadable there.
Greets Rüdiger
owl770 notifications@github.com schrieb:
Hi - thanks for the quick action on the option to suppress the artists and files tabs. I can't seem to locate v2.0.9 in github or the Kodi addon repository. Do you know if it is available yet? Thanks again.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub
Forgot to say, it's rthe fork of emschneid
owl770 notifications@github.com schrieb:
Hi - thanks for the quick action on the option to suppress the artists and files tabs. I can't seem to locate v2.0.9 in github or the Kodi addon repository. Do you know if it is available yet? Thanks again.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub
Hi @remschneid i am on the official version and i have a bug when getting artist list from my server. (this list contains only 4 artists !) Maybe your version can help me to mange that ?
here the trace:
20:39:29 25318.083984 T:1415574512 ERROR: Traceback (most recent call last): 20:39:29 25318.083984 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/gui.py", line 225, in _connect 20:39:29 25318.083984 T:1415574512 ERROR: self._update_artist_browser() 20:39:29 25318.083984 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/gui.py", line 375, in _update_artist_browser 20:39:29 25318.085938 T:1415574512 ERROR: artists = self.client.list('artist') 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/rmpd.py", line 16, in
20:39:29 25318.085938 T:1415574512 ERROR: return lambda _args: self._wrap(obj, args) 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/rmpd.py", line 23, in _wrap 20:39:29 25318.085938 T:1415574512 ERROR: return func(_args) 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 152, in 20:39:29 25318.087891 T:1415574512 ERROR: return lambda *args: wrapper(command, args) 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 195, in _execute 20:39:29 25318.087891 T:1415574512 ERROR: return retval() 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 306, in _fetch_list 20:39:29 25318.087891 T:1415574512 ERROR: return self._wrap_iterator(self._read_list()) 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 290, in _wrap_iterator 20:39:29 25318.087891 T:1415574512 ERROR: return list(iterator) 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 242, in _read_list 20:39:29 25318.089844 T:1415574512 ERROR: for key, value in self._read_pairs(): 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 235, in _read_pairs 20:39:29 25318.089844 T:1415574512 ERROR: pair = self._read_pair(separator) 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 226, in _read_pair 20:39:29 25318.091797 T:1415574512 ERROR: line = self._read_line() 20:39:29 25318.091797 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 209, in _read_line 20:39:29 25318.091797 T:1415574512 ERROR: line = self._rfile.readline() 20:39:29 25318.091797 T:1415574512 ERROR: File "/usr/lib/python2.7/socket.py", line 447, in readline 20:39:29 25318.093750 T:1415574512 ERROR: data = self._sock.recv(self._rbufsize) 20:39:29 25318.093750 T:1415574512 ERROR: timeout: timed out
Am 29.10.2016 um 22:21 schrieb Fabien:
Hi @remschneid https://github.com/remschneid i am on the official version and i have a bug when getting artist list from my server. (this list contains only 4 artists !) Maybe your version can help me to mange that ?
Hi Fabien, sorry I can't reproduce this error. Maybe the file names and/or meta tags of the songs are a bit weird. Are there any error messages in your mpd logfile?
here the trace:
20:39:29 25318.083984 T:1415574512 ERROR: Traceback (most recent call last): 20:39:29 25318.083984 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/gui.py", line 225, in _connect 20:39:29 25318.083984 T:1415574512 ERROR: self._update_artist_browser() 20:39:29 25318.083984 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/gui.py", line 375, in _update_artist_browser 20:39:29 25318.085938 T:1415574512 ERROR: artists = self.client.list('artist') 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/rmpd.py", line 16, in 20:39:29 25318.085938 T:1415574512 ERROR: return lambda /args: self._wrap(obj, args) 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/rmpd.py", line 23, in _wrap 20:39:29 25318.085938 T:1415574512 ERROR: return func(/args) 20:39:29 25318.085938 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 152, in 20:39:29 25318.087891 T:1415574512 ERROR: return lambda *args: wrapper(command, args) 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 195, in _execute 20:39:29 25318.087891 T:1415574512 ERROR: return retval() 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 306, in _fetch_list 20:39:29 25318.087891 T:1415574512 ERROR: return self._wrap_iterator(self._read_list()) 20:39:29 25318.087891 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 290, in _wrap_iterator 20:39:29 25318.087891 T:1415574512 ERROR: return list(iterator) 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 242, in _read_list 20:39:29 25318.089844 T:1415574512 ERROR: for key, value in self._read_pairs(): 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 235, in _read_pairs 20:39:29 25318.089844 T:1415574512 ERROR: pair = self._read_pair(separator) 20:39:29 25318.089844 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 226, in _read_pair 20:39:29 25318.091797 T:1415574512 ERROR: line = self._read_line() 20:39:29 25318.091797 T:1415574512 ERROR: File "/home/osmc/.kodi/addons/script.mpdc/resources/lib/xbmpc.py", line 209, in _read_line 20:39:29 25318.091797 T:1415574512 ERROR: line = self._rfile.readline() 20:39:29 25318.091797 T:1415574512 ERROR: File "/usr/lib/python2.7/socket.py", line 447, in readline 20:39:29 25318.093750 T:1415574512 ERROR: data = self._sock.recv(self._rbufsize) 20:39:29 25318.093750 T:1415574512 ERROR: timeout: timed out
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lzoubek/xbmc-plugin-mpdc/issues/11#issuecomment-257113766, or mute the thread https://github.com/notifications/unsubscribe-auth/AK7zb2ftLYa2C8AJbRfVETXngdOqyrZnks5q46rYgaJpZM4AVa0m.
Hi
I have a 30 MB mpd-db accessed by my pi over local network. Playing music works fine with pulseaudio, mpd can be accessed from the raspbian lxde with a couple of clients (I normally use ario, mpc and webclients). However in xbmc it hangs on "getting artists". What can I do?
kind regards, Henning