Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kaimi-io/yandex-music-download.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaimi <kaimi-@users.noreply.github.com>2018-07-05 17:38:02 +0300
committerGitHub <noreply@github.com>2018-07-05 17:38:02 +0300
commitd0122d7b09aece1149c49d832fb2466d7853b0a1 (patch)
tree616facf793405f3ce8539711b65f94b0eb292267
parent125fafb7d56b75793c049111823e0734e043f700 (diff)
Fixes #11
-rwxr-xr-xsrc/ya.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ya.pl b/src/ya.pl
index 6fdaefb..225952b 100755
--- a/src/ya.pl
+++ b/src/ya.pl
@@ -41,6 +41,11 @@ use constant
};
use constant
{
+ PLAYLIST_LIKE => 3,
+ PLAYLIST_LIKE_TITLE => 'Мне нравится'
+};
+use constant
+{
DEBUG => 'DEBUG',
ERROR => 'ERROR',
INFO => 'INFO',
@@ -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');