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
  #941  
Old 03-14-2014, 09:31 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
I have noticed that there is an issue with the recordings scanner when there are items that I have marked as "TV" but they are not located in any of the recordings drives. For example when there is a problem with a recording and I have to download a copy so we can watch it. I mark it as "TV" in BMT so it will show up in recordings.

PiX64: - Plex scanner will only scan the directories you specify in the setup. It has nothing to do with the "TV" or "Recordings" in SageTV BMT/SAGEx. The only corralation is that a file being scanned MUST be known about by BMT and sagex, and subsequently be identified as "TV"

In this case when I try to Sync the entire program/season it fails. When that program no longer exists in SageTV the Sync proceeds correctly with no error.
Pix64 - I don't follow this one, but see comment above

I think the problem might be that the scanner is telling Plex that a file should be there but because Plex is not set to scan for files in that location it fails. I guess the fix might be adding that location to my SageTV Recordings section in Plex but then I don't always use the same location for those downloaded TV programs.
Pix64 - Not true. The scanner only scans directories you specify in the setup of a section in plex. The custom scanner does nothing more than parse the silly SageTV stored names and grabs the info that PLEX neex to add a piece of media to the stack. Once the media is on teh stack, then it will pass the buck so to speak to the BMT Agent Scanner, which will ONLY process those files scanned and added to the stack by the scanner... if the file in question is not in the location being scanned, it will not show up in plex.
Reply With Quote
  #942  
Old 03-14-2014, 09:33 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by texneus View Post
One item of note: If I remove the libary, clean, empty trash, etc, and re-add it but using theTVDB metadata agent with the SageTV Scanner, everything works as expected.
Any ideas????
This is most likely due to a bug in the latest version of the Plex MEdia Server. I have been a little out of touch with this and haven't followed up with Plex to see if that bug has been resolved.

If you can please pm me your logs i will take a look...
Reply With Quote
  #943  
Old 03-14-2014, 05:54 PM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 269
Well, I must be daft? I have logs and pictures zipped up but I don't see a way to attach a file to a PM???
Reply With Quote
  #944  
Old 03-17-2014, 07:09 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by texneus View Post
Well, I must be daft? I have logs and pictures zipped up but I don't see a way to attach a file to a PM???
om me - ill give you my email and you can send them directly to me... sorry for delayed response.
Reply With Quote
  #945  
Old 03-17-2014, 09:51 PM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 269
Well, not sure what you mean by 'om', so lets do this...

I'm aware you're busy...I was in your shoes with a new born twice over, about 15 and again 13 years ago...and they are life changers aren't they! (congratulations! )

I had planned to setup my personal FTP server and send you a link at the suggestion of another forum member, but I won't be able to until tomorrow at the soonest. Instead I'll PM you my email address now, email me a note and I'll reply with logs. If I don't hear back within a couple days I'll follow through on the FTP server. Whenever you can get to it is fine...

Much appreciated!
Reply With Quote
  #946  
Old 03-20-2014, 12:06 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I wish there were a way for Plex sync to work with this. I've begun syncing TV episodes to my iPad for viewing at work during lunch. It seems to all work fine unless you delete all the episodes of a series from SageTV after they've been watched.

This might actually be the way Plex sync works than anything with the SageTV agent. Plex probably keys sync off the database entry. When a new episode of a show gets recorded by SageTV Plex sees it as a brand new show and uses a new database entry rather than using the previous one that is keyed to the sync.

This is all conjecture on how Plex works but seems logical. Yeah for orphaned foreign key database records!
__________________
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
  #947  
Old 04-01-2014, 06:29 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by PiX64 View Post
I would love to be able to incorporate the Phoenix views into the scanner / bmt agent.. but its not in the cards and not really supported.

What i could see is perhaps using the views during scanning to create collections in Plex.... If anyone is interested in that or think they would use it I can investigate doing it from a code perspective
This is from the Plex Channel thread - figure it should continue here. I was under the impression that the Media Libraries in Plex have to be tied to physical folders. If that's the case, I'm not sure you'd be able to limit a given collection based on Phoenix View.

I had, in the past, created an app that would create a virtual folder structure using symlinks to the files, but it was based on basic sagetv metadata. I had thought about creating one based on Phoenix views instead. What it would do is go through each Phoenix View (or those chosen), and create a actual folder structure on disc, containing symlinks to each item (named by the metadata) that point to the actual recording file. If plex is then pointed at that, it would allow it to be limited. not sure if/when I'd be able to make this app though, and because it makes hard links, it requires being run as admin.
__________________
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
  #948  
