]> git.parisson.com Git - deefuzzer.git/commitdiff
fix channel.sync when not relaying, add current media logging
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sat, 23 Aug 2025 12:12:20 +0000 (14:12 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sat, 23 Aug 2025 12:12:20 +0000 (14:12 +0200)
deefuzzer/station.py

index 07f9c01057e18e3cefa2ed7892a780aad67c2e41..2c377ff9779d490d9f8d6236fc4cb8cf8ab6c9d3 100644 (file)
@@ -632,6 +632,7 @@ class Station(Thread):
                 else:
                     media = self.playlist[self.id]
                     self.id = (self.id + 1) % self.lp
+                    self._info('Playing media: ' + media)
 
             self.q.get(1)
             try:
@@ -982,6 +983,8 @@ class Station(Thread):
                         try:
                             # Send the chunk to the stream
                             self.channel.send(self.chunk)
+                            if not self.relay_mode:
+                                self.channel.sync()
                             self.is_alive = True
                         except:
                             self._err('could not send the buffer')
@@ -996,6 +999,8 @@ class Station(Thread):
                                 self.channel.set_metadata({'song': self.song, 'charset': 'utf8', })
                                 self._info('channel restarted')
                                 self.channel.send(self.chunk)
+                                if not self.relay_mode:
+                                    self.channel.sync()
                                 self.is_alive = True
                             except:
                                 self._err('could not send data after restarting the channel')