Compare commits
No commits in common. "master" and "1.0.1" have entirely different histories.
@ -115,14 +115,11 @@ class Downloader
|
||||
|
||||
|
||||
$artist = str_replace( array( '#ARTIST:', '/' ), array( '', '-' ), strtok( $out, "\n" ) );
|
||||
$artist = utf8_encode( $artist );
|
||||
$artist = str_replace( array( "ö", "ä", "ü" ), array( "oe", "ae", "ue" ), $artist );
|
||||
$artist = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $artist );
|
||||
$artist = preg_replace( "/[^a-zA-Z0-9_.!äöü\s-]/m/u", "", $artist );
|
||||
|
||||
$title = str_replace( array( '#TITLE:', '/' ), array( '', '-' ), strtok( "\n" ) );
|
||||
$title = utf8_encode( $title );
|
||||
$title = str_replace( array( "ö", "ä", "ü" ), array( "oe", "ae", "ue" ), $title );
|
||||
$title = preg_replace( '/[^a-zA-Z0-9\ \-]/', '', $title );
|
||||
$title = preg_replace( "/[^a-zA-Z0-9_.!äöü\s-]/m/u", "", $title );
|
||||
|
||||
|
||||
|
||||
echo "[INFO] Found $artist - $title\n";
|
||||
@ -157,7 +154,7 @@ class Downloader
|
||||
}
|
||||
fclose( $file );
|
||||
|
||||
echo "\n[SUCCESS] Downloaded \"$title - $artist\"\n";
|
||||
echo "[SUCCESS] Downloaded \"$title - $artist\"\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
26
GetAll.php
26
GetAll.php
@ -1,26 +0,0 @@
|
||||
<?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,14 +1,13 @@
|
||||
<?php
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
// Please change the following vars before the fist start!
|
||||
define( 'DOWNLOAD_PATH', '/media/tobias/Steam-Spiel/Karaoke' );
|
||||
define( 'USE_INTERNAL_YOUTUBEDL_EXE', false );
|
||||
define( 'YOUTUBE_DL_PATH', '/usr/bin/youtube-dl' );
|
||||
define( 'ANIMUX_USERNAME', 'idiota@idi.at' );
|
||||
define( 'ANIMUX_PASSWORD', 'XANwe6ZhKCnaXky' );
|
||||
define( 'DOWNLOAD_PATH', 'C:/Users/hoppt/Documents/Karaoke' );
|
||||
define( 'USE_INTERNAL_YOUTUBEDL_EXE', true );
|
||||
define( 'YOUTUBE_DL_PATH', '' );
|
||||
define( 'ANIMUX_USERNAME', 'trump@whitehouse.gov' );
|
||||
define( 'ANIMUX_PASSWORD', 'C7AFvca6Ri6VhZL' );
|
||||
|
||||
//mb_internal_encoding("UTF-8");
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
|
2
start.sh
2
start.sh
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
/usr/bin/php7.3 C:\Users\hoppt\PhpstormProjects\karaoke-management\karaoke-management.php
|
BIN
youtube-dl.exe
BIN
youtube-dl.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user