summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2009-12-01 18:37:31 +0000
committerAndreas Brachold <vdr07@deltab.de>2009-12-01 18:37:31 +0000
commit433733cea4a3596119f3497f081a6ce7d9241fa5 (patch)
tree1fe6dba11c56e887a42ba4c7931f4f3b639c4ca7 /lib
parente9e85ca82492e002cc3169a01e724bead4a1eaec (diff)
downloadxxv-433733cea4a3596119f3497f081a6ce7d9241fa5.tar.gz
xxv-433733cea4a3596119f3497f081a6ce7d9241fa5.tar.bz2
* MUSIC: get cover deny startup - make Amazon developer's token none mandatory, by 2009-08-15 Amazon will require that all requests be signed with an Amazon assigned Secret Key.
Diffstat (limited to 'lib')
-rw-r--r--lib/XXV/MODULES/MUSIC.pm24
1 files changed, 19 insertions, 5 deletions
diff --git a/lib/XXV/MODULES/MUSIC.pm b/lib/XXV/MODULES/MUSIC.pm
index 74bd08e..51bced0 100644
--- a/lib/XXV/MODULES/MUSIC.pm
+++ b/lib/XXV/MODULES/MUSIC.pm
@@ -96,6 +96,16 @@ sub module {
default => 'mugglei',
type => 'file',
},
+ AmazonToken => {
+ description => gettext('Access Key ID to gathering cover images (a 20-character, alphanumeric sequence). Please sign up at http://aws.amazon.com'),
+ default => '',
+ type => 'string',
+ },
+ AmazonSecretKey => {
+ description => gettext('Secret Access Key to gathering cover images (a 40-character sequence). Please sign up at http://aws.amazon.com'),
+ default => '',
+ type => 'string',
+ },
},
Commands => {
mrefresh => {
@@ -211,10 +221,6 @@ sub _init {
return 1
if($self->{active} eq 'n');
- $self->{Amazon} = Net::Amazon->new(
- token => '1CCSPM94SQW5RNWY6682',
- );
-
#create an instance to find all files below /usr/local/mp3
$self->{ICE} = MP3::Icecast->new();
# $self->{ICE}->recursive(1);
@@ -1044,7 +1050,15 @@ sub getcovers {
my $dbh = ($self->{mdbh} ? $self->{mdbh} : $self->{dbh});
- return error('No valid Amazon token exists. Please sign up at http://amazon.com/soap!')
+ return $console->error(gettext('No Amazon Web Service (AWS) access key identifiers token exists. Please sign up at http://aws.amazon.com .'))
+ unless($self->{AmazonToken} && $self->{AmazonSecretKey});
+
+ $self->{Amazon} = Net::Amazon->new(
+ token => $self->{AmazonToken}
+ ,secret_key => $self->{AmazonSecretKey}
+ ) unless($self->{Amazon});
+
+ return error('No valid Amazon token exists. Please sign up at http://aws.amazon.com')
unless($self->{Amazon});
debug sprintf('Call getcovers%s',