View | Details | Raw Unified | Return to bug 170303
Collapse All | Expand All

(-)files/patch-mbo.h (-10 lines)
Lines 1-10 Link Here
1
--- mbo.h.orig	2003-08-28 03:36:01.000000000 +0200
2
+++ mbo.h	2008-06-20 22:15:46.000000000 +0200
3
@@ -6,6 +6,7 @@
4
 #endif
5
 
6
 int mbo_init(char *device);
7
+char *mbo_artistname (void);
8
 char *mbo_trackname (int i);
9
 
10
 #define CDI_HOME ".cdindex" 	/* for historical reasons */
(-)files/patch-Makefile (-2 / +11 lines)
Lines 1-5 Link Here
1
--- Makefile.orig	2003-08-28 03:44:07.000000000 +0200
1
--- ./Makefile.orig	2003-08-27 21:44:07.000000000 -0400
2
+++ Makefile	2008-06-20 21:57:34.000000000 +0200
2
+++ ./Makefile	2012-07-31 18:29:42.000000000 -0400
3
@@ -1,11 +1,11 @@
3
@@ -1,11 +1,11 @@
4
 ## This is the makefile for dcd, dave's cd player.
4
 ## This is the makefile for dcd, dave's cd player.
5
 
5
 
Lines 23-28 Link Here
23
 
23
 
24
 
24
 
25
 
25
 
26
@@ -45,7 +45,7 @@
27
 ## If you want to disable the network code, try this. It probably doesn't
28
 ## work, but you're welcome to try ... Just comment out the next line.
29
 
30
-NETWORK = 1
31
+# NETWORK = 1
32
 
33
 ## Here be dragons... (Non-configurable parts past here.)
34
 
26
@@ -94,10 +94,10 @@
35
@@ -94,10 +94,10 @@
27
 all: ${PROGS}
36
 all: ${PROGS}
28
 
37
 
(-)files/patch-mbo.c (-20 lines)
Lines 1-20 Link Here
1
--- mbo.c.orig	2003-08-28 01:34:12.000000000 +0200
2
+++ mbo.c	2008-06-20 22:20:40.000000000 +0200
3
@@ -46,6 +46,17 @@
4
   return FALSE;
5
 }
6
 
7
+char *mbo_artistname (void) {
8
+  char *res = (char *)malloc(255);
9
+  if (mbo_ok == FALSE) return "";
10
+  memset(res, '\0', 255);
11
+  mb_GetResultData(mbo, MBE_AlbumGetAlbumArtistName, res, 255);
12
+  #ifdef DEBUG
13
+    fprintf (stderr, "cd_get_artistname: %s\n", res);
14
+  #endif
15
+  return res;
16
+}
17
+
18
 /* convenience hack. 0 is disc name, others are track names. */
19
 /* guess what, this too is XXX UNSAFE */
20
 char *mbo_trackname (int i) {
(-)files/patch-screenop.c (-43 lines)
Lines 1-43 Link Here
1
--- screenop.c.orig	2003-08-28 01:42:36.000000000 +0200
2
+++ screenop.c	2008-06-24 01:21:54.000000000 +0200
3
@@ -15,23 +15,32 @@
4
 
5
 void disk_directory(void) {
6
   u_char ct = cd_current_track();
7
-  int tl;
8
-  char outline[80];
9
+  char *art_name, *trk_name;
10
+  int tl, tt;
11
   int disc_length = cd_disc_length();
12
   int i;
13
   #ifdef DEBUG
14
     fprintf (stderr, "Entering directory. tz is %i\n", cd_last_track());
15
   #endif
16
 
17
-  sprintf (outline, "Track  Time  (%i tracks / %2i:%02i) %30s",
18
-          cd_last_track(), disc_length/60, disc_length%60, mbo_trackname(0));
19
-  printf ("%s\n", outline);
20
+  art_name = mbo_artistname();
21
+  trk_name = mbo_trackname(0);
22
+  printf ("Artist: %s\nAlbum : %s\nTrack  Time  (%i tracks / %2i:%02i)\n",
23
+          art_name, trk_name, cd_last_track(), disc_length/60, disc_length%60);
24
+  free(art_name);
25
+  free(trk_name);
26
   
27
   for (i=1; i<=cd_last_track(); i++) {
28
     tl = cd_track_length(i);
29
-    sprintf (outline, "%s %2i  %2i:%02i  %-45s", (i==ct ? "*" : " "),
30
-            i, (tl/60), (tl%60), mbo_trackname(i));
31
-    printf ("%s\n", outline);
32
+    trk_name = mbo_trackname(i);
33
+    if(i == ct && cd_active) {
34
+	tt = cd_track_time();
35
+	printf ("* %2i  %2i:%02i  %s [%i:%02i]\n", i, (tl/60), (tl%60),
36
+		trk_name, (tt/60), (tt%60));
37
+    } else
38
+	printf ("  %2i  %2i:%02i  %s\n", i, (tl/60), (tl%60), trk_name);
39
+
40
+    free(trk_name);
41
   } /* for */
42
 }
43
 
(-)Makefile (-3 / +2 lines)
Lines 7-21 Link Here
7
7
8
PORTNAME=	dcd
8
PORTNAME=	dcd
9
PORTVERSION=	0.99.2
9
PORTVERSION=	0.99.2
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	audio
11
CATEGORIES=	audio
12
MASTER_SITES=	SF/${PORTNAME}player/${PORTNAME}player/${PORTVERSION}
12
MASTER_SITES=	SF/${PORTNAME}player/${PORTNAME}player/${PORTVERSION}
13
13
14
MAINTAINER=	gahr@FreeBSD.org
14
MAINTAINER=	gahr@FreeBSD.org
15
COMMENT=	A simple, programmable, intelligent CD player
15
COMMENT=	A simple, programmable, intelligent CD player
16
16
17
LIB_DEPENDS=	musicbrainz.4:${PORTSDIR}/audio/libmusicbrainz \
17
LIB_DEPENDS=	cdaudio:${PORTSDIR}/audio/libcdaudio
18
    		cdaudio.1:${PORTSDIR}/audio/libcdaudio
19
18
20
USE_GMAKE=	yes
19
USE_GMAKE=	yes

Return to bug 170303