Skip to content

Commit

Permalink
MythMusic: hunt for tracks in the 'Music' storage group
Browse files Browse the repository at this point in the history
This is just for testing and currently only looks on the master backend and
only if it wasn't found in the local music directory.
  • Loading branch information
Paul Harrison committed Apr 21, 2013
1 parent 2c20e71 commit 711c719
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mythplugins/mythmusic/mythmusic/metadata.cpp
Expand Up @@ -14,6 +14,7 @@
#include <mythdownloadmanager.h>
#include <mythlogging.h>
#include <mythdate.h>
#include <remotefile.h>

// mythmusic
#include "metadata.h"
Expand Down Expand Up @@ -686,7 +687,12 @@ QString Metadata::Filename(bool find) const
return gMusicData->musicDir + m_filename;

// maybe it's in our 'Music' storage group
//TODO add storage group lookup here
//FIXME: this is just looking on the master BE
QString filename = gCoreContext->GenMythURL(gCoreContext->GetSetting("MasterServerIP"),
gCoreContext->GetNumSetting("MasterServerPort"),
m_filename, "Music");
if (RemoteFile::Exists(filename))
return filename;

// not found
LOG(VB_GENERAL, LOG_ERR, QString("Metadata: Asked to get the filename for a track but no file found: %1")
Expand Down

0 comments on commit 711c719

Please sign in to comment.