Commit a0fdcb13 authored by Rocky Bernstein's avatar Rocky Bernstein

Separate title format string into cases where CDDB is enabled and where

it is is not. Now have callback for CDDB enabled boolean.
parent 6da08521
...@@ -165,34 +165,49 @@ Configuration settings in vlc are generally put in ~/.vlc/vlcrc. A ...@@ -165,34 +165,49 @@ Configuration settings in vlc are generally put in ~/.vlc/vlcrc. A
description of the ones specific to CDDAX are listed below. description of the ones specific to CDDAX are listed below.
- - - -
cddax-title-format cddax-cddb-title-format
This gives a format used in the playlist title string. This gives a format used in the playlist title string when CDDB is consulted.
Similar to the Unix date command, there are format specifiers Similar to the Unix date command, there are format specifiers
that start with a percent sign for which various information is filled that start with a percent sign for which various information is filled
in dynamically. The control specifiers are given as below in dynamically. The control specifiers are given as below
%a : The album artist ** %a : The album artist
%A : The album information ** %A : The album information
%C : Category ** %C : Category
%I : CDDB disk ID ** %I : CDDB disk ID
%G : Genre ** %G : Genre
%M : The current MRL %M : The current MRL
%m : The CD-DA Media Catalog Number (MCN) %m : The CD-DA Media Catalog Number (MCN)
%n : The number of tracks on the CD %n : The number of tracks on the CD
%p : The artist/performer/composer in the track ** %p : The artist/performer/composer in the track
%T : The track number ** %T : The track number
%s : Number of seconds in this track %s : Number of seconds in this track
%t : The name ** %t : The name
%Y : The year 19xx or 20xx ** %Y : The year 19xx or 20xx
%% : a % %% : a %
** Only available if CDDB is enabled The default is
The default if CDDB is enabled is
Track %T. %t - %p Track %T. %t - %p
Or
%T %M otherwise - -
cddax-title-format
This gives a format used in the playlist title string when CDDB is
*NOT* consulted. Similar to the Unix date command, there are format
specifiers that start with a percent sign for which various
information is filled in dynamically. The control specifiers are
given as below
%M : The current MRL
%m : The CD-DA Media Catalog Number (MCN)
%n : The number of tracks on the CD
%T : The track number
%s : Number of seconds in this track
%% : a %
The default is
%T %M
- - - -
cddax-cddb-email cddax-cddb-email
...@@ -372,4 +387,4 @@ analyze the contents of a CD. ...@@ -372,4 +387,4 @@ analyze the contents of a CD.
The tool cd-read from libcdio can be used to show the sectors of The tool cd-read from libcdio can be used to show the sectors of
the CD or CD image or extract sectors. the CD or CD image or extract sectors.
$Id: intf-cdda.txt,v 1.2 2003/12/01 04:05:29 rocky Exp $ $Id: intf-cdda.txt,v 1.3 2003/12/02 03:33:22 rocky Exp $
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cddax.c : CD digital audio input module for vlc using libcdio * cddax.c : CD digital audio input module for vlc using libcdio
***************************************************************************** *****************************************************************************
* Copyright (C) 2000,2003 VideoLAN * Copyright (C) 2000,2003 VideoLAN
* $Id: cdda.c,v 1.7 2003/12/01 03:37:23 rocky Exp $ * $Id: cdda.c,v 1.8 2003/12/02 03:33:22 rocky Exp $
* *
* Authors: Rocky Bernstein <rocky@panix.com> * Authors: Rocky Bernstein <rocky@panix.com>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -41,9 +41,13 @@ void E_(CloseIntf) ( vlc_object_t * ); ...@@ -41,9 +41,13 @@ void E_(CloseIntf) ( vlc_object_t * );
int E_(DemuxOpen) ( vlc_object_t * p_this); int E_(DemuxOpen) ( vlc_object_t * p_this);
void E_(DemuxClose) ( vlc_object_t * p_this); void E_(DemuxClose) ( vlc_object_t * p_this);
int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name, int E_(DebugCB) ( vlc_object_t *p_this, const char *psz_name,
vlc_value_t oldval, vlc_value_t val, vlc_value_t oldval, vlc_value_t val,
void *p_data ); void *p_data );
int E_(CDDBEnabledCB)( vlc_object_t *p_this, const char *psz_name,
vlc_value_t oldval, vlc_value_t val,
void *p_data );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
...@@ -73,30 +77,33 @@ int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name, ...@@ -73,30 +77,33 @@ int E_(DebugCallback) ( vlc_object_t *p_this, const char *psz_name,
"Allows you to modify the default caching value for cdda streams. This " \ "Allows you to modify the default caching value for cdda streams. This " \
"value should be set in millisecond units." ) "value should be set in millisecond units." )
#define TITLE_FMT_LONGTEXT N_( \ #define CDDB_TITLE_FMT_LONGTEXT N_( \
"Format used in the GUI Playlist Title. Similar to the Unix date \n" \ "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
"Format specifiers that start with a percent sign. Specifiers are: \n" \ "Format specifiers that start with a percent sign. Specifiers are: \n" \
" %a : The artist **\n" \ " %a : The artist\n" \
" %A : The album information **\n" \ " %A : The album information\n" \
" %C : Category **\n" \ " %C : Category\n" \
" %I : CDDB disk ID\n" \ " %I : CDDB disk ID\n" \
" %G : Genre **\n" \ " %G : Genre\n" \
" %M : The current MRL\n" \ " %M : The current MRL\n" \
" %m : The CD-DA Media Catalog Number (MCN)\n" \ " %m : The CD-DA Media Catalog Number (MCN)\n" \
" %n : The number of tracks on the CD\n" \ " %n : The number of tracks on the CD\n" \
" %p : The artist/performer/composer in the track **\n" \ " %p : The artist/performer/composer in the track\n" \
" %T : The track number\n" \ " %T : The track number\n" \
" %s : Number of seconds in this track \n" \ " %s : Number of seconds in this track \n" \
" %t : The title **\n" \ " %t : The title\n" \
" %Y : The year 19xx or 20xx **\n" \ " %Y : The year 19xx or 20xx\n" \
" %% : a % \n" \ " %% : a % \n")
"\n\n ** Only available if CDDB is enabled")
#ifdef HAVE_LIBCDDB #define TITLE_FMT_LONGTEXT N_( \
#define DEFAULT_TITLE_FORMAT "Track %T. %t - %p", "Format used in the GUI Playlist Title. Similar to the Unix date \n" \
#else "Format specifiers that start with a percent sign. Specifiers are: \n" \
#define DEFAULT_TITLE_FORMAT "%T %M", " %M : The current MRL\n" \
#endif " %m : The CD-DA Media Catalog Number (MCN)\n" \
" %n : The number of tracks on the CD\n" \
" %T : The track number\n" \
" %s : Number of seconds in this track \n" \
" %% : a % \n")
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
...@@ -113,7 +120,7 @@ vlc_module_begin(); ...@@ -113,7 +120,7 @@ vlc_module_begin();
/* Configuration options */ /* Configuration options */
add_category_hint( N_("CDX"), NULL, VLC_TRUE ); add_category_hint( N_("CDX"), NULL, VLC_TRUE );
add_integer ( MODULE_STRING "-debug", 0, E_(DebugCallback), add_integer ( MODULE_STRING "-debug", 0, E_(DebugCB),
N_("set debug mask for additional debugging."), N_("set debug mask for additional debugging."),
DEBUG_LONGTEXT, VLC_TRUE ); DEBUG_LONGTEXT, VLC_TRUE );
...@@ -126,12 +133,18 @@ vlc_module_begin(); ...@@ -126,12 +133,18 @@ vlc_module_begin();
N_("CD-ROM device name"), N_("CD-ROM device name"),
DEV_LONGTEXT, VLC_FALSE ); DEV_LONGTEXT, VLC_FALSE );
add_string( MODULE_STRING "-title-format", DEFAULT_TITLE_FORMAT, NULL, add_string( MODULE_STRING "-title-format",
N_("Format to use in playlist 'title' field"), "%T %M", NULL,
N_("Format to use in playlist 'title' field when no CDDB"),
TITLE_FMT_LONGTEXT, VLC_TRUE ); TITLE_FMT_LONGTEXT, VLC_TRUE );
#ifdef HAVE_LIBCDDB #ifdef HAVE_LIBCDDB
add_bool( MODULE_STRING "-cddb-enabled", 1, NULL, add_string( MODULE_STRING "-cddb-title-format",
"Track %T. %t - %p", NULL,
N_("Format to use in playlist 'title' field when using CDDB"),
CDDB_TITLE_FMT_LONGTEXT, VLC_TRUE );
add_bool( MODULE_STRING "-cddb-enabled", 1, E_(CDDBEnabledCB),
N_("Do CDDB lookups?"), N_("Do CDDB lookups?"),
N_("If set, lookup CD-DA track information using the CDDB " N_("If set, lookup CD-DA track information using the CDDB "
"protocol"), "protocol"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment