tag editor: fix filename change detection
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "statusbar.h"
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include "mutable_song.h"
|
||||
|
||||
@@ -138,18 +139,17 @@ void MutableSong::setComment(const std::string &value, unsigned idx)
|
||||
replaceTag(MPD_TAG_COMMENT, Song::getComment(idx), value, idx);
|
||||
}
|
||||
|
||||
const std::string &MutableSong::getNewURI() const
|
||||
const std::string &MutableSong::getNewName() const
|
||||
{
|
||||
return m_uri;
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void MutableSong::setNewURI(const std::string &value)
|
||||
void MutableSong::setNewName(const std::string &value)
|
||||
{
|
||||
std::string orig_uri = getURI();
|
||||
if (orig_uri == value)
|
||||
m_uri.clear();
|
||||
if (getName() == value)
|
||||
m_name.clear();
|
||||
else
|
||||
m_uri = value;
|
||||
m_name = value;
|
||||
}
|
||||
|
||||
unsigned MutableSong::getDuration() const
|
||||
@@ -191,12 +191,12 @@ void MutableSong::setTags(SetFunction set, const std::string &value, const std::
|
||||
|
||||
bool MutableSong::isModified() const
|
||||
{
|
||||
return !m_uri.empty() || !m_tags.empty();
|
||||
return !m_name.empty() || !m_tags.empty();
|
||||
}
|
||||
|
||||
void MutableSong::clearModifications()
|
||||
{
|
||||
m_uri.clear();
|
||||
m_name.clear();
|
||||
m_tags.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user