SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #761  
Old 04-25-2011, 10:55 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by Slugger View Post
So am I understanding this correctly?
I've really got 3 files in the process, original source file (#1), the output of the CUT script (#2), and the output from HANDBRAKE (#3). The current version of things does the following:
1) MEDIASCAN find files and queues cut script.
2) CUT script takes #1 and outputs a cut variant in a different directory (#2),
3) CUT script then links the #1 metadata to #2.
4) last step in the CUT script deletes #1.
5) HANDBRAKE script takes #2 and outputs #3,
6) then (and this is where it all goes pear-shaped) links #3 to the same metadata yet again,
7) and lastly deletes #2.

So I believe it's as you suggest it should be. However, mf STILL references #1 not #2 for some reason....

I now realize, It's only because in earlier (and not working) testing that I hard coded the directory for #2 in the HANDBRAKE script... likely masking the problem?? Regardless there seem to be (at least for a while) two instances of the recording in the sagetv db screwing things up.

Two ideas; I could do a MediaFileAPI.DeleteFile AND the AddMediaFile at the end of the CUT script, ..... It may be a cleaner way to handle the file manipulations I want to do anyway, but I don't know the implications. I'll play with that idea later if I've got the nerve...

In the meantime, It may make sense to just use ".GetMediaFileForFilePath(SourceFile)", I can't think of a clean way to do this, but this may point the HANDBRAKE script at the correct file:
Code:
def SJQ4_METADATA = ["SJQ4_ID":"4695707", "SJQ4_TYPE":"MediaFile"]

import org.apache.commons.io.FilenameUtils
def mf = MediaFileAPI.GetMediaFileForID(SJQ4_METADATA["SJQ4_ID"].toInteger())
def SourceFile = (FilenameUtils.getBaseName(MediaFileAPI.GetFileForSegment(mf, 0).getAbsolutePath()) + ".ts")
def CUTOutputDir = "\\\\Sage-pc\\Mirror_Set\\Recorded TV\\"
SourceFile = new File(CUTOutputDir + SourceFile)
mf = MediaFileAPI.GetMediaFileForFilePath(SourceFile)
SourceFile = MediaFileAPI.GetFileForSegment(mf, 0)
println SourceFile
Hopefully that'll get me the right object info associated with the right file to proceed. Too bad there's not a MoveObjectToFile API call I could use!
Reply With Quote
  #762  
Old 04-26-2011, 06:03 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
If you're doing it as I suggested above, then the SJQ4_ID value must be different in the HANDBRAKE task because it should be pointing to the new MediaFile object you created in the CUT task. If the SJQ4_ID is the same in both tasks then that's the problem.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #763  
Old 04-26-2011, 05:15 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Slugger, thanks a million for the patient leading

OK, I've got to say this SJQ4 octopus is actually pretty damn cool once you start getting the upper hand!

I've still got some error checking to put in the code, but it all seems to be playing nicely now and cleaning up as it goes. I've now got processes running together that rename the recording to "Series - SxxExx" or "movie title (year)" format as appropriate, running comskip, waiting for me to review proposed edits, then cutting commercials with VideoReDo, and finally compressing and outputting an .mkv file when wanted with Handbrake, all the while maintaining metadata correctly. SWEET!

Again, thanks for all the help.
Reply With Quote
  #764  
Old 04-26-2011, 05:41 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
@slugger - I see that you have added a groovy skip for keep stb alive. Any ideas on how to determine whether a recording is just a " black screen" because your stb was powered down? In the past I thought of trying to schedule a test recording and then run that test recording through Comskip. You could then parse the Comskip logs to see if the recording looked bad. If it was bad then you could try sending a power on and try again.

I occasionally have failed recordings due to my Rogers SA3200 box being powered down. Unlike the Rogers HD boxes this box does not have a setting that will power on when you send a channel change. This means that if the box is powered down for some reason, such as due to a software update or power outage, then I will miss recordings. This box is just hooked up to an analog capture device so it creates regular SD MPEG-2 files which are pretty easy to Comskip.

