Multiple volume albums and https proxy support fix
This commit is contained in:
10
src/ya.pl
10
src/ya.pl
@@ -104,7 +104,7 @@ $json_decoder->allow_singlequote(1);
|
|||||||
|
|
||||||
if($opt->proxy)
|
if($opt->proxy)
|
||||||
{
|
{
|
||||||
$ua->proxy(['http'], 'http://'.$opt->proxy.'/');
|
$ua->proxy(['http', 'https'], 'http://'.$opt->proxy.'/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($opt->album || ($opt->playlist && $opt->kind))
|
if($opt->album || ($opt->playlist && $opt->kind))
|
||||||
@@ -311,13 +311,19 @@ sub get_album_tracks_info
|
|||||||
info(INFO, 'Album title: '.$title);
|
info(INFO, 'Album title: '.$title);
|
||||||
info(INFO, 'Tracks total: '. $json->{pageData}->{trackCount});
|
info(INFO, 'Tracks total: '. $json->{pageData}->{trackCount});
|
||||||
|
|
||||||
|
my @volumes = ();
|
||||||
|
for my $vol(@{$json->{pageData}->{volumes}})
|
||||||
|
{
|
||||||
|
push @volumes, @{$vol};
|
||||||
|
}
|
||||||
|
|
||||||
return map
|
return map
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
dir => $_->{storageDir},
|
dir => $_->{storageDir},
|
||||||
title=> $_->{artists}->[0]->{name} . ARTIST_TITLE_DELIM . $_->{title}
|
title=> $_->{artists}->[0]->{name} . ARTIST_TITLE_DELIM . $_->{title}
|
||||||
}
|
}
|
||||||
} @{ $json->{pageData}->{volumes}->[0] };
|
} @volumes;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_playlist_tracks_info
|
sub get_playlist_tracks_info
|
||||||
|
|||||||
Reference in New Issue
Block a user