•   
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 19
  •   
Squeezebox for Kodi
(2020-09-30, 07:16)[email protected] Wrote: Hi

having a problem.
Squeezebox looks like not running.
Do not see squeezelite service running.

Reinstalling the Addon does not help so far.

How to verify squeezebox installation on Kodi?

Where should it be installed , which path?
Does it make sense to manually install it with apt-get install squeezelite?

Thanks T

I had the same thing, here’s my solution:

In Settings/System/Audio set ‘Keep audio device alive’ to ‘Off’ and also to be sure set ‘Play GUI sounds’ to ‘Never’.

If the audio device is in use by Kodi’s GUI sounds for one minute at boot Squeezelite will not launch. I think this vital piece of info should be made a sticky here somewhere.


On another note; I would still like input on how to update Squeezelite.

Gr, Nelisknip
Reply
(2020-09-30, 07:54)nielsknip Wrote:
(2020-09-30, 07:16)[email protected] Wrote: Hi

having a problem.
Squeezebox looks like not running.
Do not see squeezelite service running.

Reinstalling the Addon does not help so far.

How to verify squeezebox installation on Kodi?

Where should it be installed , which path?
Does it make sense to manually install it with apt-get install squeezelite?

Thanks T

I had the same thing, here’s my solution:

In Settings/System/Audio set ‘Keep audio device alive’ to ‘Off’ and also to be sure set ‘Play GUI sounds’ to ‘Never’.

If the audio device is in use by Kodi’s GUI sounds for one minute at boot Squeezelite will not launch. I think this vital piece of info should be made a sticky here somewhere.


On another note; I would still like input on how to update Squeezelite.

Gr, Nelisknip

thanks ok will check that.

Do you have the service running? squeezelite? 
sudo service squeezelite status
Reply
(2020-09-30, 08:35)[email protected] Wrote:
(2020-09-30, 07:54)nielsknip Wrote:
(2020-09-30, 07:16)[email protected] Wrote: Hi

having a problem.
Squeezebox looks like not running.
Do not see squeezelite service running.

Reinstalling the Addon does not help so far.

How to verify squeezebox installation on Kodi?

Where should it be installed , which path?
Does it make sense to manually install it with apt-get install squeezelite?

Thanks T

I had the same thing, here’s my solution:

In Settings/System/Audio set ‘Keep audio device alive’ to ‘Off’ and also to be sure set ‘Play GUI sounds’ to ‘Never’.

If the audio device is in use by Kodi’s GUI sounds for one minute at boot Squeezelite will not launch. I think this vital piece of info should be made a sticky here somewhere.


On another note; I would still like input on how to update Squeezelite.

Gr, Nelisknip

thanks ok will check that.

Do you have the service running? squeezelite? 
sudo service squeezelite status
Yes, it runs. After changing those settings, I rebooted my Rpi and it worked. The whole plugin comes to life, you'll see it when you go to the addon immediately.

However I still have problems with playback using Spotty due to this Squeezelite version being outdated.
Reply
(2020-09-30, 08:58)nielsknip Wrote:
(2020-09-30, 08:35)[email protected] Wrote:
(2020-09-30, 07:54)nielsknip Wrote: I had the same thing, here’s my solution:

In Settings/System/Audio set ‘Keep audio device alive’ to ‘Off’ and also to be sure set ‘Play GUI sounds’ to ‘Never’.

If the audio device is in use by Kodi’s GUI sounds for one minute at boot Squeezelite will not launch. I think this vital piece of info should be made a sticky here somewhere.


On another note; I would still like input on how to update Squeezelite.

Gr, Nelisknip

thanks ok will check that.

Do you have the service running? squeezelite? 
sudo service squeezelite status
Yes, it runs. After changing those settings, I rebooted my Rpi and it worked. The whole plugin comes to life, you'll see it when you go to the addon immediately.

However I still have problems with playback using Spotty due to this Squeezelite version being outdated.


ok , now after manual installatino it worked also for me.

thanks 

I thought the addon will install squeezelite itself
Reply
(2020-09-15, 19:31)kriznik Wrote: I have exactly same issue when playing from LMS it stops after 2-3seconds
and in log a lot of demuxers

Code:
2020-09-15 12:43:02.751 T:139637611808512  NOTICE: plugin.audio.squeezebox --> play started by lms server
2020-09-15 12:43:02.998 T:139637628593920   ERROR: Init: Error creating demuxer
2020-09-15 12:43:03.031 T:139637628593920  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder pcm_s16le
2020-09-15 12:43:03.163 T:139638178051840  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms

just to head up for anyone who needs to solve this issue:
(tested on libreelec and regular kodi on linux machine as well)

you need to do two edits:

1:
.kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py
comment this section
Code:

