Skip to content

Commit 5538833

Browse files
committed
Only look in the desired folder, but no sub-folders
Signed-off-by: Michael Herger <michael@herger.net>
1 parent d53fd86 commit 5538833

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Slim/Music/Artwork.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ sub _findStandaloneArtwork {
203203
}
204204
else {
205205
# doing a range search helps us avoid a LIKE query, which would result in a scan
206-
$sql .= '>= ? AND url < ?';
206+
$sql .= '>= ? AND url < ? AND instr(substr(url, length(?)+2), "/") < 1';
207207
my $pathUrl = Slim::Utils::Misc::fileURLFromPath($parentDir);
208-
push @candidates, $pathUrl, $pathUrl . chr(0xff);
208+
push @candidates, $pathUrl, $pathUrl . chr(0xff), $pathUrl;
209209
}
210210

211211
my $sth = Slim::Schema->dbh->prepare_cached($sql);

0 commit comments

Comments
 (0)