Old 04-01-2014, 08:46 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Fuzzy View Post
This is from the Plex Channel thread - figure it should continue here. I was under the impression that the Media Libraries in Plex have to be tied to physical folders. If that's the case, I'm not sure you'd be able to limit a given collection based on Phoenix View.

I had, in the past, created an app that would create a virtual folder structure using symlinks to the files, but it was based on basic sagetv metadata. I had thought about creating one based on Phoenix views instead. What it would do is go through each Phoenix View (or those chosen), and create a actual folder structure on disc, containing symlinks to each item (named by the metadata) that point to the actual recording file. If plex is then pointed at that, it would allow it to be limited. not sure if/when I'd be able to make this app though, and because it makes hard links, it requires being run as admin.
What you say is true about library section, but collection within the library section are completly virtual and not in anyway tied to the location of the media element.. other than of course needing to know where to go to play the file.

so my idea was i would scan in the media element as it does now, and shove it on the stack.. no change. once over in the bmt agent, an additional spot would query sagex again to get the VFS it belongs to (if that possible, would have to talk to Sean) and then simply create a new section or add it to an existing one.) If you look at the attached screenshot you will see 2 virtual collection i have setup in plex for movies. in the case of recordings from sage this image would show the all of your VFS defined views and allow the user to view the library section by any one of those VFS defined in Sage.

Last edited by PiX64; 04-01-2014 at 08:51 PM.
Reply With Quote
  #949  
Old 04-01-2014, 08:51 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
pic mentioned above ^
Attached Images
File Type: jpg Screen Shot 2014-04-01 at 9.46.50 PM.jpg (134.6 KB, 96 views)
Reply With Quote
  #950  
Old 04-02-2014, 02:44 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Unfortunately, I'm not sure if the 'query sagex again to get the VFS it belongs to' is completely possible. A given mediafile can be present in any/all views, and it's not reverse lookupable (word?). You would instead need to parse each vfs, and then assign the collection to each file in there. I'm not familiar with how the library collections work, but is it possible to have a given item in more than one collection?
__________________
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
  #951  
Old 04-02-2014, 07:02 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by Fuzzy View Post
Unfortunately, I'm not sure if the 'query sagex again to get the VFS it belongs to' is completely possible. A given mediafile can be present in any/all views, and it's not reverse lookupable (word?). You would instead need to parse each vfs, and then assign the collection to each file in there. I'm not familiar with how the library collections work, but is it possible to have a given item in more than one collection?
Yeah thats what I was affraid of. I will chat with Sean about it. A media item in Plex can belong to many different collections (views).
Reply With Quote
  #952  
Old 04-02-2014, 09:53 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
It will likely just take a multi-step process then.

Ideal method, I think, would be:
Have a method that returns the list of all vfs' that contain a given mediaitem.
That method has a cache store of the entire list of all sage media items.
If the method is called, and the cache is stale, it (re)generates it's cache.
- Generate a list of all sage mediitems
- Iterate through each vfs results list, and if that mediitem is present, add that vfs' name to that mediaitem's list in the cache
This method COULD be built into phoenix, but it would serve virtually no purpose outside of this particular use case, so might as well roll it up yourself.
The vfs API's are quick enough, compared to the plex scanning process, that this one-time list generation at the beginning of the scan, would not be incredibly slow. At the same time, I think on beginning of a scan, plex should go through and any watched statuses that have changed on existing items, update the sage server, and following scan, do the reverse (watched status on the sage server sets plex watched status).
__________________
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
  #953  
Old 04-02-2014, 12:47 PM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
Unhappy Help needed getting this plugin working...

I was playing around the PLEX using it's native scanner/agent for TV/movies.. everything worked perfectly. So, I decided to delete all the cache files/directories under C:\Users\MKANET\AppData\Local\Plex Media Server\*. Then, let PLEX recreate it's default folders there. Then, I followed the install instructions for this plugin down to the "T".

Now, no matter what I do (even after Deep Scan), 99% of all fanart is missing in PLEX. I can see the scanner adding all the media files and thumbnails; but. just not Fanart or Metadata. I can see it add fanart only for the TV shows White Collar and the Tonight Show; but that's it.

If I use the PLEX builtin scanner/agent, the fanart will get popular without any issues.

So, whats wrong? I've already tried deleting all cache files and installing and configuring this plugin 3 times. It's always the same result.

What's stopping the BMT scanner/agent from adding the other 99% of my fanart/metadata? Im not sure why it worked for only a couple of TV shows. I wouldn't even know where to begin troubleshooting something like this. Hopefully, an expert here would know exactly how to fix this.

__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #954  
Old 04-02-2014, 01:24 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by mkanet View Post
I was playing around the PLEX using it's native scanner/agent for TV/movies.. everything worked perfectly. So, I decided to delete all the cache files/directories under C:\Users\MKANET\AppData\Local\Plex Media Server\*. Then, let PLEX recreate it's default folders there. Then, I followed the install instructions for this plugin down to the "T".

