cask "4k-youtube-to-mp3" do # NOTE: "3" is not a version number, but an intrinsic part of the product name arch arm: "arm64", intel: "x64" version "5.6.5" sha256 arm: "217cf7589a47e5a87976d2b0fa519835d95d6427b800021e4b737e744421220d", intel: "a1936ae8ef4f6ed7820dbb488924df9804704975e6ebbae4abc569dc5ea5d80a" url "https://dl.4kdownload.com/app/4kyoutubetomp3_#{version}_#{arch}.dmg" name "4K YouTube to MP3" desc "Turn YouTube links into MP3 files" homepage "https://www.4kdownload.com/products/youtubetomp3/1" livecheck do url "https://www.4kdownload.com/download" regex(%r{href=.*?/4kyoutubetomp3[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg}i) end depends_on macos: ">= :high_sierra" app "4K YouTube to MP3.app" zap trash: [ "~/Library/Application Support/4kdownload.com", "~/Library/Preferences/com.4kdownload.*", "~/Library/Saved Application State/com.openmedia.4kyoutubetomp3.savedState", ] end