Any other ideas on how to check for a valid recording?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #765  
Old 04-26-2011, 09:02 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by wayner View Post
@slugger - I see that you have added a groovy skip for keep stb alive. Any ideas on how to determine whether a recording is just a " black screen" because your stb was powered down? In the past I thought of trying to schedule a test recording and then run that test recording through Comskip. You could then parse the Comskip logs to see if the recording looked bad. If it was bad then you could try sending a power on and try again.

I occasionally have failed recordings due to my Rogers SA3200 box being powered down. Unlike the Rogers HD boxes this box does not have a setting that will power on when you send a channel change. This means that if the box is powered down for some reason, such as due to a software update or power outage, then I will miss recordings. This box is just hooked up to an analog capture device so it creates regular SD MPEG-2 files which are pretty easy to Comskip.

Any other ideas on how to check for a valid recording?
Video processing is not my strength nor does it interest me so I have no way to assist you on that task. You find a program to analyze the video and determine if you need to send the power command to your stb and SJQ can do the rest.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #766  
Old 04-26-2011, 09:35 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Fair enough. Anyone else have any ideas on what to use for the video processing?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #767  
Old 04-27-2011, 09:34 AM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by tmiranda View Post
Here is an interim release of the UI that adds a "Task Overview" menu which allows you to see the state of Tasks. Clicking on one of the tabs across the top row filters by Task state. Clicking on the row just below that sorts by that field. I'm too lazy to add a screen shot but once you look at the menu it should be obvious.

To install: Download the attached .zip file and place the extracted .xml in the install directory of your Sage server. Then go to the plugin manager and update the SJQ4 UI Mod.

I believe there is a bug in this release, but I don't remember what it is

Please post feedback here.

Tom
Like the new screen Tom! Sortable columns is really a nice touch. Two observations for you:

First, many of the 'titles' show blank even though when I click on them I get the right info in the pop-up... I think it has to do with the underlying files being deleted? The data is still there and would be nice to see as a 'history'. Maybe there could be leading * if the file is mia?

Second, any way of adding an action if a 'state' is clicked on? I imagined it would pop up a screen giving options to cancel, etc.
Reply With Quote
  #768  
Old 04-27-2011, 10:53 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by bikesquid View Post
Like the new screen Tom! Sortable columns is really a nice touch. Two observations for you:

First, many of the 'titles' show blank even though when I click on them I get the right info in the pop-up... I think it has to do with the underlying files being deleted? The data is still there and would be nice to see as a 'history'. Maybe there could be leading * if the file is mia?

Second, any way of adding an action if a 'state' is clicked on? I imagined it would pop up a screen giving options to cancel, etc.
I've not seen the first issue. I'll have to see why the pop-up is different form the main screen.

I thought about being able to change the state, but I was against duplicating functionality already available in another menu. I'll think about it some more.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #769  
Old 04-27-2011, 06:38 PM
phareous phareous is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 234
SQJ4 has been working fine for weeks and all of a sudden it stopped. All the tasks show as failed. I have two remote clients (running the service) and one running on the server as the task plugin. For all three of them, I can view the test script logs but the executable logs won't show (says they aren't available).

Any ideas on how I should start troubleshooting this?
Reply With Quote
  #770  
Old 04-27-2011, 07:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by phareous View Post
SQJ4 has been working fine for weeks and all of a sudden it stopped. All the tasks show as failed. I have two remote clients (running the service) and one running on the server as the task plugin. For all three of them, I can view the test script logs but the executable logs won't show (says they aren't available).

Any ideas on how I should start troubleshooting this?
Look in sjqagent.log for each task client.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #771  
Old 04-28-2011, 08:44 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Important Task Client Upgrade Note!!

IMPORTANT: A task client plugin update will be released at some point over the weekend (probably Sunday afternoon). If you also have the Jetty plugin installed then read the following carefully.

If you don't have Jetty installed then you can ignore this message. If you have the web interface, mobile interface, SageAlert, SRE or possibly other plugins installed then you also have Jetty installed and this applies to you.

