SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

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
  #461  
Old 02-11-2013, 11:51 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by cupp View Post
I have one last question. In the wiki you mention:

How to Apply Updates

The process is slightly cumbersome but it ensures that the Plex Media Server database doesn't get corrupted and that the metadata related to your SageTV recordings is stored in the PMS database correctly.

From the Plex Media Manger web page, remove the sections that have your SageTV content
Shutdown the Plex Media Server
Download and unzip the new files per the original installation instructions near the beginning of this document.


Is this needed when updating the sage files (sagetv Customer Scanner,BMT Agent and plex.js file) or plex software or both?

Thanks

This really on pertains to SageTV Scanner code / BMT Agent code updates. The reasoning behind it is that Plex will use its cache when searching for media. IT does this to decrease the amount of time it takes to scan, and rescan Sections. When we update any code, most of the time it is a fix in the way metadata is pulled in, poster/cover art is pulled in, metadata fields that are filled in on the plex side, etc. removing the SageTV section, updating the scanner/agent code, and then re-adding the section ensures that plex will go out and manually scan EACH and EVERY file again and NOT used a cached version of it. As referenced by Darci in the wiki, this makes sure that you aren't left with orphaned elements, or elements with incorrect (NON updated data) inside of plex.

This method ONLY applys to the SageTV code Scanner(s) and Agent. You do not have to do this with normal plex "official" releases of plugins. You will find that on occasion if a plex scanner, or agent has been updated and an official release has been pushed out: If you do not remove the section and re-add it, the updates may not take affect on your existing library sections.
*** This seems to be becoming less and less true as new versions of the Plex media server is rolled out.

Also as a side note, code changes and updates at this point are few and far between, so unless there is something specific you want fixed, added, or are having trouble with, we won't be pushing out new "updates"

Hope that answers your question(s). If not lemme know and Ill give it another whirl.
Reply With Quote
  #462  
Old 02-11-2013, 01:21 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
PiX64,

I have one question I tried reading through the thread but found no answer. Does your scanner set the watched flag in SageTV once it is watched in Plex?
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #463  
Old 02-11-2013, 02:12 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
PiX64,

I have one question I tried reading through the thread but found no answer. Does your scanner set the watched flag in SageTV once it is watched in Plex?
The Scanner and Agent are setup to work in a one direction fashion. Scanners and agents aren't bi-directional in nature, that would be a plex plugin of sorts (scripts, channels, etc.).

