Write a scanner for recorded TV - 4TheRecord

I have added my recordings folder to Plex and have all the files show up correctly. I would like to be able to read the description as well, so I need a scanner that can read a textile where this info is.

I record tv using 4TheRecord.



The file-extension is .4tr, but it opens up in any text editor and looks much like an .nfo file.

I could probably get 4TheRecord to output in a different format if this helps.



The format of this file is this:



<?xml version="1.0"?><br />
<Recording xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br />
  <Actors /><br />
  <Category>documentary</Category><br />
  <ChannelDisplayName>DR HD</ChannelDisplayName><br />
  <ChannelId>51b2f50e-4041-4a56-b541-82ae43fafe09</ChannelId><br />
  <ChannelType>Television</ChannelType><br />
  <Description>Indtil nu har man opdaget 28.000 forskellige arter af fisk, og mangfoldigheden i farver, form og adfærd er utrolig. Nogle fisk kan flyve, mens andre kan svømme 100 kilometer i timen, og nogle er endog i stand til at gå på land. De mange fisk har lige så mange måder at beskytte deres afkom på. Løvpjaltefiskens parringsdans er en yndefuld menuet, hvor de spejler hinandens bevægelser. Under parringen overfører hunnen æggene til hannens hale, der beskytter dem der indtil udklækningen. Mens flyvefisken benytter sin særlige evne til at flygte fra sine fjender, lever dyndspringeren det meste af sit liv på land og gemmer sine æg i en tunnel i mudderet. Barberne og flodhestene har fundet en helt speciel måde at leve sammen på. Havet er nok et farligt sted at leve, men fiskene har gennem millioner af års evolution udviklet utrolige måder at overleve på.</Description><br />
  <Director /><br />
  <EpisodeNumber>4</EpisodeNumber><br />
  <EpisodeNumberDisplay>4/10</EpisodeNumberDisplay><br />
  <EpisodeNumberTotal>10</EpisodeNumberTotal><br />
  <EpisodePart xsi:nil="true" /><br />
  <EpisodePartTotal xsi:nil="true" /><br />
  <IsPartialRecording>false</IsPartialRecording><br />
  <IsPartOfSeries>true</IsPartOfSeries><br />
  <IsPremiere>false</IsPremiere><br />
  <IsRepeat>false</IsRepeat><br />
  <KeepUntilMode>UntilSpaceIsNeeded</KeepUntilMode><br />
  <KeepUntilValue xsi:nil="true" /><br />
  <LastWatchedPosition xsi:nil="true" /><br />
  <LastWatchedTime xsi:nil="true" /><br />
  <ProgramStartTime>2012-01-30T20:00:00</ProgramStartTime><br />
  <ProgramStopTime>2012-01-30T20:50:00</ProgramStopTime><br />
  <Rating /><br />
  <RecordingId>1b71f1c0-97da-4e99-a73b-bc53a5af3afe</RecordingId><br />
  <RecordingStartTime>2012-01-30T19:55:03.28</RecordingStartTime><br />
  <RecordingStopTime>2012-01-30T21:00:01.739+01:00</RecordingStopTime><br />
  <ScheduleId>dfb94670-73e2-49b6-99af-a5b699956e2c</ScheduleId><br />
  <ScheduleName>Livets planet ("Pattedyr" Naturserie fra BBC fra 2009. - 3/10)</ScheduleName><br />
  <SchedulePriority>Normal</SchedulePriority><br />
  <SeriesNumber xsi:nil="true" /><br />
  <StarRating xsi:nil="true" /><br />
  <SubTitle>"Fisk" Naturserie fra BBC fra 2009.</SubTitle><br />
  <Title>Livets planet</Title><br />
  <Flags /><br />
</Recording><br />




I have the file named correctly as I want it to show up, so basically I just want the scanner to read the -tag and then add this description to plea.

Is this possible? And if so, how hard is this to do? And will someone help me :-D?

Last question: Would this custom scanner work in windows? I seem to remember I read somewhere that custom scanners was not supported on windows.

Thanks in advance guys.

Hello jonaskp, I too am using 4TR to record TV on a Win7 machine which streams the recordings using Plex.



Like you I have been frustrated by my recordings having full metadata available, but Plex not being able to read the metadata.



Did you know the metadata is still embedded in the .ts file (at least on an NTFS system) even if you have not set 4TR to write out the .4tr files?



See; http://www.4therecord.eu/forum/viewtopic.php?f=12&t=45&p=263&hilit=metadata&sid=f834a11e0fcf2490bae8aaaad9c48e27#p263



The post below seems pretty definitive that custom scanners are not supported on Plex for Windows, and I can’t find any new info since then:

http://forums.plexapp.com/index.php/topic/19396-how-to-install-a-custom-scanner/page__view__findpost__p__157579



I was therefore going to look into modifying one of the .nfo agents to read the 4TR XML metadata.



My understanding of programming is pretty rudimentary, and I have never used Python, so this may take a while.



I’ll keep you posted. If you make any progress on this yourself, please share.



Step 1: Learn Python…

Thanks for the response. I myself have the same issue as you, as I have no programming knowledge that could be of use in this situation.



I was thinking about NFO scanning, but from what I read this is not supported in Plex at all? I am fairly new to Plex and have not had so much time to fiddle around.

If there is a NFO scanner that works, perhaps 4tr could be customized (via post processing) to create a .nfo file instead of/ along with the .4tr.



I’ll be looking into that I think, and I’ll keep you posted should I have some success.

From my understanding, NFO scanner is a no-go for the moment.



Does anyone else has a good idea for this then? Besides making a plugin/channel for connecting directly to FTR which would be ideal, but that is way out of my league for the moment.