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
  #1101  
Old 05-03-2015, 09:20 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by Taddeusz View Post
My Plex seems to be working correctly. I installed it on Thursday and have had several recordings since then that have showed up in Plex.
Do NOT delete that library. I think newly created ones have problem... I recall seeing the correct scanner being shown after upgrade and bring up the library property. But once I delete the library and try to create a new one, no luck.

I uninstalled the new version and installed 0.9.11.16, but the problem remains. I thought that's the version I was on.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.

Last edited by wildgoose; 05-03-2015 at 09:23 PM.
Reply With Quote
  #1102  
Old 05-03-2015, 09:31 PM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,187
has anyone notified Plex? Would they care?
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300ís networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #1103  
Old 05-03-2015, 09:39 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Looks like I have to start with a clean "%LOCALAPPDATA%\Plex Media Server" with v0.9.11.16 for this to work.

With the existing "%LOCALAPPDATA%\Plex Media Server" from 0.9.12, the add library dialog is still the new one from 0.9.12 even with server version 0.9.11. Using a different browser made no difference. It didn't work, exact same problem as 0.9.11.

With a clean "%LOCALAPPDATA%\Plex Media Server", the add library dialog reverted back to the older style one, and everything works as expected. LOCALAPPDATA must be caching some stuff from 0.9.12. This also means the bug is probably in the local javascript code running in the browser.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1104  
Old 05-03-2015, 09:41 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by tvmaster2 View Post
has anyone notified Plex? Would they care?
I have posted a message in their forum, no response yet:
https://forums.plex.tv/index.php/top...ating-library/
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1105  
Old 05-03-2015, 10:06 PM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,187
super. let's hope they respond. I imagine their desire to get all the new music features up and running was their main agenda. I'll stick with my old install for the time being.
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300ís networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #1106  
Old 05-04-2015, 06:03 AM
talbot3 talbot3 is offline
Sage Advanced User
 
Join Date: Jun 2007
Posts: 82
Quote:
Originally Posted by wildgoose View Post
This looks like a bug in PLEX. I just upgraded from 0.9.11 to 0.9.12, and see the same issue.

Looks like PLEX is invoking the wrong scanner. The sageplex scanner log is not produced at all. But the "Plex Media Scanner.log" does contain all the sagetv recording files. This log corresponds to the "Plex Series Scanner", as you can see from the content of the logs.

Looks like the PLEX add library dialog has been updated in this release. There must be a bug somewhere that it's setting the wrong scanner.

You can uninstall and reinstall older version here:
https://plex.tv/downloads/1/archive
I have the same issue with PLEX 0.9.9.14. Sagetv Scanner selection does not stick and Plex series scanner is being used.
Reply With Quote
  #1107  
Old 05-05-2015, 03:48 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by talbot3 View Post
I have the same issue with PLEX 0.9.9.14. Sagetv Scanner selection does not stick and Plex series scanner is being used.
Looks like the PLEX web client is updated independently from the server version. I got 0.9.11 to work, but a day later the UI got updated to the newer one (with the bug) even though the server version remained the same.

The new UI broke it again. Looks like the client update also affected older PLEX servers as well. This is unfortunate.

More people should contact PLEX directly and let them know this is a big problem. The bug is in the web client and it affects multiple server versions, even those not being updated.

Fortunately, the bug is only in the client. I was able to figured out how the client calls the PLEX server to create the library. If you make the API call with the right parameters, everything appears to work correctly.

You basically need to issue a HTTP POST request like:

Code:
http://host:32400/library/sections?scanner=SageTV+Scanner&language=en&agent=com.plexapp.agents.bmtagenttvshows&location=somepath&type=show&name=SageTV
This will create a PLEX library called "SageTV" using "SageTV SCanner" and with path "somepath".

I have updated my sageplex tool to allow you to add/remove/refresh PLEX library independently from the WEB UI and bypass the bug.

I'll post more info about this shortly.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1108  
Old 05-05-2015, 04:32 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
I have updated the synctool to allow you to add/delete/refresh PLEX libraries manually bypassing the web UI and the bug.

https://github.com/ai7/sagetv-for-pl...enter/releases

plex/synctool/win32/sageplex_sync.exe

Code:
c:\>sageplex_sync.exe
usage: sageplex_sync.py [options] [id [id ...]]

