SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   Plex Scanner and BMT Agent for SageTV (http://forums.sagetv.com/forums/showthread.php?t=57842)

PiX64 01-09-2012 01:21 PM

Plex Scanner(s) and BMTAgent for SageTV - Code Release 2!
 
Updated link to information/instructions Jan 6, 2016:

https://github.com/ai7/sagetv-for-plexmediacenter






================================================================
Old info below
================================================================
Google code site:

http://code.google.com/p/sagetv-for-plexmediacenter/

previously posted images in another thread, to save space not going to repost...just link :-)

http://forums.sagetv.com/forums/show...&postcount=202

:goodjob:

************************

The Newest code release 6 has been placed on the google code site under downloads.

1) shutdown plex completely
2) unzip new download into correct location
3) restart plex
4) perform a DEEP scan

done and done!

let us know if you have questions.

PiX64 01-09-2012 09:01 PM

Quote:

Originally Posted by cslatt (Post 524216)
Might be best to use the AiringID from the filename as the ID, then you could look up using GetAiringForID rather than GetMediaFileForFilePath.

Thats an interesting idea but does cause a few issues with the current scanner. ill think about that. This would solve another issue we are having and trying to get around by using the sagex.js custom functions.

thanks for the idea!

Slugger 01-09-2012 10:33 PM

Quote:

Originally Posted by PiX64 (Post 524261)
Thats an interesting idea but does cause a few issues with the current scanner. ill think about that. This would solve another issue we are having and trying to get around by using the sagex.js custom functions.

thanks for the idea!

Careful with this... the airing id encoded in the file name is not always the airing id of the MediaFile object in wiz.bin. If the user's wiz.bin identity counter has been reset by the core then the airing ids would not match up. Very unlikely on a fresh v7.1.5+ install, but very likely on an upgraded wiz.bin where the user is using a wiz.bin from v6 or older. v6 and older users are very likely to have had their wiz.bin identity id reset at least once on them.

GetMediaFileForFilePath() is a safer choice.

PiX64 01-10-2012 07:48 AM

Quote:

Originally Posted by Slugger (Post 524270)
Careful with this... the airing id encoded in the file name is not always the airing id of the MediaFile object in wiz.bin. If the user's wiz.bin identity counter has been reset by the core then the airing ids would not match up. Very unlikely on a fresh v7.1.5+ install, but very likely on an upgraded wiz.bin where the user is using a wiz.bin from v6 or older. v6 and older users are very likely to have had their wiz.bin identity id reset at least once on them.

GetMediaFileForFilePath() is a safer choice.

Thanks Slugger. I didn't know that.

PiX64 01-10-2012 01:09 PM

Just as an update to everyone -

We are getting close to some initial testing by darci and some document writting.

We have removed the need for the user (you all) to add your own mappings and such via properties files by leverging some really cool stuff Sean built into the sagex apis. This will require you to add a .js file to your sagetv server, but its no big deal at all. youll drop it there and forget about it.

We are still having one issue which Brian has posted on Plex forum. For some reason, even using the id, we are unable to get plex to update its metadata. all of our metadata is successfully written to the xml file, but plex just doesn't want to pick it up..

once that is resolved we should be super close to an initial release.

*we also have poster/banner/fanart working:clap:

wayner 01-10-2012 01:38 PM

Can you reuse the Sage Fanart folders or does it store a separate copy for Plex? It might be nice to share the folders so that any maintenance you do on Fanart, like deleting Foreign language posters, only has to be done once. For a while my Sage system seemed to think I spoke Italian since I seemed to be downloading lots of Italian covers.

LehighBri 01-10-2012 02:18 PM

Quote:

Originally Posted by wayner (Post 524321)
Can you reuse the Sage Fanart folders or does it store a separate copy for Plex? It might be nice to share the folders so that any maintenance you do on Fanart, like deleting Foreign language posters, only has to be done once. For a while my Sage system seemed to think I spoke Italian since I seemed to be downloading lots of Italian covers.

No, not using Plex's API. Plex creates it's own local copy of all artwork in its cache.

Also, I would characterize the first release as "alpha". I'd still like to clean up the code a bit, move more things into functions, but it's operating quite nicely at the moment with just a couple more issues we're working through.

wayner 01-11-2012 09:45 AM

So I am guessing that means you can't create custom artwork? TVDB doesn't allow entries for sports so I have created custom banners, posters and backgrounds for the sports that I watch.

By the way - will sports recordings import into Plex as TV shows using your scanner?

PiX64 01-11-2012 09:47 AM

Quote:

Originally Posted by wayner (Post 524394)
So I am guessing that means you can't create custom artwork? TVDB doesn't allow entries for sports so I have created custom banners, posters and backgrounds for the sports that I watch.

By the way - will sports recordings import into Plex as TV shows using your scanner?

If those banners/fanart are used by sage and known about by BMT, then yes the plex agent will find them when calling BMT and use them in plex.

wayner 01-11-2012 09:49 AM

