make playlist and playlist editor share code responsible for moving items
This commit is contained in:
@@ -155,3 +155,21 @@ MPD::Song::GetFunction charToGetFunction(char c)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::string itemTypeToString(MPD::ItemType type)
|
||||
{
|
||||
std::string result;
|
||||
switch (type)
|
||||
{
|
||||
case MPD::itDirectory:
|
||||
result = "directory";
|
||||
break;
|
||||
case MPD::itSong:
|
||||
result = "song";
|
||||
break;
|
||||
case MPD::itPlaylist:
|
||||
result = "playlist";
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef _UTILITY_TYPE_CONVERSIONS
|
||||
#define _UTILITY_TYPE_CONVERSIONS
|
||||
|
||||
#include "mpdpp.h"
|
||||
#include "mutable_song.h"
|
||||
|
||||
std::string tagTypeToString(mpd_tag_type tag);
|
||||
@@ -29,4 +30,6 @@ MPD::MutableSong::SetFunction tagTypeToSetFunction(mpd_tag_type tag);
|
||||
mpd_tag_type charToTagType(char c);
|
||||
MPD::Song::GetFunction charToGetFunction(char c);
|
||||
|
||||
std::string itemTypeToString(MPD::ItemType type);
|
||||
|
||||
#endif // _UTILITY_TYPE_CONVERSIONS
|
||||
|
||||
Reference in New Issue
Block a user