Skip to content

Conversation

@ghenry22
Copy link

@ghenry22 ghenry22 commented Oct 9, 2022

Additional for #214.

One place where the user-agent setting was not applied, resulting in some podcasts failing to download still. Creating a PR to highlight that this was missed as it is only mentioned in a comment on the previous PR.

credit to @wiseindy
https://github.com/wiseindy/podgrab

One place where the user-agent setting was not applied, resulting in some podcasts failing to download still.  Creating a PR to highlight that this was missed as it is only mentioned in a comment on the previous PR.

credit to @wiseindy
https://github.com/wiseindy/podgrab
setting := db.GetOrCreateSetting()
if len(setting.UserAgent) > 0 {
req.Header.Add("User-Agent", setting.UserAgent)
}
Copy link
Contributor

@fracai fracai Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just use the existing getRequest method from fileService.go. Replace the call to NewRequest on line 714 with getRequest as in:

req, err := getRequest(url)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants