diff --git a/Downloader.php b/Downloader.php index 0721f18..3152059 100644 --- a/Downloader.php +++ b/Downloader.php @@ -115,17 +115,15 @@ class Downloader $artist = str_replace( array( '#ARTIST:', '/' ), array( '', '-' ), strtok( $out, "\n" ) ); + $artist = utf8_encode( $artist ); $artist = str_replace( array( "ö", "ä", "ü" ), array( "oe", "ae", "ue" ), $artist ); - - //echo $artist; - $artistes = preg_replace( '/[^a-zA-Z0-9\ \-]/', "", $artist ); + $artist = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $artist ); $title = str_replace( array( '#TITLE:', '/' ), array( '', '-' ), strtok( "\n" ) ); - //echo $title; - //echo "\ns$title\n"; - $title = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $title ); - //echo "\n$title\n"; + $title = utf8_encode( $title ); $title = str_replace( array( "ö", "ä", "ü" ), array( "oe", "ae", "ue" ), $title ); + $title = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $title ); + echo "[INFO] Found $artist - $title\n"; if( is_dir( DOWNLOAD_PATH . '/' . $artist . '/' ) === false ) @@ -159,7 +157,7 @@ class Downloader } fclose( $file ); - echo "[SUCCESS] Downloaded \"$title - $artist\"\n"; + echo "\n[SUCCESS] Downloaded \"$title - $artist\"\n"; return true; } diff --git a/config.inc.php b/config.inc.php index ece005f..ac9b327 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1,4 +1,5 @@