mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-27 22:22:36 +02:00
2014-09-05 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rdcut.cpp' that caused the 'Title' value to be applied to the 'Description' field in the 'RDCut::setMetadata()' method. * Added 'docs/metadata_wildcards.txt'. * Implemented support for the '%i' ['Cut Description'] wildcard in rdimport(1)'s '--metadata-pattern' switch in 'utils/rdimport/rdimport.cpp' [Github Issue #6]. * Implemented support for the '%o' ['Outcue'] wildcard in rdimport(1)'s '--metadata-pattern' switch in 'utils/rdimport/rdimport.cpp'. * Implemented support for the '%y' ['Release Year'] wildcard in rdimport(1)'s '--metadata-pattern' switch in 'utils/rdimport/rdimport.cpp'.
This commit is contained in:
parent
f54385c881
commit
cdba0ba578
14
ChangeLog
14
ChangeLog
@ -14423,3 +14423,17 @@
|
||||
2014-09-04 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'rdairplay/nownext.cpp' that caused PAD updates
|
||||
to be sent for macro carts with the asyncronous attribute set.
|
||||
2014-09-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'lib/rdcut.cpp' that caused the 'Title' value
|
||||
to be applied to the 'Description' field in the 'RDCut::setMetadata()'
|
||||
method.
|
||||
* Added 'docs/metadata_wildcards.txt'.
|
||||
* Implemented support for the '%i' ['Cut Description'] wildcard in
|
||||
rdimport(1)'s '--metadata-pattern' switch in
|
||||
'utils/rdimport/rdimport.cpp' [Github Issue #6].
|
||||
* Implemented support for the '%o' ['Outcue'] wildcard in
|
||||
rdimport(1)'s '--metadata-pattern' switch in
|
||||
'utils/rdimport/rdimport.cpp'.
|
||||
* Implemented support for the '%y' ['Release Year'] wildcard in
|
||||
rdimport(1)'s '--metadata-pattern' switch in
|
||||
'utils/rdimport/rdimport.cpp'.
|
||||
|
@ -32,27 +32,10 @@ Password=letmein
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=Now playing "%t" by "%a"
|
||||
|
||||
; Log Selection
|
||||
|
@ -29,57 +29,10 @@ Append=0
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; --------------------------------------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; \r \r Carriage Return (ASCII 13)
|
||||
; \n \n Linefeed (ASCII 10)
|
||||
; %d(<dt>) %D(<dt>) The start date/time, formatted according to <dt>. The
|
||||
; following wildcards are available for <dt>:
|
||||
; d - The day as a number without a leading zero (1 to 31).
|
||||
; dd - The day as a number with a leading zero (01 to 31).
|
||||
; ddd - The abbreviated localized day name ('Mon' or 'Sun').
|
||||
; dddd - The long localized day name ('Monday' or 'Sunday').
|
||||
; M - The month as a number without a leading zero
|
||||
; (1 to 12).
|
||||
; MM - The month as a number with a leading zero (01 to 12).
|
||||
; MMM - The abbreviated localized month name ('Jan' or 'Dec').
|
||||
; MMMM - The long localized month name ("January' or
|
||||
; 'December').
|
||||
; yy - The last two digits of the year.
|
||||
; yyyy - The full four digits of the year.
|
||||
; h - The hour without a leading zero (0 - 23, or 1 - 12
|
||||
; if using AM/PM display).
|
||||
; hh - The hour with a leading zero (00 - 23, or 01 -12 if
|
||||
; using AM/PM display).
|
||||
; m - The minute without a leading zero (0 - 59).
|
||||
; mm - The minute with a leading zero (00 - 59).
|
||||
; s - The second without a leading zero (00 - 60).
|
||||
; ss - The second with a leading zero (00 - 60).
|
||||
; z - The milliseconds without a leading zero (0 - 999).
|
||||
; zzz - The milliseconds with leading zeros (000 - 999).
|
||||
; AP - Use AM/PM display. The 'AP' will be replaced by
|
||||
; 'AM' or 'PM' as appropriate.
|
||||
; ap - Use AM/PM display. The 'ap' will be replaced by
|
||||
; 'am' or 'pm' as appropriate.
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=NOW: %d(ddd MMM d hh:mm:ss yyyy): %t - %a\nNEXT: %D(ddd MMM d hh:mm:ss yyyy): %T - %A\n
|
||||
|
||||
; Encoding. Defines the set of escapes to be applied to the PAD fields.
|
||||
|
@ -45,27 +45,10 @@ Mountpoint=/audio.mp3
|
||||
|
||||
; Format String. The metadata to be sent each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=%t
|
||||
|
||||
; Log Selection
|
||||
|
@ -37,7 +37,6 @@ Aux2Log=Yes
|
||||
|
||||
; Additional UDP destinations can be configured by adding new sections...
|
||||
;[Udp2]
|
||||
;FormatString=Artist: %a%r
|
||||
;IpAddress=192.168.10.22
|
||||
;UdpPort=6789
|
||||
;MasterLog=Yes
|
||||
|
@ -35,57 +35,10 @@ WordSize=8
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; --------------------------------------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; \r \r Carriage Return (ASCII 13)
|
||||
; \n \n Linefeed (ASCII 10)
|
||||
; %d(<dt>) %D(<dt>) The start date/time, formatted according to <dt>. The
|
||||
; following wildcards are available for <dt>:
|
||||
; d - The day as a number without a leading zero (1 to 31).
|
||||
; dd - The day as a number with a leading zero (01 to 31).
|
||||
; ddd - The abbreviated localized day name ('Mon' or 'Sun').
|
||||
; dddd - The long localized day name ('Monday' or 'Sunday').
|
||||
; M - The month as a number without a leading zero
|
||||
; (1 to 12).
|
||||
; MM - The month as a number with a leading zero (01 to 12).
|
||||
; MMM - The abbreviated localized month name ('Jan' or 'Dec').
|
||||
; MMMM - The long localized month name ("January' or
|
||||
; 'December').
|
||||
; yy - The last two digits of the year.
|
||||
; yyyy - The full four digits of the year.
|
||||
; h - The hour without a leading zero (0 - 23, or 1 - 12
|
||||
; if using AM/PM display).
|
||||
; hh - The hour with a leading zero (00 - 23, or 01 -12 if
|
||||
; using AM/PM display).
|
||||
; m - The minute without a leading zero (0 - 59).
|
||||
; mm - The minute with a leading zero (00 - 59).
|
||||
; s - The second without a leading zero (00 - 60).
|
||||
; ss - The second with a leading zero (00 - 60).
|
||||
; z - The milliseconds without a leading zero (0 - 999).
|
||||
; zzz - The milliseconds with leading zeros (000 - 999).
|
||||
; AP - Use AM/PM display. The 'AP' will be replaced by
|
||||
; 'AM' or 'PM' as appropriate.
|
||||
; ap - Use AM/PM display. The 'ap' will be replaced by
|
||||
; 'am' or 'pm' as appropriate.
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=NOW: %d(ddd MMM d hh:mm:ss yyyy): %t - %a\nNEXT: %D(ddd MMM d hh:mm:ss yyyy): %T - %A\n
|
||||
|
||||
; Encoding. Defines the set of escapes to be applied to the PAD fields.
|
||||
|
@ -35,27 +35,10 @@ Tcpport=8000
|
||||
|
||||
; Format String. The metadata to be sent each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=%t
|
||||
|
||||
; Log Selection
|
||||
|
@ -52,27 +52,10 @@ UdpPort=5859
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=DX 1 %h!
|
||||
|
||||
; Default Format String. Similar to the 'FormatString=' parameter described
|
||||
|
@ -32,27 +32,10 @@ Password=letmein
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=Now playing "%t" by "%a"
|
||||
|
||||
; Log Selection
|
||||
|
@ -26,57 +26,10 @@ UdpPort=1234
|
||||
|
||||
; Format String. The string to be output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; --------------------------------------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length (in milliseconds)
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; \r \r Carriage Return (ASCII 13)
|
||||
; \n \n Linefeed (ASCII 10)
|
||||
; %d(<dt>) %D(<dt>) The start date/time, formatted according to <dt>. The
|
||||
; following wildcards are available for <dt>:
|
||||
; d - The day as a number without a leading zero (1 to 31).
|
||||
; dd - The day as a number with a leading zero (01 to 31).
|
||||
; ddd - The abbreviated localized day name ('Mon' or 'Sun').
|
||||
; dddd - The long localized day name ('Monday' or 'Sunday').
|
||||
; M - The month as a number without a leading zero
|
||||
; (1 to 12).
|
||||
; MM - The month as a number with a leading zero (01 to 12).
|
||||
; MMM - The abbreviated localized month name ('Jan' or 'Dec').
|
||||
; MMMM - The long localized month name ("January' or
|
||||
; 'December').
|
||||
; yy - The last two digits of the year.
|
||||
; yyyy - The full four digits of the year.
|
||||
; h - The hour without a leading zero (0 - 23, or 1 - 12
|
||||
; if using AM/PM display).
|
||||
; hh - The hour with a leading zero (00 - 23, or 01 -12 if
|
||||
; using AM/PM display).
|
||||
; m - The minute without a leading zero (0 - 59).
|
||||
; mm - The minute with a leading zero (00 - 59).
|
||||
; s - The second without a leading zero (00 - 60).
|
||||
; ss - The second with a leading zero (00 - 60).
|
||||
; z - The milliseconds without a leading zero (0 - 999).
|
||||
; zzz - The milliseconds with leading zeros (000 - 999).
|
||||
; AP - Use AM/PM display. The 'AP' will be replaced by
|
||||
; 'AM' or 'PM' as appropriate.
|
||||
; ap - Use AM/PM display. The 'ap' will be replaced by
|
||||
; 'am' or 'pm' as appropriate.
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString=NOW: %d(ddd MMM d hh:mm:ss yyyy): %t - %a\nNEXT: %D(ddd MMM d hh:mm:ss yyyy): %T - %A\n
|
||||
|
||||
; Encoding. Defines the set of escapes to be applied to the PAD fields.
|
||||
|
@ -40,27 +40,10 @@ ProgramID=1000000005
|
||||
; Format Strings. There is one for each line of PAD data (total=2).
|
||||
; The string is output each time RDAirPlay changes
|
||||
; play state, including any wildcards as placeholders for metadata values.
|
||||
; The following wildcards are available:
|
||||
;
|
||||
; Now Next Field
|
||||
; ----------------------------------------------
|
||||
; %n %N The Rivendell cart number
|
||||
; %h %H Event length
|
||||
; %g %G The Rivendell group name
|
||||
; %t %T Title
|
||||
; %a %A Artist
|
||||
; %l %L Album
|
||||
; %y %Y Year
|
||||
; %b %B Record Label
|
||||
; %c %C Client
|
||||
; %e %E Agency
|
||||
; %m %M Composer
|
||||
; %p %P Publisher
|
||||
; %r %R Conductor
|
||||
; %s %S Song ID
|
||||
; %u %U User Definied
|
||||
; %o %O Outcue
|
||||
; %i %I Description
|
||||
; The list of available wildcards can be found in the 'metadata_wildcards.txt'
|
||||
; file in the Rivendell documentation directory.
|
||||
;
|
||||
FormatString1=%c
|
||||
FormatString2=%e
|
||||
|
||||
|
@ -38,6 +38,7 @@ EXTRA_DIST = ALSA.txt\
|
||||
GPIO.txt\
|
||||
JACK.txt\
|
||||
MESSAGE_BOX.txt\
|
||||
metadata_filecards.txt\
|
||||
NEXGEN_FILTER.txt\
|
||||
NOW+NEXT.txt\
|
||||
pam_rd.txt\
|
||||
|
65
docs/metadata_wildcards.txt
Normal file
65
docs/metadata_wildcards.txt
Normal file
@ -0,0 +1,65 @@
|
||||
RIVENDELL METADATA WILDCARDS
|
||||
|
||||
These codes are used in Rivendell to indicate when a substitution of the
|
||||
indicated cart metadata field should be performed --e.g. in the
|
||||
'--metadata-pattern' switch of rdimport(1) or the RLMResolveNowNext*()
|
||||
functions in the Rivendell Loadable Module API.
|
||||
|
||||
Now Next Field
|
||||
--------------------------------------------------------------------------
|
||||
%a %A Artist
|
||||
%b %B Record Label
|
||||
%c %C Client
|
||||
%d %D Date/Time (see below)
|
||||
%e %E Agency
|
||||
%f %F [Unassigned]
|
||||
%g %G The Rivendell group name
|
||||
%h %H Event length (in milliseconds)
|
||||
%i %I Cut Description
|
||||
%j %J [Unassigned]
|
||||
%k %K [Unassigned]
|
||||
%l %L Album
|
||||
%m %M Composer
|
||||
%n %N The Rivendell cart number
|
||||
%o %O Outcue
|
||||
%p %P Publisher
|
||||
%q %Q [Unassigned]
|
||||
%r %R Conductor
|
||||
%s %S Song ID
|
||||
%t %T Title
|
||||
%u %U User Definied
|
||||
%v %V [Unassigned]
|
||||
%y %Y Release Year
|
||||
%z %Z [Unassigned]
|
||||
\r \r Carriage Return (ASCII 13)
|
||||
\n \n Linefeed (ASCII 10)
|
||||
|
||||
DATE/TIME SPECIFICATION
|
||||
%d(<dt>) %D(<dt>) The start date/time, formatted according to <dt>. The
|
||||
following wildcards are available for <dt>:
|
||||
d - The day as a number without a leading zero (1 to 31).
|
||||
dd - The day as a number with a leading zero (01 to 31).
|
||||
ddd - The abbreviated localized day name ('Mon' or 'Sun').
|
||||
dddd - The long localized day name ('Monday' or 'Sunday').
|
||||
M - The month as a number without a leading zero
|
||||
(1 to 12).
|
||||
MM - The month as a number with a leading zero (01 to 12).
|
||||
MMM - The abbreviated localized month name ('Jan' or 'Dec').
|
||||
MMMM - The long localized month name ("January' or
|
||||
'December').
|
||||
yy - The last two digits of the year.
|
||||
yyyy - The full four digits of the year.
|
||||
h - The hour without a leading zero (0 - 23, or 1 - 12
|
||||
if using AM/PM display).
|
||||
hh - The hour with a leading zero (00 - 23, or 01 -12 if
|
||||
using AM/PM display).
|
||||
m - The minute without a leading zero (0 - 59).
|
||||
mm - The minute with a leading zero (00 - 59).
|
||||
s - The second without a leading zero (00 - 60).
|
||||
ss - The second with a leading zero (00 - 60).
|
||||
z - The milliseconds without a leading zero (0 - 999).
|
||||
zzz - The milliseconds with leading zeros (000 - 999).
|
||||
AP - Use AM/PM display. The 'AP' will be replaced by
|
||||
'AM' or 'PM' as appropriate.
|
||||
ap - Use AM/PM display. The 'ap' will be replaced by
|
||||
'am' or 'pm' as appropriate.
|
@ -939,9 +939,10 @@ void RDCut::getMetadata(RDWaveData *data) const
|
||||
void RDCut::setMetadata(RDWaveData *data) const
|
||||
{
|
||||
QString sql="update CUTS set ";
|
||||
if(!data->title().isEmpty()) {
|
||||
if(!data->description().isEmpty()) {
|
||||
sql+=QString().sprintf("DESCRIPTION=\"%s\",",
|
||||
(const char *)RDTextValidator::stripString(data->title()).utf8());
|
||||
(const char *)RDTextValidator::stripString(data->description()).
|
||||
utf8());
|
||||
}
|
||||
if(!data->outCue().isEmpty()) {
|
||||
sql+=QString().sprintf("OUTCUE=\"%s\",",
|
||||
@ -1079,11 +1080,11 @@ void RDCut::setMetadata(RDWaveData *data) const
|
||||
}
|
||||
if(sql.right(1)==",") {
|
||||
sql=sql.left(sql.length()-1);
|
||||
sql+=QString().
|
||||
sprintf(" where CUT_NAME=\"%s\"",(const char *)cut_name.utf8());
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
sql+=QString().
|
||||
sprintf(" where CUT_NAME=\"%s\"",(const char *)cut_name.utf8());
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,6 +154,19 @@ void RDGroup::setDefaultTitle(const QString &str)
|
||||
}
|
||||
|
||||
|
||||
QString RDGroup::generateTitle(const QString &pathname)
|
||||
{
|
||||
QString title=defaultTitle();
|
||||
QString basename=RDGetBasePart(pathname);
|
||||
int ptr=basename.findRev(".");
|
||||
title.replace("%p",RDGetPathPart(pathname));
|
||||
title.replace("%f",basename.left(ptr));
|
||||
title.replace("%e",basename.right(basename.length()-ptr-1));
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
bool RDGroup::enforceCartRange() const
|
||||
{
|
||||
return RDBool(RDGetSqlValue("GROUPS","NAME",group_name,"ENFORCE_CART_RANGE",
|
||||
|
@ -49,6 +49,7 @@ class RDGroup
|
||||
void setDeleteEmptyCarts(bool state) const;
|
||||
QString defaultTitle() const;
|
||||
void setDefaultTitle(const QString &str);
|
||||
QString generateTitle(const QString &pathname);
|
||||
bool enforceCartRange() const;
|
||||
void setEnforceCartRange(bool state) const;
|
||||
bool exportReport(ExportType type) const;
|
||||
|
@ -357,6 +357,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc docs/scheduler_formats.ods
|
||||
%doc docs/copy_split_format.odt
|
||||
%doc docs/ando_interface.odt
|
||||
%doc docs/metadata_wildcards.txt
|
||||
%doc scripts/rd_backup
|
||||
%doc scripts/start_traverso.sh
|
||||
%doc icons/rivendell-16x16.png
|
||||
|
25
rlm/rlm.h
25
rlm/rlm.h
@ -321,28 +321,9 @@ extern "C" {
|
||||
*
|
||||
* Returns a pointer to a null-terminated string resulting from resolving
|
||||
* the 'standard' Rivendell Now & Next wildcards in accordance with the
|
||||
* data values in the <now> and <next> parameters. The following wildcards
|
||||
* are supported:
|
||||
*
|
||||
* Now Next Field
|
||||
* ----------------------------------------------
|
||||
* %n %N The Rivendell cart number
|
||||
* %h %H Event length (in milliseconds)
|
||||
* %g %G The Rivendell group name
|
||||
* %t %T Title
|
||||
* %a %A Artist
|
||||
* %l %L Album
|
||||
* %y %Y Year
|
||||
* %b %B Record Label
|
||||
* %c %C Client
|
||||
* %e %E Agency
|
||||
* %m %M Composer
|
||||
* %p %P Publisher
|
||||
* %r %R Conductor
|
||||
* %s %S Song ID
|
||||
* %u %U User Definied
|
||||
* %o %O Outcue
|
||||
* %d %D Cut Description
|
||||
* data values in the <now> and <next> parameters. The list of available
|
||||
* wildcards can be found in the 'metadata_wildcards.txt' file in the
|
||||
* Rivendell documentation directory.
|
||||
*
|
||||
* RETURNS: A pointer to a null terminated string. This string is statically
|
||||
* allocated, and may be reused in subsequent calls to the utility functions.
|
||||
|
@ -802,6 +802,9 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
effective_group=new RDGroup(import_group->name());
|
||||
}
|
||||
}
|
||||
if(wavedata->metadataFound()&&wavedata->title().isEmpty()) {
|
||||
wavedata->setTitle(effective_group->generateTitle(filename));
|
||||
}
|
||||
}
|
||||
|
||||
if(import_use_cartchunk_cutid||found_cart) {
|
||||
@ -861,7 +864,7 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
delete cart;
|
||||
return MainObject::NoCut;
|
||||
}
|
||||
RDCut *cut=new RDCut(QString().sprintf("%06u_%03d",*cartnum,cutnum));
|
||||
RDCut *cut=new RDCut(*cartnum,cutnum);
|
||||
RDAudioImport *conv=new RDAudioImport(import_station,import_config,this);
|
||||
conv->setCartNumber(cart->number());
|
||||
conv->setCutNumber(cutnum);
|
||||
@ -944,20 +947,19 @@ MainObject::Result MainObject::ImportFile(const QString &filename,
|
||||
cut->autoSegue(import_segue_level,import_segue_length);
|
||||
if((wavedata->title().length()==0)||
|
||||
((wavedata->title().length()>0)&&(wavedata->title()[0] == '\0'))) {
|
||||
QString title=effective_group->defaultTitle();
|
||||
QString basename=RDGetBasePart(filename);
|
||||
int ptr=basename.findRev(".");
|
||||
title.replace("%p",RDGetPathPart(filename));
|
||||
title.replace("%f",basename.left(ptr));
|
||||
title.replace("%e",basename.right(basename.length()-ptr-1));
|
||||
cut->setDescription(title.utf8());
|
||||
QString title=effective_group->generateTitle(filename);
|
||||
if((!wavedata->metadataFound())&&(!wavedata->description().isEmpty())) {
|
||||
cut->setDescription(title.utf8());
|
||||
}
|
||||
if(cart_created) {
|
||||
cart->setTitle(title.utf8());
|
||||
}
|
||||
}
|
||||
if(import_title_from_cartchunk_cutid) {
|
||||
if((wavedata->cutId().length()>0)&&(wavedata->cutId()[0]!='\0')) {
|
||||
if(cut->description().isEmpty()) {
|
||||
if(cut->description().isEmpty()&&
|
||||
(!wavedata->metadataFound())&&
|
||||
(!wavedata->description().isEmpty())) {
|
||||
cut->setDescription(wavedata->cutId());
|
||||
}
|
||||
cart->setTitle(wavedata->cutId());
|
||||
@ -1341,6 +1343,11 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
||||
*groupname=value;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
wavedata->setDescription(value);
|
||||
wavedata->setMetadataFound(true);
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
wavedata->setAlbum(value);
|
||||
wavedata->setMetadataFound(true);
|
||||
@ -1357,6 +1364,11 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
||||
found_cartnum=true;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
wavedata->setOutCue(value);
|
||||
wavedata->setMetadataFound(true);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
wavedata->setPublisher(value);
|
||||
wavedata->setMetadataFound(true);
|
||||
@ -1381,6 +1393,11 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
||||
wavedata->setUserDefined(value);
|
||||
wavedata->setMetadataFound(true);
|
||||
break;
|
||||
|
||||
case 'y':
|
||||
wavedata->setReleaseYear(value.toInt());
|
||||
wavedata->setMetadataFound(true);
|
||||
break;
|
||||
}
|
||||
value="";
|
||||
if((ptr>=pattern.length())||(i==filename.length())) {
|
||||
@ -1436,24 +1453,27 @@ bool MainObject::VerifyPattern(const QString &pattern)
|
||||
}
|
||||
macro_active=true;
|
||||
switch(pattern.at(++i)) {
|
||||
case 'a':
|
||||
case 'b':
|
||||
case 'c':
|
||||
case 'e':
|
||||
case 'g':
|
||||
case 'l':
|
||||
case 'm':
|
||||
case 'n':
|
||||
case 'p':
|
||||
case 'r':
|
||||
case 's':
|
||||
case 't':
|
||||
case 'u':
|
||||
case '%':
|
||||
break;
|
||||
case 'a':
|
||||
case 'b':
|
||||
case 'c':
|
||||
case 'e':
|
||||
case 'g':
|
||||
case 'i':
|
||||
case 'l':
|
||||
case 'm':
|
||||
case 'n':
|
||||
case 'o':
|
||||
case 'p':
|
||||
case 'r':
|
||||
case 's':
|
||||
case 't':
|
||||
case 'u':
|
||||
case 'y':
|
||||
case '%':
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user