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
  #1121  
Old 05-20-2015, 02:16 PM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
Hi,

Plex Web will sort of play it correctly, it's not seamless playback like in SageTV. Plex Web plays the first segment to the end and then starts the second segment with a gap in between. So Plex Web is sort of treating it like a playlist without actually having a playlist.

Plex Home Theatre will play the first segment to the end and then stop, can not even manually play the second segment cause there is no way to chose it or skip to it.

If I stop the playback of the second segment in Plex Web and attempt to start it again, Plex web will ask if I want to resume playback and it will start playback right where it left off in the playback of the second segment.

I then stopped the playback of the second segment in Plex Web and attempted to start it where it left off in Plex Home Theatre but it does not play and displays the message "Unable to play media/Please check that the file exists and the necessary drive is mounted".

Plex for Android also treats the segmented recording the same way Plex Home Theatre does, stops after first segment is played to the end and cannot resume to time during second segment.

As for how to reproduce a segmented recording? The only sure way I know to purposely tell SageTV to split the output file is by using a FAT32 partition to save the recordings, since FAT32 has a 4GB limit but this would obviously only work on longer recordings like a sporting event. I am using NTFS and I think I have an underlying issue causing my recordings to get split but since SageTV handles the playback without any issues it would be nice if Plex could handle the playback without any issues as well.

The files that are segmented for this recording are;
Files:
D:\SageTV Recordings\NHLHockey-ChicagoBlackhawksatAnaheimDucks-3810345-0.mpg
D:\SageTV Recordings\NHLHockey-ChicagoBlackhawksatAnaheimDucks-3810345-1.mpg
Total Size: 40.71GB

Thanks for your time.
Reply With Quote
  #1122  
Old 05-20-2015, 11:17 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
I did a test for multi segment files in PLEX by create a test movie with 2 files using the naming convention here (simply duplicating the mkv file with appropriate name):
https://support.plex.tv/hc/en-us/art...ti-Part-Movies

Both the Web UI, PHT, and iPhone PLEX client handled it correctly. There's a slight pause when it switches over from part1 to part2, but the total length for movie showed up correctly in PHT and iPhone client (The web client however showed the individual movie file length, not the total length, during playback. The info page shows correct total length).

So this could be a bug in the way sageplex is adding segmented files to PLEX. I'll try to find some time this weekend to look into this.

In the mean time, can you try creating a multi-segment movie in PLEX and see if you get the same result I did above?
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1123  
Old 05-21-2015, 08:23 AM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
I can confirm that multiple part movies in Plex do play correctly in Plex Web and Plex Home Theatre. I already have a multiple part movie in my movies library in Plex and the playback of this movie works correctly in Plex Web as well as in Plex Home Theatre, unfortunately it doesn't work in Plex for Android but that is a post for the Plex team in the Plex forums. The SageTV recording files are named differently though than the multiple part movies and Plex won't even add the SageTV recordings to a TV library unless using the SageTV scanner due to the SageTV file naming.
Reply With Quote
  #1124  
Old 05-21-2015, 10:01 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
I see. Thanks for the update. The next step for me is to figure out a way to get a segmented recording in SageTV and observe how it's been processed and handled in PLEX...
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1125  
Old 05-22-2015, 10:30 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
I was able to create a multi-segmented recording in SageTV last night by recording to a FAT32 partition. However it works as expected in PLEX similar to the segmented movie and I did not find any issues. The playback works correctly in my PLEX iphone client, as well as the web. Similar to the movie, the iphone showed the correct total time during play, while the web showed the particular segment's total time. Both were able to go to the next segment automatically.

Any chance PLEX was scanning the files when the recording was still going on? Can you duplicate the issue?

You can create a clean set of logs for troubleshooting by doing this:

1) copy/move the segmented files to a new folder, say c:\sage2
2) create a new PLEX library that points to this folder, using the "SageTV Scanner" and "BMT agent" as usual.

Send me the sageplex_scanner.log (You may want to delete this file before you try this as the logs are appended) and com.plexapp.agents.bmtagenttvshows.log. Both should be relatively short.

