add ifdefs to fix conditional compilation
This commit is contained in:
@@ -2268,12 +2268,18 @@ void SetSelectedItemsPriority::run()
|
||||
|
||||
bool ToggleOutput::canBeRun()
|
||||
{
|
||||
#ifdef ENABLE_OUTPUTS
|
||||
return myScreen == myOutputs;
|
||||
#else
|
||||
return false;
|
||||
#endif // ENABLE_OUTPUTS
|
||||
}
|
||||
|
||||
void ToggleOutput::run()
|
||||
{
|
||||
#ifdef ENABLE_OUTPUTS
|
||||
myOutputs->toggleOutput();
|
||||
#endif // ENABLE_OUTPUTS
|
||||
}
|
||||
|
||||
bool ToggleVisualizationType::canBeRun()
|
||||
|
||||
@@ -693,7 +693,9 @@ private:
|
||||
virtual bool canBeRun() OVERRIDE;
|
||||
virtual void run() OVERRIDE;
|
||||
|
||||
#ifdef HAVE_TAGLIB_H
|
||||
const MPD::Song *m_song;
|
||||
#endif // HAVE_TAGLIB_H
|
||||
};
|
||||
|
||||
struct EditLibraryTag: BaseAction
|
||||
@@ -788,7 +790,9 @@ private:
|
||||
virtual bool canBeRun() OVERRIDE;
|
||||
virtual void run() OVERRIDE;
|
||||
|
||||
#ifdef HAVE_TAGLIB_H
|
||||
const MPD::Song *m_song;
|
||||
#endif // HAVE_TAGLIB_H
|
||||
};
|
||||
|
||||
struct JumpToPositionInSong: BaseAction
|
||||
|
||||
@@ -616,16 +616,16 @@ MPD::Song getLocalSong(const fs::directory_entry &entry, bool read_tags)
|
||||
mpd_song *s = mpd_song_begin(&pair);
|
||||
if (s == nullptr)
|
||||
throw std::runtime_error("invalid path: " + entry.path().native());
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
if (read_tags)
|
||||
{
|
||||
#ifdef HAVE_TAGLIB_H
|
||||
Tags::setAttribute(s, "Last-Modified",
|
||||
timeFormat("%Y-%m-%dT%H:%M:%SZ", fs::last_write_time(entry.path()))
|
||||
);
|
||||
// read tags
|
||||
Tags::read(s);
|
||||
#endif // HAVE_TAGLIB_H
|
||||
}
|
||||
# endif // HAVE_TAGLIB_H
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user