diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2010-05-14 01:22:32 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2010-05-14 01:22:32 +0200 |
commit | 8de70f39183efd5c526fa15151fe1d852fff3482 (patch) | |
tree | 7df551529cd72db0820814805b3c7fdcd363d71c | |
parent | 02d3ec0e2a87778f847b266a10cfde9194bafab0 (diff) |
MediaLibrary::LocateSong: compare hashes, not strings
-rw-r--r-- | src/media_library.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/media_library.cpp b/src/media_library.cpp index 440f5f7c..f984ac31 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -643,12 +643,11 @@ void MediaLibrary::LocateSong(const MPD::Song &s) if (Songs->Empty()) Update(); - std::string song = s.GetTitle(); - if (song != Songs->Current().GetTitle()) + if (s.GetHash() != Songs->Current().GetHash()) { for (size_t i = 0; i < Songs->Size(); ++i) { - if (song == (*Songs)[i].GetTitle()) + if (s.GetHash() == (*Songs)[i].GetHash()) { Songs->Highlight(i); break; |