Skip to content

Commit

Permalink
syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdodson committed Feb 7, 2010
1 parent b3e9cdc commit 91be768
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions backend/backend.php
Expand Up @@ -249,9 +249,25 @@ function buildPath($meta) {
global $hierarchy;

// strip out weird characters.
$genre = str_replace("/","-",$meta['genre']);
$artist = str_replace("/","-",$meta['artist']);
$album = str_replace("/","-",$meta['album']);
if (isset($meta['genre'])) {
$genre = str_replace("/","-",$meta['genre']);
} else {
$genre = '';
}

if (isset($meta['artist'])) {
$artist = str_replace("/","-",$meta['artist']);
} else {
$artist = '';
}

if (isset($meta['album'])) {
$album = str_replace("/","-",$meta['album']);
} else {
$album = '';
}


if (isset($meta['filename'])) {
$filename = str_replace("/","-",$meta['filename']);
} else if (isset($meta['track'])) {
Expand Down Expand Up @@ -1053,7 +1069,7 @@ function compareNumber($a,$b) {

if ((isNothing($am['number']) && isNothing($bm['number']))
|| ($am['number'] == $bm['number'])) {
return compareNodes($b,$a);
return compareNodes($a,$b);
}

if (isNothing($am['number'])) {
Expand Down

0 comments on commit 91be768

Please sign in to comment.