The scanner log should indicate how the scanner processed the multi segmented files.. the BMT log should show one entry corresponding to processing the show.

PM me and I'll send you the contact info, we can debug this offline.

Edit: I've rewrote the multi-segment handling code in the TV scanner, as well as adding support for multi-segment handling to the Movie scanner. Should work better now. I've refreshed the download with the new build. Give it a try.

You can also just replace the movie/tv scanner file:
https://raw.githubusercontent.com/ai...V%20Scanner.py
https://raw.githubusercontent.com/ai...e%20Scanner.py
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.

Last edited by wildgoose; 05-22-2015 at 10:10 PM.
Reply With Quote
  #1126  
Old 05-28-2015, 03:20 PM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
Hi, just saw your post today. Thanks. I have other computers that I also run PHT on and on those computers when I play the segmented SageTV recordings they play properly as expected. It is just this one computer that for some reason I cannot get continuous playback of segmented files. I am going to try your suggestion to copy a recording and creating a new library and I'll provide the logs.

Last edited by clarenceb5; 05-28-2015 at 03:31 PM.
Reply With Quote
  #1127  
Old 05-28-2015, 06:47 PM
clarenceb5 clarenceb5 is offline
Sage Advanced User
 
Join Date: Jun 2007
Location: Whitby, ON
Posts: 89
OK so I copied one of the hockey games I have that is a segmented recording to another folder called D:\SageTVTest. While it copied I ran another test with Plex Home Theatre to be certain that the segmented recordings still don't play continuously from one segment to the next and as before when I press play on the recording it would show the progress bar quickly with the full recording time but when I would press pause to show the progress bar it would only display the duration of the first segment and it would stop playing once it reached the end of the first segment.

Once the recording was done copying I created the new Plex library and added the new folder D:\SageTVTest using the SageTVScanner and the SageTV BMT Agent. The recording showed up and imidiately I tested the playback in Plex Home Theatre and to my surprise it played from one segment to the next and the progress bar is showing the full length of the recording.

So I went into my original SageTV recordings library to test playback there and again to my surprise the recordings are now playing continuously from one segment to the next.

Now I've removed the SageTVTest library and my original library is still playing the segmented recordings continuously. I've replaced the scanner files with the updates you provided.

Thanks for your time and help with this matter. Somehow it solved itself.
Reply With Quote
  #1128  
Old 05-29-2015, 01:51 PM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Using with Ubuntu, not working

I'm using the latest version of this scanner from wildgoose on my plexserver that is running on Ubuntu 14.02 but I don't get any results. It seems that the scanner does see my shows but then errors out at the end of the scan. I see all my shows in the log, but in the end Plex says I have no shows. Is there anything special I need to do to make it work with Ubuntu?
Reply With Quote
  #1129  
Old 05-30-2015, 06:45 AM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Quote:
Originally Posted by dranockcir View Post
I'm using the latest version of this scanner from wildgoose on my plexserver that is running on Ubuntu 14.02 but I don't get any results. It seems that the scanner does see my shows but then errors out at the end of the scan. I see all my shows in the log, but in the end Plex says I have no shows. Is there anything special I need to do to make it work with Ubuntu?
Can you send me the log or show what error is in the scanner log at the end? Sent you a PM.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1130  
Old 06-07-2015, 08:03 PM
jughead's Avatar
jughead jughead is offline
Sage Advanced User
 
Join Date: Jul 2004
Posts: 114
Hi, I haven't posted here in a while but I just tried installing this plugin and I would love some help finding my mistake

After following the instructions in the wiki and adding the SageTV folders, when Plex scans, it adds no SageTV files at all.

I'm assuming this is the issue from Plex Media Scanner.log:

Code:
Jun 07, 2015 20:54:43:800 [7028] DEBUG - Directory had 27 files, database had 0 files, can't skip.
Jun 07, 2015 20:54:43:975 [7028] DEBUG - Removing 0 media items that were left.
Jun 07, 2015 20:54:43:975 [7028] DEBUG - Removing 0 directories that were left.
Jun 07, 2015 20:54:43:976 [7028] DEBUG - Refreshing section 23 of type: 2
Anyone have an idea what is going on?