positional arguments:
  id                    PLEX library ID/name/all (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PLEX library sections (default: False)
  -s, --sync            sync watch status (default: False)
  -m, --media           ID is media-id, not section-id (default: False)
  --position POSITION   Set explicit resume position (h:m:s) (default: None)
  -x IGNORE             ignore if pos within initial x seconds (default: 60)
  -p                    confirm each sync update (default: False)
  -n                    do nothing, simulate sync operation (default: False)
  --addtv NAME PATH     add PLEX library for Sage TV shows (default: False)
  --addmovie NAME PATH  add PLEX library for Sage Movies (default: False)
  --delsec ID           delete a PLEX library section (default: None)
  --refresh ID          refresh a PLEX library section (default: None)

Compare or synchronize watch status and resume position of the specified PLEX
library sections with SageTV. Individual PLEX Media files can be specified
when the -m option is used.
To add a Sage TV library called "SageTV" pointing to f:\Media, run
Code:
c:\>sageplex_sync.exe --addtv SageTV f:\Media
Created library section [93]: SageTV
To add a Sage Movie library called "SageMovie" pointing to f:\Media, run
Code:
c:\>sageplex_sync.exe --addmovie SageMovie f:\Media
Created library section [94]: SageMovie
To list PLEX libraries and their IDs:

Code:
c:\>sageplex_sync.exe -l
 93: SageTV (show)
 94: SageMovie (movie)
You can similarly perform a refresh on a library, or delete it (use with caution) using the library ID.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1109  
Old 05-05-2015, 06:25 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by wildgoose View Post
I have updated the synctool to allow you to add/delete/refresh PLEX libraries manually bypassing the web UI and the bug.

https://github.com/ai7/sagetv-for-pl...enter/releases

plex/synctool/win32/sageplex_sync.exe

Code:
c:\>sageplex_sync.exe
usage: sageplex_sync.py [options] [id [id ...]]

positional arguments:
  id                    PLEX library ID/name/all (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list PLEX library sections (default: False)
  -s, --sync            sync watch status (default: False)
  -m, --media           ID is media-id, not section-id (default: False)
  --position POSITION   Set explicit resume position (h:m:s) (default: None)
  -x IGNORE             ignore if pos within initial x seconds (default: 60)
  -p                    confirm each sync update (default: False)
  -n                    do nothing, simulate sync operation (default: False)
  --addtv NAME PATH     add PLEX library for Sage TV shows (default: False)
  --addmovie NAME PATH  add PLEX library for Sage Movies (default: False)
  --delsec ID           delete a PLEX library section (default: None)
  --refresh ID          refresh a PLEX library section (default: None)

Compare or synchronize watch status and resume position of the specified PLEX
library sections with SageTV. Individual PLEX Media files can be specified
when the -m option is used.
To add a Sage TV library called "SageTV" pointing to f:\Media, run
Code:
c:\>sageplex_sync.exe --addtv SageTV f:\Media
Created library section [93]: SageTV
To add a Sage Movie library called "SageMovie" pointing to f:\Media, run
Code:
c:\>sageplex_sync.exe --addmovie SageMovie f:\Media
Created library section [94]: SageMovie
To list PLEX libraries and their IDs:

Code:
c:\>sageplex_sync.exe -l
 93: SageTV (show)
 94: SageMovie (movie)
You can similarly perform a refresh on a library, or delete it (use with caution) using the library ID.
Do the --addtv and --addmovie support more than one path for the library?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #1110  
Old 05-05-2015, 10:19 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by Fuzzy View Post
Do the --addtv and --addmovie support more than one path for the library?
Hmm, not currently. I'll figure out the API syntax and add it tomorrow.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1111  
Old 05-06-2015, 11:46 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
It is now updated to handle multiple path when adding library.

Code:
  --addtv NAME [PATH ...]
                        add PLEX library for Sage TV shows (default: False)
  --addmovie NAME [PATH ...]
                        add PLEX library for Sage Movies (default: False)
To add a TV section with 2 paths:

Code:
sageplex_sync.exe --addtv "SageTV" f:\media1 "f:\My Path2"
The 8.1 release download has been updated with this change.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1112  
Old 05-06-2015, 07:00 PM
jm9843 jm9843 is offline
Sage Aficionado
 
Join Date: Oct 2003
Posts: 288
Quote:
Originally Posted by tvmaster2 View Post
has anyone notified Plex? Would they care?
They're aware of it and it seems like a priority.
Reply With Quote
  #1113  
Old 05-07-2015, 10:56 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
PLEX Web v2.4.4 have fixed the issue for me.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1114  
Old 05-08-2015, 07:11 AM
talbot3 talbot3 is offline
Sage Advanced User
 
Join Date: Jun 2007
Posts: 82
Wildgoose,

I am having an issue on my end getting the scanner to work. I am using PLEX server versions 0.9.9.14.

This is from the plex media scanner log file:

May 08, 2015 09:08:27:131 [1324] ERROR - No module in SageTV Scanner
May 08, 2015 09:08:27:146 [1324] ERROR - Error in Python: Looking up module:
Traceback (most recent call last):
File "C:\Documents and Settings\Server\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 43, in <module>
sageplexcfg.getScannerDebug())
File "C:\Documents and Settings\Server\Local Settings\Application Data\Plex Media Server\Scanners\Movies\sageplex\plexlog.py", line 105, in updateLoggingConfig
backupCount=backups)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\logging\handlers.py", line 117, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\logging\handlers.py", line 64, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "C:\Program Files\Plex\Plex Media Server\python27.zip\logging\__init__.py", line 902, in __init__
StreamHandler.__init__(self, self._open())
File "C:\Program Files\Plex\Plex Media Server\python27.zip\logging\__init__.py", line 925, in _open
stream = open(self.baseFilename, self.mode)
IOError: (13, 'Permission denied', 'C:\\Program Files\\Plex\\Plex Media Server')

