diff --git a/modules/communication/liquidsoap/initthread.py b/modules/communication/liquidsoap/initthread.py index 20b491964ef9234df420cae1b8af04b68324d737..4e92586c633675f078886515d9c7d645ffe45666 100644 --- a/modules/communication/liquidsoap/initthread.py +++ b/modules/communication/liquidsoap/initthread.py @@ -89,17 +89,21 @@ class LiquidSoapInitThread(threading.Thread): if channel == ScheduleEntryType.FILESYSTEM: - # Have to seek? Calc how many seconds were missed - now_unix = time.mktime(datetime.datetime.now().timetuple()) - seconds_to_seek = now_unix - self.active_entry.start_unix - # TODO For some reason LiquidSoap cue-points don't work. Actually, # this would be the ideal approach to seek. Investigate some solution! # if seconds_to_seek < 0: # seconds_to_seek = 0 # self.liquidsoapcommunicator.activate(self.active_entry, seconds_to_seek) + + self.liquidsoapcommunicator.activate(self.active_entry) + rest_of_playlist = self.active_entry.get_next_entries() + for entry in rest_of_playlist: + self.logger.info("ACTIVATING NEXT ENTRY: %s" %entry) + self.liquidsoapcommunicator.activate(entry) - self.liquidsoapcommunicator.activate(self.active_entry, seconds_to_seek) + # Have to seek? Calc how many seconds were missed + now_unix = time.mktime(datetime.datetime.now().timetuple()) + seconds_to_seek = now_unix - self.active_entry.start_unix # And seek these seconds forward if seconds_to_seek > 0: