This project has moved. For the latest updates, please go here.

operation of custom commands

Mar 14, 2014 at 10:27 PM
I am writing some code to both send a notification and update XBMCs library on a per show basis. The communications to xbmc have been pretty well finalized buti am having some trouble with launching this application using the postcustomcommand settings. My question is about compatibility. If I launch my custom proogram from cmd window in win7 it runs fine and exits. Are custom commands not capable of launching .py scripts even if the python interpreter is installed on the machine?
Coordinator
Mar 14, 2014 at 11:50 PM
Note that customcommands are run from service space (session 0) where we you cmd command is from user space (session 1). Hence there may be some differences.
HAving said that please post your profiles.conf file section which shows your custom commands. KEY point to note here is that you run your PY files from a CMD space, which is a Shell. Custom command launches your executable directly as an application (i.e. NO shell). So where as .py commands may run in cmd.exe (shell), .py is NOT an executable application by itself.

You may need to modify your custom command to launch a CMD.exe and then use the /C switch to invoke your py files. Or start the python runtime and then point to your PY file.

Again, post your config here and then it can be helped.
Marked as answer by rboy1 on 3/14/2014 at 8:51 PM
Mar 15, 2014 at 12:28 AM
[TS Unprocessed]
Description=Use this to copy the WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
PreConversionCommercialRemover=true
PostCustomCommandPath=C:\Python27\projects\xbmcNotifier\XBMCnotifier.py
PostCustomCommandParameters=%convertedfile% %showname% %season%## %episode%## %episodename%
PostCustomCommandHangPeriod=10
PostCustomCommandCritical=false
PostCustomCommandShowWindow=True

Above is what I tried. I also threw together a quick and dirty batch file to collect the arguments supplied by MCEBuddy and echo them so that they would end up in the log. What I found with that is PostCustomCommand never shows up in the log files. Only PreMeta and plain ole CustomCommand do. I went back to the profiles.conf and changed all the PostCustomCommands to CustomCommands and the batch file ran and echoed some data back to the log.

The reason I want to run the .py script directly is for logging purposes. Haven't tried to run the .py in the way you mentioned above (don't know how)
Coordinator
Mar 15, 2014 at 1:29 AM
Can you post your conversion log file where the post custom command does not work

Mar 15, 2014 at 1:52 AM
LOG File

This is a quick and dirty conversion which used unprocessed ts profile and no commskip. (link expires on 20MAR2015)
Coordinator
Mar 15, 2014 at 3:50 AM
I think part of the issue is that you're using an outdated version of MCEBuddy, upgrade to the latest 2.3.15 and it should fix your issue. If you need more help we'll be glad to support it, unfortunately we can't debug or support old versions. (400+ changes since 2.3.13)
Mar 15, 2014 at 12:34 PM
I will have to donate and get the early release program for that correct? I am trying to see if this program will work before I donate
Coordinator
Mar 15, 2014 at 4:47 PM
Please see the documentation it states the post custom is available in 2.3.14 an later.

"

5. (v.2.3.14+) At the very end of the conversion process after all the files are moved to the destination directory. To do so the first 4 parameters need to be defined for the profile for which a post conversion custom command needs to be run.

PostCustomCommandPath=<Full Path/Relative of the executable>

PostCustomCommandParameters=<Optional parameters to be passed - see below for list>

PostCustomCommandHangPeriod=<0 or +ve number>

PostCustomCommandCritical=<true or false>

PostCustomCommandUISession=<true or false>

PostCustomCommandShowWindow=<true or false>

"


Jan 13, 2015 at 11:44 PM
Hi, did you ever get your python script running? If so, what did the profile look like? I am still having issues.