We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 5f46521d authored by Jonas Haraldsson's avatar Jonas Haraldsson

fix inconsistent param names

parent 905a2373
...@@ -338,7 +338,7 @@ class TrackXML { ...@@ -338,7 +338,7 @@ class TrackXML {
$adodb->StartTrans(); $adodb->StartTrans();
for ($i = 0; $i < count($tracks_array); $i++) { for ($i = 0; $i < count($tracks_array); $i++) {
$t = $tracks_array[$i]; $t = $tracks_array[$i];
if ($t['ignoredcode'] === 0) { if ($t['ignored_code'] === 0) {
try { try {
// Create artist, album and track if not already in db // Create artist, album and track if not already in db
$t['track_id'] = getTrackID($t['artist'], $t['album'], $t['track'], $t['mbid'], $t['duration']); $t['track_id'] = getTrackID($t['artist'], $t['album'], $t['track'], $t['mbid'], $t['duration']);
...@@ -388,7 +388,7 @@ class TrackXML { ...@@ -388,7 +388,7 @@ class TrackXML {
if ($forward_enabled) { if ($forward_enabled) {
for ($i = 0; $i < count($tracks_array); $i++) { for ($i = 0; $i < count($tracks_array); $i++) {
$t = $tracks_array[$i]; $t = $tracks_array[$i];
if ($t['ignoredcode'] === 0) { if ($t['ignored_code'] === 0) {
/* Forward scrobbles, we are forwarding unmodified input submitted by user, /* Forward scrobbles, we are forwarding unmodified input submitted by user,
* but only the scrobbles that passed our ignore filters, see prepareTrack(). */ * but only the scrobbles that passed our ignore filters, see prepareTrack(). */
forwardScrobble($userid, forwardScrobble($userid,
...@@ -421,10 +421,10 @@ class TrackXML { ...@@ -421,10 +421,10 @@ class TrackXML {
$albumartist_node = $scrobble->addChild('albumArtist', repamp($t['albumartist'])); $albumartist_node = $scrobble->addChild('albumArtist', repamp($t['albumartist']));
$albumartist_node->addAttribute('corrected', $t['albumartist_corrected']); $albumartist_node->addAttribute('corrected', $t['albumartist_corrected']);
$scrobble->addChild('timestamp', $t['timestamp']); $scrobble->addChild('timestamp', $t['timestamp']);
$ignoredmessage_node = $scrobble->addChild('ignoredMessage', $t['ignoredmessage']); $ignoredmessage_node = $scrobble->addChild('ignoredMessage', $t['ignored_message']);
$ignoredmessage_node->addAttribute('code', $t['ignoredcode']); $ignoredmessage_node->addAttribute('code', $t['ignored_code']);
if ($t['ignoredcode'] === 0) { if ($t['ignored_code'] === 0) {
$accepted_count += 1; $accepted_count += 1;
} else { } else {
$ignored_count += 1; $ignored_count += 1;
......
...@@ -340,13 +340,13 @@ function prepareTrack($userid, $t, $type) { ...@@ -340,13 +340,13 @@ function prepareTrack($userid, $t, $type) {
list($t['timestamp_old'], $t['timestamp'], $t['timestamp_corrected']) = correctInput($t['timestamp'], 'timestamp'); list($t['timestamp_old'], $t['timestamp'], $t['timestamp_corrected']) = correctInput($t['timestamp'], 'timestamp');
if($t['ignored_code'] === 0) { if($t['ignored_code'] === 0) {
list($t['ignoredcode'], $t['ignoredmessage']) = ignoreInput($t['timestamp'], 'timestamp'); list($t['ignored_code'], $t['ignored_message']) = ignoreInput($t['timestamp'], 'timestamp');
} }
if ($t['ignoredcode'] === 0) { if ($t['ignored_code'] === 0) {
$exists = scrobbleExists($userid, $t['artist'], $t['track'], $t['timestamp']); $exists = scrobbleExists($userid, $t['artist'], $t['track'], $t['timestamp']);
if ($exists) { if ($exists) {
$t['ignoredcode'] = 91; // GNU FM specific $t['ignored_code'] = 91; // GNU FM specific
$t['ignoredmessage'] = 'Already scrobbled'; $t['ignored_message'] = 'Already scrobbled';
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment