text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set YTDL_TimeStamps to resourcesPath & "ets"
|
Main.applescript
|
set YTDL_TimeStamps to ""
|
Main.applescript
|
set YTDL_credentials to ""
|
Main.applescript
|
if credentials_choice is true then
|
Main.applescript
|
get_YTDL_credentials()
|
Main.applescript
|
if DL_Limit_Rate is true then
|
Main.applescript
|
set YTDL_limit_rate_value to ("--limit-rate " & DL_Limit_Rate_Value & "m ")
|
Main.applescript
|
set YTDL_limit_rate_value to ""
|
Main.applescript
|
if DL_Add_Metadata is true then
|
Main.applescript
|
set YTDL_metadata to "--add-metadata "
|
Main.applescript
|
set YTDL_metadata to ""
|
Main.applescript
|
if DL_Use_Proxy is true then
|
Main.applescript
|
set YTDL_Use_Proxy to ("--proxy " & DL_Proxy_URL & " ")
|
Main.applescript
|
set YTDL_Use_Proxy to ""
|
Main.applescript
|
if DL_Use_Cookies is true then
|
Main.applescript
|
set YTDL_Use_Cookies to ("--cookies " & DL_Cookies_Location & " ")
|
Main.applescript
|
set YTDL_Use_Cookies to ""
|
Main.applescript
|
if DL_Use_Custom_Settings is true then
|
Main.applescript
|
set YTDL_Custom_Settings to (DL_Custom_Settings & " ")
|
Main.applescript
|
set YTDL_Custom_Settings to ""
|
Main.applescript
|
if DL_Use_Custom_Template is true then
|
Main.applescript
|
set YTDL_Custom_Template to DL_Custom_Template
|
Main.applescript
|
set YTDL_Custom_Template to ""
|
Main.applescript
|
if DL_QT_Compat is true then
|
Main.applescript
|
set YTDL_QT_Compat to "--recode-video \"mp4\" --ppa \"VideoConvertor:-vcodec libx264 -acodec aac\" "
|
Main.applescript
|
set YTDL_QT_Compat to ""
|
Main.applescript
|
set YTDL_no_part to ""
|
Main.applescript
|
if DL_audio_only is true then
|
Main.applescript
|
set one_playlist_item to ""
|
Main.applescript
|
if URL_user_entered_clean contains "playlist" or (URL_user_entered_clean contains "watch?" and URL_user_entered_clean contains "&list=") or (URL_user_entered_clean contains "?list=") then
|
Main.applescript
|
set one_playlist_item to "--playlist-items 1 "
|
Main.applescript
|
set YTDL_get_formats to do shell script shellPath & DL_Use_YTDLP & " --list-formats --ignore-errors " & one_playlist_item & URL_user_entered & " 2>&1"
|
Main.applescript
|
set YTDL_get_formats to errStr
|
Main.applescript
|
if YTDL_get_formats contains "audio only" and DL_audio_codec is theBestLabel then
|
Main.applescript
|
set YTDL_audio_only to "--format bestaudio "
|
Main.applescript
|
set YTDL_audio_codec to "--extract-audio --audio-format " & DL_audio_codec & " --audio-quality 0 "
|
Main.applescript
|
check_download_folder(folder_chosen)
|
Main.applescript
|
if DL_Use_Cookies is true then check_cookies_file(DL_Cookies_Location)
|
Main.applescript
|
tell application "System Events" to set test_DL_folder to (get class of item (folder_chosen as text)) as text
|
Main.applescript
|
if test_DL_folder is "file" then
|
Main.applescript
|
set offset_to_file_name to last_offset(folder_chosen as text, "/")
|
Main.applescript
|
set folder_chosen to text 1 thru offset_to_file_name of folder_chosen
|
Main.applescript
|
set URL_user_entered_from_auto_download to ""
|
Main.applescript
|
set downloadsFolder_Path to folder_chosen
|
Main.applescript
|
set skip_Main_dialog to false
|
Main.applescript
|
if button_number_returned is 5 then -- Continue to download
|
Main.applescript
|
if openBatch_chosen is true then
|
Main.applescript
|
open_batch_processing(folder_chosen, remux_format_choice, subtitles_choice, YTDL_credentials, YTDL_subtitles, YTDL_STEmbed, YTDL_format, YTDL_remux_format, YTDL_Remux_original, YTDL_description, YTDL_audio_only, YTDL_audio_codec, YTDL_over_writes, YTDL_Thumbnail_Write, YTDL_Thumbnail_Embed, YTDL_metadata, YTDL_limit_rate_value, YTDL_verbose, YTDL_TimeStamps, YTDL_Use_Proxy, YTDL_Use_Cookies, YTDL_Custom_Settings, YTDL_Custom_Template, YTDL_no_part, YTDL_QT_Compat, DL_Use_YTDLP)
|
Main.applescript
|
download_video(shellPath, path_to_MacYTDL, MacYTDL_custom_icon_file, MacYTDL_custom_icon_file_posix, screen_width, screen_height, YTDL_simulate_file, URL_user_entered, URL_user_entered_from_auto_download, folder_chosen, diag_Title, DL_batch_status, remux_format_choice, subtitles_choice, YTDL_credentials, YTDL_subtitles, YTDL_STEmbed, YTDL_format_pref, YTDL_format, YTDL_remux_format, YTDL_Remux_original, YTDL_description, YTDL_audio_only, YTDL_audio_codec, YTDL_over_writes, YTDL_Thumbnail_Write, YTDL_Thumbnail_Embed, YTDL_metadata, YTDL_limit_rate_value, YTDL_verbose, YTDL_TimeStamps, YTDL_Use_Proxy, YTDL_Use_Cookies, YTDL_Custom_Settings, YTDL_Custom_Template, YTDL_no_part, skip_Main_dialog, theButtonOKLabel, theButtonCancelLabel, theButtonDownloadLabel, theButtonReturnLabel, theButtonQuitLabel, theButtonContinueLabel, YTDL_QT_Compat, DL_Use_YTDLP)
|
Main.applescript
|
end main_dialog
|
Main.applescript
|
on download_video(shellPath, path_to_MacYTDL, MacYTDL_custom_icon_file, MacYTDL_custom_icon_file_posix, screen_width, screen_height, YTDL_simulate_file, URL_user_entered, URL_user_entered_from_auto_download, folder_chosen, diag_Title, DL_batch_status, remux_format_choice, subtitles_choice, YTDL_credentials, YTDL_subtitles, YTDL_STEmbed, YTDL_format_pref, YTDL_format, YTDL_remux_format, YTDL_Remux_original, YTDL_description, YTDL_audio_only, YTDL_audio_codec, YTDL_over_writes, YTDL_Thumbnail_Write, YTDL_Thumbnail_Embed, YTDL_metadata, YTDL_limit_rate_value, YTDL_verbose, YTDL_TimeStamps, YTDL_Use_Proxy, YTDL_Use_Cookies, YTDL_Custom_Settings, YTDL_Custom_Template, YTDL_no_part, skip_Main_dialog, theButtonOKLabel, theButtonCancelLabel, theButtonDownloadLabel, theButtonReturnLabel, theButtonQuitLabel, theButtonContinueLabel, YTDL_QT_Compat, DL_Use_YTDLP)
|
Main.applescript
|
if URL_user_entered_from_auto_download is not "" then
|
Main.applescript
|
set URL_user_entered_clean to URL_user_entered_from_auto_download
|
Main.applescript
|
if text -2 of URL_user_entered is "/" then
|
Main.applescript
|
set URL_user_entered to quoted form of (text 2 thru -3 of URL_user_entered) -- Why not just remove the trailing slash ??
|
Main.applescript
|
if URL_user_entered is "" or URL_user_entered is "''" then
|
Main.applescript
|
set theURLBlankLabel to localized string "You need to paste a URL before selecting Download. Quit or OK to try again." from table "MacYTDL"
|
Main.applescript
|
set quit_or_return to button returned of (display dialog theURLBlankLabel buttons {theButtonQuitLabel, theButtonOKLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600)
|
Main.applescript
|
if quit_or_return is theButtonOKLabel then
|
Main.applescript
|
if length of URL_user_entered is greater than 4 then
|
Main.applescript
|
set test_URL to text 2 thru 5 of URL_user_entered
|
Main.applescript
|
if not test_URL is "http" then
|
Main.applescript
|
set theURLNothttpLabel1 to localized string "The URL" from table "MacYTDL"
|
Main.applescript
|
set theURLNothttpLabel2 to localized string "is not valid. It should begin with the letters http. You need to paste a valid URL before selecting Download. Quit or OK to try again." from table "MacYTDL"
|
Main.applescript
|
set quit_or_return to button returned of (display dialog theURLNothttpLabel1 & " \"" & URL_user_entered & "\" " & theURLNothttpLabel2 buttons {theButtonQuitLabel, theButtonOKLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600)
|
Main.applescript
|
if skip_Main_dialog is true then
|
Main.applescript
|
set theURLTooShortLabel1 to localized string "The URL" from table "MacYTDL"
|
Main.applescript
|
set theURLTooShortLabel2 to localized string "is not valid. It should begin with the letters http. You need to paste a valid URL before selecting Download, Quit or OK to try again." from table "MacYTDL"
|
Main.applescript
|
set quit_or_return to button returned of (display dialog theURLTooShortLabel1 & " \"" & URL_user_entered & "\" " & theURLTooShortLabel2 buttons {theButtonQuitLabel, theButtonOKLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600)
|
Main.applescript
|
if URL_user_entered contains "https://iview.abc.net.au/category" or URL_user_entered contains "https://iview.abc.net.au/collection" or URL_user_entered is "'https://iview.abc.net.au/browse'" or URL_user_entered contains "https://iview.abc.net.au/channel" or URL_user_entered is "'https://iview.abc.net.au'" or URL_user_entered is "'https://iview.abc.net.au/'" then
|
Main.applescript
|
set theURLWarningiViewCategoryLabel to localized string "This is an iView page from which MacYTDL cannot download videos. Try an individual show." from table "MacYTDL"
|
Main.applescript
|
display dialog theURLWarningiViewCategoryLabel with title diag_Title buttons {theButtonOKLabel} default button 1 with icon file MacYTDL_custom_icon_file giving up after 600
|
Main.applescript
|
if URL_user_entered contains "https://www.sbs.com.au/ondemand" then
|
Main.applescript
|
if URL_user_entered is "'https://www.sbs.com.au/ondemand'" or URL_user_entered is "'https://www.sbs.com.au/ondemand/tv-shows'" or URL_user_entered contains "https://www.sbs.com.au/ondemand/collection" or URL_user_entered contains "-collection" or URL_user_entered contains "https://www.sbs.com.au/ondemand/sport" or URL_user_entered contains "https://www.sbs.com.au/ondemand/movies" or URL_user_entered contains "https://www.sbs.com.au/ondemand/live" or URL_user_entered contains "https://www.sbs.com.au/ondemand/fifa-world-cup-2022" or URL_user_entered contains "https://www.sbs.com.au/ondemand/favourites" then
|
Main.applescript
|
set theURLWarningSBSCategoryLabel to localized string "This is an SBS OnDemand Category page from which MacYTDL cannot download videos. Try an individual show." from table "MacYTDL"
|
Main.applescript
|
display dialog theURLWarningSBSCategoryLabel with title diag_Title buttons {theButtonOKLabel} default button 1 with icon file MacYTDL_custom_icon_file giving up after 600
|
Main.applescript
|
set YTDL_output_template to " -o '%(title)s.%(ext)s'"
|
Main.applescript
|
if YTDL_Custom_Template is not "" then
|
Main.applescript
|
set YTDL_output_template to " -o '" & YTDL_Custom_Template & "'"
|
Main.applescript
|
if URL_user_entered contains "ABC" then
|
Main.applescript
|
set YTDL_output_template to " -o '%(series)s-%(title)s.%(ext)s'"
|
Main.applescript
|
else if URL_user_entered contains "ITV" then
|
Main.applescript
|
set YTDL_output_template to " -o '%(series)s-%(season)s-%(title)s.%(ext)s'"
|
Main.applescript
|
else if URL_user_entered contains "9Now" then
|
Main.applescript
|
set URL_user_entered_sans_q to text 1 thru -2 of URL_user_entered
|
Main.applescript
|
set NineNow_URL_items to every text item of URL_user_entered_sans_q
|
Main.applescript
|
set NineNow_show_old to text 1 thru end of item 4 of NineNow_URL_items
|
Main.applescript
|
set NineNow_show_new to run_Utilities_handlers's replace_chars(NineNow_show_old, "-", "_")
|
Main.applescript
|
set YTDL_output_template to " -o '" & NineNow_show_new & "-%(title)s.%(ext)s'"
|
Main.applescript
|
else if URL_user_entered contains "7Plus" then
|
Main.applescript
|
set is_channel to false
|
Main.applescript
|
if URL_user_entered_clean contains "https://www.youtube.com/c/" or URL_user_entered_clean contains "https://www.youtube.com/channel/" or URL_user_entered_clean contains "https://www.youtube.com/user/" or URL_user_entered_clean contains "https://www.youtube.com/@" then
|
Main.applescript
|
set theYTChannelLabel to localized string "The URL you entered looks like a YouTube channel. Most channels have a great many videos, some have hundreds. It may take hours to check and download each video. Do you really wish to continue or return to the Main dialog ?" from table "MacYTDL"
|
Main.applescript
|
set quit_or_return to button returned of (display dialog theYTChannelLabel buttons {theButtonReturnLabel, theButtonContinueLabel} default button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600)
|
Main.applescript
|
if quit_or_return is theButtonReturnLabel then
|
Main.applescript
|
set is_channel to true
|
Main.applescript
|
set theYTChannelLabel to localized string "The URL you entered looks like a YouTube channel. You are using youtube-dl for your download. Currently, MacYTDL cannot download channels with youtube-dl." from table "MacYTDL"
|
Main.applescript
|
display dialog theYTChannelLabel buttons {theButtonReturnLabel} default button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600
|
Main.applescript
|
set number_of_URLs to number of text items in URL_user_entered_clean
|
Main.applescript
|
if number_of_URLs is greater than 1 then
|
Main.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.