View Full Version : Simple way to access metadata based on file name?
11-15-2010, 08:33 AM
Hi, I'm new to Sage, (convert from BTV), and I'm hoping this is a simple question, but I haven't been able to find the answer in the forums.
Is there any way (API, or web service?) to get metadata from a Sage recording based on the filename? I just want the internal SageTV metadata, not TVDB etc..
I want to scan a directory of sage recordings and programatically get the meta data about them.
11-15-2010, 11:40 AM
There are a couple of solutions.
1. sagex-api/sagex-services (using either Java, or http)
2. Nielm's WebServer
For #1, you can either use java an get a mediafile based on the file path, and then use the MediaFileAPI, AiringAPI, and ShowAPI classes for accessing the various information. Or, you can use the sagex-services, which expose the sage api over http and allows you to return xml or json. If you have sagex-services plugin installed, just point your browser to "http://YOURSERVER:8080/sagex/api"
It will bring back a help page.
I've never used #2, but nielm's webserver can return information in xml.
11-15-2010, 11:53 AM
...For #1, you can either use java an get a mediafile based on the file path...
I've been playing around with the sagex/api page, but cant find a call to get info based on file path? can you point me to the right method i should be calling?
UPDATE: I believe I found it with: GetMediaFileForFilePath()
vBulletin® v3.7.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.