1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Improve handling of releases without video files

New: Show warning in queue if download contains executable or archive file and no video file was detected

(cherry picked from commit b15b6a079846b21cac8476820fce9cde81732291)
This commit is contained in:
Mark McDowall
2022-12-12 23:05:01 -08:00
committed by Robin Dadswell
parent d4ce08a044
commit ce031124c7
4 changed files with 134 additions and 5 deletions
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
namespace NzbDrone.Core.MediaFiles
{
internal static class FileExtensions
{
private static List<string> _archiveExtensions = new List<string>
{
".rar",
".r00",
".zip",
".tar",
".gz",
".tar.gz"
};
private static List<string> _executableExtensions = new List<string>
{
".exe",
".bat",
".cmd",
".sh"
};
public static HashSet<string> ArchiveExtensions => new HashSet<string>(_archiveExtensions, StringComparer.OrdinalIgnoreCase);
public static HashSet<string> ExecutableExtensions => new HashSet<string>(_executableExtensions, StringComparer.OrdinalIgnoreCase);
}
}