summaryrefslogtreecommitdiffstats
path: root/modules/plugins/Lastfm.plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/plugins/Lastfm.plugin.php')
-rw-r--r--modules/plugins/Lastfm.plugin.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php
index 6e4b2ab4..10f51344 100644
--- a/modules/plugins/Lastfm.plugin.php
+++ b/modules/plugins/Lastfm.plugin.php
@@ -54,12 +54,12 @@ class AmpacheLastfm {
*/
public function install() {
- Preference::insert('lastfm_user','Last.FM Username',' ','25','string','plugins');
- Preference::insert('lastfm_pass','Last.FM Password',' ','25','string','plugins');
- Preference::insert('lastfm_port','Last.FM Submit Port',' ','25','string','internal');
- Preference::insert('lastfm_host','Last.FM Submit Host',' ','25','string','internal');
- Preference::insert('lastfm_url','Last.FM Submit URL',' ','25','string','internal');
- Preference::insert('lastfm_challenge','Last.FM Submit Challenge',' ','25','string','internal');
+ Preference::insert('lastfm_user','Last.FM Username','','25','string','plugins');
+ Preference::insert('lastfm_pass','Last.FM Password','','25','string','plugins');
+ Preference::insert('lastfm_port','Last.FM Submit Port','','25','string','internal');
+ Preference::insert('lastfm_host','Last.FM Submit Host','','25','string','internal');
+ Preference::insert('lastfm_url','Last.FM Submit URL','','25','string','internal');
+ Preference::insert('lastfm_challenge','Last.FM Submit Challenge','','25','string','internal');
} // install
@@ -172,15 +172,15 @@ class AmpacheLastfm {
*/
public function load($data,$user_id) {
- if (strlen($data['lastfm_user'])) {
- $this->username = $data['lastfm_user'];
+ if (strlen(trim($data['lastfm_user']))) {
+ $this->username = trim($data['lastfm_user']);
}
else {
debug_event('LastFM','No Username, not scrobbling','3');
return false;
}
- if (strlen($data['lastfm_pass'])) {
- $this->password = $data['lastfm_pass'];
+ if (strlen(trim($data['lastfm_pass']))) {
+ $this->password = trim($data['lastfm_pass']);
}
else {
debug_event('LastFM','No Password, not scrobbling','3');