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