mirror of
https://github.com/openvk/openvk
synced 2025-04-23 16:43:02 +03:00
Fix audio upload not working on Windows 11 because Windows is the worst operating system which doesn't work properly under any circumstances
This commit is contained in:
parent
861456964e
commit
7622592290
3 changed files with 5 additions and 2 deletions
|
@ -123,7 +123,7 @@ class Audio extends Media
|
|||
$start = time();
|
||||
while(file_exists($filename))
|
||||
if(time() - $start > 5)
|
||||
exit("Timed out waiting for ffmpeg");
|
||||
exit("Timed out waiting for ffmpeg"); // TODO replace with exception
|
||||
|
||||
} catch(UnknownCommandException $ucex) {
|
||||
exit(OPENVK_ROOT_CONF["openvk"]["debug"] ? "bash/pwsh is not installed" : VIDEOS_FRIENDLY_ERROR);
|
||||
|
|
|
@ -31,7 +31,7 @@ ffmpeg -i $audioFile -f dash -encryption_scheme cenc-aes-ctr -encryption_key $ke
|
|||
ffmpeg -i $audioFile -vn -ar 44100 "original_$token.mp3"
|
||||
Move-Item "original_$token.mp3" ($fileHash + '_fragments')
|
||||
|
||||
Move-Item -Path ($fileHash + '_fragments') -Destination "$storageDir/$hashPart"
|
||||
Get-ChildItem -Path ($fileHash + '_fragments/*') | Move-Item -Destination ("$storageDir/$hashPart/$fileHash" + '_fragments')
|
||||
Move-Item -Path ("$fileHash.mpd") -Destination "$storageDir/$hashPart"
|
||||
|
||||
cd ..
|
||||
|
|
|
@ -198,6 +198,9 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
{
|
||||
$user = Authenticator::i()->getUser();
|
||||
|
||||
if(!$this->template)
|
||||
$this->template = new \stdClass;
|
||||
|
||||
$this->template->isXmas = intval(date('d')) >= 1 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false;
|
||||
$this->template->isTimezoned = Session::i()->get("_timezoneOffset");
|
||||
|
||||
|
|
Loading…
Reference in a new issue