Skip to content

Commit

Permalink
transform opml into array in command.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Jun 30, 2021
1 parent 01549f7 commit 681d320
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Slim/Control/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,12 @@ sub playlistXitemCommand {
if ( $handler && $handler->can('explodePlaylist') ) {
$handler->explodePlaylist($client, $path, sub {
my $tracks = shift;
# transform opml list into url array if needed
if (ref $tracks eq 'HASH') {
$tracks = [ map {
$_->{play} || $_->{url}
} @{$tracks->{items}} ];
}
$client->execute(['playlist', $cmd . 'tracks' , 'listRef', $tracks, $fadeIn]);
$request->setStatusDone();
});
Expand Down

0 comments on commit 681d320

Please sign in to comment.