SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2016, 03:43 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
SageTV renamer for Kodi/Plex

So after to long of time I decided to finally post my renamer I made for a couple of users. It does require SageX and BMT. It is windows only (sorry linux users ). Of note I do have one user using it for a linux sagetv installation by running from a windows pc. It doesn't have to be run from the sagetv server just from a windows pc.

I wrote a quick readme (didn't even proof read so go easy). Any issues please submit on github and I will try to keep on top of it. Not sure there are many users that will want this but figured I would share just in case.

This allows you to use sage as a backend recorder and plex/kodi for the front in. You can schedule this to run in a batch or run occasionally when you want.

PluckyHDSage2Kodi]

I do plan on sharing the source eventually as well.

Of note you can edit the xml directly or run with the cmd line switch "/settings" to edit the settings

cheers

Last edited by PLUCKYHD; 05-26-2016 at 03:47 PM.
Reply With Quote
  #2  
Old 07-30-2016, 06:11 PM
SWKerr SWKerr is offline
Sage Icon
 
Join Date: Jun 2008
Posts: 1,178
Was looking forward to you finishing this up but I am having a problem with it.
I have not been able to get this to run.
Just using the test file with the example folders it gives me the following error in the log. I get the same error using real files and on multiple machines.

Am I missing a pre-rec or doing something stupid. (Windows 10-64)


[Header]\r\n2016-07-30 20:01:13,573 [1] INFO PluckyHDSage2Kodi.LogHandler Version #4.0.5990.27472BETA
2016-07-30 20:01:13,657 [1] INFO PluckyHDSage2Kodi.LogHandler Fetching currExt=.mpg
2016-07-30 20:01:13,657 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for=C:\testFiles\SageTVTV
1
2016-07-30 20:01:13,827 [1] ERROR PluckyHDSage2Kodi.LogHandler Error in process on file C:\testFiles\SageTVTV\test.mpg
2016-07-30 20:01:13,827 [1] ERROR PluckyHDSage2Kodi.LogHandler System.FormatException: String was not recognized as a valid Boolean.
at System.Boolean.Parse(String value)
at PluckyHDSage2Kodi.sagexHTTP.Process(String file, SageMediaObject mediaObj)
2016-07-30 20:01:13,827 [1] ERROR PluckyHDSage2Kodi.LogHandler Error in process on file C:\testFiles\SageTVTV\test.mpg
2016-07-30 20:01:13,827 [1] ERROR PluckyHDSage2Kodi.LogHandler System.FormatException: String was not recognized as a valid Boolean.
at System.Boolean.Parse(String value)
at PluckyHDSage2Kodi.sagexHTTP.Process(String file, SageMediaObject mediaObj)
2016-07-30 20:01:13,827 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for extension .mpg = 0
2016-07-30 20:01:13,827 [1] INFO PluckyHDSage2Kodi.LogHandler Fetching currExt=.ts
2016-07-30 20:01:13,843 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for=C:\testFiles\SageTVTV
0
2016-07-30 20:01:13,843 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for extension .ts = 0
2016-07-30 20:01:13,843 [1] INFO PluckyHDSage2Kodi.LogHandler Fetching currExt=.mkv
2016-07-30 20:01:13,843 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for=C:\testFiles\SageTVTV
0
2016-07-30 20:01:13,843 [1] INFO PluckyHDSage2Kodi.LogHandler Total files found for extension .mkv = 0
[Footer]\r\n
__________________

Retired SageTV in favor of Plex\Emby and YouTubeTV.
Reply With Quote
  #3  
Old 07-30-2016, 09:12 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Did you edit the xml manually or first run it with the /settings parameter?
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #4  
Old 07-31-2016, 08:15 PM
SWKerr SWKerr is offline
Sage Icon
 
Join Date: Jun 2008
Posts: 1,178
I edited the xml manually but tired the /settings with a fresh copy of the program and get the same error.
__________________

Retired SageTV in favor of Plex\Emby and YouTubeTV.
Reply With Quote
  #5  
Old 08-01-2016, 10:41 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Could you post the xml file, please?
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #6  
Old 08-13-2016, 08:00 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Need to see the XML your settings aren't right somewhere. The log states it isn't finding any files.
What is in your folder structure "C:\testFiles\SageTVTV\test.mpg"? Do you have video files there and the video files hace to be in safetv database in their current location you can't move it out of safetv because then I cant get the sage db info.
Reply With Quote
  #7  
Old 10-28-2016, 09:10 PM
Flips's Avatar
Flips Flips is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 155
Thanks for your help Plucky. I wasn't understanding the general usage. I was moving recordings before. Now I just ran a test after I put in one of my recording directories. I am closer, but I still get the following error, same for each file:
Code:
[Header]\r\n2016-10-28 22:06:50,018 [1] INFO  PluckyHDSage2Kodi.LogHandler Version #4.0.5990.27472BETA
2016-10-28 22:06:50,066 [1] INFO  PluckyHDSage2Kodi.LogHandler Fetching currExt=.mpg
2016-10-28 22:06:50,076 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for=d:\sage1\
 145