Any ideas what I may need to change on my end to get it to run? I tried changing the permissions for the plex program file and user folders but no luck so far.
Reply With Quote
  #1115  
Old 05-08-2015, 10:32 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Looks like it's having trouble opening the log file. The log location should be in c:\documents and settings\..., not C:\\Program Files\\Plex\\Plex Media Server...

The plugin configuration file should be here:

C:\Documents and Settings\Server\Local Settings\Application Data\Plex Media Server\sageplex_cfg.json

In it you should see something like:

Code:
    "scanner": {
        "ext"      : [".mpg", ".avi", ".mkv", ".mp4", ".ts", ".m4v"],
        "log"      : "%LOCALAPPDATA%\\Plex Media Server\\Logs\\sageplex_scanner.log",
        "debug"    : true
    },
Can you verify the path "%LOCALAPPDATA%\Plex Media Server\Logs" is valid by trying it in explorer? Do you see the log file there? You can try setting the path directly without the %% environment variable. Remember to use two \\ for path.

If all else fails, try set the log path directly to somewhere else, like

"log" : "c:\\temp\\sageplex_scanner.log",

You can also run the scanner directly on the command line via the PLEX scanner.exe program. This way you can see some additional messages from the sageplex scanner that might shad some light on what's going on...

Feel free to PM me if you want more details.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1116  
Old 05-08-2015, 11:59 AM
talbot3 talbot3 is offline
Sage Advanced User
 
Join Date: Jun 2007
Posts: 82
Thanks. Your advice helped me get it to work. The main issue was that %LOCALAPPDATA% is not recognized by my windows XP OS. I had to edit the sageplex_cfg.json file to the absolute path. I also had to edit the config.py files to the absolute path so the json file could be found.
Reply With Quote
  #1117  
Old 05-08-2015, 12:22 PM
talbot3 talbot3 is offline
Sage Advanced User
 
Join Date: Jun 2007
Posts: 82
Quote:
Originally Posted by talbot3 View Post
Thanks. Your advice helped me get it to work. The main issue was that %LOCALAPPDATA% is not recognized by my windows XP OS. I had to edit the sageplex_cfg.json file to the absolute path. I also had to edit the config.py files to the absolute path so the json file could be found.
Adding an evironment variable for LOCALAPPDATA also worked. That is probably the preferred way so I do not need to edit the config.py files.

Last edited by talbot3; 05-08-2015 at 01:31 PM.
Reply With Quote
  #1118  
Old 05-08-2015, 10:13 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by talbot3 View Post
Adding an evironment variable for LOCALAPPDATA also worked. That is probably the preferred way so I do not need to edit the config.py files.
Thanks for reporting this. I didn't get a chance to test this on XP. Looks like it doesn't have the LOCALAPPDATA environment variable windows 7 have.

Another way is to simply set a SAGEPLEX_CFG environment variable that point to the config json file directly. This is created precisely for this situation where the default location lookup fails.

I've updated the source code on github to handle XP, as well as not crash when the log can't be created for some reason. It'll now also search for "%USERPROFILE%\Local Settings\Application Data\Plex Media Server" which I believe should be the location for Plex data on XP. This will be included when the next release goes out.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1119  
Old 05-20-2015, 11:20 AM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
Plex Home Theatre cannot play segmented recordings

Hi, I am having an issue with playback in Plex Home Theatre of SageTV recordings that recorded longer than the allotted time in the EPG.

I have recorded an NHL Hockey Game that records beyond the allotted time in the EPG. I use a SageTV plugin called SageTV Recording Extender, it is for sporting events that need to record longer than the allotted time in the EPG.

I expect to see the recorded hockey game in the Plex library and displaying the total time of the recording. I also expect the recording to display the total time of the recording when play is pressed and while the recording is playing in Plex. I expect this to happen even when the recording media file is segmented.

When I play the recording of the hockey game in Plex Home Theatre, the segmented media file, it will only play for the time that is the actual duration in the SageTV EPG so the game last night that ran for 3 overtime periods will only play the first 2.5 hours in Plex. In Plex Web the first half of the segmented file will play to the end and then the second half of the segmented file will play.

How do I get Plex to play the full 5 hours and 44 minutes of the recording?

I am using the latest versions of everything;
Latest SageTV
Latest Plex Media Center (PlexPass)
Latest Plex Home Theatre (PlexPass)
Latest sagetv-for-plexmediacenter plugin
Using Windows 7 Ultimate x64

Any help would be greatly appreciated.
Reply With Quote
  #1120  
Old 05-20-2015, 01:09 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Hmm, so you are saying Plex Web in the browser will play it correctly, but Plex Home Theater will stop after the 1st segment?

Can you list the files that belong to this particular recording? There are some special code in the sageplex scanner that processes segmented recordings.

What's a good way to produce a segmented recording in SageTV? All my recordings are single file.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
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 12:06 PM.


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