Skip to content

Commit

Permalink
Version interface
Browse files Browse the repository at this point in the history
  • Loading branch information
NelibYT committed Jun 25, 2022
1 parent a17be62 commit c40adf2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ytMP4 Skin.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ if not exist "bin\yt-dlp.exe" powershell -command "& {Add-Type -AssemblyName Sys
if not exist "bin\ffmpeg.exe" powershell -command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Le dossier bin est introuvable ou incomplet. Vous pouvez le trouver ici: https://github.com/NelibYT/ytMP4/releases', 'ytMP4 Skin 1.2', 'OK', [System.Windows.Forms.MessageBoxIcon]::Warning)}" & exit
if not exist "bin\curl.exe" powershell -command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Le dossier bin est introuvable ou incomplet. Vous pouvez le trouver ici: https://github.com/NelibYT/ytMP4/releases', 'ytMP4 Skin 1.2', 'OK', [System.Windows.Forms.MessageBoxIcon]::Warning)}" & exit
if not exist "bin\sfk.exe" powershell -command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Le dossier bin est introuvable ou incomplet. Vous pouvez le trouver ici: https://github.com/NelibYT/ytMP4/releases', 'ytMP4 Skin 1.2', 'OK', [System.Windows.Forms.MessageBoxIcon]::Warning)}" & exit
if not exist "bin\kix32.exe" powershell -command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Le dossier bin est introuvable ou incomplet. Vous pouvez le trouver ici: https://github.com/NelibYT/ytMP4/releases', 'ytMP4 Skin 1.2', 'OK', [System.Windows.Forms.MessageBoxIcon]::Warning)}" & exit
::Si la connexion ne fonctionne pas, un message d'erreur apparaît
ping www.youtube.com -n 1 -w 1000 >nul & if errorlevel 1 powershell -command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('ytMP4 Skin ne peut pas se connecter a internet. Verifiez votre connexion.', 'ytMP4 Skin 1.2', 'OK', [System.Windows.Forms.MessageBoxIcon]::Warning)}" & exit
::J'utilise curl et swissfileknife pour extraire le tag de la dernière release
"bin\curl.exe" -k "https://api.github.com/repos/NelibYT/ytMP4/releases/latest">"bin\maj.tmp" & "bin\sfk.exe" filter "bin\maj.tmp" -+tag_name -write -yes & set /p maj=<"bin\maj.tmp" & del "bin\maj.tmp"
::Si la version actuelle n'est pas celle présente sur GitHub, on peut la télécharger
if not "%maj:~15,-2%"=="1.2" powershell -Command "& {Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('Une nouvelle version de ytMP4 Skin est disponible. Voulez-vous la telecharger?', 'ytMP4 Skin 1.2', 'YesNo', [System.Windows.Forms.MessageBoxIcon]::Information);}">"bin\dld.tmp" & set /p dld=<"bin\dld.tmp" & del "bin\dld.tmp"
if "%dld%"=="Yes" start https://github.com/NelibYT/ytMP4/releases & exit
::Je cache la console avec kixtart
echo setconsole("hide")>"bin\tmp.kix" & "bin\kix32.exe" "bin\tmp.kix" & del "bin\tmp.kix"
::Sélection du dossier d'exportation
powershell -command "& {[void] [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); $FolderBrowserDialog = New-Object System.Windows.Forms.FolderBrowserDialog; $FolderBrowserDialog.RootFolder = 'MyComputer'; if ($initialDirectory) {$FolderBrowserDialog.SelectedPath = $initialDirectory}; [void] $FolderBrowserDialog.ShowDialog(); return $FolderBrowserDialog.SelectedPath}">"bin\folder.tmp" & set /p folder=<"bin\folder.tmp" & del "bin\folder.tmp"
::On quitte si la croix a été pressée
Expand Down

0 comments on commit c40adf2

Please sign in to comment.