2016-10-28 22:06:50,163 [1] ERROR PluckyHDSage2Kodi.LogHandler Error in process on file d:\sage1\ACharlieBrownChristmas-12744898-0.mpg
2016-10-28 22:06:50,166 [1] ERROR PluckyHDSage2Kodi.LogHandler System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at PluckyHDSage2Kodi.sagexHTTP.Process(String file, SageMediaObject mediaObj)
Reply With Quote
  #8  
Old 10-29-2016, 08:18 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Probably also an issue with the settings and will need to see your XML file. It's probably a simple typo, but without looking at the XML, it's impossible to say for sure.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #9  
Old 10-29-2016, 06:45 PM
Flips's Avatar
Flips Flips is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 155
Thanks for taking a look. I didn't change much from the original...

Code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="PluckyHDSage2Kodi.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
       </sectionGroup>
    <section name="log4net"
            type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
  <log4net>
    <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
      <file type="log4net.Util.PatternString" value="PluckyHDLog-%date{yyyy-MM-dd_HH-mm-ss}.log" />     
      <param name="AppendToFile" value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <param name="Header" value="[Header]\r\n" />
        <param name="Footer" value="[Footer]\r\n" />
        <param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
      </layout>
    </appender>

    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
      <layout type="log4net.Layout.PatternLayout">
        <param name="Header" value="[Header]\r\n" />
        <param name="Footer" value="[Footer]\r\n" />
        <param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
      </layout>
    </appender>

    <root>
      <level value="INFO" />
      <appender-ref ref="LogFileAppender" />
      <appender-ref ref="ConsoleAppender" />
    </root>
  </log4net>
  <appSettings>
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>
  <system.web>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>
  <userSettings>
    <PluckyHDSage2Kodi.Properties.Settings>
      <setting name="SageServerHttp" serializeAs="String">
        <value>http://localhost:8080</value>
      </setting>
      <setting name="DeleteAfterCopy" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="UserName" serializeAs="String">
        <value>sage</value>
      </setting>
      <setting name="Password" serializeAs="String">
        <value>frey</value>
      </setting>
      <setting name="SourceLocation" serializeAs="Xml">
        <value>
          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <string>d:\sage1\</string>
          </ArrayOfString>
        </value>
      </setting>
      <setting name="NewLocation" serializeAs="String">
        <value>C:\TestFiles\</value>
      </setting>
      <setting name="InclArticleFiles" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="Extensions" serializeAs="Xml">
        <value>
          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <string>.mpg</string>
            <string>.ts</string>
            <string>.mkv</string>
          </ArrayOfString>
        </value>
      </setting>
      <setting name="TvSubFolder" serializeAs="String">
        <value>TV</value>
      </setting>
      <setting name="MovieSubFolder" serializeAs="String">
        <value>Movies</value>
      </setting>
      <setting name="RunTestOnly" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="IgnoreDuplicateFiles" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="ScrubStartingArticlestoEnd" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="MovieFileRenamParams" serializeAs="String">
        <value>{ShowTitle} ({ShowYear}) {Resolution}-{@MediaFileID}</value>
      </setting>
      <setting name="MovieFolderRenamParams" serializeAs="String">
        <value>{ShowTitle} ({ShowYear})</value>
      </setting>
      <setting name="TVFileRenamParams" serializeAs="String">
        <value>{ShowTitle} ({ShowYear}) S{SeasonNum}-E{EpisodeNum} {EpisodeName} [{Resolution}]-{@MediaFileID}</value>
      </setting>
      <setting name="TVFolderRenamParams" serializeAs="String">
        <value>{ShowTitle} ({ShowYear})</value>
      </setting>
      <setting name="DeleteLowerResolutionOnReplacement" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="UseResolutionNames" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="ResolutionOrder" serializeAs="String">
        <value>1080p:720p:480p:480i</value>
      </setting>
      <setting name="ResolutionNames" serializeAs="String">
        <value>Bluray:HDTV:DVD:NTSC</value>
      </setting>
      <setting name="ArticleExtensions" serializeAs="Xml">
        <value>
          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <string>.edl</string>
            <string>.properties</string>
            <string>.jpeg</string>
          </ArrayOfString>
        </value>
      </setting>
      <setting name="DuplicateAdder" serializeAs="String">
        <value>[duplicate]</value>
      </setting>
      <setting name="MoveDuplicatesToSpecialFolder" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="DuplicatesFolder" serializeAs="String">
        <value>Duplicates</value>
      </setting>
      <setting name="RenameMultiSegments" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="NewNameForDuplicates" serializeAs="String">
        <value>True</value>
      </setting>
    </PluckyHDSage2Kodi.Properties.Settings>
  </userSettings>
</configuration>
Reply With Quote
  #10  
