cask "multiviewer" do arch arm: "arm64", intel: "x64" sha256 arm: "18c48c4e4db4fa66bfec6cca6c77f8f1fbeb68964dad0cb19ab9c499600b8a4d", intel: "05e80638a2e0ce9e1b9970d2d3088d0e806d8bd694f9632e309b667b5f5775b8" on_arm do version "2.12.0,wYBMmwD1W-1KJtI4Dpaiuf7P2M4VtAqR" end on_intel do version "2.12.0,iz2ZWti1vrK3IykG-4HbF-BSwTaSosUb" end url "https://releases.multiviewer.app/v/#{version.csv.first}/1/#{version.csv.second}/MultiViewer-#{version.csv.first}-#{arch}.dmg" name "MultiViewer" desc "Unofficial desktop client for F1 TV" homepage "https://multiviewer.app/" livecheck do url "https://api.multiviewer.dev/api/v1/releases/latest" regex(%r{/([^/]+?)/MultiViewer[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg}i) strategy :json do |json, regex| json["downloads"]&.flat_map do |item| match = item["url"]&.match(regex) next if match.blank? "#{match[2]},#{match[1]}" end end end auto_updates true depends_on macos: :monterey app "MultiViewer.app" zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.electron.multiviewer-for-f1.sfl*", "~/Library/Application Support/MultiViewer", "~/Library/Caches/com.electron.multiviewer-for-f1", "~/Library/Caches/com.electron.multiviewer-for-f1.ShipIt", "~/Library/HTTPStorages/com.electron.multiviewer-for-f1", "~/Library/Preferences/com.electron.multiviewer-for-f1.plist", "~/Library/Saved Application State/com.electron.multiviewer-for-f1.savedState", ] end