Fixes #11
This commit is contained in:
12
src/ya.pl
12
src/ya.pl
@@ -40,6 +40,11 @@ use constant
|
||||
RENAME_ERRORS_MAX => 5
|
||||
};
|
||||
use constant
|
||||
{
|
||||
PLAYLIST_LIKE => 3,
|
||||
PLAYLIST_LIKE_TITLE => 'Мне нравится'
|
||||
};
|
||||
use constant
|
||||
{
|
||||
DEBUG => 'DEBUG',
|
||||
ERROR => 'ERROR',
|
||||
@@ -684,7 +689,12 @@ sub get_playlist_tracks_info
|
||||
return;
|
||||
}
|
||||
|
||||
my $title = $opt{mobile} ? $json->{result}->{title} : $json->{pageData}->{playlist}->{title};
|
||||
my $title = $opt{mobile}
|
||||
?
|
||||
( $opt{playlist} == PLAYLIST_LIKE ? PLAYLIST_LIKE_TITLE : $json->{result}->{title} )
|
||||
:
|
||||
$json->{pageData}->{playlist}->{title};
|
||||
|
||||
if(!$title)
|
||||
{
|
||||
info(DEBUG, 'Can\'t get playlist title');
|
||||
|
||||
Reference in New Issue
Block a user