|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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. |
#3
|
||||
|
||||
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 |
#4
|
|||
|
|||
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. |
#5
|
||||
|
||||
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 |
#6
|
|||
|
|||
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. |
#7
|
||||
|
||||
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) |
#8
|
||||
|
||||
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 |
#9
|
||||
|
||||
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> |
#10
|
|||
|
|||
Quote:
|
#11
|
||||
|
||||
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 Thanks, flips |
#12
|
|||
|
|||
iRRC I log it if it doesn't hit the sagetv server. Do you have sagex remote services installed?
|
#13
|
||||
|
||||
Quote:
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 Code:
http://localhost:8080/sagex/media/thumbnail?mediafile=ACharlieBrownChristmas-12744898-0.mpg Thanks, flips |
#14
|
|||
|
|||
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.
|
#15
|
||||
|
||||
Quote:
Thanks for looking into it! Let me know if there is anything I can do to help. flips |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |