Update
This commit is contained in:
parent
7d0cc28981
commit
d37db84faf
@ -115,11 +115,14 @@ class Downloader
|
|||||||
|
|
||||||
|
|
||||||
$artist = str_replace( array( '#ARTIST:', '/' ), array( '', '-' ), strtok( $out, "\n" ) );
|
$artist = str_replace( array( '#ARTIST:', '/' ), array( '', '-' ), strtok( $out, "\n" ) );
|
||||||
$artist = preg_replace( "/[^a-zA-Z0-9_.!äöü\s-]/m/u", "", $artist );
|
//echo $artist;
|
||||||
|
$artistes = preg_replace( '/[^a-zA-Z0-9\ \-]/', "", $artist );
|
||||||
|
|
||||||
$title = str_replace( array( '#TITLE:', '/' ), array( '', '-' ), strtok( "\n" ) );
|
$title = str_replace( array( '#TITLE:', '/' ), array( '', '-' ), strtok( "\n" ) );
|
||||||
$title = preg_replace( "/[^a-zA-Z0-9_.!äöü\s-]/m/u", "", $title );
|
//echo $title;
|
||||||
|
//echo "\ns$title\n";
|
||||||
|
$title = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $title );
|
||||||
|
//echo "\n$title\n";
|
||||||
|
|
||||||
|
|
||||||
echo "[INFO] Found $artist - $title\n";
|
echo "[INFO] Found $artist - $title\n";
|
||||||
@ -160,4 +163,4 @@ class Downloader
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
26
GetAll.php
Normal file
26
GetAll.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
system( "clear" );
|
||||||
|
|
||||||
|
require_once 'config.inc.php';
|
||||||
|
|
||||||
|
echo "\n";
|
||||||
|
echo "Please enter the number from->to to download karaoke-files";
|
||||||
|
echo "\n";
|
||||||
|
$from = readline( "@From[int] " );
|
||||||
|
echo "\n";
|
||||||
|
$to = readline( "@To[int] " );
|
||||||
|
|
||||||
|
|
||||||
|
$downloader = new Downloader();
|
||||||
|
for( $i=$from; $i <= $to; $i++ )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$downloader->requestSong( $i );
|
||||||
|
}catch ( RuntimeException $e )
|
||||||
|
{
|
||||||
|
echo "An error occurred while processing the download.\n";
|
||||||
|
echo $e->getMessage() . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Please change the following vars before the fist start!
|
// Please change the following vars before the fist start!
|
||||||
define( 'DOWNLOAD_PATH', 'C:/Users/hoppt/Documents/Karaoke' );
|
define( 'DOWNLOAD_PATH', '/media/tobias/Steam-Spiel/Karaoke' );
|
||||||
define( 'USE_INTERNAL_YOUTUBEDL_EXE', true );
|
define( 'USE_INTERNAL_YOUTUBEDL_EXE', false );
|
||||||
define( 'YOUTUBE_DL_PATH', '' );
|
define( 'YOUTUBE_DL_PATH', '/usr/bin/youtube-dl' );
|
||||||
define( 'ANIMUX_USERNAME', 'trump@whitehouse.gov' );
|
define( 'ANIMUX_USERNAME', 'idiota@idi.at' );
|
||||||
define( 'ANIMUX_PASSWORD', 'C7AFvca6Ri6VhZL' );
|
define( 'ANIMUX_PASSWORD', 'XANwe6ZhKCnaXky' );
|
||||||
|
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user