So with that being said, The watched status SHOULD be synced upon initial scan of your directory (possibly on subsaquent scans (although i haven't tested it)) inward to plex. Once in plex the watched status and watched position information is maintained within plex.

I have toyed with the idea of creating a plex plugin/script that would allow for sync backwards to SageTV Server, but it is just not that clean of a solution in my opinion.

It would be easier in my opinion to create a small sage plugin which periodically went out to the plex server and requested watched status info anything also maintained within plex... you could also potentially make the files delete that have been watched... but yeah

long answer to your question sorry.

short answer is no plex just brings in watched status from sage on initial scan :-)
Reply With Quote
  #464  
Old 02-11-2013, 02:17 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
PIX64,

Do you know where Plex keeps its watched status? maybe an XML file or DB that I can scan then use SJQ to mark as watched. If you can point me in the right direction it would be appreciated.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #465  
Old 02-11-2013, 02:32 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
PIX64,

Do you know where Plex keeps its watched status? maybe an XML file or DB that I can scan then use SJQ to mark as watched. If you can point me in the right direction it would be appreciated.
It is stored internally on the plex db. I believe there is an api access for it:

http://wiki.plexapp.com/index.php/PlexNine_AdvancedInfo

VERY similiar to the way you use stuckless sagex api via a browser, you can also all individual elements, by using the correct syntax, or get all items. What is returned is an xml document with the information you are looking for.

I believe you can also pull it out of the Metadata served up by the Plex DLNA server.

I haven't looked to much into though so I am not 100% sure what exactly is available via the API...
Reply With Quote
  #466  
Old 02-11-2013, 03:46 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Thanks.

I can view the recently watched shows using Plex DLNA server... by browsing under Video\TV Shows\Recently Viewed Episodes. Now I just have to find a way to get that to a text document. That gives me a starting point at least. Thanks.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #467  
Old 02-13-2013, 05:09 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Followup,

I was able to accomplish what I wanted using wget and SJQ3.

This gives me the viewed Items in an xml C:\SJQNEW\wget\wget.exe "http://192.168.0.9:32400/library/sections/2/recentlyViewed" I do a scan for the airing Id. I then use SJQ3 to marked them watched. I do the same for the movies section.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #468  
Old 02-14-2013, 08:52 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
Followup,

I was able to accomplish what I wanted using wget and SJQ3.

This gives me the viewed Items in an xml C:\SJQNEW\wget\wget.exe "http://192.168.0.9:32400/library/sections/2/recentlyViewed" I do a scan for the airing Id. I then use SJQ3 to marked them watched. I do the same for the movies section.
VERY NICE!

I may have to get your help setting that up. I never dove into SJQ because I just didn't have a need to... If this setup works well, then it may be worth it to invest the time in figuring out how to use it.
Reply With Quote
  #469  
Old 02-20-2013, 08:37 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,038
SageTV Scanner missing?

Hi,

I just tried to install this on Linux, using the instructions at http://code.google.com/p/sagetv-for-...allingAndUsing.

I did the following:
Code:
sudo /etc/init.d/plexmediaserver stop
cd /usr/lib/plexmediaserver/Resources
sudo unzip /tmp/sagetv-for-plexmediacenter.zip
sudo unzip /tmp/sagetv-for-plexmediacenter-r2.zip
sudo unzip /tmp/sagetv-for-plexmediacenter-r3
sudo unzip /tmp/BMTAgent-LinuxMac-Fix-PATCH.zip
sudo vi Plug-ins/BMTAgent.bundle/Contents/Code/BMTAgent.properties
sudo vi Scanners/Series/SageTV\ Scanner.py
sudo vi Scanners/Movies/SageTV\ Movie\ Scanner.py
sudo /etc/init.d/plexmediaserver start
When I go to the Plex web interface, add a "Recorded TV" library section, and point it at my SageTV recordings, there is no SageTV Media Scanner option to select in the Media Scanner drop-down, just the Plex Scanner. Similarly, there is no Sage BMT Agent. Just the TVDB, and Personal Media Shows.

I think maybe things might unzip to the wrong place, so it is not seeing the new files. I'm running " plexmediaserver 0.9.7.11.386-d353989". For example, until I did the unzip, there was no "Scanners" directory. Just a Plug-ins/Scanners.bundle/ directory.

Is my plex too new?

Thanks,

Drew
__________________
Server HW: Xeon CPU E3-1270, 16GB RAM, 9TB Raid-Z + L2Arc,
Server SW: Ubuntu 12.04 x86_64, ZFS on Linux, Java 1.6.0_21, SageTV 7.1.9.1
Tuner HW: Pinnacle 800i, Pinnacle 801e USB, HDHR
Client: HD300, HD100
Reply With Quote
  #470  
Old 02-20-2013, 08:52 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by drewg View Post
Hi,

I just tried to install this on Linux, using the instructions at http://code.google.com/p/sagetv-for-...allingAndUsing.

I did the following:
Code:
sudo /etc/init.d/plexmediaserver stop
cd /usr/lib/plexmediaserver/Resources
sudo unzip /tmp/sagetv-for-plexmediacenter.zip
sudo unzip /tmp/sagetv-for-plexmediacenter-r2.zip
sudo unzip /tmp/sagetv-for-plexmediacenter-r3
sudo unzip /tmp/BMTAgent-LinuxMac-Fix-PATCH.zip
sudo vi Plug-ins/BMTAgent.bundle/Contents/Code/BMTAgent.properties
sudo vi Scanners/Series/SageTV\ Scanner.py
sudo vi Scanners/Movies/SageTV\ Movie\ Scanner.py
sudo /etc/init.d/plexmediaserver start
When I go to the Plex web interface, add a "Recorded TV" library section, and point it at my SageTV recordings, there is no SageTV Media Scanner option to select in the Media Scanner drop-down, just the Plex Scanner. Similarly, there is no Sage BMT Agent. Just the TVDB, and Personal Media Shows.

I think maybe things might unzip to the wrong place, so it is not seeing the new files. I'm running " plexmediaserver 0.9.7.11.386-d353989". For example, until I did the unzip, there was no "Scanners" directory. Just a Plug-ins/Scanners.bundle/ directory.

Is my plex too new?

Thanks,

Drew
Nope not to new. Scanners dir will only be there after you put it there. the scanners folder is for custom scanners. the core plex code puts the default scanners and agents for the most part in .bundle files.

1) Make sure that you completely shutdown plex media server before copying over the contents of the zip files (I see that you stopped and started it, but I was having issues with Linux, specifically Ubuntu where I had to actually do a restart for it to completely stop). U will only need the latest release of the code, the linux patch, and the bmt agent.

