SageTV Community  

Go Back   SageTV Community > General Discussion > General Discussion
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

General Discussion General discussion about SageTV and related companies, products, and technologies.

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 12-14-2011, 01:18 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
yeah...im having issues with the python, cause well i don't know python very well.

I am struggling through it, and getting there...slowly :-)

I hope to have something soon for peeps to test.
Reply With Quote
  #62  
Old 12-14-2011, 03:27 PM
fventura fventura is offline
Sage User
 
Join Date: Dec 2003
Posts: 72
Quote:
Originally Posted by gplasky View Post
So maybe I'm a little dense but I don't understand. I had set up Plex with all my Sage TV recordings, my music, ripped movies, etc. Plex grabbed all the meta data for all of them including the TV recordings with its own scrapers. Why do I need to talk to BMT to get the same metadata that Plex grabs on its own from tvdb? My TV recordings have the S & E numbers in the file name from Sage. Plex got everyone correct. So I watched recordings from PC Plex clients and Android Plex clients without issue.

Gerry
This is what makes me think I am missing something in my Sage configuration. None of my files have season and episode numbers in them. My recording are fairly popular shows (I think). The Simpsons, Family Guy, 2 and a Half Men, The Tonight Show, 60 Minutes....

What show do you have recorded that has S&E numbers,...I will record it as well and see if I get different filenames.
Reply With Quote
  #63  
Old 12-14-2011, 03:35 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Adding S&E numbers is an option that came along with SageV7 - look in detailed setup. It is likely also pretty easy to write an SJQ script to change the filename to add this info to make it more Plex-compliant.
__________________
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
  #64  
Old 12-14-2011, 03:36 PM
dinki's Avatar
dinki dinki is offline
Sage Expert
 
Join Date: Mar 2006
Posts: 682
Quote:
Originally Posted by wayner View Post
Adding S&E numbers is an option that came along with SageV7 - look in detailed setup. It is likely also pretty easy to write an SJQ script to change the filename to add this info to make it more Plex-compliant.
Are you talking about renaming the old recordings to include SxxExx and updating the filename information in the sage database? That'd be great.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data
SageTV 9 Docker, Open DCT Docker
Silicondust HDHomeRun Duo + Quatro
Sage Mini Client on Amazon Fire Sticks and Android TVs
Reply With Quote
  #65  
Old 12-14-2011, 03:42 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Yes - I am talking about renaming. I don't have too much experience at writing SJQ scripts but I have done a few. And I am pretty sure that the Sage API now contains the S&E info. Therefore you should be able to add it to the filenames pretty easily, assuming that this info is stored with the metadata from the original EPG entry or it was or can be retrieved by BMT.
__________________
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
  #66  
Old 12-14-2011, 04:45 PM
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
Yes - I am talking about renaming. I don't have too much experience at writing SJQ scripts but I have done a few. And I am pretty sure that the Sage API now contains the S&E info. Therefore you should be able to add it to the filenames pretty easily, assuming that this info is stored with the metadata from the original EPG entry or it was or can be retrieved by BMT.
not sure i understand what you mean here. Why would i rename the file? i can simply tell the plex metadata engine what the metadata is for a file named e:\recordings\Somelongannoyingnamefomrsage090980890273509.10.mpg

:-)

reading your post again i think i do understand...sorry

so yes thats possible to do, but from what Sean told me one would have to 1 remove file from sage 2 rename file to appropriate format 3 reimport file as recording...

what happens then with files like Americas Funniest Home Videos? these NEVER get sxxexx in my experience...i suppose sjq could pick those up and rename based on metadata from bmt...

Writting a Plex media agent still seems cleaner to me, but im all for other options. Im not so good an python and running into issues with it :-/

Last edited by PiX64; 12-14-2011 at 04:58 PM.
Reply With Quote
  #67  
Old 12-14-2011, 04:51 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Not sure if you all know this or not, but i found something in my testing that will actual add your sage recordings that aren't named right to your plex library
follow these steps:

1) from plex media manager select Home
2_ select MOVIES..yes movies
3) change the name at the top from movies to Sage Recordings or whatever you desire
4) hit advnaced tab
5) change the media scanner to plex video file scanner
6) change primary metadata agent to Personal Media

thats it.. your sage files with their silly filenames will show up in plex.
Reply With Quote
  #68  
Old 12-14-2011, 05:00 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
* Maybe slugger can chime in here on how to set that up in SJQ...is SJQ free btw or do you have to pay for it?
Reply With Quote
  #69  
Old 12-14-2011, 05:17 PM
fventura fventura is offline
Sage User
 
Join Date: Dec 2003
Posts: 72
Quote:
Originally Posted by PiX64 View Post
Not sure if you all know this or not, but i found something in my testing that will actual add your sage recordings that aren't named right to your plex library
follow these steps:

1) from plex media manager select Home
2_ select MOVIES..yes movies
3) change the name at the top from movies to Sage Recordings or whatever you desire
4) hit advnaced tab
5) change the media scanner to plex video file scanner
6) change primary metadata agent to Personal Media

thats it.. your sage files with their silly filenames will show up in plex.
Yes I am doing this now in order to watch shows that are currently being recorded.

I am also running this script to copy my sage files to another location in the proper format for Plex to grab metadata for them (as an interim solution - evaluation Plex/XBMC). It seems to get information from Sage's properties files if they exist.

http://forum.xbmc.org/showthread.php?t=87261
Reply With Quote
  #70  
Old 12-14-2011, 05:52 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by fventura View Post
Yes I am doing this now in order to watch shows that are currently being recorded.

I am also running this script to copy my sage files to another location in the proper format for Plex to grab metadata for them (as an interim solution - evaluation Plex/XBMC). It seems to get information from Sage's properties files if they exist.

http://forum.xbmc.org/showthread.php?t=87261
So that script creates symbolic links... Were u able to get Plex to scan symbolic links and properly catalog them? If so please do tell!

That script will only work on Windows 7 as mklink command isn't supported in xp.
Reply With Quote
  #71  
Old 12-14-2011, 05:57 PM
fventura fventura is offline
Sage User
 
Join Date: Dec 2003
Posts: 72
No, sorry, I am not using the symbolic link option. I am copying files to another shared drive. I am running Windows 2003 Server and I don't think it supports symbolic links either.

Thinking about setting up a Windows7 box to at least test WMC. Could try to test a Sage install on it also using a tuner from my HDhomerun. Got a few of them (unused machines) lying around prior to moving to Sage Extenders
Reply With Quote
  #72  
Old 12-14-2011, 06:16 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by fventura View Post
No, sorry, I am not using the symbolic link option. I am copying files to another shared drive. I am running Windows 2003 Server and I don't think it supports symbolic links either.

Thinking about setting up a Windows7 box to at least test WMC. Could try to test a Sage install on it also using a tuner from my HDhomerun. Got a few of them (unused machines) lying around prior to moving to Sage Extenders
Did u modify the script then to copy the file rather than making symbolic links? I'm confused, what did you do exactly? :-)
Reply With Quote
  #73  
Old 12-14-2011, 06:29 PM
fventura fventura is offline
Sage User
 
Join Date: Dec 2003
Posts: 72
Quote:
Originally Posted by PiX64 View Post
Did u modify the script then to copy the file rather than making symbolic links? I'm confused, what did you do exactly? :-)
First off I am not a programmer...

The instructions indicate the symlink option is optional. I suspect if this worked I wouldn't need to also copy the mpg file to the destination location.

I did modify the config.xml only where it was required...ie: source and destination locations, filenames/shows to process, delete source or not option, tvdb login and key. I think that was it, everything else is at default. I set up an AT job to run this daily.

