This project has moved and is read-only. For the latest updates, please go here.

Attributes are not being read properly

Topics: question
Jan 8, 2014 at 8:33 AM
Edited Jan 8, 2014 at 8:33 AM

I love the concept of this script, however I'm having trouble getting it to work correctly. I'm currently trying to process a single file as a test. However, I can't seem to get it to properly identify the attributes of the metadata.

It states that it found the various attributes at the given indexes, but as you go down, you can see that it says Title is 'Title' and that it can't find a match in TVDB for 'Subtitle'.

Its the same for all the properties. I'm running Windows 8.1. I also tried specifying the attributes in the XML config file, but that didn't help. Thoughts? Any help is appreciated!

WTV-MetaRenamer v0.18
... found 'Date Created' at index 4
... found 'Title' at index 21
... found 'Subtitle' at index 204
... found 'Broadcast date' at index 271
... found 'Program Description' at index 272
... found 'Recording time' at index 273

Processing D:\Recorded TV\Almost Human_KCPQDT_2013_12_16_19_58_00.wtv
... title is 'Title'
... FetchSeriesID returning 266840 from cache
... returning default language code en
... returning MatchBroadcastDate as False
... returning MatchBroadcastDate as False
... SeriesIsInIgnoreList
...... ignore list is empty
...... returning False
... SeriesIsNotInOnlyList
...... only list is empty
...... returning False
... retrieved episode information from cache
... testing against the subtitle metadata
... MatchEpisodePrecisely: trying to find an episode that matches 'Subtitle'
... didn't match text
... BestMatchEpisode called for 'Subtitle'
... 'Episode 01': ignoring score of 10 as it exceeds the 50% threshold
Jan 8, 2014 at 10:00 AM

I'm sorry to say this but I think that the broadcaster has failed to provide relevant information. It isn't the script failing.

To confirm this, please right-click on the file and choose Properties then click on the Details tab. You will see a set of properties and values. On the left hand side are the properties, so Title, Subtitle, Rating, Tags, Comments, etc. On the right hand side are the values, which is what the script uses to figure out what this recording is. I think that you will have values of Title and Subtitle, rather than a title of "Almost Human", etc.

If you do indeed have values of Title and Subtitle, there isn't anything the script can do automatically. All I can suggest is that you manually change the values. You could also try talking to the broadcaster to see why they aren't sending the appropriate programme information.

If you don't have values of Title and Subtitle, please send a screenshot of that window.

Jan 8, 2014 at 4:14 PM
Edited Jan 8, 2014 at 4:15 PM
Unfortunately it is showing the correct values for those attributes:


Is there anything wrong with what I have configured? I only actually changed the location of where the recordings are located and where the logs are located.
--Recorded TV

<?xml version="1.0" encoding="UTF-8"?>
<recordings>D:\Recorded TV</recordings>
<change_char from="&" to="and" />
<change_char from="?" to="" />
<change_char from="/\" to="-" />
<change_char from=":" to="," />
Jan 9, 2014 at 10:53 AM
That is very strange ...

I wonder if it is something introduced in Windows 8(.1) ... I've not tried it on there yet. I'll copy some files onto my laptop and see if the script works there.

Jan 12, 2014 at 12:37 PM
OK - I'm starting to see what is going wrong. I think there may be a problem with your configuration file but I'm struggling to see what it is at the moment.

Where your system is displaying:

Processing D:\Recorded TV\Almost Human_KCPQDT_2013_12_16_19_58_00.wtv

it should actually be displaying:

Processing Almost Human_KCPQDT_2013_12_16_19_58_00.wtv

The script is somehow getting the filename a bit messed up and then failing to retrieve the attributes.

Can you, perhaps, put the config file onto SkyDrive and then paste a read-only share link to the file?
Jan 12, 2014 at 9:40 PM
Jan 13, 2014 at 2:28 PM
Well, it works for me with that configuration file :-(.

What is the command line you are using, please, including which directory are you in when you run the script?

Jan 13, 2014 at 4:25 PM
Edited Jan 13, 2014 at 4:26 PM
--Recorded TV

Dir where I run from (via PS in Admin mode):
.\wtv-metarenamer.ps1 -singlefile 'Almost Human_KCPQDT_2013_12_16_19_58_00.wtv'
Jan 13, 2014 at 4:39 PM
If you enter the command like that, it should work.

If, however, you are specifying the full path to the file, it will fail in the way you have described.

I'll add a check to the script to make sure that only a leafname (i.e. just the filename) is being specified.
Jan 13, 2014 at 6:37 PM
Edited Jan 13, 2014 at 6:37 PM

I tried both ways (note I used a different file this time) and have the same results. I've uploaded both log files. No change in the config.

Command: .\wtv-metarenamer.ps1 -singlefile 'Hawaii Five-0_KIRODT_2014_01_10_20_58_00'

Command: .\wtv-metarenamer.ps1 -singlefile 'D:\Recorded TV\Hawaii Five-0_KIRODT_2014_01_10_20_58_00'

When I have the chance later, I'll try just reverting to having everything in the same directory. I just set it up this way because I'm OCD about file organization sometimes.