Skip to content

Commit

Permalink
NickelSeries: Added support for series without an index
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Aug 12, 2020
1 parent 3c786e4 commit a06f1ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NickelSeries/metadata.cc
Expand Up @@ -200,7 +200,7 @@ void NSMetadata::init(QXmlStreamReader &r) {
}

for (QString source : this->series.keys())
if (this->series[source].first.isEmpty() || this->series[source].second.isEmpty())
if (this->series[source].first.isEmpty())
this->series.remove(source);

for (QString source : this->subtitle.keys())
Expand Down
4 changes: 3 additions & 1 deletion NickelSeries/nickelseries.cc
Expand Up @@ -87,7 +87,9 @@ static void ns_update_series(Volume *v, QString const& filename) {
double d = QVariant(index).toDouble(&ok);
if (ok) {
nh_log("... simplified series index '%s' to '%s'", qPrintable(index), qPrintable(QString::number(d)));
index = QString::number(d);
index = d
? QString::number(d)
: QString();
}

nh_log("... Volume::setSeriesName('%s')", qPrintable(series));
Expand Down

0 comments on commit a06f1ac

Please sign in to comment.