Before upgrading the task client to the new release, you MUST upgrade Jetty to its latest version first. It is safe to upgrade the SJQv4 task client plugin only after you've upgraded Jetty. The required Jetty update is already available in the plugin manager and can be installed immediately.

If you upgrade the SJQv4 task client without upgrading Jetty first you will end up with duplicate jars in your SageTV\JARs folder and things aren't likely going to work as desired.

Unfortunately, the SageTV plugin manager has no way for us to automate this or prevent the conflict from occurring if you don't follow these instructions. If you don't update Jetty first then you will end up with duplicate jars, which will cause you problems.

Again, the task client update is scheduled for release by Sunday afternoon.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #772  
Old 04-28-2011, 09:35 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I just started trying to use SJQ4, and I am not having any success so far...

I am trying to follow the SJQ4 Comskip 1 example. In the "Executable", "Executable Arguments", and "Test Script" forward slashes are used instead of back slashes. In Windows paths have back slashes, not forward slashes. Forward slashes are only used for switches.

When typing in the data, there are spaces between each character. This is disconcerting, but the data entered does not have the extra spaces between the characters after completing each line.

The complexity seems to be about ten times greater than SJQ3, so I think the learning curve will be very steep.

I tried committing the SDComskip task and had about 70 "Returned" items. I suspect that was because I did not have the compskip_test.groovy script in place. Deleting all 70 of the items one by one is a pain. There should be a way to mark all of them to delete them all at once.

I can struggle more with SJQ4. First, are the forward slashes in the Comskip 1 example correct? I think the documentation is a bit weak to get SQJ4 working. Maybe there are steps that I am missing...

Dave
Reply With Quote
  #773  
Old 04-29-2011, 04:59 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by davephan View Post
I just started trying to use SJQ4, and I am not having any success so far...

I am trying to follow the SJQ4 Comskip 1 example. In the "Executable", "Executable Arguments", and "Test Script" forward slashes are used instead of back slashes. In Windows paths have back slashes, not forward slashes. Forward slashes are only used for switches.

When typing in the data, there are spaces between each character. This is disconcerting, but the data entered does not have the extra spaces between the characters after completing each line.

The complexity seems to be about ten times greater than SJQ3, so I think the learning curve will be very steep.

I tried committing the SDComskip task and had about 70 "Returned" items. I suspect that was because I did not have the compskip_test.groovy script in place. Deleting all 70 of the items one by one is a pain. There should be a way to mark all of them to delete them all at once.

I can struggle more with SJQ4. First, are the forward slashes in the Comskip 1 example correct? I think the documentation is a bit weak to get SQJ4 working. Maybe there are steps that I am missing...

Dave
For file paths in the test script and exe, the slashes can be either way since Java can handle them either way. If you're passing file paths in the arguments then the slashes would probably have to be correct for the OS you're running on (unless the application you're passing the args to can also handle the slashes either way).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #774  
Old 04-29-2011, 05:50 AM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I have "Returned" for status for each file that SJQ4 ran. I would like to try deleting the tasks and start over. How do I delete all the "Returned" tasks in the "Task Overview" section? I can delete one at a time, but there are 70 of them. It takes quite awhile to delete one at a time.

To create a task, the path is "Setup", "Sage Job Queue", "Show Clients", "Create New Task".

There does not seem to be a way to delete tasks, only create new tasks. How do I delete tasks?

Dave
Reply With Quote
  #775  
Old 04-29-2011, 07:33 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
To delete multiple tasks at once:

1) Connect directly to the SJQv4 database by following this document

2) Run ONE of the following queries:

To delete everything in the queue: DELETE FROM queue
(This will mess up the sync between task clients and the server if there are any tasks in running or started state when you run this query.)

To delete everything except running tasks: DELETE FROM queue WHERE state NOT IN ('RUNNING','STARTED')

To delete tasks that are waiting: DELETE FROM queue WHERE state = 'WAITING'

If these kinds of operations are missing from the UI then open a ticket with tmiranda and he may add the features to the UI.