Thanks!
Reply With Quote
  #1131  
Old 06-09-2015, 12:22 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
Are you installing the new 8.1 version from github or the old version from google code? You can donwload the new version from the link in my sig.

The main github page has some install instructions for Windows.

Feel free to PM me if you want more info or have some issues. Thanks.
__________________
sagetv-for-plexmediacenter v8.3.1 is available! Github/Download site.
Reply With Quote
  #1132  
Old 06-09-2015, 06:09 PM
jughead's Avatar
jughead jughead is offline
Sage Advanced User
 
Join Date: Jul 2004
Posts: 114
Hi, thanks for the response and also for working on this plugin

I had been using the old one from google code but just updated to the new 8.1.

I'm still having the same problem though. When adding a library in Plex, I can select SageTV Scanner & BMT Agent. Everything looks like it is working, I see the file names being looked at in the bottom of the plex screen, but the library is empty when I click on it. Same thing for a movie or a TV library.

I didn't remove any of the old files when updating, just overwrote the duplicates, even though I think the properties files are no longer needed. The only place you have to set a password now is in the .json, correct?
Also, regarding installing- the synctool folder is not needed?

Plex version 0.9.12.3
Windows 7 64 bit

Below is the part of the log that I think will help. If you need more info, just ask an thank you again!

Code:
2015-06-09 19:01:41,707| DEBUG   | Getting media info from SageTV ...
2015-06-09 19:01:41,707| DEBUG   | openUrl: http://sage:frey@localhost:8080/sagex/api?c=plex:GetMediaFileForName&1=AmericasGotTalent-S10E01-Audition1-1222044-0.mpg&encoder=json
2015-06-09 19:01:42,404| DEBUG   | getMediaFileForName(AmericasGotTalent-S10E01-Audition1-1222044-0.mpg): not found
2015-06-09 19:01:42,404| ERROR   | No media info from SageTV: AmericasGotTalent-S10E01-Audition1-1222044-0.mpg
Edit: I CAN log into the sagex API at 127.0.0.1:8080/sagex/api

Last edited by jughead; 06-09-2015 at 06:12 PM. Reason: more info
Reply With Quote
  #1133  
Old 06-09-2015, 08:43 PM
jughead's Avatar
jughead jughead is offline
Sage Advanced User
 
Join Date: Jul 2004
Posts: 114
hopefully this will also help. when i plug this into the browser, i get a popup notifying me that i am logging in as user sage. then the below code. it does have errors.
Code:
http://sage:frey@localhost:8080/sagex/api?c=plex:GetMediaFileForName&1=AmericasGotTalent-S10E01-Audition1-1222044-0.mpg&encoder=json
Code:
{"sagexVersion":"7.1.9.1","exception":"java.lang.RuntimeException: javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@ddf728 has no such function \"GetMediaFiles\" in <eval> at line number 41\r\n\tat sagex.remote.api.ApiHandler.callService(ApiHandler.java:200)\r\n\tat sagex.remote.api.ApiHandler.handleRequest(ApiHandler.java:140)\r\n\tat sagex.remote.SagexServlet.doPost(SagexServlet.java:87)\r\n\tat sagex.remote.SagexServlet.doGet(SagexServlet.java:41)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:707)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:820)\r\n\tat org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)\r\n\tat org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)\r\n\tat org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)\r\n\tat org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)\r\n\tat org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)\r\n\tat org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)\r\n\tat org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)\r\n\tat org.mortbay.jetty.handler.rewrite.RewriteHandler.handle(RewriteHandler.java:230)\r\n\tat org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)\r\n\tat org.mortbay.jetty.Server.handle(Server.java:326)\r\n\tat org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)\r\n\tat org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)\r\n\tat org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)\r\n\tat org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)\r\n\tat org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)\r\n\tat org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)\r\n\tat org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)\r\nCaused by: javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@ddf728 has no such function \"GetMediaFiles\" in <eval> at line number 41\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:586)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:511)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:227)\r\n\tat sagex.remote.api.ServiceFactory.callService(ServiceFactory.java:83)\r\n\tat sagex.remote.api.ApiHandler.callService(ApiHandler.java:198)\r\n\t... 22 more\r\nCaused by: <eval>:41 TypeError: sagex.api.MediaFileAPI@ddf728 has no such function \"GetMediaFiles\"\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:58)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:214)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:186)\r\n\tat jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:173)\r\n\tat jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkBean(NashornBottomLinker.java:118)\r\n\tat jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:73)\r\n\tat jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)\r\n\tat jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:144)\r\n\tat jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:232)\r\n\tat jdk.nashorn.internal.scripts.Script$\\^eval\\_.GetMediaFileForName(<eval>:41)\r\n\tat jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:537)\r\n\tat jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:209)\r\n\tat jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)\r\n\tat jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:185)\r\n\tat jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:505)\r\n\t... 25 more\r\n","error":"javax.script.ScriptException: TypeError: sagex.api.MediaFileAPI@ddf728 has no such function \"GetMediaFiles\" in <eval> at line number 41"}
Thanks!
Reply With Quote
  #1134  