So it is doing what it should...copying the mpg files to a directory structure that Plex/XBMC can read in. However, in the log file I do see it trying to create symlinks and failing....my assumption as I scan the huge log file (I have debugging turned up) is that it was just for internal tracking of the process...but I am probably incorrect.
Reply With Quote
  #74  
Old 12-14-2011, 07:13 PM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by fventura View Post
First off I am not a programmer...

The instructions indicate the symlink option is optional. I suspect if this worked I wouldn't need to also copy the mpg file to the destination location.

I did modify the config.xml only where it was required...ie: source and destination locations, filenames/shows to process, delete source or not option, tvdb login and key. I think that was it, everything else is at default. I set up an AT job to run this daily.

So it is doing what it should...copying the mpg files to a directory structure that Plex/XBMC can read in. However, in the log file I do see it trying to create symlinks and failing....my assumption as I scan the huge log file (I have debugging turned up) is that it was just for internal tracking of the process...but I am probably incorrect.

Ah ok.. no worries man i was just trying to understand what you were doing. I dont' want to spend anymore of my time creating a metadata agent for plex if it is really not necessary.

I knew you could tell it to copy the file to a new location, but i didn't think it was possible to not create the symlinks.

I think that if we can get some input from Slugger on the SJQ and if it is possible to set it up in such a way that it will scan the recordings directory, rename files, then reimport those files to sage, that would certainly be ideal.

I spent some time trying to get Plex to be able to read the symlinks, but was 100% unsuccessful. If someone else has been able to figure this out, then i def think that is the quickest solution for all of us that are going to use plex in conjuction with our sage recordings.
Reply With Quote
  #75  
Old 12-14-2011, 10:00 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by PiX64 View Post
* Maybe slugger can chime in here on how to set that up in SJQ...is SJQ free btw or do you have to pay for it?
I believe that SJQ is now free. If I remember correctly Slugger was charging for some of his plugins but he stopped doing so ater Sage died.

I kind of like your process of reading the SageTV DB and populating that metadata over to Plex. I have gone through and done a lot of fixing of metadata over the years. I might lose some of that if I just had Plex find its own metadata. It would also be nice if you could copy over Fanart files to Plex - I have created some custom Fanart where it did not exist. This is primarily for Sports and Kids' shows. TVDB does not allow you to upload Fanart for Sports shows.

But if you have the S and E numbers in the filename then it should be pretty easy for Plex to automatically generate the metadata.

The Sage API does in fact contain the Season and Episode in the API. Here are the entries:
Code:
GetShowSeasonNumber
 public int GetShowSeasonNumber(sage.Show Show) Returns the season number of the specified Show. For episodic content; sometimes a numeric value is given to the season. If that information exists, this will return it.
 
Parameters:Show - the Show object Returns:the season number of the specified Show, 0 if it is not set Since:7.1 
--------------------------------------------------------------------------------

GetShowEpisodeNumber
 public int GetShowEpisodeNumber(sage.Show Show) Returns the episode number of the specified Show. For episodic content; sometimes a numeric value is given to the episode in a season. If that information exists, this will return it.
 
