changeset 1340:7bb2692b3be9

Setting a sane default configuration for the plugin
author Calin Crisan ccrisan@gmail.com
date Mon, 23 Jul 2007 21:59:13 +0300
parents 83cbc6968a0b
children 4ca99d2be90e d2050220659a f8b498451a84
files src/cdaudio-ng/Makefile src/cdaudio-ng/cdaudio-ng.c src/cdaudio-ng/cdaudio-ng.h
diffstat 3 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/cdaudio-ng/Makefile	Mon Jul 23 21:43:17 2007 +0300
+++ b/src/cdaudio-ng/Makefile	Mon Jul 23 21:59:13 2007 +0300
@@ -10,6 +10,6 @@
 
 OBJECTS = ${SOURCES:.c=.o}
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(CDIO_CFLAGS) $(CDDB_CFLAGS) -I../../intl -I../..
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(CDIO_CFLAGS) $(CDDB_CFLAGS) -I../../intl -I../.. -Wall -g3 -ggdb
 
 include ../../mk/objective.mk
--- a/src/cdaudio-ng/cdaudio-ng.c	Mon Jul 23 21:43:17 2007 +0300
+++ b/src/cdaudio-ng/cdaudio-ng.c	Mon Jul 23 21:59:13 2007 +0300
@@ -132,11 +132,11 @@
 	if (!bmp_cfg_db_get_bool(db, "CDDA", "use_cddb", &use_cddb))
 		use_cddb = TRUE;
 	if (!bmp_cfg_db_get_string(db, "CDDA", "cddbserver", &string))
-		strcpy(cddb_server, "");
+		strcpy(cddb_server, CDDA_DEFAULT_CDDB_SERVER);
 	else
 		strcpy(cddb_server, string);
 	if (!bmp_cfg_db_get_int(db, "CDDA", "cddbport", &cddb_port))
-		cddb_port = 1;
+		cddb_port = CDDA_DEFAULT_CDDB_PORT;
 	if (!bmp_cfg_db_get_string(db, "CDDA", "device", &string))
 		strcpy(device, "");
 	else
@@ -283,7 +283,7 @@
 	trackinfo = (trackinfo_t *) malloc(sizeof(trackinfo_t) * (lasttrackno + 1));
 	int trackno;
 
-	trackinfo[0].startlsn = cdio_get_track_lsn(pcdrom_drive->p_cdio, trackno);
+	trackinfo[0].startlsn = cdio_get_track_lsn(pcdrom_drive->p_cdio, 0);
 	trackinfo[0].endlsn = cdio_get_track_last_lsn(pcdrom_drive->p_cdio, CDIO_CDROM_LEADOUT_TRACK);
 	strcpy(trackinfo[0].performer, "");
 	strcpy(trackinfo[0].name, "");
--- a/src/cdaudio-ng/cdaudio-ng.h	Mon Jul 23 21:43:17 2007 +0300
+++ b/src/cdaudio-ng/cdaudio-ng.h	Mon Jul 23 21:59:13 2007 +0300
@@ -3,9 +3,11 @@
 #define CDAUDIO_NG_H
 
 
-#define DEF_STRING_LEN		256
-#define CDDA_DEFAULT		"cdda://default"
-#define CDDA_DAE_FRAMES		8
+#define DEF_STRING_LEN				256
+#define CDDA_DEFAULT				"cdda://default"
+#define CDDA_DAE_FRAMES				8
+#define CDDA_DEFAULT_CDDB_SERVER	"freedb.org"
+#define CDDA_DEFAULT_CDDB_PORT		888
 
 
 typedef struct {