def onPlayBackStopped(self):
   '''Kodi event fired when playback is stopped'''
    if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False

2:
.kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py
Code:
elif self.lmsserver.status["title"] != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")
change to
Code:
elif self.lmsserver.status["title"].strip() != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")

it still throws demuxer errors into log, but playback is not interrupted and everything works!
Reply
(2020-10-05, 16:31)kriznik Wrote:
(2020-09-15, 19:31)kriznik Wrote: I have exactly same issue when playing from LMS it stops after 2-3seconds
and in log a lot of demuxers

Code:
2020-09-15 12:43:02.751 T:139637611808512  NOTICE: plugin.audio.squeezebox --> play started by lms server
2020-09-15 12:43:02.998 T:139637628593920   ERROR: Init: Error creating demuxer
2020-09-15 12:43:03.031 T:139637628593920  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder pcm_s16le
2020-09-15 12:43:03.163 T:139638178051840  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms

just to head up for anyone who needs to solve this issue:
(tested on libreelec and regular kodi on linux machine as well)

you need to do two edits:

1:
.kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py
comment this section
Code:

def onPlayBackStopped(self):
   '''Kodi event fired when playback is stopped'''
    if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False

2:
.kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py
Code:
elif self.lmsserver.status["title"] != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")
change to
Code:
elif self.lmsserver.status["title"].strip() != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")

it still throws demuxer errors into log, but playback is not interrupted and everything works!
I commented that section out but it resulted in not being able to stop playback at all.

It seems that xbmc.player calls the OnPlayBackStopped function if play is called while already playing.

I made below changes and it seems to work fine so far. I also had an issue with the playlist not always being updated. Maybe you can test it. I'd refine it a bit and then maybe write a pull request.

To test, put below content into a file, e.g. patch.txt and then apply patch -p1 < patch.txt from the .kodi/addons/ folder


Code:

diff -x '.*' -ruN ./plugin.audio.squeezebox/resources/lib/main_service.py .kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py
--- ./plugin.audio.squeezebox/resources/lib/main_service.py     2020-11-16 19:23:13.119458346 +0100
+++ .kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py  2020-11-16 19:16:19.090921696 +0100
@@ -139,12 +139,14 @@
                 self._prev_checksum = self.lmsserver.timestamp
                 log_msg("playlist changed on lms server")
                 self.kodiplayer.update_playlist()
-                self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index)
+                # self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index) # Don't start playing again
             elif not self.kodiplayer.is_playing and self.lmsserver.mode == "play":
                 # playback started
                 log_msg("play started by lms server")
-                if not len(self.kodiplayer.playlist):
-                    self.kodiplayer.update_playlist()
+                self._prev_checksum = self.lmsserver.timestamp # Set Timestemp on start of playing
+                self.kodiplayer.update_playlist() # Update playlist on start of playing
+                # if not len(self.kodiplayer.playlist):
+                #    self.kodiplayer.update_playlist()
                 self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index)

             elif self.kodiplayer.is_playing:
@@ -158,6 +160,7 @@
                     log_msg("Playlist is randomized! Reload to unshuffle....")
                     self.kodiplayer.playlist.unshuffle()
                     self.kodiplayer.update_playlist()
+                    self.kodiplayer.is_playing = False # it seems that xbmc.player calls the OnPlayBackStopped function if the play function is called while already playing.
                     self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index)
                 elif xbmc.getCondVisibility("Player.Paused") and self.lmsserver.mode == "play":
                     # playback resumed
@@ -169,12 +172,15 @@
                     self.kodiplayer.pause()
                 elif self.kodiplayer.playlist.getposition() != self.lmsserver.cur_index:
                     # other track requested
+                    self.kodiplayer.is_playing = False # it seems that xbmc.player calls the OnPlayBackStopped function if the play function is called while already playing.
                     log_msg("other track requested by lms server")
                     self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index)
                 elif self.lmsserver.status["title"] != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8"):
                     # monitor if title still matches
                     log_msg("title mismatch - updating playlist...")
                     self.kodiplayer.update_playlist()
+                    log_msg("other track requested by lms server")
+                    self.kodiplayer.is_playing = False # it seems that xbmc.player calls the OnPlayBackStopped function if the play function is called while already playing.
                     self.kodiplayer.play(self.kodiplayer.playlist, startpos=self.lmsserver.cur_index)
                 elif self.lmsserver.mode == "play" and not self.lmsserver.status["current_title"]:
                     # check if seeking is needed - if current_title has value, it means it's a radio stream so we ignore that
diff -x '.*' -ruN ./plugin.audio.squeezebox/resources/lib/player_monitor.py .kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py
--- ./plugin.audio.squeezebox/resources/lib/player_monitor.py   2020-11-16 19:23:13.119458346 +0100
+++ .kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py        2020-11-15 17:51:37.529612468 +0100
@@ -129,9 +129,11 @@
     def update_playlist(self):
         '''Update the playlist'''
         lmsplaylist = self.lmsserver.cur_playlist(True)
