parseAlbumSingleSubtitle function
Parses album or single subtitles
Implementation
JsonMap parseAlbumSingleSubtitle(JsonMap result, JsonMap albumOrSingle) {
final typeOrYear = nav(result, SUBTITLE, nullIfAbsent: true);
if (typeOrYear != null) {
if ((typeOrYear as String).isNumeric()) {
albumOrSingle['year'] = typeOrYear;
} else {
albumOrSingle['type'] = typeOrYear;
final year = nav(result, SUBTITLE2, nullIfAbsent: true);
if (year != null && (year as String).isNumeric()) {
albumOrSingle['year'] = year;
}
}
}
return albumOrSingle;
}