Jump to content

Pointers into plugin API to parse folder containing SageTV recordings


richard.steele
Go to solution Solved by Luke,

Recommended Posts

richard.steele

I'd like a plugin that can interpret a directory of videos recorded by SageTV. While I've looked at some of the other plugins sources and have a basic plugin started, I haven't quite found what I'm looking for in the API to do this. Is there a way for a plugin to provide a content type on a library? Or would I provide a metadata parser that can interpret the properties file I have SageTV generating? I'm struggling a bit finding my way around the API, and I'm not familiar enough with it to even know what I'm looking for.

 

(I could just rename the files to get them into Emby, aEmbnd even started writing an external tool to do this, this might be a good way to introduce me to Emby development. Also, my wife and daughter aren't sold on Emby yet, so I might have a period of time running both Emby and SageTV. It would be convenient for me to be able to watch recordings from SageTV in Emby.)

Link to comment
Share on other sites

richard.steele

I'll take a look at that plugin.

 

As for the structure, there isn't much: a flat list of files. There are a couple of options that control the file names: you can include the episode name or not, and include can include the season/episode numbers or not. These got introduced over time, and unfortunately while I've included the episode name I didn't select to include the numbers. So, the file names appear in this general format, depending on which options are selected:

<show name>(-S##E##)(-episode name)-<show ID>-<segement #>.mpg

where the parenthetical parts are optional and the show ID is some kind of internal identifier (I think) unique to SageTV that can be ignored.

 

My plan to get around this is, for those shows that don't include the season and episode numbers, is to rely on a properties file that SageTV can optionally generate (using the CMT plugin) that contains this and a bunch of other metadata. I've attached an example.

 

 

 

AmericanExperience-Sealab-12403087-0.mpg.properties.zip

Link to comment
Share on other sites

PenkethBoy

Just a thought - could you not use Filebot to rename them and save yourself the time writing a plugin etc - unless thats your primary focus?

Link to comment
Share on other sites

  • Solution

We already support those file names but currently require series folders. That's on our list to support in the future though and then I think this will be all set.

  • Like 1
Link to comment
Share on other sites

richard.steele

I'd looked at using a file renamer but didn't find one that could work with the metadata embedded in the properties file (that I could make work; tried MCEBuddy with no luck). I hadn't come across filebot before and so started writing something in Java to do the work. I then thought it made more sense to maybe embed into Emby as a plugin, especially since I thought maybe then I wouldn't have to duplicate storage. But disk space is pretty cheap.

 

I took a peek at filebot and am encouraged that since the scripting is based on Groovy that there's a hope it could use the metadata in the properties files. Thanks for the tip.

 

Bigger picture, the more seamless importing from SageTV Emby can get the better. There has to be a fair number of SageTV holdouts like me still around.

Link to comment
Share on other sites

PenkethBoy

curious why is the embedded metadata important when if named correctly this comes from the metadata providers

 

also emby will read some file metadata already for Tv and Movies etc

Link to comment
Share on other sites

richard.steele

I think the "when if named correctly" is the key: not all, and in fact most, of my SageTV recordings aren't named in a way that third-party applications have been able to parse. Emby can't parse it at all right now. In my limited tinkering, FileBot seems to do better but still seems to need my input to resolve ambiguities. I'm looking for something dead reliable and totally automated that can run in the background.

 

I'll continue to tinker with both Filebot and Emby plugins.

 

Thanks,

Rich

Link to comment
Share on other sites

PenkethBoy

looking for something dead reliable and totally automated that

 

good luck - dont think that exists

 

as all depend on the metadata providers and if you have poorly named files :) then you will have problems - but once renamed to Emby / common standards etc - you only have to do it once - things will always work even if you have to rebuild your db in the future etc

Link to comment
Share on other sites

Happy2Play

Isn't this just a issue of Emby not supporting episodes outside a SERIES folder, as Luke mentioned?

 

As there is nothing wrong with the naming scheme.

Edited by Happy2Play
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...