Update encoding
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user