don't set default value for mpd_music_dir

This commit is contained in:
Andrzej Rybczak
2008-11-21 19:07:15 +01:00
parent 20a49f38cb
commit 55c7777515
3 changed files with 10 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
#
#mpd_port = "6600"
#
#mpd_music_dir = "/var/lib/mpd/music"
#mpd_music_dir = ""
#
#mpd_connection_timeout = "5"
#

View File

@@ -38,6 +38,13 @@
#include "status_checker.h"
#include "tag_editor.h"
#define CHECK_MPD_MUSIC_DIR \
if (Config.mpd_music_dir.empty()) \
{ \
ShowMessage("configuration variable mpd_music_dir is not set!"); \
continue; \
}
#define REFRESH_MEDIA_LIBRARY_SCREEN \
do { \
mLibArtists->Display(redraw_screen); \
@@ -2501,6 +2508,7 @@ int main(int argc, char *argv[])
}
else if (Keypressed(input, Key.EditTags))
{
CHECK_MPD_MUSIC_DIR;
# ifdef HAVE_TAGLIB_H
if (wCurrent == mLibArtists)
{
@@ -3484,6 +3492,7 @@ int main(int argc, char *argv[])
# ifdef HAVE_TAGLIB_H
else if (Keypressed(input, Key.TagEditor))
{
CHECK_MPD_MUSIC_DIR;
if (current_screen != csTagEditor && current_screen != csTinyTagEditor)
{
CLEAR_FIND_HISTORY;

View File

@@ -219,7 +219,6 @@ void DefaultConfiguration(ncmpcpp_config &conf)
{
conf.mpd_host = "localhost";
conf.mpd_password = "";
conf.mpd_music_dir = "/var/lib/mpd/music/";
conf.song_list_format = "{%a - }{%t}|{[.white]%f[/white]}%r{[.green](%l)[/green]}";
conf.song_columns_list_format = "(8)[green]{l} (25)[cyan]{a} (40){t} (30)[red]{b}";
conf.song_status_format = "{(%l) }{%a - }{%t}|{%f}";