homebrew-cask/Casks/p/plex-htpc.rb

29 lines
839 B
Ruby

cask "plex-htpc" do
version "1.47.1.3971,8b24dbb6"
sha256 "f33986c14acfd6ee58e23f509b6db47638d11ff9ea0df619ba53b78e2ec078c4"
url "https://downloads.plex.tv/htpc/#{version.csv.first}-#{version.csv.second}/macos/PlexHTPC-#{version.csv.first}-#{version.csv.second}-universal.zip"
name "Plex HTPC"
desc "Home Theater PC media player"
homepage "https://www.plex.tv/"
livecheck do
url "https://plex.tv/api/downloads/7.json"
regex(/"version"\s*:\s*"(\d(?:\.\d+)*)-([a-f0-9]{8})"/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end
auto_updates true
depends_on macos: ">= :high_sierra"
app "Plex HTPC.app"
zap trash: [
"~/Library/Application Support/Plex HTPC",
"~/Library/Caches/Plex HTPC",
"~/Library/Logs/Plex HTPC",
]
end