Now, no matter what I do (even after Deep Scan), 99% of all fanart is missing in PLEX. I can see the scanner adding all the media files and thumbnails; but. just not Fanart or Metadata. I can see it add fanart only for the TV shows White Collar and the Tonight Show; but that's it.

If I use the PLEX builtin scanner/agent, the fanart will get popular without any issues.

So, whats wrong? I've already tried deleting all cache files and installing and configuring this plugin 3 times. It's always the same result.

What's stopping the BMT scanner/agent from adding the other 99% of my fanart/metadata? Im not sure why it worked for only a couple of TV shows. I wouldn't even know where to begin troubleshooting something like this. Hopefully, an expert here would know exactly how to fix this.
The built scanner has nothing to do with the fanart, and more importantly the built in agent and the bmt agent are WILDLY different animals. That being said, I would start by asking the following

1) are you running the most recent version of plex media server
2) are you running the most recent version of the scanner / agent code
3) do you have create media index files turned on in plex ? (advanced settings)
4) Delete plex cache manually is not a good way to do. use the clean bundles / empty trash from within the webui. shutting down plex and restartign it will effectively clear the cache.

Also please zip up the log files mainly Plex Scanner and BMTAgent log and either attach them to this thread or shoot em over to me in email.
Reply With Quote
  #955  
Old 04-02-2014, 01:29 PM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
Thanks for the quick reply!

1. Yes, I have the most recent of everything; I just installed PLEX and this plugin for the first time.

2. Yes.

3. No I dont have this option selected. I remember it saying something about it being slower with it on. However, that got me thinking that the problem may be related to an advanced setting that I may have changed which caused this problem.

4. I didnt know that. But, I had done it from the UI earlier as well.

Quote:
Originally Posted by PiX64 View Post
The built scanner has nothing to do with the fanart, and more importantly the built in agent and the bmt agent are WILDLY different animals. That being said, I would start by asking the following

1) are you running the most recent version of plex media server
2) are you running the most recent version of the scanner / agent code
3) do you have create media index files turned on in plex ? (advanced settings)
4) Delete plex cache manually is not a good way to do. use the clean bundles / empty trash from within the webui. shutting down plex and restartign it will effectively clear the cache.

I really appreciate your help! I can't wait to get this working since it seems like a great enhancement. I'll email you the log files soon...

Thanks again.
Also please zip up the log files mainly Plex Scanner and BMTAgent log and either attach them to this thread or shoot em over to me in email.
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #956  
Old 04-02-2014, 01:31 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by mkanet View Post
Thanks for the quick reply!

1. Yes, I have the most recent of everything; I just installed PLEX and this plugin for the first time.

2. Yes.

3. No I dont have this option selected. I remember it saying something about it being slower with it on. However, that got me thinking that the problem may be related to an advanced setting that I may have changed which caused this problem.

4. I didnt know that. But, I had done it from the UI earlier as well.
thanks.

can you please provide the log files when you have a chance? Im happy to take a look and figure out what is going on.
Reply With Quote
  #957  
Old 04-05-2014, 10:28 AM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 269
Hi Pix64, I thought I would just chime in since this sounds exactly like the problem we starting working on a few posts up. I deeply apologize for taking so long to get back to you with more log files, between kids and their extracurriculars and trying to get taxes filed I have had very little time to work on the new fresh system. Hopefully you and mkanet can get this figured out...
Reply With Quote
  #958  
Old 04-05-2014, 10:59 AM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
PiX64 has made significant progress with this. I'm hopeful that resolving this issue will help others that also had problems getting this plugin to work.
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #959  
Old 04-05-2014, 07:11 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by mkanet View Post
PiX64 has made significant progress with this. I'm hopeful that resolving this issue will help others that also had problems getting this plugin to work.
to be fair this scanner and agent work and work very well for most people :-)

That being said I have tracked down where the issue is, and its not a plex/sagetv scanner / bmt agent issue. Its an issue with plex.js and a function being used in it. The function called with the current media element is returning a java exception. I changed some of the code in the js file hoping that would do the trick but no dice. I will be looking more closely at this possibly tomorrow, but def. monday.

Its close... :-)
Reply With Quote
  #960  
Old 04-07-2014, 10:07 AM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
Is there a 'defacto standard' utility that does a good job converting HDHR (ie mpg2) into a format that is more Roku friendly (ie h264)?

I've never had much luck transcoding. But I think it's almost to the inevitable point now - I'm growing weary of switching between sage extenders and roku/plex clients...

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
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 06:10 PM.


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