Update encoding
This commit is contained in:
parent
79db89f932
commit
15f6f4e0e8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
// Please change the following vars before the fist start!
|
||||
define( 'DOWNLOAD_PATH', '/media/tobias/Steam-Spiel/Karaoke' );
|
||||
@ -7,7 +8,7 @@ define( 'YOUTUBE_DL_PATH', '/usr/bin/youtube-dl' );
|
||||
define( 'ANIMUX_USERNAME', 'idiota@idi.at' );
|
||||
define( 'ANIMUX_PASSWORD', 'XANwe6ZhKCnaXky' );
|
||||
|
||||
mb_internal_encoding("UTF-8");
|
||||
//mb_internal_encoding("UTF-8");
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user