SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux > SageTV for unRAID/Docker
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-26-2018, 08:50 AM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Renaming / Moving sage recordings

I recently moved to docker/unraid for Sage, and in the process installed an emby server for a couple roku clients to play the sage recordings.

I pointed emby at the sage recordings folder, but it doesn't pick up the shows, not sure why. I assume its because they are not in folders by show name. I also pointed it at an "imports" folder which does have tv shows by show name, and they are picked up fine.

So I'm sure this has been discussed on here, but I'm having trouble finding the best solution for this.

My goals:
1. All TV shows should be on the same "view" on my HD300 running Sage, ie imports imported as recordings(this is accomplished by Phoenix 3.)
2. Emby should pick up all recordings in both the sage recordings and sage imports folder as tv shows and that "view" should be seamless.

I'm thinking using phoenix-renamer script to just watch my sage tv recordings directory, rename new files, then if successful, fire off a custom mover script to the imports folder in a directory based on the show name. BMT should import the "new" show as a recording back in sage, and emby should pick it up as a tv show, correct?

If I go this route, I see that java is required to run the phoenix renamer script. Is java installed on the unraid server? I'd like to run it under "user-scripts" plugin. If that doesn't work, would I be able to run it under the sagetv docker, since that has java installed? If neither of these work, what is the best way to accomplish this?

Thanks!
Reply With Quote
  #2  
Old 08-26-2018, 09:51 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by lewispm View Post
I recently moved to docker/unraid for Sage, and in the process installed an emby server for a couple roku clients to play the sage recordings.

I pointed emby at the sage recordings folder, but it doesn't pick up the shows, not sure why. I assume its because they are not in folders by show name. I also pointed it at an "imports" folder which does have tv shows by show name, and they are picked up fine.

So I'm sure this has been discussed on here, but I'm having trouble finding the best solution for this.

My goals:
1. All TV shows should be on the same "view" on my HD300 running Sage, ie imports imported as recordings(this is accomplished by Phoenix 3.)
2. Emby should pick up all recordings in both the sage recordings and sage imports folder as tv shows and that "view" should be seamless.

I'm thinking using phoenix-renamer script to just watch my sage tv recordings directory, rename new files, then if successful, fire off a custom mover script to the imports folder in a directory based on the show name. BMT should import the "new" show as a recording back in sage, and emby should pick it up as a tv show, correct?

If I go this route, I see that java is required to run the phoenix renamer script. Is java installed on the unraid server? I'd like to run it under "user-scripts" plugin. If that doesn't work, would I be able to run it under the sagetv docker, since that has java installed? If neither of these work, what is the best way to accomplish this?

Thanks!
java is not installed by unRAID, and I don't think there is a package for it. But, you can either use the sagetv docker container, or create a new phoenix renamer container and have java installed there. I thought about doing this myself, but, just don't have the time
Reply With Quote
  #3  
Old 08-26-2018, 08:16 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by lewispm View Post
I recently moved to docker/unraid for Sage, and in the process installed an emby server for a couple roku clients to play the sage recordings.

I pointed emby at the sage recordings folder, but it doesn't pick up the shows, not sure why. I assume its because they are not in folders by show name. I also pointed it at an "imports" folder which does have tv shows by show name, and they are picked up fine.

So I'm sure this has been discussed on here, but I'm having trouble finding the best solution for this.

My goals:
1. All TV shows should be on the same "view" on my HD300 running Sage, ie imports imported as recordings(this is accomplished by Phoenix 3.)
2. Emby should pick up all recordings in both the sage recordings and sage imports folder as tv shows and that "view" should be seamless.

I'm thinking using phoenix-renamer script to just watch my sage tv recordings directory, rename new files, then if successful, fire off a custom mover script to the imports folder in a directory based on the show name. BMT should import the "new" show as a recording back in sage, and emby should pick it up as a tv show, correct?

If I go this route, I see that java is required to run the phoenix renamer script. Is java installed on the unraid server? I'd like to run it under "user-scripts" plugin. If that doesn't work, would I be able to run it under the sagetv docker, since that has java installed? If neither of these work, what is the best way to accomplish this?