To delete a configured task: Load a client, click on supported tasks, select the task you want to delete, on the next screen you should be given the option to edit the task or delete it. Choose delete.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...

Last edited by Slugger; 11-05-2013 at 10:50 AM.
Reply With Quote
  #776  
Old 04-29-2011, 10:28 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I've made some progress with the SJQ4 installation, but it still isn't working yet.

The SJQ4 "Task Overview" has jobs that show states "Skipped", "Failed", and "Complete". No files are actually processed with Comskip.exe.

I'm confused by the sjqagent.properties file located in the c:\sjqagent\config folder.

The sample is:

task.mytask.exe=C:/bin/mytask.exe
# task.mytask.args=/f /g /t
task.mytask.test=C:/scripts/mytask_precheck.groovy
# task.mytask.testargs=
# task.mytask.schedule=* * * * *
# task.mytask.resources=100
# task.mytask.maxprocs=1
# task.mytask.rcmin=0
# task.mytask.rcmax=0

Only two lines appear to be relevant in the sample are:
task.mytask.exe=C:/bin/mytask.exe
task.mytask.test=C:/scripts/mytask_precheck.groovy

The comskip_test.groovy file is located in my c:\comskip folder. I don't have a C:\bin folder.

I could put the comskip_test.groovy path in the second line, but I'm not sure what to do with the first line:
task.mytask.exe=C:/bin/mytask.exe

I did try to install the SJQ4 Task Client for Windows (v4.0.0.1509). The service is set to "automatic", but it will not start. I assume that the reason that the SJQ4 Task Client is because of a problem with the sjqagent.properties file. When I try to start the SJQ4 Task Client service, I get the following error:

Windows could not start the SJQ4 task client agent for Windows (v4.0.0.1509) on the local computer. For more information, review the system event log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1.

Dave
Reply With Quote
  #777  
Old 04-30-2011, 05:07 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by davephan View Post
I've made some progress with the SJQ4 installation, but it still isn't working yet.

The SJQ4 "Task Overview" has jobs that show states "Skipped", "Failed", and "Complete". No files are actually processed with Comskip.exe.
View the task output from the UI. Does it provide any clue as to what's happening?

Quote:
I'm confused by the sjqagent.properties file located in the c:\sjqagent\config folder.

The sample is:

task.mytask.exe=C:/bin/mytask.exe
# task.mytask.args=/f /g /t
task.mytask.test=C:/scripts/mytask_precheck.groovy
# task.mytask.testargs=
# task.mytask.schedule=* * * * *
# task.mytask.resources=100
# task.mytask.maxprocs=1
# task.mytask.rcmin=0
# task.mytask.rcmax=0

Only two lines appear to be relevant in the sample are:
task.mytask.exe=C:/bin/mytask.exe
task.mytask.test=C:/scripts/mytask_precheck.groovy

The comskip_test.groovy file is located in my c:\comskip folder. I don't have a C:\bin folder.

I could put the comskip_test.groovy path in the second line, but I'm not sure what to do with the first line:
task.mytask.exe=C:/bin/mytask.exe
All of those lines are relevant and control various aspects of the task itself.

http://code.google.com/p/sagetv-addo...ent.properties

The test script determines if your exe should run or not. The exe is the actual program you want to run against your object file. Nothing has to go in C:\bin\, that was just the example location. Put files where ever you want.

Quote:
I did try to install the SJQ4 Task Client for Windows (v4.0.0.1509). The service is set to "automatic", but it will not start. I assume that the reason that the SJQ4 Task Client is because of a problem with the sjqagent.properties file. When I try to start the SJQ4 Task Client service, I get the following error:

Windows could not start the SJQ4 task client agent for Windows (v4.0.0.1509) on the local computer. For more information, review the system event log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1.
Go to the directory where you installed the task client. In there is a logs dir. In there is a wrapper.log. That file should contain the details of why the service failed to start. Typical reason is it was unable to find java.exe on the system path.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #778  
Old 04-30-2011, 01:03 PM
Korny Korny is offline
Sage Advanced User
 
