viggie wrote:
> Hi all,
> >
Code:
--------------------
> > [17-02-02 18:55:08.7362] Plugins::YouTube::API::_call (130) Calling
API:
https://www.googleapis.com/youtube/v3/search?key=***&maxResults=50&part=snippet&q=lady%20gaga®ionCode=XK&relevanceLanguage=EN&type=video%2Cchannel%2Cplaylist
>
--------------------
> >
>
> I see this "®ionCode" instead of RegionCode, but from previous
> replies, I could not understand if that is just a problem how it shows
> in the log file and not the code itself.
>
> Once I copy the URL to the browser and change to RegionCode, I get the
> full reply with results.
>
> Can you please help with this issue?
>
> Thanks.
It's definitvely something with the encoding by LMS of the url. The
following is used to build the url
Code:
--------------------
my $url = '?' . (delete $args->{_noKey} ? '' : 'key=' .
$prefs->get('APIkey') . '&');
$args->{regionCode} ||= $prefs->get('country') unless delete
$args->{_noRegion};
$args->{part} ||= 'snippet' unless delete $args->{_noPart};
$args->{maxResults} ||= 50;
for my $k ( sort keys %{$args} ) {
next if $k =~ /^_/;
$url .= $k . '=' . URI::Escape::uri_escape_utf8(
Encode::decode( 'utf8', $args->{$k} ) ) . '&';
}
--------------------
The keys of $args are the items of the YT API call, and you can add a
log of the build url, but it seems that the problem happens when the url
is encoded by LMS to be usable as an url, the "Re" is interpreted as
special char. Have you tried to change the LMS UI langage to English to
see?
LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos
PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi
B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010,
AppleTV 4, Airport Express
------------------------------------------------------------------------
philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=105840
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins