mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-08 08:02:41 +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>
|
2019-09-25 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in rddbmgr(8) that caused a segfault when processing
|
* Fixed a bug in rddbmgr(8) that caused a segfault when processing
|
||||||
a SQL error.
|
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;
|
QTime time;
|
||||||
QDate date;
|
QDate date;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Sanity Check
|
||||||
|
//
|
||||||
|
if(pattern.length()<2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize Pattern Parser
|
// Initialize Pattern Parser
|
||||||
//
|
//
|
||||||
if((pattern.at(0)=='%')&&(pattern.at(1)!='%')) {
|
if((pattern.at(0)=='%')&&(pattern.at(1)!='%')) {
|
||||||
field=pattern.at(1);
|
field=pattern.at(1);
|
||||||
value="";
|
value="";
|
||||||
delimiter=pattern.at(2);
|
if(pattern.length()>=3) {
|
||||||
ptr=3;
|
delimiter=pattern.at(2);
|
||||||
|
ptr=3;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ptr=2;
|
||||||
|
}
|
||||||
macro_active=true;
|
macro_active=true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1645,7 +1657,8 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename,
|
|||||||
|
|
||||||
for(int i=0;i<=filename.length();i++) {
|
for(int i=0;i<=filename.length();i++) {
|
||||||
if(macro_active) {
|
if(macro_active) {
|
||||||
if((filename.at(i)==delimiter)||(i==filename.length())) {
|
if(((!delimiter.isNull())&&(filename.at(i)==delimiter))||
|
||||||
|
(i==filename.length())) {
|
||||||
switch(field.toAscii()) {
|
switch(field.toAscii()) {
|
||||||
case 'a':
|
case 'a':
|
||||||
wavedata->setArtist(value);
|
wavedata->setArtist(value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user