Kodi Community Forum
[ARCHIVED - WON'T UPDATE] XSqueeze - Squeezebox player for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [ARCHIVED - WON'T UPDATE] XSqueeze - Squeezebox player for XBMC (/showthread.php?tid=122199)



- sdsnyr94 - 2012-03-07

WOW! This looks fantastic!

I initially kept getting an error stating that that the plugin was broken and if I wanted to disable it... probably caused by the Artist Slideshow plugin not installing fast enough. (This is on my work Ubuntu laptop... I'll see if Openelec does the same for me later.)

For me, the only thing missing is a cleaner way (GUI Based) to choose the music. My wife never has cared for the way you navigate the menus on the BOOM, so she gets equally frustrated here and just uses the IPAD app.

As always, great work on the add-on, and thanks for all the time you have put into it.


- bossanova808 - 2012-03-08

Yeah I've worked out you must be on RC2, and I probably should have waited a day for the artist slideshow to update around the world...but it re-activates soon as AS drops in.

Yes I'd like to work on music choosing etc. next, but that's a big job pretty much separate from what's been done. Indeed, my first thoughts are to write it initially as a plugin and just use the list building stuff from XBMC which give quite a bit for free, and then bind the running of this to a button on the XSqueeze page.

That being said, my family has some major real life stuff coming up (surgery) - so my window of opportunity is narrowing rapidly and it might well be a few months before I can get into this. But then again it might be just the distraction I need.


- bossanova808 - 2012-03-08

pkscuot Wrote:I've created a skin for folks using XBMC's default skin, Confluence. It trades some of the Squeezebox extras for being as true as possible to the Confluence music player. The biggest loss is that you only get the next two upcoming tracks and no album art for the upcoming tracks. I think all the other squeezey goodness is there.

The zip file can be downloaded directly from:

https://github.com/downloads/pkscout/script.artistslideshow/xsqueeze.skin.confluence.zip

You need to put this in the addon folder under resources/skins. I'll let bossanova808 make a decision about whether to include it in the distribution.

Happy to include it for sure as an alternate.

Only thing is, I think because you've been testing with an older version, it flakes out with 0.4 as it's missing some of the controls that are programmatically set (the playstate icon which shows play/pause/stop). I will add try/except clauses around those, as I guess not every skin file has to implement all the controls, but a quick test here with that done still fails a bit - I have no SB display lines, the server/player stuff is hidden under the weather etc.

(Lns 230-4 of NowPlayingWindow.py become:

Code:
try:
          self.getControl( constants.PLAYSTATE  ).setImage( mode + '.png' )
        except:
          pass

I don't want to push a new version yet just for this so could you maybe add that code and then just check all is cool with your skin file, as even with that I seem to be missing some stuff...

....also re: our discussion yesterday I tested on Mac last night and it is indeed failing. I really don't have a python set up on Mac for testing, and I need to know some type of call that works to ID the mac platform ... I am using platform.platform() but have also tried platform.system(), both of which should work and return something starting with Darwin, but they seem to raise an exception. I need to set up ssh/python/a keyboard etc before I have any ope of solving this... so if ANYONE with a Mac can just run those in (XBMC) python....and tell me what happens, that would be awesome.


- pkscout - 2012-03-08

bossanova808 Wrote:Only thing is, I think because you've been testing with an older version, it flakes out with 0.4 as it's missing some of the controls that are programmatically set (the playstate icon which shows play/pause/stop). I will add try/except clauses around those, as I guess not every skin file has to implement all the controls, but a quick test here with that done still fails a bit - I have no SB display lines, the server/player stuff is hidden under the weather etc.
I just updated the addon. I'll take a look at updating the skin file. On my setup (admittedly with the older addon) the two green lines (which I presume as the slingbox display lines) were in the upper left corner and didn't conflict with the weather. As I said though, I'll take another look.

Quote:....also re: our discussion yesterday I tested on Mac last night and it is indeed failing. I really don't have a python set up on Mac for testing, and I need to know some type of call that works to ID the mac platform ... I am using platform.platform() but have also tried platform.system(), both of which should work and return something starting with Darwin, but they seem to raise an exception. I need to set up ssh/python/a keyboard etc before I have any ope of solving this... so if ANYONE with a Mac can just run those in (XBMC) python....and tell me what happens, that would be awesome.
I'll stick this on my list to look at as well.


- pkscout - 2012-03-08

pkscuot Wrote:I just updated the addon. I'll take a look at updating the skin file. On my setup (admittedly with the older addon) the two green lines (which I presume as the slingbox display lines) were in the upper left corner and didn't conflict with the weather. As I said though, I'll take another look.

I fixed my Confluence skin and uploaded a new copy, available at:

https://github.com/downloads/pkscout/script.artistslideshow/xsqueeze.skin.confluence.zip

I did run into a problem though. Even with the Default skin I was getting nothing but my fallback artwork. I took a peak, and you are calling Artist Slideshow with the artist name as XSQUEEZE_TRACK_0_UNIARTIST. Neither the Default skin or mine have that property in there, and even if you add it, it doesn't work because Artist Slideshow doesn't try to decode the unicode. I know it did at one point, but I had to strip it out because it was causing some other issues.

So I changed XSqueeze to call Artist Slideshow with XSQUEEZE_TRACK_0_ARTIST, and now it works fine.


- bossanova808 - 2012-03-08

(XSQUEEZE_TRACK_0_UNIARTIST is definitely added as a property directly by XSqueeze and works fine with my testing here)... but if you're not doing unicode that way anymore I will change it the non unicode for sure. That said, it was working with unicode names this way?


- bossanova808 - 2012-03-08

Ok yep that's all good and I will add it as an alternate but it's a bit too vanilla for my tastes - I figure I've got this massive screen, I want some info on it Wink

Many thanks again for all your help!


- bossanova808 - 2012-03-08

Pushed 0.4.1 - I think this might solve the mac platform detection thingy, and has safer exit handling.


- bossanova808 - 2012-03-08

Ok platform detection OSX works, but apparently I still can't start a process on that platform...grrr...

22:57:16 T:2959286272 ERROR: Error Type: <type 'exceptions.OSError'>
22:57:16 T:2959286272 ERROR: Error Contents: [Errno 10] No child processes
22:57:16 T:2959286272 ERROR: Traceback (most recent call last):
File "/Users/MacMini/Library/Application Support/XBMC/addons/script.xsqueeze/default.py", line 51, in <module>
output, result = subprocess.Popen(exe, shell=False, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
File "/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/subprocess.py", line 1134, in _execute_child
_eintr_retry_call(os.waitpid, self.pid, 0)
File "/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/subprocess.py", line 465, in _eintr_retry_call
return func(*args)
OSError: [Errno 10] No child processes


- pkscout - 2012-03-08

bossanova808 Wrote:Ok yep that's all good and I will add it as an alternate but it's a bit too vanilla for my tastes - I figure I've got this massive screen, I want some info on it Wink

Many thanks again for all your help!

Yea, that's definitely a personal preference. I like the more minimalist style of the default Confluence music player, and with all those great artist images, I don't want anything getting in the way. Big Grin


- pkscout - 2012-03-08

bossanova808 Wrote:Ok platform detection OSX works, but apparently I still can't start a process on that platform...grrr...

I made the following changes to constants.py:

Added stat module:
import stat

Then on line 173 I changed the chmod stuff to:
os.chmod(EXE[0], stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)

At least on my OSX machine that properly sets the bits to rwxr-xr-x and lets XSqueeze run without manually changing anything.

P.S. I don't know if this was you or me, but my included skin file doesn't have the 720p directory. Without it you both have to rename the folder and move the XSqueezeNowPlaying.xml file into a newly created 720p directory in the skin directory.


- bossanova808 - 2012-03-09

hmm, the chmodding was actually working ok for me...or at least, reporting success (i.e. not raising an exception). Are you saying with the above chmod it all works?

It was actually the call for squeezeslave to POpen that was failing for me. I used to use call(), and I think that worked - it's just I need to grab the output when detecting audio outputs/servers....so maybe I can change it back to call for running main()

..but if it's jsut a wierd chmod thing that would be better. You could actually play music on the Mac with just those changes?


- bossanova808 - 2012-03-09

Good point re: skin file, I have put it in a 720p folder now.


- bossanova808 - 2012-03-09

hmmm thinking about that more, I found os.chmod failed on various flavours of linux so I moved to os.system...

I really need to sort out my mac setup...


- pkscout - 2012-03-09

bossanova808 Wrote:hmm, the chmodding was actually working ok for me...or at least, reporting success (i.e. not raising an exception). Are you saying with the above chmod it all works?

It was actually the call for squeezeslave to POpen that was failing for me. I used to use call(), and I think that worked - it's just I need to grab the output when detecting audio outputs/servers....so maybe I can change it back to call for running main()

..but if it's jsut a wierd chmod thing that would be better. You could actually play music on the Mac with just those changes?

With this change I can launch XSqueeze and then play stuff with no other manual changes. With the code as shipped the OSX executable was still showing rw-r--r-- even after I tried to launch XSqueeze. So python might not have been throwing an exception, but it definitely wasn't doing the chmod. That's probably why the POpen was failing.

I find with both OSX and Windows I sometimes have to try two or three different python way of doing things before I find one that works on all platforms.