Skip to content

Commit 62ddfd5

Browse files
committed
Add a mapped image called 'smartimage' for want of a better name. This displays coverart for films and screenshots for series.
1 parent a7b6c2a commit 62ddfd5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

mythtv/libs/libmythmetadata/videometadata.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,11 @@ void VideoMetadata::GetImageMap(MetadataMap& imageMap)
12441244
}
12451245

12461246
imageMap["fanartfile"] = fanartfile;
1247+
1248+
QString smartimage = coverfile;
1249+
if (!screenshotfile.isEmpty () && (GetSeason() > 0 || GetEpisode() > 0))
1250+
smartimage = screenshotfile;
1251+
imageMap["smartimage"] = smartimage;
12471252
}
12481253

12491254
void ClearMap(MetadataMap &metadataMap)

mythtv/programs/mythfrontend/videolist.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ static int AddFileNode(MythGenericTree *where_to_add, QString name,
333333
QHash<QString, QString> imageMap;
334334
metadata->GetImageMap(imageMap);
335335
sub_node->SetImageFromMap(imageMap);
336+
sub_node->SetImage("buttonimage", imageMap["smartimage"]);
336337

337338
// Statetypes
338339
QHash<QString, QString> stateMap;

0 commit comments

Comments
 (0)