Old 06-09-2015, 08:49 PM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
I was having a similar problem and stuckless suggested that I had Java 8 and to switch to Java 7. I did and it now works. Do you have Java 8?
Reply With Quote
  #1135  
Old 06-09-2015, 08:56 PM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Quote:
Originally Posted by wildgoose View Post
Can you send me the log or show what error is in the scanner log at the end? Sent you a PM.
Thanks for the awesome support wildgoose, I have Plex Media Server on an Ubuntu 15.04 machine and Sage running on Windows 7. Thanks for updating the Sageplex scanner and helping me figure out why it wasn't working.
Reply With Quote
  #1136  
Old 06-09-2015, 09:39 PM
jughead's Avatar
jughead jughead is offline
Sage Advanced User
 
Join Date: Jul 2004
Posts: 114
Quote:
Originally Posted by dranockcir View Post
I was having a similar problem and stuckless suggested that I had Java 8 and to switch to Java 7. I did and it now works. Do you have Java 8?
Yes, I had java 8 update 31 and just now updated to update 45 and still have the same issue. I was just checking out your thread and it looks like the same issue.

TypeError: sagex.api.MediaFileAPI@ddf728 has no such function \"GetMediaFiles\" in <eval> at line number 41\r\n\tat

We are both getting that error.

It looks like Java 7 is no longer getting security updates, based on some googling. I am not really comfortable rolling back to it even though it might solve this problem. Damn. Is everyone else using this plugin running Java 7 on their SageTV boxes?
Reply With Quote
  #1137  
Old 06-10-2015, 02:19 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I use java 7. I think most people run their sage server on a headless, or at least rarely interacted with, computer, so java security updates are not an incredibly high priority item.
__________________
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
  #1138  
Old 06-10-2015, 05:15 AM
dranockcir dranockcir is offline
Sage Advanced User
 
Join Date: Jul 2004
Location: Jupiter, FL
Posts: 137
Yep, mine just does sage, no one surfs on it.
Reply With Quote
  #1139  
Old 06-10-2015, 09:46 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by Fuzzy View Post
I use java 7. I think most people run their sage server on a headless, or at least rarely interacted with, computer, so java security updates are not an incredibly high priority item.
I'm fairly sure I have Java 6 on at least ONE of my servers.
__________________
"Keep your goals away from the trolls"
Reply With Quote
  #1140  
Old 06-11-2015, 04:31 PM
wildgoose wildgoose is offline
Sage Advanced User
 
Join Date: Jan 2010
Location: CA
Posts: 156
While helping out some users, I realized things would be a lot easier if there's an installer. So I wrote an install script for Windows/MacOS/Linux. It copies files to the right location and copies and configures sageplex_cfg.json for you automatically.

And yes, there's also an uninstall option should you want to remove it. The uninstall should also handle removal of earlier versions, including the older version from google code.

Should make updating to newer versions an easier process.
__________________
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)
 

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.