-        if len(self.playlist) > len(lmsplaylist):
-            log_msg("clearing playlist...")
-            self.playlist.clear()
+        log_msg("clearing playlist...") #
+        self.playlist.clear()           # Always clear playlist if requested, don't compare size
+#         if len(self.playlist) > len(lmsplaylist):
+#             log_msg("clearing playlist...")
+#             self.playlist.clear()
         for item in lmsplaylist:
             li, file_name = self.create_listitem(item)
             self.playlist.add(file_name, li, item["playlist index"])
Reply
Hi all,

The Squeezelite version is outdated in the Multimedia-tools package. Upgrading to latest should solve our issue I think.

I’ve requested the Libreelec devs on Github to do so; however they didn’t get around to it yet.

https://github.com/LibreELEC/LibreELEC.t...-722323185

Gr, Nelis
Reply
I don't know about libreelec as I use osmc. I had some findings when looking why the squeezelite service wasn't properly found:
  1. make sure suqeezelite knows its MAC address. I use the squeezelite from dpkg and on osmc it starts too early before network is up and doesn't configure its MAC address. So I pass it to squeezlite manually with the -m switch. BTW, you can also specify the MAC of another player on the network in the kodi plugin settings which is also great if you want to monitor squeezelite running on a different box.
  2. make sure both kodi and squeezelite can access the audio device. I think that kodi requires access to the audio device even if playing back a silent audio track. OSMC doesn't use pulseaudio by default so I installed it. Finally I decided to run pulseaudio as a system service on boot so both kodi and squeezelite would be able to access it. You can manage pulseaudio on your box from a linux pc by setting the PULSE_SERVER environment variable to your box hostname and running pavucontrol or paprefs (load the module module-native-protocol-tcp with options auth-anonymous=1 auth-ip-acl=127.0.0.1;192.168.1.0/24 or whatever your local ip range is)
The issue that the squeezebox kodi plugin would stop playback right after start seems not be related to the squeezelite version for me.
Reply
(2020-10-05, 16:31)kriznik Wrote:
(2020-09-15, 19:31)kriznik Wrote: I have exactly same issue when playing from LMS it stops after 2-3seconds
and in log a lot of demuxers

Code:
2020-09-15 12:43:02.751 T:139637611808512  NOTICE: plugin.audio.squeezebox --> play started by lms server
2020-09-15 12:43:02.998 T:139637628593920   ERROR: Init: Error creating demuxer
2020-09-15 12:43:03.031 T:139637628593920  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder pcm_s16le
2020-09-15 12:43:03.163 T:139638178051840  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms

just to head up for anyone who needs to solve this issue:
(tested on libreelec and regular kodi on linux machine as well)

you need to do two edits:

1:
.kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py
comment this section
Code:

def onPlayBackStopped(self):
   '''Kodi event fired when playback is stopped'''
    if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False

2:
.kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py
Code:
elif self.lmsserver.status["title"] != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")
change to
Code:
elif self.lmsserver.status["title"].strip() != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")

it still throws demuxer errors into log, but playback is not interrupted and everything works!

I must be doing something wrong with the commenting out in step 1, as everytime I do it, the service doesn't start up.

Is this the correct way to comment out the section?
Code:

'''' Commenting out everything below
def onPlayBackStopped(self):
''''
   '''Kodi event fired when playback is stopped'''
''''   
if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False
''''
Reply
(2020-11-16, 21:11)nielsknip Wrote: Hi all,

The Squeezelite version is outdated in the Multimedia-tools package. Upgrading to latest should solve our issue I think.

I’ve requested the Libreelec devs on Github to do so; however they didn’t get around to it yet.

https://github.com/LibreELEC/LibreELEC.t...-722323185

Gr, Nelis

A zip is now posted in that thread, for manually updating multimedia tools package with Squeezelite to 1.9.8 if you're impatient for the auto-update. First test seems very promising for me at least; nice synced music over multiple PIs without interruption.
Reply
(2020-11-18, 02:53)kidhazy Wrote:
(2020-10-05, 16:31)kriznik Wrote:
(2020-09-15, 19:31)kriznik Wrote: I have exactly same issue when playing from LMS it stops after 2-3seconds
and in log a lot of demuxers

Code:
2020-09-15 12:43:02.751 T:139637611808512  NOTICE: plugin.audio.squeezebox --> play started by lms server
2020-09-15 12:43:02.998 T:139637628593920   ERROR: Init: Error creating demuxer
2020-09-15 12:43:03.031 T:139637628593920  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder pcm_s16le
2020-09-15 12:43:03.163 T:139638178051840  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms

