From 541f6a5ee801fcf12676e117a51f52702e6c4864 Mon Sep 17 00:00:00 2001 From: Kaimi Date: Wed, 6 Apr 2016 15:24:54 +0300 Subject: [PATCH] mobile api download fix --- src/ya.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ya.pl b/src/ya.pl index cc12ad5..1757aa8 100755 --- a/src/ya.pl +++ b/src/ya.pl @@ -289,7 +289,7 @@ if($opt{album} || ($opt{playlist} && $opt{kind})) info(INFO, 'Filtering single track: ' . $opt{track} . ' [' . $opt{album} . ']'); @track_list_info = grep ( - (split(/\./, $_->{dir}))[1] eq $opt{track} + (split(/\./, $_->{dir}))[-1] eq $opt{track} , @track_list_info ); @@ -467,7 +467,7 @@ sub get_track_url { my $storage_dir = shift; - my (undef, $track_id) = split /\./, $storage_dir; + my $track_id = (split(/\./, $storage_dir))[-1]; my $request = $ua->get ( $opt{mobile} ?