mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-05 22:52:45 +02:00
2019-09-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdimport(1) that caused it to throw an exception when given a '--metadata-pattern' of less than three characters.
This commit is contained in:
parent
cc3dc06b4a
commit
bfee1c8440
@ -19122,3 +19122,6 @@
|
||||
2019-09-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rddbmgr(8) that caused a segfault when processing
|
||||
a SQL error.
|
||||
2019-09-27 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdimport(1) that caused it to throw an exception
|
||||
when given a '--metadata-pattern' of less than three characters.
|
||||
|
@ -1628,14 +1628,26 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
||||
QTime time;
|
||||
QDate date;
|
||||
|
||||
//
|
||||
// Sanity Check
|
||||
//
|
||||
if(pattern.length()<2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize Pattern Parser
|
||||
//
|
||||
if((pattern.at(0)=='%')&&(pattern.at(1)!='%')) {
|
||||
field=pattern.at(1);
|
||||
value="";
|
||||
delimiter=pattern.at(2);
|
||||
ptr=3;
|
||||
if(pattern.length()>=3) {
|
||||
delimiter=pattern.at(2);
|
||||
ptr=3;
|
||||
}
|
||||
else {
|
||||
ptr=2;
|
||||
}
|
||||
macro_active=true;
|
||||
}
|
||||
else {
|
||||
@ -1645,7 +1657,8 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
||||
|
||||
for(int i=0;i<=filename.length();i++) {
|
||||
if(macro_active) {
|
||||
if((filename.at(i)==delimiter)||(i==filename.length())) {
|
||||
if(((!delimiter.isNull())&&(filename.at(i)==delimiter))||
|
||||
(i==filename.length())) {
|
||||
switch(field.toAscii()) {
|
||||
case 'a':
|
||||
wavedata->setArtist(value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user