Parameters:Show - the Show object Returns:the episode number of the specified Show, 0 if it is not set Since:7.1
Therefore I would think that Groovy code something like this in SJQ would get this info:
Code:
Object mf = MediaFileAPI.GetMediaFileForID(Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")));
String OrigFileName = SJQ4_METADATA.get("SJQ4_LAST_SEGMENT");
Int SeasonNum=ShowAPI.GetShowSeasonNumber(mf);
Int EpNum=ShowAPI.GetShowEpisode(mf);
Then I imagine it is just some string parsing as you want to change

ModernFamily-AftertheFire-6179364-0.mpg to ModernFamily-S03E08-AftertheFire-6179364-0.mpg

So you would just parse the string for the first "-" and insert "S"+SeasonNum+"E"+EpNum - but you may have to force leading zeros to always have a two digit Series and Episode Number. Then just run a rename command passing the original and new file names.

The problem may be if you have shows that were required by Sage v7.0 or earlier since it seems that the S&E info wasn't stored back then. Therefore you may have to have BMT fetch this data.

But Slugger would be the expert at all of this.
__________________
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
  #76  
Old 12-14-2011, 10:02 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by fventura View Post
Yes I am doing this now in order to watch shows that are currently being recorded.
Are there any limitations on this - for example, some programs will only playback content that existed when you first started watching a show. So if you start watching a 60 min show 15 minutes into the show then you will only get the first 15 minutes. But if you restart watching you should get the rest.
__________________
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
  #77  
Old 12-15-2011, 12:12 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by PiX64 View Post
I think that if we can get some input from Slugger on the SJQ and if it is possible to set it up in such a way that it will scan the recordings directory, rename files, then reimport those files to sage, that would certainly be ideal.
Yes, it's possible with SJQ, however...

Quote:
Originally Posted by wayner View Post
I believe that SJQ is now free. If I remember correctly Slugger was charging for some of his plugins but he stopped doing so ater Sage died.
SJQ still requires a license (donation) to unlock all features. But the unlicensed version will run a single task from a single task client so you could set this up with the unlicensed version.

However...

If you just want to write a script and run it once to scan your existing recordings then ignore SJQ and just write a Groovy script and import the sagex-api.jar as your means to access the Sage server. If you want it to continuously update your library on new recording events, etc. then you probably want the entire SJQ package.

Warning: Yes, renaming your recordings in wiz.bin is very doable with SJQ/Groovy/any language, but it is not a simple process and one should be very cautious when writing such a script. I'd be testing it diligently before actually running it against my entire recording library. You need to rename the current recording file to the new desired file name, delete the entry from wiz.bin, import the new file name back into wiz.bin, then relink the new import to the old airing object for proper metadata. You need to check for and properly react to errors on any of those actions along the way (i.e. be able to completely roll back to where you started should any of those actions fail along the way).

I have a script that moves files in my svn repository. It doesn't rename them, but I think someone modded it to do a rename based on S/E info - check the SJQv4 thread. Either way, this is an operation you want to test heavily before running against one's entire recording library.

Good luck and happy scripting!
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #78  
Old 12-15-2011, 08:36 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I did a rename of my files a while back in SJQ3. I did not like the way Sage named the files.

If it didn't have episodes then BMT fetched them. As long as you keep the airing ID at the end you simply do a rename inplace and a library refresh and all is fine. No need to touch the wiz.bin let Sage update the file name.

Below is a sample of the final product.
Criminal Minds - S06E07 - Middle Man-440210-0.mpg

Code:
//Rule SJQRenameMYSeries
if [IsObjMediaFile == "true" && $.IsTVFile{} == "true" && Filename =$ ".mpg" && Filename !* "- S0" && Filename !* "- S1" && Filename !* "- S2" && Filename !* "- S3" && FileExists == "%c%.properties" && FileExists == "%d%/%p%.VPrj" && $.GetNumberOfSegments{} == "1"] {
    :SCANMEDIA "true"
//   :RUNQLOADER "true"
    :PRIORITY 9999
     SJQRenameMYSeries
}


//Client
SJQRenameMYSeries {
:MAX 1
   :RESOURCES 55
  "C:\\SJQNEW\\SJQRenameMYSeriesNew.bat \"%c%\" \"$.GetShowTitle{}\" \"$.GetShowEpisode{}\" \"$.GetShowSeasonNumber{}\" \"$.GetShowEpisodeNumber{}\" \"$.GetAiringID{}\""
}


SJQRenameMYSeriesNew.bat

move "%~f1" "%~d1%~p1"
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 exit 1

set MediaTitle=%2
rem for /f "useback tokens=*" %%a in ('%MediaTitle%') do set MediaTitle=%%~a
set MediaTitle=%MediaTitle:: = %
set MediaTitle=%MediaTitle:? = %
set MediaTitle=%MediaTitle::= %
set MediaTitle=%MediaTitle:?= %
set MediaTitle=%MediaTitle:& =& %
for /f "useback tokens=*" %%a in ('%MediaTitle%') do set MediaTitle=%%~a

set episodename=%3
set episodename=%episodename:: = %
set episodename=%episodename:? = %
set episodename=%episodename::= %
set episodename=%episodename:?= %
set episodename=%episodename:& =& %
set episodename=%episodename::=-%
for /f "useback tokens=*" %%a in ('%episodename%') do set episodename=%%~a


set  SeasonNumber=%4
for /f "useback tokens=*" %%a in ('%SeasonNumber%') do set SeasonNumber=%%~a
set  SeasonNumber=0%SeasonNumber%
set  SeasonNumber=%SeasonNumber:~-2%
echo %SeasonNumber%


set  EpisodeNumber=%5
for /f "useback tokens=*" %%a in ('%EpisodeNumber%') do set EpisodeNumber=%%~a
set  EpisodeNumber=0%EpisodeNumber%
if %EpisodeNumber% LEQ 99 set EpisodeNumber=%EpisodeNumber:~-2%
if %EpisodeNumber% GTR 99 set EpisodeNumber=%EpisodeNumber:~-3%

echo %EpisodeNumber%

set airingid=%6
for /f "useback tokens=*" %%a in ('%airingid%') do set airingid=%%~a

move /Y "%~f1" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0%~x1"
set checkmove=%ERRORLEVEL%
if %checkmove% NEQ 0 exit 1
move /Y "%~f1.properties" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0%~x1.properties"
move /Y "%~d1%~p1%~n1.qfix" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0.qfix"
move /Y "%~d1%~p1%~n1.edl" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0.edl"
move /Y "%~d1%~p1%~n1.VPrj" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0.VPrj"
move /Y "%~d1%~p1%~n1.aspects" "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0.aspects"
echo "renamed" >> "%~d1%~p1%MediaTitle% - S%SeasonNumber%E%EpisodeNumber% - %episodename%-%airingid%-0.renamed"
if %checkmove% EQU 0 exit 0

Thia is the actual SJQ log
Code:
Task Log: 673776/SJQRenameMYSeries
Wed Dec 14 07:29:05 PST 2011: Starting task with priority 5/1/10
Executing command line: C:\SJQNEW\SJQRenameMYSeriesNew.bat "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.mpg" "Criminal Minds" "Middle Man" "6" "7" "440210"
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.

C:\SJQService\sjqc_winntsvc\bin>move "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.mpg" "C:\Users\Administrator\Videos\SageTV\" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>set checkuse=0 
C:\SJQService\sjqc_winntsvc\bin>if 0 NEQ 0 exit 1 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>rem for /f "useback tokens=*" %a in ('"Criminal Minds"') do set MediaTitle=%~a 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle="Criminal Minds" 
C:\SJQService\sjqc_winntsvc\bin>for /F "useback tokens=*" %a in ('"Criminal Minds"') do set MediaTitle=%~a 
C:\SJQService\sjqc_winntsvc\bin>set MediaTitle=Criminal Minds 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>set episodename="Middle Man" 
C:\SJQService\sjqc_winntsvc\bin>for /F "useback tokens=*" %a in ('"Middle Man"') do set episodename=%~a 
C:\SJQService\sjqc_winntsvc\bin>set episodename=Middle Man 
C:\SJQService\sjqc_winntsvc\bin>set  SeasonNumber="6" 
C:\SJQService\sjqc_winntsvc\bin>for /F "useback tokens=*" %a in ('"6"') do set SeasonNumber=%~a 
C:\SJQService\sjqc_winntsvc\bin>set SeasonNumber=6 
C:\SJQService\sjqc_winntsvc\bin>set  SeasonNumber=06 
C:\SJQService\sjqc_winntsvc\bin>set  SeasonNumber=06 
C:\SJQService\sjqc_winntsvc\bin>echo 06 
06
C:\SJQService\sjqc_winntsvc\bin>set  EpisodeNumber="7" 
C:\SJQService\sjqc_winntsvc\bin>for /F "useback tokens=*" %a in ('"7"') do set EpisodeNumber=%~a 
C:\SJQService\sjqc_winntsvc\bin>set EpisodeNumber=7 
C:\SJQService\sjqc_winntsvc\bin>set  EpisodeNumber=07 
C:\SJQService\sjqc_winntsvc\bin>if 07 LEQ 99 set EpisodeNumber=07 
C:\SJQService\sjqc_winntsvc\bin>if 07 GTR 99 set EpisodeNumber=07 
C:\SJQService\sjqc_winntsvc\bin>echo 07 
07
C:\SJQService\sjqc_winntsvc\bin>set airingid="440210" 
C:\SJQService\sjqc_winntsvc\bin>for /F "useback tokens=*" %a in ('"440210"') do set airingid=%~a 
C:\SJQService\sjqc_winntsvc\bin>set airingid=440210 
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.mpg" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.mpg" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>set checkmove=0 
C:\SJQService\sjqc_winntsvc\bin>if 0 NEQ 0 exit 1 
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.mpg.properties" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.mpg.properties" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.qfix" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.qfix" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.edl" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.edl" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.VPrj" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.VPrj" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.aspects" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.aspects" 
        1 file(s) moved.
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.EDFAV" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.EDFAV" 
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.JANFAV" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.JANFAV" 
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.archive" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.archive" 
C:\SJQService\sjqc_winntsvc\bin>move /Y "C:\Users\Administrator\Videos\SageTV\CriminalMinds-MiddleMan-440210-0.OLDNOTWATCHED" "C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.OLDNOTWATCHED" 
C:\SJQService\sjqc_winntsvc\bin>echo "renamed"  1>>"C:\Users\Administrator\Videos\SageTV\Criminal Minds - S06E07 - Middle Man-440210-0.renamed" 
C:\SJQService\sjqc_winntsvc\bin>if 0 EQU 0 exit 0

Screen Cap attached of Sage Screen
Attached Images
File Type: jpg criminalminds.jpg (315.4 KB, 136 views)
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 12-15-2011 at 08:58 AM.
Reply With Quote
  #79  
Old 12-15-2011, 08:41 AM
PiX64's Avatar
PiX64 PiX64 is offline
Sage Icon
 
Join Date: Dec 2008
Location: Illinois
Posts: 1,991
Quote:
Originally Posted by nyplayer View Post
I did a rename of my files a while back in SJQ3. I did not like the way Sage named the files.

If it didn't have episodes then BMT fetched them. As long as you keep the airing ID at the end you simply do a rename inplace and a library refresh and all is fine. No need to touch the wiz.bin let Sage update the file name.

Below is a sample of the final product.
Criminal Minds - S06E07 - Middle Man-440210-0.mpg
If that works, and there is no need to actualy delete and then re-import, that may be the solution i was looking for. I hate to create a scraping agent for plex if there is a way to leverage built in plex functionality.

what happens though in the case that there is no season and episode number found in bmt?
Reply With Quote
  #80  
Old 12-15-2011, 08:54 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Well if BMT does not find the season episode... and Sage does it will still work.. If neither has it then you can modify the the SJQ rule to only run if it sees season and episode. You can easily test this on just 1 recording rename it manually keeping the airingID at the end and do a refresh.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
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
Plex vs AirVideo for streaming files to iPad wayner General Discussion 16 11-03-2011 12:13 PM
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
Button press to bring Sage forward to front active? IncredibleHat SageTV Software 8 05-30-2006 06:31 PM
Anything new on the MVP front? x[corwyn] SageTV Customizations 12 08-22-2004 06:49 AM


All times are GMT -6. The time now is 06:37 AM.


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