Use user-agent in all places in fileService.go and make sure user agent box is wide

pull/214/head
James Luck 2 years ago
parent 0e8453c202
commit 94b4b2b19b

@ -110,7 +110,7 @@
</label> </label>
<label for="userAgent" style="display: inline-block;" > <label for="userAgent" style="display: inline-block;" >
<span class="label-body">Specify the User-Agent header specified when downloading podcasts</span> <span class="label-body">Specify the User-Agent header specified when downloading podcasts</span>
<input type="text" name="userAgent" v-model="userAgent"> <input type="text" class="u-full-width" name="userAgent" v-model="userAgent">
</label> </label>
<input type="submit" value="Save" class="button"> <input type="submit" value="Save" class="button">

@ -28,8 +28,7 @@ func Download(link string, episodeTitle string, podcastName string, prefix strin
} }
client := httpClient() client := httpClient()
req, err := http.NewRequest("GET", link, nil) req, err := getRequest(link)
req.Header.Add("User-Agent", "")
if err != nil { if err != nil {
Logger.Errorw("Error creating request: "+link, err) Logger.Errorw("Error creating request: "+link, err)
} }

Loading…
Cancel
Save