A SageTV BMT agent which will allow us SageTV die hards to incoroporate our recordings directories into plex…(this is going awesome, and i have no issues with this)
A SageTV BMT Scanner which we will use to scan our sage recordings directories for files. The defailt Plex Series scanner doesn’t work because sage can’t always save the file with SxxExx info in the file name.
My question is How exactly do i go about debugging my scanner? I have scoured the forums here trying to find the solution but each ends with my print(‘test’) statements NOT being written to the Plex Media Scanner.log.
I am using a mixed set of environments to try and build this scanner hoping that one would allow me to log debug messages. I tried to use the following posts:
The paths specified to use in both posts do not exist. I am running currently on osx 10.6.8 with the most recent BETA of Plex. I am also trying to get this to run on win 7 64 bit with most recent version of beta server running on there as well.
Can anyone please point me in the direction of how exactly i get this to work:
print(‘This is a test’)
and point me to the file where i can see this output?
In reading some more i see that most likely the only way to get the print statements to show is by running the scanner from the commandline. When i try and do this i get file not found. the paths i found in this post do NOT exist on my mac osx system:
Just to close the loop on this, what i was doing wrong is i didnt’ have the actual plex server app file located in the correct spot. For following the post outlined above to work correctly your server app has to be loacted at
~/Library/Application Support/Plex/Plex Media Server.app
Now…I have the CLI version of the scanner working, but I still cannot under any circumstances see my logging. any ideas on how to get these print statements to show up on the CLI?
For anyone interested and following this the prints do NOT show up in the terminal window on mac. they show up at least for me in the console program under applications->utlities. Once you open that up the messages will show up in the left hand pane under Console MEssages! also for some reason print(‘asdfsdf’) isn’t working but print “alksdjflasjdf” does.
sheesh that was painful. we really need a dev guide for this.
Out of curiosity, what flavor of Windows is it that doesn't have a command line? I've been able to run the scanner just fine at the command line in XP/7/8.
I misread the earlier posts. I read it as the print statements in the Plex scanner were coming out on the mysterious Apple Mac console app. But now I see that this was only when you run from the CLI. I've never used a Mac but, from your helpful sarcasm, I assume the Mac console app is the same as the Windows command line? So there must be another facility on the Mac that allows you to run a command line (the terminal window?) and not get any output. That must come in handy.
However, for some reason the Plex framework supplies a simple-to-use logging facility for Agent development, but not Scanner development (even 2yrs later). Personally I'd like to run my scanner in Plex, not at the command line. So here is one very simple method of logging whilst doing that.
No sarcasm (helpful or not) intended. I was honestly curious, since I don't have firsthand experience with all Windows environments.
I don't think it's super helpful to require the scanner to be run from a CLI to produce usable output, necessarily, and FWIW I don't know of any way to get output from the Scanner on a Mac besides running it this way.
All that said and given the current state of logging in the Scanner, I think it's preferable to run from the command line for debugging vs. importing a Python library to do the same in this case. But to each his own, I suppose.