Thanks!
Emby does require renaming to get things picked up nicely. I fought with that for a while a bit ago. From what I remember I was playing around with a SJQ script someone wrote, (in the SJQ v4 thread I believe), Phoenix renamer and MCEBuddy running in a Windows VM. I never got something I really liked working, though, (mostly due to lack of time), and as a quick fix ended up installing a Plex docker alongside Emby. Plex picks up the SageTV recordings fine as long as you turn on extended filenames and have it put season/episode in the name. My kids use that to watch / download shows on their iOS devices. It would be nice if Emby was modified to be able to parse the SageTV names like Plex is able to do, or if SageTV was modified to allow custom naming "templates" for files.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #4  
Old 08-27-2018, 11:51 AM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 279
For Emby to pick up SageTV recordings you need to import them as home movies. All recordings then appear by file name. Ya, you loose metadata but you can figure out what each show is by the filename. Not too big of deal, just a bit "sloppy".
__________________
Server: Xeon E3-1225, 32GB RAM, Open Media Vault 5, SageTV Docker
Tuners: HD Homerun Quatro (OTA)
Clients: NVidia SheildTV x3
Reply With Quote
  #5  
Old 08-27-2018, 12:11 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by texneus View Post
For Emby to pick up SageTV recordings you need to import them as home movies. All recordings then appear by file name. Ya, you loose metadata but you can figure out what each show is by the filename. Not too big of deal, just a bit "sloppy".
This is not my experience. Recordings need to be named properly. Allowing spaces in filenames and also letting SageTV insert the season and episode numbers (S01E01) into the filenames are both important.

I started doing this for Plex and have a MUCH better experience. Some day when Plex's DVR becomes more mature with fewer bugs I will be dropping SageTV. It's annoying managing two media organization applications. While SageTV is currently the better DVR Plex is MUCH better at media organization.
__________________
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
  #6  
Old 08-27-2018, 03:28 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Quote:
Originally Posted by Taddeusz View Post
Allowing spaces in filenames and also letting SageTV insert the season and episode numbers (S01E01) into the filenames are both important.
I changed the setting to allow SageTV to insert the season and episode numbers. Is there a setting for allowing spaces, or any other settings that might help?
Reply With Quote
  #7  
Old 08-27-2018, 03:31 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Quote:
Originally Posted by stuckless View Post
java is not installed by unRAID, and I don't think there is a package for it. But, you can either use the sagetv docker container, or create a new phoenix renamer container and have java installed there. I thought about doing this myself, but, just don't have the time
I'm willing to do this, I may dig into building my own docker for this soon.

Would there be any detriment to just adding a script to the sagetv docker? It seems like the best use of resources. If the script is run from the appdata folder it should survive an upgrade, right?

If I do build my own docker container, is there a template I can start with that might help point me in the right direction?

Thanks!
Reply With Quote
  #8  
Old 08-27-2018, 03:32 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by lewispm View Post
I changed the setting to allow SageTV to insert the season and episode numbers. Is there a setting for allowing spaces, or any other settings that might help?
Shut down SageTV, modify your Sage.properties file to set extended_filenames=true, and start it back up.
__________________
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
  #9  
Old 08-27-2018, 04:42 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Quote:
Originally Posted by Taddeusz View Post
Shut down SageTV, modify your Sage.properties file to set extended_filenames=true, and start it back up.
Did it, thanks!

I'm working on a php script now to add spaces to the recordings, then pass them to the phoenix renamer, then move them into their own folders based on show name.
Reply With Quote
  #10  
Old 08-28-2018, 05:18 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by lewispm View Post
Did it, thanks!

I'm working on a php script now to add spaces to the recordings, then pass them to the phoenix renamer, then move them into their own folders based on show name.
The phoenix renamer shoudn't need spaces in the names. It can understand CamelCase and the sagetv Airing format.
Reply With Quote
  #11  
