diff options
author | Kaimi <kaimi-@users.noreply.github.com> | 2018-07-05 17:38:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-05 17:38:02 +0300 |
commit | d0122d7b09aece1149c49d832fb2466d7853b0a1 (patch) | |
tree | 616facf793405f3ce8539711b65f94b0eb292267 | |
parent | 125fafb7d56b75793c049111823e0734e043f700 (diff) |
Fixes #11
-rwxr-xr-x | src/ya.pl | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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'); |