mirror of
https://github.com/Radarr/Radarr
synced 2025-03-15 00:19:49 +00:00
Merge branch 'master' of git://github.com/kayone/NzbDrone
This commit is contained in:
commit
46c8642cc4
4 changed files with 7 additions and 8 deletions
|
@ -12,7 +12,7 @@ namespace NzbDrone.Core.Providers
|
|||
public class MediaFileProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
private static readonly string[] MediaExtentions = new[] { "*.mkv", "*.avi", "*.wmv", "*.mp4" };
|
||||
private static readonly string[] MediaExtentions = new[] { ".mkv", ".avi", ".wmv", ".mp4" };
|
||||
private readonly DiskProvider _diskProvider;
|
||||
private readonly EpisodeProvider _episodeProvider;
|
||||
private readonly SeriesProvider _seriesProvider;
|
||||
|
@ -72,7 +72,7 @@ namespace NzbDrone.Core.Providers
|
|||
if (!_repository.Exists<EpisodeFile>(e => e.Path == Parser.NormalizePath(filePath)))
|
||||
{
|
||||
var parseResult = Parser.ParseEpisodeInfo(filePath);
|
||||
|
||||
|
||||
|
||||
if (parseResult == null)
|
||||
return null;
|
||||
|
@ -199,14 +199,11 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
Logger.Debug("Scanning '{0}' for episodes", path);
|
||||
|
||||
var mediaFileList = new List<string>();
|
||||
var filesOnDisk = _diskProvider.GetFiles(path, "*.*", SearchOption.AllDirectories);
|
||||
|
||||
foreach (var ext in MediaExtentions)
|
||||
{
|
||||
mediaFileList.AddRange(_diskProvider.GetFiles(path, ext, SearchOption.AllDirectories));
|
||||
}
|
||||
var mediaFileList = filesOnDisk.Where(c => MediaExtentions.Contains(Path.GetExtension(c).ToLower())).ToList();
|
||||
|
||||
Logger.Trace("{0} media files were found in {1}", mediaFileList.Count, path);
|
||||
Logger.Debug("{0} media files were found in {1}", mediaFileList.Count, path);
|
||||
return mediaFileList;
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 473 B After Width: | Height: | Size: 589 B |
Binary file not shown.
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 1.7 KiB |
2
NzbDrone.Web/Content/Images/icon_source.url
Normal file
2
NzbDrone.Web/Content/Images/icon_source.url
Normal file
|
@ -0,0 +1,2 @@
|
|||
[InternetShortcut]
|
||||
URL=http://www.iconfinder.com/search/?q=iconset:onebit
|
Loading…
Add table
Reference in a new issue