﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
12277	Metadata collection always fails for Manual Record rules	Steve Erlenborn <simon.sinister@…>	Peter Bennett	"My recording rules are all set up manually. Even though I configured mythTv to automatically download artwork for my recordings, it never worked. I read the Wiki page ""Enhancing Recordings with Metadata Lookup"" to look for hints. Next, I experimented with running 'mythmetadatalookup --refresh-all-rules'. In the output from that operation, I found the following pattern repeating.

''2014-09-06 00:48:14.817623 I  Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -N Orphan Black (Manual Record) 2014-04-18 19:00:00
2014-09-06 00:48:15.124764 I  Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -M Orphan Black (Manual Record)
2014-09-06 00:48:15.426320 I  Metadata Lookup Failed: No Results Orphan Black (Manual Record) 0 0''

I noticed that the title string being passed to the utility included ""(Manual Record)"", so I tried running the same command, by hand, with and without that suffix.

''/usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -M ""Orphan Black (Manual Record)""
/usr/share/mythtv/metadata/Television/ttvdb.py -l en -a US -M ""Orphan Black""
<?xml version='1.0' encoding='UTF-8'?>
<metadata>
  <item>
    <language>en</language>
    <title>Orphan Black</title>
    <inetref>260315</inetref>
...''

This version without "" (Manual Record)"" was able to retrieve metadata.

In the code, I found that programinfo.cpp adds that string :

{{{
 926     description = title =
 927         QString(""%1 (%2)"").arg(title).arg(QObject::tr(""Manual Record""));
}}}


I've implemented a fix, in the attached patch, where I strip out the interfering string in two methods in metadatagrabber.cpp. After doing so, automatic collection of metadata is now working for me, at least when the title is unique.
"	Patch - Bug Fix	closed	minor	unknown	MythTV - Scheduling	0.27-fixes	medium	fixed	metadata manual record		0
