Skip to content

Commit

Permalink
Merge pull request #32 from cheanrod/streamcontent-parsing
Browse files Browse the repository at this point in the history
Improve parsing r:StreamContent
  • Loading branch information
svrooij committed Jan 15, 2020
2 parents 10c26c6 + fd45d63 commit c5498f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/helpers/metadata-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export class MetadataHelper {
if(streamContent.length === 2) {
track.Artist = streamContent[0].trim();
track.Title = streamContent[1].trim();
} else {
track.Artist = streamContent[0].trim();
if(didlItem['r:radioShowMd'] && typeof didlItem['r:radioShowMd'] === 'string') {
const radioShowMd = (didlItem['r:radioShowMd'] as string).split(',');
track.Title = radioShowMd[0].trim();
}
}
}
if(didlItem['upnp:albumArtURI']) {
Expand Down

0 comments on commit c5498f6

Please sign in to comment.