don't set default value for mpd_music_dir

master
Andrzej Rybczak 18 years ago
parent 20a49f38cb
commit 55c7777515
  1. 2
      doc/config
  2. 9
      src/ncmpcpp.cpp
  3. 1
      src/settings.cpp

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

@ -38,6 +38,13 @@
#include "status_checker.h" #include "status_checker.h"
#include "tag_editor.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 \ #define REFRESH_MEDIA_LIBRARY_SCREEN \
do { \ do { \
mLibArtists->Display(redraw_screen); \ mLibArtists->Display(redraw_screen); \
@ -2501,6 +2508,7 @@ int main(int argc, char *argv[])
} }
else if (Keypressed(input, Key.EditTags)) else if (Keypressed(input, Key.EditTags))
{ {
CHECK_MPD_MUSIC_DIR;
# ifdef HAVE_TAGLIB_H # ifdef HAVE_TAGLIB_H
if (wCurrent == mLibArtists) if (wCurrent == mLibArtists)
{ {
@ -3484,6 +3492,7 @@ int main(int argc, char *argv[])
# ifdef HAVE_TAGLIB_H # ifdef HAVE_TAGLIB_H
else if (Keypressed(input, Key.TagEditor)) else if (Keypressed(input, Key.TagEditor))
{ {
CHECK_MPD_MUSIC_DIR;
if (current_screen != csTagEditor && current_screen != csTinyTagEditor) if (current_screen != csTagEditor && current_screen != csTinyTagEditor)
{ {
CLEAR_FIND_HISTORY; CLEAR_FIND_HISTORY;

@ -219,7 +219,6 @@ void DefaultConfiguration(ncmpcpp_config &conf)
{ {
conf.mpd_host = "localhost"; conf.mpd_host = "localhost";
conf.mpd_password = ""; 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_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_columns_list_format = "(8)[green]{l} (25)[cyan]{a} (40){t} (30)[red]{b}";
conf.song_status_format = "{(%l) }{%a - }{%t}|{%f}"; conf.song_status_format = "{(%l) }{%a - }{%t}|{%f}";

Loading…
Cancel
Save