SageTV Community  

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

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
  #1341  
Old 01-04-2017, 02:49 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,612
Quote:
Originally Posted by jm9843 View Post
Did you do anything for recordings that existed prior to enabling extended_filenames in Sage? (e.g. a batch rename)
I'm sure I could have figured out some sort of batch renaming. AFAIK, the existing batch renamers for SageTV create copies of files rather than renaming them in place. But in the end I just went through and manually renamed all the recordings. While a pain I only had to do it once.
__________________
Server: 2 x Xeon L5430, Supermicro X7DWE , 24GB RAM, 12TB drive array, 2 HDHR's, SageTV 9, unRAID 6.2
Client 2: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #1342  
Old 01-25-2017, 01:25 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,373
So is it possible to run the sync tool on a different computer than the sage and plex servers? I'm running both Sage and Plex in their own dockers on an unRAID server. I attempted to download the windows sageplex_sync tool, and am unable to get it to do anything - displays help for everything except -l, and that returns 'Failed to retrieve sections!'

any thoughts?

EDIT: nevermind - I had to add the computer I was running the sync tool on to plex's "List of IP addresses and networks that are allowed without auth".
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: Phenom II X4 965, 16GB RAM, 120GB 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. HD-PVR 1212 w/USB-UIRT for premiums
Primary ClientHD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room

Last edited by Fuzzy; 01-25-2017 at 01:31 PM.
Reply With Quote
  #1343  
Old 01-26-2017, 11:47 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Quote:
Originally Posted by Fuzzy View Post
EDIT: nevermind - I had to add the computer I was running the sync tool on to plex's "List of IP addresses and networks that are allowed without auth".
I am curious what version of the PLEX server you are running. This didn't work on my Windows PLEX server v1.3.3.3148.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1344  
Old 01-27-2017, 02:32 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,373
Quote:
Originally Posted by wildgoose View Post
I am curious what version of the PLEX server you are running. This didn't work on my Windows PLEX server v1.3.3.3148.
I don't know.. most recent I'd guess. IF it's a problem of a remote program accessing a windows service, I'd look first at firewall issues. I always disable firewalls on my windows machines that are on my home network, because the only thing they do is get in the way.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: Phenom II X4 965, 16GB RAM, 120GB 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. HD-PVR 1212 w/USB-UIRT for premiums
Primary ClientHD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #1345  
Old 01-27-2017, 07:45 AM
dstanley's Avatar
dstanley dstanley is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 136
Quote:
Originally Posted by wildgoose View Post
This is due to a REST api change on PLEX side. Previously we can simply query http://localhost:32400/library/sections to retrieve the list of sections. Now this API requires authentication.

Need to look into this and update the code accordingly.

FYI I am also still on v7. It was working perfectly fine until recently when I lost my DVR drive. While troubleshooting I decided it's time to start from a clean state so I reinstalled Windows from scratch. I got SageTV v7 and PLEX up and running without too much trouble. Probably should've gone with v9 but as I was fixing my system I didn't want to change too many variables at once.

Meanwhile this single point of failure (one machine) was bugging me, and I decided to build a second system where I can experiment with stuff without affecting regular SageTV. Put together a new i5 over the holiday break and throw a bunch of disks in there. Still experimenting..

Anyway I haven't actually installed this plugin after rebuilding my system. Just tried it now and getting a failure on installing Jetty Web Server dependency (while installing sagex-services).. Need to figure this out or move to v9 I suppose.
Any progress on this authentication problem!? I am using SageTV V9 and the latest Plex and I get the same error as above:

C:\Program Files\SageTV\sagetv-for-plexmediacenter\plex\synctool\win32>sageplex_sync.exe all -s
Failed to retrieve sections!

Total: 0 videos.

I would really like to sync my SageTV watching with the Plex file system - Thanks for any help.

Dwight
__________________
SERVER: Intel Core 2 Quad Q9300 2.50GHz WIN10 32-bit with SageTV V9
MOTHERBOARD: Gigabyte EG43M-S2H / 4GB DDR2-PC5300 SYSTEM DRIVE: SSD 120GB STORAGE SPACES: 4xSeagate 2TB
EXTERNAL DEVICES: 4xHD-PVR's, 2xUSB-UIRT's, Firewire Channel Changing
TUNERS:SA3250HD on HD-PVR #1, SA4250HD on HD-PVR #2, SA4250HD on HD-PVR #3, CISCO4642HD on HD-PVR #4, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 3xHD200
Reply With Quote
  #1346  
Old 01-31-2017, 11:22 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Quote:
Originally Posted by dstanley View Post
Any progress on this authentication problem!? I am using SageTV V9 and the latest Plex and I get the same error as above:

C:\Program Files\SageTV\sagetv-for-plexmediacenter\plex\synctool\win32>sageplex_sync.exe all -s
Failed to retrieve sections!

Total: 0 videos.

I would really like to sync my SageTV watching with the Plex file system - Thanks for any help.

Dwight
Sorry for the delay. I hope to be able to look at this this soon. Does this only affect the sync tool, or is the scanner/bmt agent not working as well? (It's interesting that this is working for Fuzzy, so it might be a setting I am missing somewhere...)

The plugin is not working for me at the moment because I rebuilt my system recently and hasn't figured out how to install the jetty plugin on my V7 sagetv. Going to update to v9 soon...
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1347  
Old 02-01-2017, 10:29 AM
dstanley's Avatar
dstanley dstanley is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 136
As far as I can tell the Scanner/BMT Agent is working correctly - but the SageTV 'watched' status is not getting transferred to Plex at all.
__________________
SERVER: Intel Core 2 Quad Q9300 2.50GHz WIN10 32-bit with SageTV V9
MOTHERBOARD: Gigabyte EG43M-S2H / 4GB DDR2-PC5300 SYSTEM DRIVE: SSD 120GB STORAGE SPACES: 4xSeagate 2TB
EXTERNAL DEVICES: 4xHD-PVR's, 2xUSB-UIRT's, Firewire Channel Changing
TUNERS:SA3250HD on HD-PVR #1, SA4250HD on HD-PVR #2, SA4250HD on HD-PVR #3, CISCO4642HD on HD-PVR #4, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 3xHD200
Reply With Quote
  #1348  
Old 02-03-2017, 06:41 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Quote:
Originally Posted by dstanley View Post
As far as I can tell the Scanner/BMT Agent is working correctly - but the SageTV 'watched' status is not getting transferred to Plex at all.
Thanks for the update. This is expected because setting the watch status and resume position is using the PLEX REST endpoint (which is not working), but adding media to the library is using internal plugin APIs which should still work.

I think I found a workaround.

On PLEX server, under settings, server, is your server signed in, or unclaimed?

I believe if the server is not signed in (left as unclaimed), then the APIs don't need authentication, like it does before. But if the server is signed in, then all clients needs to be authenticated, even local ones (this was not the case before).

So as a workaround you can sign out on the server if you don't need to access to the media outside of your network.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1349  
Old 02-05-2017, 02:42 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Ok I've updated the plugin to fix the authentication error.

What you need to do is to specify a token (X-Plex-Token) value during the install, or add it to the sageplex_cfg.json file under plex manually.

You can find the value here:
https://support.plex.tv/hc/en-us/art...n-X-Plex-Token

This will be then used for all queries to the PLEX server. BMT agent should now correctly update the watch status and resume position, and synctool should also work now.

Let me know if you encounter any issues.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.

Last edited by wildgoose; 02-05-2017 at 04:38 PM.
Reply With Quote
  #1350  
Old 02-05-2017, 05:52 PM
peternm22 peternm22 is offline
Sage Expert
 
Join Date: Jan 2005
Posts: 503
Syncing watch status is working perfectly again for me. Thanks for the update!
Reply With Quote
  #1351  
Old 02-05-2017, 07:18 PM
dstanley's Avatar
dstanley dstanley is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 136
Thank you so much. I will work on installing your new plugin.
Appreciate it so much!

Dwight
__________________
SERVER: Intel Core 2 Quad Q9300 2.50GHz WIN10 32-bit with SageTV V9
MOTHERBOARD: Gigabyte EG43M-S2H / 4GB DDR2-PC5300 SYSTEM DRIVE: SSD 120GB STORAGE SPACES: 4xSeagate 2TB
EXTERNAL DEVICES: 4xHD-PVR's, 2xUSB-UIRT's, Firewire Channel Changing
TUNERS:SA3250HD on HD-PVR #1, SA4250HD on HD-PVR #2, SA4250HD on HD-PVR #3, CISCO4642HD on HD-PVR #4, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 3xHD200
Reply With Quote
  #1352  
Old 02-06-2017, 07:01 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Great!

As part of the work I finally upgraded my system to v9 (installed on top of my Windows v7), and was pleasantly surprised there were no drama! Everything just worked, even though my install location is d:, not the default c:. Nice job guys! Should've upgraded sooner
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1353  
Old 02-09-2017, 01:11 PM
dstanley's Avatar
dstanley dstanley is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 136
Came across an issue and I don't know if this is part of my problem now.
Running the command line:
"C:\Program Files\SageTV\sagetv-for-plexmediacenter\plex\synctool\win32\sageplex_sync.exe" all -s

Chugs away for a while and then fails on this episode:
Elementary - S05E01 - Folie ā Deux HDTV-720P.mkv

This is the last part of the command screen when it craps out:
Code:
  48739: Folie ? DeuxC:\Program Files\SageTV\sagetv-for-plexmediacenter\plex\synctool\win32\python27.zip\urllib.py:1299: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

Traceback (most recent call last):
  File "c:\devtools\python27\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 12, in <module>
  File "c:\devtools\python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 24, in <module>
  File "sageplex_sync.py", line 806, in <module>
  File "sageplex_sync.py", line 801, in main
  File "sageplex_sync.py", line 544, in mainSync
  File "sageplex_sync.py", line 255, in syncSections
  File "sageplex\plexapi.py", line 231, in walkPlex
  File "sageplex\plexapi.py", line 231, in walkPlex
  File "sageplex\plexapi.py", line 223, in walkPlex
  File "sageplex_sync.py", line 301, in processVideo
  File "sageplex\sagex.py", line 181, in getMediaFileForName
  File "sageplex\sagex.py", line 149, in call
  File "sageplex\sagex.py", line 121, in getApiUrl
  File "c:\devtools\python27\lib\urllib.py", line 1299, in quote
KeyError: u'\xe0'
Any suggestions?

Thanks for your work,
Dwight
__________________
SERVER: Intel Core 2 Quad Q9300 2.50GHz WIN10 32-bit with SageTV V9
MOTHERBOARD: Gigabyte EG43M-S2H / 4GB DDR2-PC5300 SYSTEM DRIVE: SSD 120GB STORAGE SPACES: 4xSeagate 2TB
EXTERNAL DEVICES: 4xHD-PVR's, 2xUSB-UIRT's, Firewire Channel Changing
TUNERS:SA3250HD on HD-PVR #1, SA4250HD on HD-PVR #2, SA4250HD on HD-PVR #3, CISCO4642HD on HD-PVR #4, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 3xHD200
Reply With Quote
  #1354  
Old 02-09-2017, 11:48 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
Quote:
Originally Posted by dstanley View Post
Came across an issue and I don't know if this is part of my problem now.
Running the command line:
"C:\Program Files\SageTV\sagetv-for-plexmediacenter\plex\synctool\win32\sageplex_sync.exe" all -s

Chugs away for a while and then fails on this episode:
Elementary - S05E01 - Folie ā Deux HDTV-720P.mkv
It's choking on the filename, not able to construct a URL to query sagetv, probably due to the ā character. I need to look into this and see what I can do about it...

My recordings have names such as these:
Quote:
Elementary-BangBangShootChute-5085092-0.mpg
Elementary-BeMyGuest-5129948-0.mpg
Elementary-CrownedClownDowntownBrown-5139754-0.mpg
You may be able to work around the problem by rename the file and remove the ā character. If that doesn't work move the file somewhere else for the time being to allow the sync to run to the end...
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1355  
Old 02-10-2017, 09:08 AM
dstanley's Avatar
dstanley dstanley is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Brantford, Ontario, Canada
Posts: 136
Thanks for looking into this - another one of my files had the ellipsis character in the file name:
"Gotham - S03E02 - Mad City- Burn the Witch… DTV-720p.mkv"

Mac OS ellipsis: OPTION + semicolon
Windows ellipsis: ALT + 0133

Not sure if the was scraped and written by BMT or Plex or Sickbeard (now I use Sonarr) - this is the episode name used at TheTVDB.com
https://thetvdb.com/?tab=episode&ser...=5654597&lid=7

Also error/died out on this one:
Young & Hungry - S02E18 - Young & Doppelgänger HDTV-720p.mkv

I will have to watch out for these types of filenames for sure!

Renaming them has let the sageplex_sync.exe complete without further errors.

Dwight
__________________
SERVER: Intel Core 2 Quad Q9300 2.50GHz WIN10 32-bit with SageTV V9
MOTHERBOARD: Gigabyte EG43M-S2H / 4GB DDR2-PC5300 SYSTEM DRIVE: SSD 120GB STORAGE SPACES: 4xSeagate 2TB
EXTERNAL DEVICES: 4xHD-PVR's, 2xUSB-UIRT's, Firewire Channel Changing
TUNERS:SA3250HD on HD-PVR #1, SA4250HD on HD-PVR #2, SA4250HD on HD-PVR #3, CISCO4642HD on HD-PVR #4, ROGERS CABLE-ON, CANADA
CLIENTS: 2xHD300 3xHD200
Reply With Quote
  #1356  
Old 02-15-2017, 08:35 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 152
I added some code that I think should fix the issue. I've updated the download. Give it a try and let me know how it works. Thanks!
__________________
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 05:38 PM
Possible to get SageTV to handle my library more like Plex? DAMAC SageTV Mac Edition 0 06-10-2009 11: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 07:35 AM.


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