just to head up for anyone who needs to solve this issue:
(tested on libreelec and regular kodi on linux machine as well)

you need to do two edits:

1:
.kodi/addons/plugin.audio.squeezebox/resources/lib/player_monitor.py
comment this section
Code:

def onPlayBackStopped(self):
   '''Kodi event fired when playback is stopped'''
    if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False

2:
.kodi/addons/plugin.audio.squeezebox/resources/lib/main_service.py
Code:
elif self.lmsserver.status["title"] != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")
change to
Code:
elif self.lmsserver.status["title"].strip() != xbmc.getInfoLabel("MusicPlayer.Title").decode("utf-8")

it still throws demuxer errors into log, but playback is not interrupted and everything works!

I must be doing something wrong with the commenting out in step 1, as everytime I do it, the service doesn't start up.

Is this the correct way to comment out the section?
Code:

'''' Commenting out everything below
def onPlayBackStopped(self):
''''
   '''Kodi event fired when playback is stopped'''
''''   
if self.is_playing:
        self.lmsserver.stop()
        log_msg("playback stopped")
     self.is_playing = False
''''
Got this figured out - was my lack of formatting.

The following worked for me.
Code:
    def onPlayBackStopped(self):
        '''Kodi event fired when playback is stopped'''
        '''
        if self.is_playing:
            self.lmsserver.stop()
            log_msg("playback stopped")
        self.is_playing = False
        '''
This, combined with the updated Multimedia Tools allows me to play on the RPi4.  I just need to go back through the posts as I can't get 'stop' working via Kodi.  It works if I use a web interface into LMS against the player.
Reply
(2020-11-16, 20:44)dajoe Wrote:
(2020-10-05, 16:31)kriznik Wrote:
(2020-09-15, 19:31)kriznik Wrote:  
I commented that section out but it resulted in not being able to stop playback at all.

It seems that xbmc.player calls the OnPlayBackStopped function if play is called while already playing.

I made below changes and it seems to work fine so far. I also had an issue with the playlist not always being updated. Maybe you can test it. I'd refine it a bit and then maybe write a pull request.

To test, put below content into a file, e.g. patch.txt and then apply patch -p1 < patch.txt from the .kodi/addons/ folder

<< snip >>
dajoe - so does your post mean that instead of making the changes of commenting out the onPlayBackStopped(self) section you applied your 'patch' and you were able to both play and stop the music via Kodi successfully?

I've made the comment-out changes to onPlayBackStopped(self) and can play successfully, but can't stop via Kodi.

Thanks.
Reply
(2020-11-20, 02:57)kidhazy Wrote:
(2020-11-16, 20:44)dajoe Wrote:
(2020-10-05, 16:31)kriznik Wrote:
I commented that section out but it resulted in not being able to stop playback at all.

It seems that xbmc.player calls the OnPlayBackStopped function if play is called while already playing.

I made below changes and it seems to work fine so far. I also had an issue with the playlist not always being updated. Maybe you can test it. I'd refine it a bit and then maybe write a pull request.

To test, put below content into a file, e.g. patch.txt and then apply patch -p1 < patch.txt from the .kodi/addons/ folder

<< snip >>
dajoe - so does your post mean that instead of making the changes of commenting out the onPlayBackStopped(self) section you applied your 'patch' and you were able to both play and stop the music via Kodi successfully?

I've made the comment-out changes to onPlayBackStopped(self) and can play successfully, but can't stop via Kodi.

Thanks.

Yes, this is the case for me. It is still a bit rough but all in all it ist working for me.
Reply
The point is you need the OnPlayBackStopped() function to make kodi stop playback on lms. So by commenting it out you can no longer stop playback from Kodi.

What I did was setting is_playing to false where play() is called to prevent OnPlayBackStopped() from stopping playback right away. It will be reset to the correct value later-on
Reply
(2020-11-20, 13:05)dajoe Wrote: The point is you need the OnPlayBackStopped() function to make kodi stop playback on lms. So by commenting it out you can no longer stop playback from Kodi.

What I did was setting is_playing to false where play() is called to prevent OnPlayBackStopped() from stopping playback right away. It will be reset to the correct value later-on

Cheers dajoe.  I manually added your changes (my LibreElec dist on RPi didn't have patch) and the play/stop works.

The only issue I see is if I try to start a song from within a LMS playlist it just starts whatever is in the existing server playlist.  Starting individual songs from the artist/album view works fine.
Is this something you've seen, or possibly a typo I've made trying to manually update the files to match your patch/diff statements?

Thanks.
Reply
  •   
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 19
  •   



Logout Mark Read Team Forum Stats Members Help
Squeezebox for Kodi2
This forum uses Lukasz Tkacz MyBB addons.