--- unity_clementine_daemon.py 2015-10-22 22:32:56.971335000 +0200 +++ unity_clementine_daemon_patch2.py 2015-10-23 18:57:25.680890306 +0200 @@ -23,6 +23,7 @@ import os import shutil import sqlite3 +import subprocess APP_NAME = 'unity-scope-clementine' LOCAL_PATH = '/usr/share/locale/' @@ -321,17 +322,17 @@ else: filename = result.uri dirname = os.path.dirname(filename) - os.system("xdg-open '%s'" % str(dirname)) + cmd=["xdg-open", str(dirname)] else: - albumtracks = '' + cmd = ["clementine","-a"] if result.uri.startswith('album://'): tracks = get_music_from_clementine(ALBUM_SQL % (album, artist)) for track in tracks: - albumtracks = '%s \'%s\'' % (albumtracks, track[1].decode('utf-8')) + cmd.append(track[1].decode('utf-8')) else: - albumtracks = result.uri - os.system('clementine -a %s' % albumtracks) - + cmd.append(result.uri) + sp=subprocess.Popen(cmd) + sp.communicate() return Unity.ActivationResponse(handled=Unity.HandledType.HIDE_DASH, goto_uri=None) def do_create_previewer(self, result, metadata):