Join Date: Nov 2010
Location: Minnesota
Posts: 87
I know I'm missing something, but I'm reading the sage Mediafile API and the Getmedaifilemetadata. I really wish I had a coding back ground, but I'm slowly learning. In the end all I'm really trying to do is output filepath showtitle and seasonxepisode(example 3x04)
http://download.sage.tv/api/sage/api...lang.String%29
I'm just trying to grab the episode number, I'm using
Code:
def mediaFile = MediaFileAPI.GetMediaFileForID(SJQ4_METADATA['SJQ4_ID'].toInteger())
def fileName = "${SJQ4_METADATA['SJQ4_PATH']}/${SJQ4_METADATA['SJQ4_LAST_SEGMENT']}"
def showTitle = MediaFileAPI.GetMediaTitle(mediaFile)
def episode = MediaFileAPI.GetMediaFileMetadata(mediafile, EpisodeNumber)
def season = MediaFileAPI.GetMediaFileMetadata(mediafile SeasonNumber)
    if(!Tools.setExeArgs("\"$fileName\" \"$showTitle\" \"$seasonx$episode\"" ))
       return 1 // If the call fails then return the task to the queue and try again later...
     return 0 // The exe args have been modified, return success and fire off the exe!
I'm getting groovy.lang.MissingPropertyException: No such Property: mediafile for class
__________________
Intel I7 4790k @ stock speeds, 32 GB of ram. 8TB of recording space.

Last edited by Korny; 04-30-2011 at 01:28 PM. Reason: This may have become a moot point with sage 7.16, testing now
Reply With Quote
  #779  
Old 04-30-2011, 02:49 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by Korny View Post
I know I'm missing something, but I'm reading the sage Mediafile API and the Getmedaifilemetadata. I really wish I had a coding back ground, but I'm slowly learning. In the end all I'm really trying to do is output filepath showtitle and seasonxepisode(example 3x04)
http://download.sage.tv/api/sage/api...lang.String%29
I'm just trying to grab the episode number...
I think you want this:
Code:
def episode = MediaFileAPI.GetMediaFileMetadata(mediafile, "EpisodeNumber")
def season = MediaFileAPI.GetMediaFileMetadata(mediafile, "SeasonNumber")
notice the comma after mediafile in the season line and the " around episode and season number
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #780  
Old 04-30-2011, 03:06 PM
bikesquid's Avatar
bikesquid bikesquid is offline
Sage Aficionado
 
Join Date: Jan 2010
Location: California's North Coast
Posts: 392
Quote:
Originally Posted by Korny View Post
I know I'm missing something, but I'm reading the sage Mediafile API and the Getmedaifilemetadata. I really wish I had a coding back ground, but I'm slowly learning. In the end all I'm really trying to do is output filepath showtitle and seasonxepisode(example 3x04)
http://download.sage.tv/api/sage/api...lang.String%29
I'm just trying to grab the episode number, I'm using
def mediaFile = MediaFileAPI.GetMediaFileForID(SJQ4_METADATA['SJQ4_ID'].toInteger())
Quote:
Originally Posted by razrsharpe View Post
I think you want this:
Code:
def episode = MediaFileAPI.GetMediaFileMetadata(mediafile, "EpisodeNumber")
def season = MediaFileAPI.GetMediaFileMetadata(mediafile, "SeasonNumber")
notice the comma after mediafile in the season line and the " around episode and season number

You'll also need to change mediafile to mediaFile as variables are case sensitive... and your def statement above uses the capital version....
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 4 (0 members and 4 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) cslatt SageTV Customizations 48 06-11-2012 10:44 AM
SJQv4: Technology Preview Slugger SageTV v7 Customizations 39 12-17-2010 01:17 PM
SageTV Plugin Developers: Any way to see stats for your plugin? mkanet SageTV Software 4 12-12-2010 10:33 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
SJQv4: Design Discussion Slugger SageTV v7 Customizations 26 10-18-2010 08:22 AM


All times are GMT -6. The time now is 03:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.