SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

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
  #861  
Old 12-28-2013, 04:22 PM
wolverines wolverines is offline
Sage User
 
Join Date: Dec 2008
Location: NJ
Posts: 60
Quote:
Originally Posted by PiX64 View Post
You added plex.js to the sagex directory on sage server? and tried to his the URL above with the additional c=plex:GetMediafileForName&1= name of show no extension.

If all is correct you should get a fully populated XML response
Yes, I added plex.js to the sagex directory on the sage server. I went to the sagex/api and added the line you show above but I'm not sure I'm doing it 100% correct. I am at ipadress: portno/sagex/api?c=plex:GetMediaFielForName&1=NCIS and I get an error message. It says error sagex-version="7.1.9.1"> then 2 lines below it says java.lang.NoSuchMethodException: no such method: GetMediafileForName.

So I tried just using the c=GetMediaFiles&1=T command. That is listing files on an H: drive. I don't have one as I'm using Flexraid to take what were some older drives and span them into one new M: drive. Sage has been recording to a directory on the M: drive successfully for months now so I'm guessing I have to somehow change where sagex or BMT are pointing to? I'm open to any and all suggestions and appreciate the help!
__________________
SageTV 7, Win 8.1, Celeron G1610, 8GB Ram, Hauppauge HVR 2250, HD Homerun Prime, Flexraid server, Plex
Reply With Quote
  #862  
Old 01-05-2014, 09:23 AM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
on XP

I was trying to set this up over the weekend and I have Sage and Plex on a comp running XP. The directory structure for Plex looks different and I can't get the Sage Scanner or the agent to show up in the dropdown in plex.... I don't see the instructions for XP. Do you have suggestions on where I should be putting the files in the Plex XP directory structure?
Reply With Quote
  #863  
Old 01-05-2014, 09:41 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by LWM4P View Post
I was trying to set this up over the weekend and I have Sage and Plex on a comp running XP. The directory structure for Plex looks different and I can't get the Sage Scanner or the agent to show up in the dropdown in plex.... I don't see the instructions for XP. Do you have suggestions on where I should be putting the files in the Plex XP directory structure?
https://code.google.com/p/sagetv-for...g#Installation

once running you can click in on the plex icon in the sys tray and say open plugins folder. it will take you to the correct location. new scaners and agents won't show up until the plex server is restarted. I would suggest following the wiki... if you can't get it work after following the detailed wiki, then post questions here.

My responses will be delayed however. Brian has been working on some stuff for this I haven't been able to test, and i just have a ton going on right now... new baby coming any day, wrapping things up for work so I can take paternity leave, etc. Sooo I apologize for delayed responses.
Reply With Quote
  #864  
Old 01-05-2014, 11:11 AM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
Log Error

Quote:
Originally Posted by PiX64 View Post
https://code.google.com/p/sagetv-for...g#Installation

Sooo I apologize for delayed responses.
No problem at all! I really appreciate the help. In fact, just mentioning to hit that button to go to the plugins folder made me realize what I was doing wrong. I now get the scanner and the agent showing. I hit the deep scan button and it only runs briefly... this is the last part of the log: The file 'Wipeout-..' is the last file in the directory. I'll keep plugging away, but let me know if the below gives you an idea of what I went wrong.

Jan 05, 2014 10:15:54:176 [2740] DEBUG - Adding file for scanner: D:\Videos\RECORDINGS\Wipeout-TheCatFaceShirt-12437203-0.mpg
Jan 05, 2014 10:15:54:348 [2740] DEBUG - Directory had 564 files, database had 0 files, can't skip.
Jan 05, 2014 10:15:54:614 [2740] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 107, in Scan
mf = getMediaFileForFilePath(urllib.quote(file))
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 41, in getMediaFileForFilePath
return executeSagexAPICall(url, 'MediaFile')
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 52, in executeSagexAPICall
resp = unicodeToStr(json.JSONDecoder().decode(fileData))
File "C:\Program Files\Plex\Plex Media Server\Exts\simplejson\decoder.py", line 402, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\Plex\Plex Media Server\Exts\simplejson\decoder.py", line 420, in raw_decode
raise JSONDecodeError("No JSON object could be decoded", s, idx)
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
Jan 05, 2014 10:15:54:614 [2740] ERROR - We got an error scanning in D:\Videos\RECORDINGS
Jan 05, 2014 10:15:54:692 [2740] ERROR - There were errors scanning location: D:\Videos\RECORDINGS
Jan 05, 2014 10:15:54:692 [2740] DEBUG - Since it was an incomplete scan, we are not going to whack missing media.
Jan 05, 2014 10:15:54:754 [2740] DEBUG - Refreshing section 1 of type: 2
Reply With Quote
  #865  