2) Make sure to put the files in the following locations:
$PLEX_HOME/Library/Application Support/Plex Media Server/Scanner
$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-ins

3) Once that is done, for kicks please try restarting your linux box, restarting plex, and then try and add the scanners/agent when adding a new section.

lemme know how it goes, and if that doesn't work, then we will work through how to get it up and running.

~Mike
Reply With Quote
  #471  
Old 02-20-2013, 09:38 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,038
Thanks for making me look harder for the "Application Support" directory! Plex puts stuff in weird places, so I had tried to find it using the contents of the dpkg and that was how I arrived at /usr/lib/plexmediaserver/Resources. But it turns out that the correct path to unzip things from is /var/lib/plexmediaserver/Library/Application Support/Plex Media Server
It must create that on the fly, as it was not mentioned in the dpkg contents. FWIW, I'm on Ubuntu & the start/stop script worked fine for me. I checked with ps that nothing was running before unzipping in the correct stop.


At any rate, the Recordings section is now populating!!!

BTW, the reason I'm trying this is because the native plex scanner seems to miss about 50% of my recordings. Last night I was trying to watch something on my android tablet, and I could not find it because (I guess) the Plex scanner could not figure it out. FWIW, the problematic show now seems to be in the index, even thhough it is a show which BMT can't figure out either (Silicon Valley: American Experience). Thanks so much for this!!

Drew
__________________
Server HW: Xeon CPU E3-1270, 16GB RAM, 9TB Raid-Z + L2Arc,
Server SW: Ubuntu 12.04 x86_64, ZFS on Linux, Java 1.6.0_21, SageTV 7.1.9.1
Tuner HW: Pinnacle 800i, Pinnacle 801e USB, HDHR
Client: HD300, HD100
Reply With Quote
  #472  
Old 02-20-2013, 09:42 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by drewg View Post
Thanks for making me look harder for the "Application Support" directory! Plex puts stuff in weird places, so I had tried to find it using the contents of the dpkg and that was how I arrived at /usr/lib/plexmediaserver/Resources. But it turns out that the correct path to unzip things from is /var/lib/plexmediaserver/Library/Application Support/Plex Media Server
It must create that on the fly, as it was not mentioned in the dpkg contents. FWIW, I'm on Ubuntu & the start/stop script worked fine for me. I checked with ps that nothing was running before unzipping in the correct stop.


At any rate, the Recordings section is now populating!!!

BTW, the reason I'm trying this is because the native plex scanner seems to miss about 50% of my recordings. Last night I was trying to watch something on my android tablet, and I could not find it because (I guess) the Plex scanner could not figure it out. FWIW, the problematic show now seems to be in the index, even thhough it is a show which BMT can't figure out either (Silicon Valley: American Experience). Thanks so much for this!!

Drew
Awesome Drew, Glad you got it up and running. The file you said was still int the index, that should be flushed out if you purge the cache by removing the section, restarting pms, and then re-adding the section.

You should see ALL recordings now, and movies for that matter recorded by SageTV (If you setup a SageTV Movies Section and used the SageTV Movie Scanner of course).

Please let me know if you have any other issues, have enhancement suggestions, etc. With enhancements, I haven't done much updating on it in a while since it has been working so smoothly, but that doesn't mean i can't find time to do some updates.
Reply With Quote
  #473  
Old 02-20-2013, 08:45 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Why is it that I am getting better metadata for all my shows using the built in scanner rather then the Sagetv agent? All my file are named correctly.. but i tried using the Sage agent and half my shows have no descriptions... yet when I use the built in scanner I get info for all my shows.


