forked from findechris/lms_mixcloud
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathSettings.pm
36 lines (28 loc) · 884 Bytes
/
Settings.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package Plugins::MixCloud::Settings;
# Plugin to stream audio from SoundCloud streams
#
# Released under GNU General Public License version 2 (GPLv2)
# Written Christian Mueller
# See file LICENSE for full license details
use strict;
use base qw(Slim::Web::Settings);
use Slim::Utils::Prefs;
sub name {
return 'PLUGIN_MIXCLOUD';
}
sub page {
return 'plugins/MixCloud/settings/basic.html';
}
sub prefs {
my $class = shift;
# playformat not used for now
my @prefs = ( preferences('plugin.mixcloud'), qw(apiKey), qw(helper_application), qw(helper_application_custom_path) );
push @prefs, qw(useBuffered) unless Slim::Player::Protocols::HTTP->can('canEnhanceHTTP');
return @prefs;
}
sub handler {
my ($class, $client, $params) = @_;
$params->{"pref_useBuffered"} = 0 unless defined $params->{"pref_useBuffered"};
return $class->SUPER::handler( $client, $params );
}
1;