2014-04-01, 16:04
I've had some wired problems with the plugin, it just wouldn't work correctly.As of now, I think the problem lies in how I start the plugin automatically via autoexce.py:
But the script automatically adds some prerequists to the autoexce.py on every start. It doesn't check if these prerequisits are arelady present but just removes them and adds them again at the end of the file. Thus, the command to start the script is exceuted before it is initialized. I just removed line 66&67 in pm.py after the first start and wrote autoexece.py by myself.
Maybe this is of use to someone.
pm.py:
autoexece.py:
PHP Code:
xbmc.executebuiltin("RunAddon(script.lastfmplaylistgeneratorPM)")
But the script automatically adds some prerequists to the autoexce.py on every start. It doesn't check if these prerequisits are arelady present but just removes them and adds them again at the end of the file. Thus, the command to start the script is exceuted before it is initialized. I just removed line 66&67 in pm.py after the first start and wrote autoexece.py by myself.
Maybe this is of use to someone.
pm.py:
PHP Code:
#66 #removeauto('lastfmplaylistgeneratorpm')
#67 #addauto("if os.path.exists('" + os.path.normpath(process).replace('\\','\\\\') + "'):#lastfmplaylistgeneratorpm\n\tos.remove('" + os.path.normpath(process).replace('\\','\\\\') + "')","lastfmplaylistgeneratorpm")
autoexece.py:
PHP Code:
import xbmc#lastfmplaylistgeneratorpm
import os#lastfmplaylistgeneratorpm
import time#lastfmplaylistgeneratorpm
time.sleep(2)#lastfmplaylistgeneratorpm
if os.path.exists('C:\\Users\\Administrator\\AppData\\Roaming\\XBMC\\addons\\script.lastfmplaylistgeneratorPM\\resources\\pm.pid'):#lastfmplaylistgeneratorpm
os.remove('C:\\Users\\Administrator\\AppData\\Roaming\\XBMC\\addons\\script.lastfmplaylistgeneratorPM\\resources\\pm.pid')#lastfmplaylistgeneratorpm
xbmc.executebuiltin("RunAddon(script.lastfmplaylistgeneratorPM)")