Perhaps the built in scanner has better logic to match episodes?
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #474  
Old 02-20-2013, 08:49 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
Why is it that I am getting better metadata for all my shows using the built in scanner rather then the Sagetv agent? All my file are named correctly.. but i tried using the Sage agent and half my shows have no descriptions... yet when I use the built in scanner I get info for all my shows.


Perhaps the built in scanner has better logic to match episodes?
Scanner isn't used to bring in metadata.

The scanner is used to take the oddly named files and obtain base level information required by Plex to add it to the content library. This includes:

1) Title
2) Season #
3) Ep #
4) Original airdate

(I believe thats right i would have to verify by looking at the code to be sure)

The BMT Agent is what is used to get the remaining metadata, poster art, etc. from the sagex apis. If you are seeing sketchy metadata then either
1) you are missing that data in BMT/SageTV
or
2) there is an error happening somewhere in your api call from plex to the sagex api. (if this is the case then i would need to see all pert. logs in order to assist you.
Reply With Quote
  #475  
Old 02-20-2013, 08:57 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
Maybe it is just taking a lot longer or getting stuck somewhere. I will do more testing in the morning and let you know. Thanks for your quick response.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #476  
Old 02-20-2013, 08:58 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
Maybe it is just taking a lot longer or getting stuck somewhere. I will do more testing in the morning and let you know. Thanks for your quick response.
no prob, keep me posted.
Reply With Quote
  #477  
Old 02-22-2013, 08:24 AM
darcilicious's Avatar
darcilicious darcilicious is offline
Sage Icon
 
Join Date: Jul 2009
Location: Venus
Posts: 1,306
Quote:
Originally Posted by PiX64 View Post
2) there is an error happening somewhere in your api call from plex to the sagex api. (if this is the case then i would need to see all pert. logs in order to assist you.
I'm missing episode descriptions/summaries also on my TV shows; I'll poke around this weekend and see what's what. I've got PlexPass so I'm always using the latest server (and the new computer client is looking pretty good, based on the final version of XBMC Frodo, it has AirPlay, yay!!)
__________________
SageTV Server 7.1.x w/Gemstone and Plex Home Theater v1.0.10 w/PlexPass
HD-PVR w/v1.5.6 drivers / Hauppauge IR blaster / FiOS Extreme HD / Motorola QIP6200 / SPDIF+720p Fixed Output
on HP Media Center 8400F (Phenom 9500 QuadCore 2.2GHz, nVidia GeForce 8500 GT)
via Olevia 247TFHD/Onyko TX-SR606/Harmony 550/HP MediaSmart EX490 WHS w/12TB
Plex Media Server v0.9.9.5 on HP Touchsmart Envy 23 d16qd
Sonos Play:3, Connect / SimpleTV v2 / Roku 2 XS+Plex / iPhone 5 / iPad 2
Reply With Quote
  #478  
Old 02-22-2013, 08:32 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by darcilicious View Post
I'm missing episode descriptions/summaries also on my TV shows; I'll poke around this weekend and see what's what. I've got PlexPass so I'm always using the latest server (and the new computer client is looking pretty good, based on the final version of XBMC Frodo, it has AirPlay, yay!!)
Hmm... I am also using the lastest plexpass version, and I haven't noticed anything missing... strange :-/
Reply With Quote
  #479  
Old 02-22-2013, 09:11 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,054
I moved on to using the SageTVScanner with the plex built in TheTVDB agent and am getting better matches
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Reply With Quote
  #480  
Old 02-22-2013, 09:16 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
I moved on to using the SageTVScanner with the plex built in TheTVDB agent and am getting better matches
yeah, that will work fine provided you have season and episode info in your file names. if not, then you will get some wonky results for certain shows. I would check your BMT however if i were you just to see if you are missing that data inside of SageTV as well...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Comparing to Plex heffneil Batch Metadata Tools 20 01-08-2012 04:54 PM
Need help with SJQv4 remote agent coppit SageTV v7 Customizations 4 12-19-2010 11:03 AM
Plex in a TV? What about sage? rwc General Discussion 9 09-05-2010 04:38 PM
Possible to get SageTV to handle my library more like Plex? DAMAC SageTV Mac Edition 0 06-10-2009 10:33 AM
SagetTVService Virus Win32.Agent.dwo Ponchera SageTV Software 6 02-04-2008 06:33 PM


All times are GMT -6. The time now is 10:27 PM.


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