Old 01-05-2014, 11:40 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by LWM4P View Post
No problem at all! I really appreciate the help. In fact, just mentioning to hit that button to go to the plugins folder made me realize what I was doing wrong. I now get the scanner and the agent showing. I hit the deep scan button and it only runs briefly... this is the last part of the log: The file 'Wipeout-..' is the last file in the directory. I'll keep plugging away, but let me know if the below gives you an idea of what I went wrong.

Jan 05, 2014 10:15:54:176 [2740] DEBUG - Adding file for scanner: D:\Videos\RECORDINGS\Wipeout-TheCatFaceShirt-12437203-0.mpg
Jan 05, 2014 10:15:54:348 [2740] DEBUG - Directory had 564 files, database had 0 files, can't skip.
Jan 05, 2014 10:15:54:614 [2740] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 107, in Scan
mf = getMediaFileForFilePath(urllib.quote(file))
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 41, in getMediaFileForFilePath
return executeSagexAPICall(url, 'MediaFile')
File "C:\Documents and Settings\DVR\Local Settings\Application Data\Plex Media Server\Scanners\Series\SageTV Scanner.py", line 52, in executeSagexAPICall
resp = unicodeToStr(json.JSONDecoder().decode(fileData))
File "C:\Program Files\Plex\Plex Media Server\Exts\simplejson\decoder.py", line 402, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\Plex\Plex Media Server\Exts\simplejson\decoder.py", line 420, in raw_decode
raise JSONDecodeError("No JSON object could be decoded", s, idx)
JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)
Jan 05, 2014 10:15:54:614 [2740] ERROR - We got an error scanning in D:\Videos\RECORDINGS
Jan 05, 2014 10:15:54:692 [2740] ERROR - There were errors scanning location: D:\Videos\RECORDINGS
Jan 05, 2014 10:15:54:692 [2740] DEBUG - Since it was an incomplete scan, we are not going to whack missing media.
Jan 05, 2014 10:15:54:754 [2740] DEBUG - Refreshing section 1 of type: 2
I've seen that happen mainly when plex.js isn't installed on he sage server. Did u put that in the sagex directory and restart sage server?
Reply With Quote
  #866  
Old 01-05-2014, 01:08 PM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
Quote:
Originally Posted by PiX64 View Post
I've seen that happen mainly when plex.js isn't installed on he sage server. Did u put that in the sagex directory and restart sage server?
plex.js is in this directory: C:\Program Files\SageTV\SageTV\sagex\services

and I have restarted sage.

The sagex-api log looks ok, has three lines all positive.

Is there someway to positively tell if sage knows its there?
Reply With Quote
  #867  
Old 01-05-2014, 01:12 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Look through this thread for exact syntax but call the custom function I made directly from a web browser

Http:// x . X . X . X : port/ sagex/API?c=plex:GetMediaFileForName&1= name of show less extension
Reply With Quote
  #868  
Old 01-05-2014, 01:41 PM
LWM4P LWM4P is offline
Sage User
 
Join Date: Jun 2008
Location: Denver, CO
Posts: 62
Quote:
Originally Posted by PiX64 View Post
Look through this thread for exact syntax but call the custom function I made directly from a web browser

Http:// x . X . X . X : port/ sagex/API?c=plex:GetMediaFileForName&1= name of show less extension
crap.. it says 'Not Found' for the sagex api ... I'll troubleshoot that sometime tonight.
Reply With Quote
  #869  
Old 01-05-2014, 04:47 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I am going to give this a try - I installed Plex a long time ago but I haven't really used it. But I bought a Chromecast recently so that gives interesting options - although I should have a large enough cache of extenders that I don't really need that just for Sage.

One questions on the installation. After installing the sage.js file do you need to restart Sage? Or can I just put this in the right folder and everything will start working immediately?

By the way the current download file has a double zip extension - is that supposed to be the case? And is there just one file for Win and Mac? I notice that there is a _MACOSX folder - is that needed on Windows?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #870  
Old 01-06-2014, 08:34 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by wayner View Post
I am going to give this a try - I installed Plex a long time ago but I haven't really used it. But I bought a Chromecast recently so that gives interesting options - although I should have a large enough cache of extenders that I don't really need that just for Sage.

One questions on the installation. After installing the sage.js file do you need to restart Sage? Or can I just put this in the right folder and everything will start working immediately?

By the way the current download file has a double zip extension - is that supposed to be the case? And is there just one file for Win and Mac? I notice that there is a _MACOSX folder - is that needed on Windows?
The double zip extension was an accident. The plugin and Scanner folder is the only thing you need for any platform. Just place them in the correct location for plex, change the bmt properties file in the plugin folder, and then change the sage variables at the top of the scanner file(s).

Place the .js file on the Sage server and restart sage.

from a webbrowser try hitting

http:// x . x . x . x : port /sagex/api?c=plex:GetMediaFileForName&1= <the name of a file on your sage server minus the extension>

if you get a valid xml response, then you are all setup from a Sagex perspective.

The wiki also has a walkthrough on how to setup incase you get stuck.


example from my setup:

192.168.1.110:8500/sagex/api?c=plex:GetMediaFileForName&1=Seinfeld-S07E12-TheCaddy-15916736-0
Reply With Quote
  #871  
Old 01-07-2014, 08:41 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I'm not sure what is causing the issue but I updated to the latest version of Plex, 0.9.8.18.290, and noticed that when it starts a media update of my SageTV recordings it seems to get stuck and the scanner ends up using %50 CPU (100% on one core) indefinitely. The only way I can stop the scan is to manually right click the Plex icon and select "Cancel Library Update".

I've looked in the logs and there doesn't seem to be anything obvious. Is this known or something new?
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #872  
Old 01-07-2014, 11:11 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Taddeusz View Post
I'm not sure what is causing the issue but I updated to the latest version of Plex, 0.9.8.18.290, and noticed that when it starts a media update of my SageTV recordings it seems to get stuck and the scanner ends up using %50 CPU (100% on one core) indefinitely. The only way I can stop the scan is to manually right click the Plex icon and select "Cancel Library Update".

I've looked in the logs and there doesn't seem to be anything obvious. Is this known or something new?
Try turning of Media Indexing on the plex server.
Reply With Quote
  #873  
Old 01-07-2014, 11:13 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by PiX64 View Post
Try turning of Media Indexing on the plex server.
I've never had media indexing enabled.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #874  
Old 01-07-2014, 11:32 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Taddeusz View Post
I've never had media indexing enabled.
OK.

- I would make sure you are running the latest code
- In plex Empty Trash
- Clean Bundles
- The restart plex
- Rescan

Provide logs please.
Reply With Quote
  #875  
Old 01-07-2014, 12:45 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by PiX64 View Post
OK.

- I would make sure you are running the latest code
- In plex Empty Trash
- Clean Bundles
- The restart plex
- Rescan

Provide logs please.
I followed your instructions and I still get a stuck scan. Here are the logs.

I assure you that media scanning is disabled. I have also moved my Plex server to a different computer and still get the same problem. I hope this helps.
Attached Files
File Type: zip Plex Logs.zip (294.4 KB, 119 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #876  
Old 01-07-2014, 12:54 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Taddeusz View Post
I followed your instructions and I still get a stuck scan. Here are the logs.

I assure you that media scanning is disabled. I have also moved my Plex server to a different computer and still get the same problem. I hope this helps.
from the looks of it there are a few odd things going on

1) There is a system volume information folder in the directory being scanned which may be causing some issues
2) did you actually clean the database, empty the trash, and remove the section?
The reason i ask this is there are many indicators in this log which appear like you are reusing media items in the current plex cache / database and not actually scanning the file that is there.

If your SageTV recordings aren't finishing scanning it is possible that another section is in the process of scanning as well.
Reply With Quote
  #877  
Old 01-07-2014, 01:59 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by PiX64 View Post
from the looks of it there are a few odd things going on

1) There is a system volume information folder in the directory being scanned which may be causing some issues
2) did you actually clean the database, empty the trash, and remove the section?
The reason i ask this is there are many indicators in this log which appear like you are reusing media items in the current plex cache / database and not actually scanning the file that is there.

If your SageTV recordings aren't finishing scanning it is possible that another section is in the process of scanning as well.
Ok, just did that. Deleted the section and then followed the rest of the directions. Since my recording drives are actually the root of the drives they are going to have the "System Volume Information" folder. Every drive in Windows has that. However, I created a folder on each drive, moved all the recordings to it, and changed the share location to that folder. The sysvol folders are no longer an issue. It is still freezing.

At this point it almost looks like it's getting hung up on a single video, Dracula-AWhiffofSulfur-17071167-0.mpg. I noticed in the new interface (plex.tv/web/app) that it takes a screenshot of each video and uses that as the poster art until the metadata and artwork are downloaded. I might surmise that it is this part of the scanner that is messing up.

However, for your perusal are logs from a fresh SageTV recordings section in Plex.
Attached Files
File Type: zip Plex Logs.zip (202.6 KB, 115 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #878  
Old 01-07-2014, 02:01 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
After looking at the logs again it looks like it's just taking an obscene amount of time to get the screen shots it wants for each video and not liking my HDHR recordings.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #879  
Old 01-07-2014, 03:57 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
As you can see from the screenshot I'm also getting spotty metadata and artwork. I don't know why it doesn't all come in at once. Eventually it will fill it all in but it takes some time.
Attached Images
File Type: jpg Taddeusz-Plex.jpg (171.1 KB, 202 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: 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
  #880  
Old 01-08-2014, 08:59 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Taddeusz View Post
As you can see from the screenshot I'm also getting spotty metadata and artwork. I don't know why it doesn't all come in at once. Eventually it will fill it all in but it takes some time.
Is Toy Story of Terror marked as a Movie in your BMT ui ?
Reply With Quote
Reply


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

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 07:10 PM.


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