text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set user_system_arch to (do shell script "arch") | Main.applescript |
if user_system_arch is not "arm64" then set user_system_arch to "Intel" | Main.applescript |
set shellPath to "PATH=$PATH:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:~/opt/bin:~/opt/sbin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:" & quoted form of (POSIX path of (path_to_MacYTDL & "::")) & "; " | Main.applescript |
set MacYTDL_custom_icon_file to (path to resource "macytdl.icns") as string | Main.applescript |
set MacYTDL_custom_icon_file_posix to POSIX path of MacYTDL_custom_icon_file | Main.applescript |
set theVersionLabel to localized string "Version" from table "MacYTDL" | Main.applescript |
set diag_Title to "MacYTDL, " & theVersionLabel & " " & MacYTDL_version & ", " & MacYTDL_date | Main.applescript |
set YTDL_version to "Not installed" | Main.applescript |
set ffprobe_version to "Not installed" | Main.applescript |
set ffmpeg_version to "Not installed" | Main.applescript |
set Atomic_is_installed to false | Main.applescript |
set old_version_prefs to "No" | Main.applescript |
set usr_bin_folder to ("/usr/local/bin/" as text) | Main.applescript |
set ytdlp_file to ("/usr/local/bin/yt-dlp" as text) | Main.applescript |
set homebrew_ARM_ytdlp_file to ("/opt/homebrew/bin/yt-dlp" as text) | Main.applescript |
set homebrew_Intel_ytdlp_file to ("usr:local:bin:yt-dlp" as text) | Main.applescript |
set macPorts_ytdlp_file to ("/opt/local/bin/yt-dlp" as text) | Main.applescript |
set youtubedl_file to ("/usr/local/bin/youtube-dl" as text) | Main.applescript |
set home_folder to (path to home folder) as text | Main.applescript |
set libraries_folder to home_folder & "Library:Script Libraries" | Main.applescript |
set DTP_file to libraries_folder & ":DialogToolkitMacYTDL.scptd" | Main.applescript |
set MacYTDL_preferences_folder to "Library/Preferences/MacYTDL/" | Main.applescript |
set MacYTDL_preferences_path to (POSIX path of (path to home folder) & MacYTDL_preferences_folder) | Main.applescript |
set MacYTDL_prefs_file to MacYTDL_preferences_path & "MacYTDL.plist" | Main.applescript |
set ffmpeg_file to ("/usr/local/bin/ffmpeg" as text) | Main.applescript |
set ffprobe_file to ("/usr/local/bin/ffprobe" as text) | Main.applescript |
set homebrew_ARM_ffmpeg_file to ("/opt/homebrew/bin/ffmpeg" as text) | Main.applescript |
set homebrew_Intel_ffmpeg_file to ("usr:local:bin:ffmpeg" as text) | Main.applescript |
set homebrew_ARM_ffprobe_file to ("/opt/homebrew/bin/ffprobe" as text) | Main.applescript |
set homebrew_Intel_ffprobe_file to ("usr:local:bin:ffprobe" as text) | Main.applescript |
set macPorts_ffmpeg_file to ("/opt/local/bin/ffmpeg" as text) | Main.applescript |
set macPorts_ffprobe_file to ("/opt/local/bin/ffprobe" as text) | Main.applescript |
set batch_filename to "BatchFile.txt" as string | Main.applescript |
set batch_file to POSIX file (MacYTDL_preferences_path & batch_filename) | Main.applescript |
set screen_size to get_screensize() | Main.applescript |
set X_position to item 1 of screen_size as integer | Main.applescript |
set Y_position to item 2 of screen_size as integer | Main.applescript |
set screen_width to item 3 of screen_size as integer | Main.applescript |
set screen_height to item 4 of screen_size as integer | Main.applescript |
set theButtonOKLabel to localized string "OK" from table "MacYTDL" | Main.applescript |
set theButtonQuitLabel to localized string "Quit" from table "MacYTDL" | Main.applescript |
set theButtonDownloadLabel to localized string "Download" from table "MacYTDL" | Main.applescript |
set theButtonReturnLabel to localized string "Return" from table "MacYTDL" | Main.applescript |
set theButtonContinueLabel to localized string "Continue" from table "MacYTDL" | Main.applescript |
set theButtonCancelLabel to localized string "Cancel" from table "MacYTDL" | Main.applescript |
set theButtonNoLabel to localized string "No" from table "MacYTDL" | Main.applescript |
set theButtonYesLabel to localized string "Yes" from table "MacYTDL" | Main.applescript |
set theBestLabel to localized string "Best" from table "MacYTDL" | Main.applescript |
set theDefaultLabel to localized string "Default" from table "MacYTDL" | Main.applescript |
set theNoRemuxLabel to localized string "No remux" from table "MacYTDL" | Main.applescript |
set path_to_Utilities to (path_to_MacYTDL & "Contents:Resources:Scripts:Utilities.scpt") as alias | Main.applescript |
set run_Utilities_handlers to load script path_to_Utilities | Main.applescript |
if exists file youtubedl_file then | Main.applescript |
set YTDL_exists to true | Main.applescript |
set YTDL_exists to false | Main.applescript |
if exists file ytdlp_file then | Main.applescript |
set ytdlp_path_alias to POSIX file ytdlp_file as alias | Main.applescript |
set its_type to file type of disk item homebrew_Intel_ytdlp_file | Main.applescript |
if its_type is "slnk" then | Main.applescript |
set homebrew_ytdlp_exists to true | Main.applescript |
set ytdlp_exists to false | Main.applescript |
if size of ytdlp_path_alias is greater than 9000 then | Main.applescript |
set homebrew_ytdlp_exists to false | Main.applescript |
set ytdlp_exists to true | Main.applescript |
if size of ytdlp_path_alias is less than 9000 and its_type is not "slnk" then | Main.applescript |
else if exists file homebrew_ARM_ytdlp_file then | Main.applescript |
else if exists file macPorts_ytdlp_file then | Main.applescript |
set ytdlp_file to ("/opt/local/bin/yt-dlp" as text) | Main.applescript |
if exists file DTP_file then | Main.applescript |
set DTP_exists to true | Main.applescript |
set DTP_exists to false | Main.applescript |
if exists file ffmpeg_file then | Main.applescript |
set its_type_ffmpeg to file type of disk item homebrew_Intel_ffmpeg_file | Main.applescript |
if its_type_ffmpeg is "slnk" then | Main.applescript |
set homebrew_ffmpeg_exists to true | Main.applescript |
set ffmpeg_exists to false | Main.applescript |
set homebrew_ffmpeg_exists to false | Main.applescript |
set ffmpeg_exists to true | Main.applescript |
else if exists file homebrew_ARM_ffmpeg_file then | Main.applescript |
set ffmpeg_file to ("/opt/homebrew/bin/ffmpeg" as text) | Main.applescript |
else if exists file macPorts_ffmpeg_file then | Main.applescript |
set ffmpeg_file to ("/opt/local/bin/ffmpeg" as text) | Main.applescript |
if exists file ffprobe_file then | Main.applescript |
set its_type_ffmprobe to file type of disk item homebrew_Intel_ffprobe_file | Main.applescript |
set homebrew_ffprobe_exists to true | Main.applescript |
set ffprobe_exists to false | Main.applescript |
set homebrew_ffprobe_exists to false | Main.applescript |
set ffprobe_exists to true | Main.applescript |
else if exists file homebrew_ARM_ffprobe_file then | Main.applescript |
set ffprobe_file to ("/opt/homebrew/bin/ffprobe" as text) | Main.applescript |
else if exists file macPorts_ffprobe_file then | Main.applescript |
set ffprobe_file to ("/opt/local/bin/ffprobe" as text) | Main.applescript |
if exists file MacYTDL_prefs_file then | Main.applescript |
set prefs_exists to true | Main.applescript |
set prefs_exists to false | Main.applescript |
if ffmpeg_exists is true or homebrew_ffmpeg_exists is true then | Main.applescript |
set ffmpeg_version_long to do shell script shellPath & " ffmpeg -version" | Main.applescript |
set AppleScript's text item delimiters to {"-", " "} | Main.applescript |
set ffmpeg_version to text item 3 of ffmpeg_version_long | Main.applescript |
if ffprobe_exists is true or homebrew_ffprobe_exists is true then | Main.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.