Old 08-28-2018, 07:28 AM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 279
Quote:
Originally Posted by Taddeusz View Post
This is not my experience. Recordings need to be named properly. Allowing spaces in filenames and also letting SageTV insert the season and episode numbers (S01E01) into the filenames are both important.
If you import as TV or Movies, yes. If you import as Home Videos as I suggested, most definitely the name does not matter. There is no naming convention or season/episode data for home movies.
__________________
Server: Xeon E3-1225, 32GB RAM, Open Media Vault 5, SageTV Docker
Tuners: HD Homerun Quatro (OTA)
Clients: NVidia SheildTV x3
Reply With Quote
  #12  
Old 08-28-2018, 07:35 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by texneus View Post
If you import as TV or Movies, yes. If you import as Home Videos as I suggested, most definitely the name does not matter. There is no naming convention or season/episode data for home movies.
Just to be blunt, then what's the point?
__________________
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
  #13  
Old 08-28-2018, 10:26 AM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 279
Quote:
Originally Posted by Taddeusz View Post
Just to be blunt, then what's the point?
Wow, really? I just provided an extremely simple option to the OPs question on how to get SageTV recordings into emby and even thought I was pretty transparent on its limitations. Will it work? Yes. Will it meet the OP's needs? To be blunt, that's not your call.
__________________
Server: Xeon E3-1225, 32GB RAM, Open Media Vault 5, SageTV Docker
Tuners: HD Homerun Quatro (OTA)
Clients: NVidia SheildTV x3
Reply With Quote
  #14  
Old 08-28-2018, 11:30 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by texneus View Post
Wow, really? I just provided an extremely simple option to the OPs question on how to get SageTV recordings into emby and even thought I was pretty transparent on its limitations. Will it work? Yes. Will it meet the OP's needs? To be blunt, that's not your call.
I'm sorry, that was rude. But sure, it's a solution but it doesn't produce the results he was originally asking for. The only way to do that is through file renaming and telling SageTV to name new recordings in a specific way. Without renaming it may all be there but it's not going to be organized in any kind of meaningful way. And if you have a family or even multiple people wanting to watch things it's just not going to look appealing to the vast majority of "normal" people.

IMHO, it's better to have things work seamlessly as expected rather than having vastly disparate experiences if you must have separate media platforms.
__________________
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
  #15  
Old 08-28-2018, 12:19 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Ok, with the "extended filenames" and season/episodes added to the recording name, it appears the only thing emby needs is for each recording to be in its own directory, then it should pick it up, is that correct?

So let me know if this sounds good.

Sage records into a tv-recordings directory as, for example:
60Minutes-S50E49-521704-0.mpg

If I parse out the title as 60Minutes, create a directory called 60Minutes, put a Season 50 directory inside there, and put this file in that directory in a place that is passed to emby, it should pick it up, right?

1. Does emby need spaces (ie 60 Minutes instead of 60Minutes)?
2. Do I need to trim the SageTV info off the end of the file? (521704-0)
3. After moving this file to another directory that sage sees, BMT should pull it back in as a recording, but now I'll have two entries for the same episode. One will fail because I have moved it but not told Sage I did. Is there a command line way to tell Sage to delete a show? (a docker command I can run in the sage docker would be great) Or, will Sage follow a symlink to the new location (that sage can see but doesn't import)?

Thanks!

Last edited by lewispm; 08-28-2018 at 12:21 PM.
Reply With Quote
  #16  
Old 08-28-2018, 12:31 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by lewispm View Post
Ok, with the "extended filenames" and season/episodes added to the recording name, it appears the only thing emby needs is for each recording to be in its own directory, then it should pick it up, is that correct?

So let me know if this sounds good.

Sage records into a tv-recordings directory as, for example:
60Minutes-S50E49-521704-0.mpg

If I parse out the title as 60Minutes, create a directory called 60Minutes, put a Season 50 directory inside there, and put this file in that directory in a place that is passed to emby, it should pick it up, right?

