PHT-Problem: wrong jump after after os-functions in combination with writing to Dict



in my plugin TuneIn2017 I have two functions to start and stop recordings.
In Function RecordStart I use subprocess.Popen to call the external programm streamripper. If the call is successfull I write the process-ID (and more infos) to a Dict['PID'].
Then, before given a user-info with ObjectContainer, PHT jumps back at the beginning of function RecordStart and tries calling streamripper once more.
Nice to see on the basis of timestamps in PLugin-Log.
Other Players (Web, Media Player) works fine).

The same happens in the function RecordStop. Here the jump-back occurs after os.kill and removing the process-ID from the Dict.

Did I make a mistake or do we have a special PHT-Problem?

* Linux: PMS + OpenPHT
* Windows: PMS + OpenPHT-

Code-extract RecordStart:

call = subprocess.Popen(args, shell=False) # shell=False needs shlex

# output,error = call.communicate() # blocked, not needed here
Log('call: ' + str(call)) # Bsp.
if str(call).find('object at') > 0: # subprocess.Popen object OK
PID_line = '%s|%s|%s|%s' % (, url, title_org, summ)


Dict['PID'].append(PID_line) # without no PHT-Problem
title_new = L('Aufnahme') + ' ' + L('gestartet')
msg = '%s:
%s | %s | PID: %s' % (title_new, url, summ,
header = L('Info')
# at this point PHT jumps back to the start if this function. Return of
# ObjectContainer is not executed.
return ObjectContainer(header='Info', message=msg)

return oc

except Exception as exception:


######Plugins: [ARDMediathek2016](, [Plex-Plugin-KIKA_und_tivi](, [Plex-Plugin-3Sat_Mediathek](, [Plex-Plugin-Flickr](, [Plex-Plugin-TagesschauXL](, [Plex-Plugin-Phoenix_Mediathek](, [TuneIn2017](