Skip to content

Commit abef050

Browse files
committed
Add support for downloading episodes with many redirects (pdst.fm)
#2161
1 parent a58bae5 commit abef050

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/services/tools.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { errorLogger } from '../lib/logger'
33
import { request } from './request'
44

55
const forceSecureRedirectDomains = {
6-
'feeds.gty.org': true
6+
'feeds.gty.org': true,
7+
// we've found pdst.fm mp3s to use up to 6 redirects, which causes errors with Android downloads
8+
'pdst.fm': true
79
}
810

911
export const getSecureUrl = async (mediaUrl: string) => {
@@ -21,7 +23,7 @@ export const getSecureUrl = async (mediaUrl: string) => {
2123
const secureUrlInfo = response?.data || {}
2224
const { secureUrl } = secureUrlInfo
2325

24-
if (secureUrl) {
26+
if (secureUrl?.startsWith('https://')) {
2527
finalUrl = secureUrl
2628
}
2729
} else if (mediaUrl.indexOf('http://') >= 0) {

0 commit comments

Comments
 (0)