diff --git a/mythtv/libs/libmythmetadata/metadatacommon.h b/mythtv/libs/libmythmetadata/metadatacommon.h
index a205744..16e7179 100644
a
|
b
|
class META_PUBLIC MetadataLookup : public QObject, public ReferenceCounter |
249 | 249 | void SetDownloads(ArtworkMap map) { m_downloads = map; }; |
250 | 250 | |
251 | 251 | // General Sets |
252 | | void SetTitle(const QString &title) { m_title = title; }; |
| 252 | void SetTitle(const QString &title) |
| 253 | { |
| 254 | m_title = title; |
| 255 | QString manRecSuffix = QString(" (%1)").arg(QObject::tr("Manual Record")); |
| 256 | m_base_title = title; // m_title with " (Manual Record)" stripped. |
| 257 | m_base_title.replace(manRecSuffix,""); |
| 258 | }; |
253 | 259 | void SetFilename(const QString &filename) { m_filename = filename; }; |
254 | 260 | |
255 | 261 | // General Sets - Video |
… |
… |
class META_PUBLIC MetadataLookup : public QObject, public ReferenceCounter |
287 | 293 | // General |
288 | 294 | QString GetFilename() const { return m_filename; }; |
289 | 295 | QString GetTitle() const { return m_title; }; |
| 296 | QString GetBaseTitle() const { return m_base_title; }; |
290 | 297 | QStringList GetCategories() const { return m_categories; }; |
291 | 298 | float GetUserRating() const { return m_userrating; }; |
292 | 299 | uint GetRatingCount() const { return m_ratingcount; }; |
… |
… |
class META_PUBLIC MetadataLookup : public QObject, public ReferenceCounter |
375 | 382 | |
376 | 383 | QString m_filename; |
377 | 384 | QString m_title; |
| 385 | QString m_base_title; // m_title with " (Manual Record)" stripped. |
378 | 386 | QString m_network; |
379 | 387 | QString m_status; |
380 | 388 | const QStringList m_categories; |
diff --git a/mythtv/libs/libmythmetadata/metadatadownload.cpp b/mythtv/libs/libmythmetadata/metadatadownload.cpp
index c886654..20c029d 100644
a
|
b
|
void MetadataDownload::run() |
148 | 148 | if (list[0]->GetAutomatic() && list.count() > 1 |
149 | 149 | && list[0]->GetStep() == kLookupSearch) |
150 | 150 | { |
151 | | MetadataLookup *bestLookup = findBestMatch(list, lookup->GetTitle()); |
| 151 | MetadataLookup *bestLookup = findBestMatch(list, lookup->GetBaseTitle()); |
152 | 152 | if (bestLookup) |
153 | 153 | { |
154 | 154 | MetadataLookup *newlookup = bestLookup; |
… |
… |
void MetadataDownload::run() |
172 | 172 | |
173 | 173 | LOG(VB_GENERAL, LOG_INFO, |
174 | 174 | QString("Returning Metadata Results: %1 %2 %3") |
175 | | .arg(lookup->GetTitle()).arg(lookup->GetSeason()) |
| 175 | .arg(lookup->GetBaseTitle()).arg(lookup->GetSeason()) |
176 | 176 | .arg(lookup->GetEpisode())); |
177 | 177 | QCoreApplication::postEvent(m_parent, |
178 | 178 | new MetadataLookupEvent(list)); |
… |
… |
void MetadataDownload::run() |
183 | 183 | { |
184 | 184 | LOG(VB_GENERAL, LOG_INFO, |
185 | 185 | QString("Metadata Lookup Failed: No Results %1 %2 %3") |
186 | | .arg(lookup->GetTitle()).arg(lookup->GetSeason()) |
| 186 | .arg(lookup->GetBaseTitle()).arg(lookup->GetSeason()) |
187 | 187 | .arg(lookup->GetEpisode())); |
188 | 188 | } |
189 | 189 | if (m_parent) |
… |
… |
MetadataLookup* MetadataDownload::findBestMatch(MetadataLookupList list, |
210 | 210 | for (MetadataLookupList::const_iterator i = list.begin(); |
211 | 211 | i != list.end(); ++i) |
212 | 212 | { |
213 | | QString title = (*i)->GetTitle(); |
| 213 | QString title = (*i)->GetBaseTitle(); |
214 | 214 | if (title == originaltitle) |
215 | 215 | { |
216 | 216 | ret = (*i); |
… |
… |
MetadataLookup* MetadataDownload::findBestMatch(MetadataLookupList list, |
260 | 260 | MetadataLookupList::const_iterator i = list.begin(); |
261 | 261 | for (; i != list.end(); ++i) |
262 | 262 | { |
263 | | if ((*i)->GetTitle() == bestTitle) |
| 263 | if ((*i)->GetBaseTitle() == bestTitle) |
264 | 264 | { |
265 | 265 | ret = (*i); |
266 | 266 | break; |
… |
… |
MetadataLookupList MetadataDownload::handleMovie(MetadataLookup *lookup) |
526 | 526 | } |
527 | 527 | else if (lookup->GetStep() == kLookupSearch) |
528 | 528 | { |
529 | | if (lookup->GetTitle().isEmpty()) |
| 529 | if (lookup->GetBaseTitle().isEmpty()) |
530 | 530 | { |
531 | 531 | // no point searching on nothing... |
532 | 532 | return list; |
533 | 533 | } |
534 | | list = grabber.Search(lookup->GetTitle(), lookup); |
| 534 | list = grabber.Search(lookup->GetBaseTitle(), lookup); |
535 | 535 | } |
536 | 536 | |
537 | 537 | return list; |
… |
… |
MetadataLookupList MetadataDownload::handleTelevision(MetadataLookup *lookup) |
582 | 582 | if (!lookup->GetSubtitle().isEmpty()) |
583 | 583 | { |
584 | 584 | list = grabber.SearchSubtitle(lookup->GetInetref(), |
585 | | lookup->GetTitle() /* unused */, |
| 585 | lookup->GetBaseTitle() /* unused */, |
586 | 586 | lookup->GetSubtitle(), lookup, false); |
587 | 587 | } |
588 | 588 | |
… |
… |
MetadataLookupList MetadataDownload::handleTelevision(MetadataLookup *lookup) |
608 | 608 | } |
609 | 609 | else if (lookup->GetStep() == kLookupSearch) |
610 | 610 | { |
611 | | if (lookup->GetTitle().isEmpty()) |
| 611 | if (lookup->GetBaseTitle().isEmpty()) |
612 | 612 | { |
613 | 613 | // no point searching on nothing... |
614 | 614 | return list; |
615 | 615 | } |
616 | 616 | if (!lookup->GetSubtitle().isEmpty()) |
617 | 617 | { |
618 | | list = grabber.SearchSubtitle(lookup->GetTitle(), |
| 618 | list = grabber.SearchSubtitle(lookup->GetBaseTitle(), |
619 | 619 | lookup->GetSubtitle(), lookup, false); |
620 | 620 | } |
621 | 621 | if (list.isEmpty()) |
622 | 622 | { |
623 | | list = grabber.Search(lookup->GetTitle(), lookup); |
| 623 | list = grabber.Search(lookup->GetBaseTitle(), lookup); |
624 | 624 | } |
625 | 625 | } |
626 | 626 | else if (lookup->GetStep() == kLookupCollection) |
… |
… |
MetadataLookupList MetadataDownload::handleRecordingGeneric(MetadataLookup *look |
685 | 685 | |
686 | 686 | MetadataLookupList list; |
687 | 687 | |
688 | | if (lookup->GetTitle().isEmpty()) |
| 688 | if (lookup->GetBaseTitle().isEmpty()) |
689 | 689 | { |
690 | 690 | // no point searching on nothing... |
691 | 691 | return list; |
… |
… |
MetadataLookupList MetadataDownload::handleRecordingGeneric(MetadataLookup *look |
705 | 705 | lookup->SetEpisode(1); |
706 | 706 | } |
707 | 707 | |
708 | | list = grabber.Search(lookup->GetTitle(), lookup); |
| 708 | list = grabber.Search(lookup->GetBaseTitle(), lookup); |
709 | 709 | |
710 | 710 | if (list.count() == 1) |
711 | 711 | { |