1. Does emby need spaces (ie 60 Minutes instead of 60Minutes)?
2. Do I need to trim the SageTV info off the end of the file? (521704-0)
3. After moving this file to another directory that sage sees, BMT should pull it back in as a recording, but now I'll have two entries for the same episode. One will fail because I have moved it but not told Sage I did. Is there a command line way to tell Sage to delete a show? (a docker command I can run in the sage docker would be great) Or, will Sage follow a symlink to the new location (that sage can see but doesn't import)?

Thanks!
The naming conventions are here: https://github.com/MediaBrowser/Wiki/wiki/TV%20naming.

It looks like it will support spaces or underscores. But the title needs to have spaces in order to be recognized (e.g. "60 Minutes" rather than "60Minutes"). It also looks, like Plex, that Emby ignores everything after the "SxxExx". So there's no need to remove SageTV's airing ID's.

I'm not certain of the folders. For Plex I have not created any kind of directory structure. All SageTV recordings are in a single folder on my unRAID server. All ripped TV programs are in a separate folder that are split out by title and season.

In SageTV with extended filenames enabled all new recordings will have the appropriate spaces.

Just to test I will briefly install Emby on my unRAID server to verify on my 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
  #17  
Old 08-28-2018, 12:52 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Unfortunately, unlike Plex, Emby appears to require TV shows be in a set folder structure (Show->Season xx).

I added both my ripped and recorded shows. Emby picks up my ripped shows fine but does weird stuff with the recordings that are all lumped in a single folder.
__________________
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
  #18  
Old 08-28-2018, 01:43 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
Quote:
Originally Posted by Taddeusz View Post
Unfortunately, unlike Plex, Emby appears to require TV shows be in a set folder structure (Show->Season xx).

I added both my ripped and recorded shows. Emby picks up my ripped shows fine but does weird stuff with the recordings that are all lumped in a single folder.
Yes, that's why I began this whole process. It picked up my imports directory tv shows just fine, as they were in folders by show title, but didn't pick up my sage recordings directory without folders.

So I think I'm gonna run the phoenix renamer once on the current Sage recordings directory to get all the files that were recorded prior to me changing those settings renamed. Then I'll use my php script (so I can put it in user-scripts on the unraid server) to move recordings to their own directory on the "imports" directory nightly.

And thanks for the replies! Great info!

Last edited by lewispm; 08-28-2018 at 01:45 PM.
Reply With Quote
  #19  
Old 08-28-2018, 01:57 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by lewispm View Post
Yes, that's why I began this whole process. It picked up my imports directory tv shows just fine, as they were in folders by show title, but didn't pick up my sage recordings directory without folders.

So I think I'm gonna run the phoenix renamer once on the current Sage recordings directory to get all the files that were recorded prior to me changing those settings renamed. Then I'll use my php script (so I can put it in user-scripts on the unraid server) to move recordings to their own directory on the "imports" directory nightly.

And thanks for the replies! Great info!
Glad I could be of some help.
__________________
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
  #20  
Old 08-28-2018, 02:55 PM
lewispm lewispm is offline
Sage User
 
Join Date: Mar 2009
Location: Collierville, TN
Posts: 73
The phoenix-renamer fails with this msg:

Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:374)
	at sagex.phoenix.standalone.JarRunner.main(JarRunner.java:58)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Layout
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	... 3 more
it had a similar log/class error on windows, but it still processed the files. I don't have permissions set correctly on the windows VM to rename the files, but it did go through and try.

Any idea how to fix this on my mac?
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
Moving Recordings In Sage FidgetyRat SageTV Software 2 06-04-2010 11:23 AM
Renaming Manual recordings Jimmy Rivers SageTV Software 1 09-01-2008 11:07 PM
Help please, clarify moving Sage recordings to new PC stevech SageTV Software 4 07-11-2007 10:48 PM
renaming recordings stevech SageTV Software 4 04-03-2006 11:45 AM
Renaming Sage recordings through API jominor SageTV Studio 4 03-07-2006 05:46 AM


All times are GMT -6. The time now is 05:19 PM.


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