Old 10-29-2016, 07:58 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Flips View Post
Thanks for your help Plucky. I wasn't understanding the general usage. I was moving recordings before. Now I just ran a test after I put in one of my recording directories. I am closer, but I still get the following error, same for each file:
Code:
[Header]\r\n2016-10-28 22:06:50,018 [1] INFO  PluckyHDSage2Kodi.LogHandler Version #4.0.5990.27472BETA
2016-10-28 22:06:50,066 [1] INFO  PluckyHDSage2Kodi.LogHandler Fetching currExt=.mpg
2016-10-28 22:06:50,076 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for=d:\sage1\
 145
2016-10-28 22:06:50,163 [1] ERROR PluckyHDSage2Kodi.LogHandler Error in process on file d:\sage1\ACharlieBrownChristmas-12744898-0.mpg
2016-10-28 22:06:50,166 [1] ERROR PluckyHDSage2Kodi.LogHandler System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at PluckyHDSage2Kodi.sagexHTTP.Process(String file, SageMediaObject mediaObj)
That's an odd is there 145 files in there? I can see what file it's failing on that file is in sage database currently correctly? It's obviously a bad check by me. Let me pull up the source code in the next day or two and see if I can help you out. It may be a configuration error I'll look over that log you posted as well. I know this works because I use it
Reply With Quote
  #11  
Old 10-31-2016, 03:41 PM
Flips's Avatar
Flips Flips is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 155
Yep, there are 145 files in that directory. I get the same error on every file, here is the last file and the last few lines of the log:
Code:
2016-10-29 19:43:15,110 [1] ERROR PluckyHDSage2Kodi.LogHandler Error in process on file d:\sage1\WisconsinFoodie-WildTomatoIslandOrchardCider-14266633-0.mpg
2016-10-29 19:43:15,111 [1] ERROR PluckyHDSage2Kodi.LogHandler System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at PluckyHDSage2Kodi.sagexHTTP.Process(String file, SageMediaObject mediaObj)
2016-10-29 19:43:15,113 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for extension .mpg = 0
2016-10-29 19:43:15,113 [1] INFO  PluckyHDSage2Kodi.LogHandler Fetching currExt=.ts
2016-10-29 19:43:15,126 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for=d:\sage1\
 0
2016-10-29 19:43:15,126 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for extension .ts = 0
2016-10-29 19:43:15,127 [1] INFO  PluckyHDSage2Kodi.LogHandler Fetching currExt=.mkv
2016-10-29 19:43:15,139 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for=d:\sage1\
 0
2016-10-29 19:43:15,139 [1] INFO  PluckyHDSage2Kodi.LogHandler Total files found for extension .mkv = 0
[Footer]\r\n
What is the call that you make to the webserver? I can try that manually to make sure that is working. If I change the server or the directly slightly it will error out, so I believe it is hitting the server, but maybe it isn't returning something properly. Only the BMIT site is used on the web server?

Thanks,
flips
Reply With Quote
  #12  
Old 10-31-2016, 04:12 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
iRRC I log it if it doesn't hit the sagetv server. Do you have sagex remote services installed?
Reply With Quote
  #13  
Old 10-31-2016, 08:33 PM
Flips's Avatar
Flips Flips is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 155
Quote:
Originally Posted by PLUCKYHD View Post
iRRC I log it if it doesn't hit the sagetv server. Do you have sagex remote services installed?
Yep, double checked tonight.

Are you pulling out the sageid from the filename or are you passing the filename to the api?

Poking around in the api, this worked:
Code:
http://localhost:8080/sagex/media/thumbnail?mediafile=12744898
But this didn't... but I'm not sure it was supposed to...
Code:
http://localhost:8080/sagex/media/thumbnail?mediafile=ACharlieBrownChristmas-12744898-0.mpg
or did my 145 files break the array or something?

Thanks,
flips
Reply With Quote
  #14  
Old 11-02-2016, 07:47 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Are you running v9 or v7 apparently something broke in 9 I just found out. Not sure what it is yet but working on it.
Reply With Quote
  #15  
Old 11-02-2016, 12:21 PM
Flips's Avatar
Flips Flips is offline
Sage Advanced User
 
Join Date: Oct 2005
Posts: 155
Quote:
Originally Posted by PLUCKYHD View Post
Are you running v9 or v7 apparently something broke in 9 I just found out. Not sure what it is yet but working on it.
Yep I'm on v9...

Thanks for looking into it! Let me know if there is anything I can do to help.

flips
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
The "Best" of stock SageTV and Kodi, can it be done? stanger89 Gemstone for v7 21 06-24-2016 03:08 PM
Kodi 17 and Nexus Player.. SageTV nyplayer General Discussion 5 03-14-2016 10:47 AM
Kodi as SageTV Alternative ? PeteCress General Discussion 23 03-04-2016 08:48 AM
Plex 4.0 - better peruse the Plex.forum before updating.... tvmaster2 General Discussion 18 08-17-2015 10:16 AM
Eventghost, Plex and SageTV lovingHDTV SageTV Software 16 09-18-2014 09:04 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.