more common way of handling example config files (like in ncmpc) + add a few
more functions to libmpdclient implementation
This commit is contained in:
@@ -2,4 +2,7 @@
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
SUBDIRS = src
|
||||
SUBDIRS = src doc
|
||||
docdir = $(prefix)/share/doc/$(PACKAGE)
|
||||
doc_DATA = AUTHORS NEWS
|
||||
EXTRA_DIST = COPYING $(doc_DATA)
|
||||
|
||||
34
NEWS
Normal file
34
NEWS
Normal file
@@ -0,0 +1,34 @@
|
||||
ncmpcpp-0.2
|
||||
|
||||
+ libmpd dependency dropped
|
||||
+ pkgconfig is not needed anymore
|
||||
+ ncmpcpp now shows more info if it cannot connect to mpd
|
||||
+ proper handling for mpd password added
|
||||
+ if ncmpcpp lose connection to mpd it'll try to reconnect
|
||||
+ playlist status added
|
||||
+ new screen - lyrics
|
||||
+ switching between playlist and browser with tab key added
|
||||
+ alternate movement keys added (j and k keys)
|
||||
+ auto center mode added
|
||||
+ new option - crossfade can be set to any value now (X key)
|
||||
+ new option - going to parent directory in browser using backspace key
|
||||
+ issue with backspace key fixed
|
||||
+ sorting items in browser is case insensitive now
|
||||
+ many fixes and improvements
|
||||
|
||||
|
||||
ncmpcpp-0.1.2
|
||||
|
||||
+ parts of interface are hideable now
|
||||
+ new screen - media library
|
||||
+ new option - crop (it removes all songs from playlist except the playing one)
|
||||
+ many fixes and optimizations
|
||||
|
||||
|
||||
ncmpcpp-0.1.1
|
||||
|
||||
+ add example configuration file
|
||||
+ configure.in now works as expected
|
||||
+ taglib dependency is optional now
|
||||
+ more customizable options
|
||||
|
||||
@@ -62,5 +62,5 @@ if test "$taglib" = "yes" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -533,6 +533,15 @@ void MPDConnection::StartSearch(bool exact_match) const
|
||||
mpd_startSearch(itsConnection, exact_match);
|
||||
}
|
||||
|
||||
void MPDConnection::StartFieldSearch(mpd_TagItems item)
|
||||
{
|
||||
if (isConnected)
|
||||
{
|
||||
itsSearchedField = item;
|
||||
mpd_startFieldSearch(itsConnection, item);
|
||||
}
|
||||
}
|
||||
|
||||
void MPDConnection::AddSearch(mpd_TagItems item, const string &str) const
|
||||
{
|
||||
if (isConnected)
|
||||
@@ -558,6 +567,23 @@ void MPDConnection::CommitSearch(SongList &v) const
|
||||
}
|
||||
}
|
||||
|
||||
void MPDConnection::CommitSearch(TagList &v) const
|
||||
{
|
||||
if (isConnected)
|
||||
{
|
||||
mpd_commitSearch(itsConnection);
|
||||
char *tag = NULL;
|
||||
while ((tag = mpd_getNextTag(itsConnection, itsSearchedField)) != NULL)
|
||||
{
|
||||
string s_tag = tag;
|
||||
if (v.empty() || v.back() != s_tag)
|
||||
v.push_back(s_tag);
|
||||
delete [] tag;
|
||||
}
|
||||
mpd_finishCommand(itsConnection);
|
||||
}
|
||||
}
|
||||
|
||||
void MPDConnection::GetDirectory(const string &path, ItemList &v) const
|
||||
{
|
||||
if (isConnected)
|
||||
@@ -612,7 +638,7 @@ int MPDConnection::CheckForErrors()
|
||||
{
|
||||
int errid = 0;
|
||||
if (itsConnection->error)
|
||||
{
|
||||
{
|
||||
if (itsConnection->error == MPD_ERROR_ACK)
|
||||
{
|
||||
// this is to avoid setting too small max size as we check it before fetching current status
|
||||
|
||||
@@ -140,8 +140,10 @@ class MPDConnection
|
||||
bool SavePlaylist(const string &) const;
|
||||
|
||||
void StartSearch(bool) const;
|
||||
void StartFieldSearch(mpd_TagItems);
|
||||
void AddSearch(mpd_TagItems, const string &) const;
|
||||
void CommitSearch(SongList &v) const;
|
||||
void CommitSearch(SongList &) const;
|
||||
void CommitSearch(TagList &) const;
|
||||
|
||||
void GetArtists(TagList &) const;
|
||||
void GetAlbums(string, TagList &) const;
|
||||
@@ -173,6 +175,7 @@ class MPDConnection
|
||||
ErrorHandler itsErrorHandler;
|
||||
void *itsErrorHandlerUserdata;
|
||||
|
||||
mpd_TagItems itsSearchedField;
|
||||
std::vector<QueueCommand *> itsQueue;
|
||||
};
|
||||
|
||||
|
||||
@@ -1739,7 +1739,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
found_pos = 0;
|
||||
vFoundPositions.clear();
|
||||
|
||||
|
||||
if (mLibArtists->Empty())
|
||||
{
|
||||
Mpd->GetArtists(vArtists);
|
||||
@@ -1747,13 +1747,13 @@ int main(int argc, char *argv[])
|
||||
for (TagList::const_iterator it = vArtists.begin(); it != vArtists.end(); it++)
|
||||
mLibArtists->AddOption(*it);
|
||||
}
|
||||
|
||||
|
||||
mLibArtists->HighlightColor(Config.library_active_column_color);
|
||||
mLibAlbums->HighlightColor(Config.main_highlight_color);
|
||||
mLibSongs->HighlightColor(Config.main_highlight_color);
|
||||
|
||||
|
||||
wCurrent->Hide();
|
||||
|
||||
|
||||
REFRESH_MEDIA_LIBRARY_SCREEN;
|
||||
|
||||
wCurrent = mLibArtists;
|
||||
|
||||
Reference in New Issue
Block a user