Skip to content

Commit

Permalink
fix: Fix issue #182
Browse files Browse the repository at this point in the history
X changed their video cdn domain.  (`video.twimg.com` -> `video-cf.twimg.com`)
This change cause the url of videos to be filtered.
Since the parsed urls are supposed to be validated (the download should not need to validate incoming urls.),
the filter was removed.
  • Loading branch information
EltonChou committed Aug 21, 2024
1 parent 53aa23e commit 051e800
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/backend/downloads/MediaDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ export default class MediaDownloader {
await this.downloadMedia(mediaFile.src, makeFilePath(mediaFile), recordConfig)
}

Array.from(mediaCatalog.videos).filter(isValidTweetMediaFileUrl).forEach(download)
Array.from(mediaCatalog.videos).forEach(download)

Array.from(mediaCatalog.images)
.filter(({ url }) => isValidTweetMediaFileUrl(url))
.filter(shouldAllowThumbnail(this.featureSettings.includeVideoThumbnail))
.forEach(({ url }, index) => download(url, index))
}
Expand Down

0 comments on commit 051e800

Please sign in to comment.