fetch now playing song and set window title if it's empty
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
AC_INIT(configure.in)
|
AC_INIT(configure.in)
|
||||||
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
AM_INIT_AUTOMAKE(ncmpcpp, 0.3.3)
|
AM_INIT_AUTOMAKE(ncmpcpp, 0.3.4_pre)
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
|||||||
@@ -369,6 +369,11 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
|||||||
}
|
}
|
||||||
if (changed.ElapsedTime)
|
if (changed.ElapsedTime)
|
||||||
{
|
{
|
||||||
|
if (np.Empty())
|
||||||
|
{
|
||||||
|
np = Mpd->GetCurrentSong();
|
||||||
|
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));
|
||||||
|
}
|
||||||
if (!np.Empty() && !player_state.empty())
|
if (!np.Empty() && !player_state.empty())
|
||||||
{
|
{
|
||||||
int elapsed = Mpd->GetElapsedTime();
|
int elapsed = Mpd->GetElapsedTime();
|
||||||
|
|||||||
Reference in New Issue
Block a user