Awesome - well done! So you copy the image file(s) to the Plex cache locations?

And what about sports - will the scanner import all types of TV recordings to Plex?

PiX64 01-11-2012 09:52 AM

Quote:

Originally Posted by wayner (Post 524396)
Awesome - well done! So you copy the image file(s) to the Plex cache locations?

And what about sports - will the scanner import all types of TV recordings to Plex?

Yup that is what i am working on now. so far what is working
is

following naming conventions
show-episode-randomnumbers
show-SxxExx-epsidoes-randomnumbers

following extensions
.mkv
.mpg
.avi

working on .ts support right now which is pissing me off at the moment :-)

darcilicious 01-11-2012 09:55 AM

Quote:

working on .ts support right now which is pissing me off at the moment :-)
Bwahahaha ;)

(not that I'm pleased with my state of affairs regarding Plex and my .ts files either! :p )

wayner 01-11-2012 09:56 AM

Are multiple dashes allowed? The BMT standard for TV shows is show -- episode.-random numbers so many of my TV files imported from elsewhere follow this standard to be able to show up into Sage with metadata using BMT.

PiX64 01-11-2012 09:57 AM

do you put imported TV into your recordings directories?

wayner 01-11-2012 09:59 AM

No - they go into other folders in my Video Library and I also often move recordings to Video Library folders based on the show name, ie

\\Servername\Kids shows\Dora the Explorer\Dora the Explorer -- Fish out of water.avi or
\\Servername\Kids shows\Dora the Explorer\Dora the Explorer -- S01E19 -Fish out of water.avi

PiX64 01-11-2012 10:06 AM

K, so the plex scanner and agent will only be used for your recordings directories right now. you will need to use the standard OOTB plex series scanner and TVDB lookup for all other content you want to add to your plex library.

so for me i have
recordings
recordingsf
recordingsG

all set as 'Sage Recordings' using the SageTV Scanner and BMTAgent

i then have

UNRAID/../TVShows/
setup as Imported TVShows name
using
Plex Series Scanner
TVDB Agent

jnmfox 01-11-2012 10:53 AM

Will this work with a jailbroken Apple TV 2 with aTV Flash (black) installed? aTV Flash includes Plex Client software.

Recorded TV, dvd rips, and blu-ray rips?

PiX64 01-11-2012 10:59 AM

Quote:

Originally Posted by jnmfox (Post 524411)
Will this work with a jailbroken Apple TV 2 with aTV Flash (black) installed? aTV Flash includes Plex Client software.

Recorded TV, dvd rips, and blu-ray rips?

I think there is a bit of confusion as to what the SageTV Scanner / BMT Agent actually does.

So Plex is a stand alone media server that allows you to grab media from all different sources and locations. Plex has a set of clients that work with it (ios, atv2, roku, pc client, so on and so forth).

Up until now there was a mediocer way at best to include your Sage Recordings content in your Plex media Server setup. The SageTV Scanner will scan your sage recordings directory and find all of your RECORDED files. the BMT Agent will then go out to BMT and grab as much metadata as it can about your RECORDINGS (recorded TV and Movies) and populated the plex objects with the data. Plex will then Add your SAGETV recordinsg content to its list of "known" content.

you can think of it as another source for plex.

Now to answer the question above.
SageTV Recordings imported into plex will work with any of the clients that can connect to plex. Quality and all of that will very based on client of course, but that is no different than any other media that is served up by plex.

for dvd and bluray, you will need to add those directories directly to PLEX in order for them to show up in your library and be available to your clients. SageTV Scanner and BMT will NOT scan your SageTV Import Directories, only the Recordings.

*Hope that clarifies a bit. if not, i will try again :-)

jnmfox 01-11-2012 11:06 AM

Thanks for the fast reply. Let me make sure I understand you correctly:

I would need to install the Plex "server" software which I could do on my Sage server and use SageTV Scanner / BMT Agent to find my media files and add them to Plex.

Once I have the information in Plex I could use Plex clients to play the files. Playback would depend on the client.

PiX64 01-11-2012 11:09 AM

Quote:

Originally Posted by jnmfox (Post 524415)
Thanks for the fast reply. Let me make sure I understand you correctly:

I would need to install the Plex "server" software which I could do on my Sage server and use SageTV Scanner / BMT Agent to find my media files and add them to Plex.

Once I have the information in Plex I could use Plex clients to play the files. Playback would depend on the client.

Yes that is correct, with the addition that the SageTV Scanner and BMT Agent will ONLY scan and find metadata for your recordings. that is anything in your recordings directories (recorded movies, recorded tvshows, imported movies and tv shows moved to the recordings directory for some strange reason) it will NOT!! scan the media center import directories in sage.

if you want your media center import directoreies from sage into plex you would simply need to add them directly to the plex server for the specific type of content you are importing. You would then use teh default Plex scanners and agents NOT the SageTV scanner and SageTV Agent.


All times are GMT -6. The time now is 02:54 AM.

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