Permalink
Browse files

Fix a bug resulting in multiple copies of the same track being insert…

…ed into the database;
  • Loading branch information...
1 parent f668f40 commit a7c7b5232e30e1e1af0a44c072dc5aae6e7ece92 @stuartm stuartm committed Jul 4, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 mythplugins/mythmusic/mythmusic/metadata.cpp
@@ -173,6 +173,11 @@ bool Metadata::isInDatabase()
bool retval = false;
QString sqldir = m_filename.section('/', 0, -2);
+
+ // Filename is the absolute path, we want the relative path
+ QString musicdir = gCoreContext->GetSetting("MusicLocation");
+ sqldir.remove(musicdir);
+
QString sqlfilename = m_filename.section('/', -1);
MSqlQuery query(MSqlQuery::InitCon());

0 comments on commit a7c7b52

Please sign in to comment.