Commit ee2a6f6c authored by David Trattnig's avatar David Trattnig
Browse files

Added transation handling for filesystem sources.

parent e0556516
......@@ -636,7 +636,13 @@ class SoundSystem():
if channel not in ChannelType.FILESYSTEM.channels:
raise InvalidChannelException
self.logger.info(SimpleUtil.pink("playlist.push('%s', '%s'" % (channel, uri)))
return self.__send_lqc_command__(self.client, channel, "playlist_push", uri)
self.enable_transaction()
result = self.__send_lqc_command__(self.client, channel, "playlist_push", uri)
self.logger.info("%s.playlist_push result: %s" % (channel, result))
self.disable_transaction()
return result
......@@ -649,8 +655,13 @@ class SoundSystem():
"""
if channel not in ChannelType.FILESYSTEM.channels:
raise InvalidChannelException
return self.__send_lqc_command__(self.client, channel, "playlist_seek", str(seconds_to_seek))
self.enable_transaction()
result = self.__send_lqc_command__(self.client, channel, "playlist_seek", str(seconds_to_seek))
self.logger.info("%s.playlist_seek result: %s" % (channel, result))
self.disable_transaction()
return result
def playlist_clear(self, channel):
......@@ -661,10 +672,13 @@ class SoundSystem():
raise InvalidChannelException
self.logger.info(SimpleUtil.pink("Clearing filesystem queue '%s'!" % channel))
return self.__send_lqc_command__(self.client, channel, "playlist_clear")
self.enable_transaction()
result = self.__send_lqc_command__(self.client, channel, "playlist_clear")
self.logger.info("%s.playlist_clear result: %s" % (channel, result))
self.disable_transaction()
return result
#
# Fading
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment