Ticket #665: mythmusic-speedup-cache.patch

File mythmusic-speedup-cache.patch, 945 bytes (added by mythtv@…, 15 years ago)

in query processing, only ask for LastPlay?() conversion once

  • mythmusic/mythmusic/metadata.cpp

     
    814819            }
    815820            else
    816821            {
    817                 playcountMin = min(temp->PlayCount(), playcountMin);
    818                 playcountMax = max(temp->PlayCount(), playcountMax);
    819                 lastplayMin  = min(temp->LastPlay(),  lastplayMin);
    820                 lastplayMax  = max(temp->LastPlay(),  lastplayMax);
     822                int playCount = temp->PlayCount();
     823                playcountMin = min(playCount, playcountMin);
     824                playcountMax = max(playCount, playcountMax);
     825                double lastPlay = temp->LastPlay();
     826                lastplayMin  = min(lastPlay,  lastplayMin);
     827                lastplayMax  = max(lastPlay,  lastplayMax);
    821828            }
    822829        }
    823830    }