Update supported video extensions

This commit is contained in:
Ben Adrian Sarmiento
2024-06-19 20:29:05 +02:00
parent 9829b34254
commit 55edd46aa4
5 changed files with 16 additions and 15 deletions

View File

@@ -197,7 +197,7 @@ func (t *TorrentManager) repair(torrent *Torrent, wg *sync.WaitGroup) {
// check if broken files are playable
allPlayable := true
for _, file := range brokenFiles {
if utils.IsPlayable(file.Path) {
if utils.IsVideo(file.Path) {
continue
}
@@ -394,7 +394,7 @@ func (t *TorrentManager) assignLinks(torrent *Torrent) bool {
if action == "extract" {
videoFiles := []string{}
torrent.SelectedFiles.IterCb(func(_ string, file *File) {
if utils.IsPlayable(file.Path) {
if utils.IsVideo(file.Path) {
videoFiles = append(videoFiles, fmt.Sprintf("%d", file.ID))
} else if file.ID != 0 {
t.repairLog.Debugf("Extracting file %s from rar'ed torrent %s", file.Path, t.GetKey(torrent))