Compare commits

...

3 commits

Author SHA1 Message Date
jens 159e4a44b7 Update 'download_xcode.rb' 2021-09-10 19:32:45 +00:00
jens 85aee01979 Merge pull request 'prefer hls_aes streams over others' (#6) from hlsstreams into main
Reviewed-on: #6
2020-11-01 02:28:33 +00:00
Jens Timmerman cc4b8d70b6 prefer hls_aes streams over others 2020-11-01 03:27:38 +01:00
3 changed files with 16 additions and 4 deletions

View file

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
print "What is the URL of your Apple Downloads resource?\nYou should find this on https://developer.apple.com/download/ \nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
print "Make sure you have aria2 installed (brew install aria2) "
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
exec(command)

View file

@ -54,6 +54,7 @@ struct LoginView: View{
struct VRTNuView: View{
var vrtNu: VRTNu
var body: some View {
NavigationView(){
List(vrtNu.getShows(), id: \.title){ show in
NavigationLink(destination: ShowView(show: show)){
@ -72,8 +73,8 @@ struct VRTNuView: View{
}
}
}
}
}.navigationTitle("Browse VRT Nu")//.listStyle(DefaultListStyle())
}.navigationBarTitle("Browse VRT Nu")
}
}
}
struct ShowView: View {

View file

@ -51,7 +51,16 @@ struct Episode: Hashable, Comparable{
let duration = videojson.value(forKey: "duration") as! Double
let title = videojson.value(forKey: "title") as! String
let targetURLs = videojson.value(forKey: "targetUrls") as! [NSDictionary]
let videourl = targetURLs[0].value(forKey: "url") as! String
var videourl = targetURLs[0].value(forKey: "url") as! String
// it seams that the hls_aes stream has more changes of playing
// TODO: pass all streams and switch stream if one fails?
for i in 0 ..< targetURLs.count{
if targetURLs[i].value(forKey: "type") as! String == "hls_aes"{
videourl = targetURLs[i].value(forKey: "url") as! String
}
}
print(videourl)
//session.get('https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/videos/%s?vrtPlayerToken=%s&client=%s@PROD' %(video_id, token, clientid)).json()
var video = Video(hlsUrl: URL(string: videourl)!,