Skip to content

Commit

Permalink
Prevent showing 0x0 artwork when a recording doesn't have Seas/Ep.
Browse files Browse the repository at this point in the history
I am not sure why this solution didn't occur to me earlier,

Basically, if the season input to the methods is 0, just order
the season results descending.  That way if the user has set
artwork (or any artwork has been set for anything > 1x01),
it'll be shown in higher priority than the 0x0 artwork.

The bug still exists (it's just inverted now, you'd get TV results
if you actually had TV and movies with the same legit inetref,
but this should affect far, far, far fewer people. Many/most users
will probably never see this inversion of the bug at all.

Refs #10408
  • Loading branch information
Robert McNamara committed Mar 15, 2012
1 parent 9c4e7fd commit cbd9703
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mythtv/libs/libmythtv/metadataimagehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ ArtworkMap GetArtwork(QString inetref,
if (strict)
querystring += "AND season = :SEASON;";
else
querystring += "ORDER BY season = :SEASON DESC, season DESC;";
{
if (season > 0)
{
querystring += "ORDER BY season = :SEASON DESC, season DESC;";
}
else
querystring += "ORDER BY season DESC;";
}

query.prepare(querystring);

query.bindValue(":INETREF", inetref);
query.bindValue(":SEASON", season);
if (strict || season > 0)
query.bindValue(":SEASON", season);

if (!query.exec())
{
Expand Down

0 comments on commit cbd9703

Please sign in to comment.