update active recordings

This commit is contained in:
Luke Pulverenti
2017-08-24 15:52:19 -04:00
parent 5e0f8fd8c4
commit e441e2f53d
157 changed files with 568 additions and 654 deletions

View File

@@ -4,7 +4,6 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
@@ -73,14 +72,23 @@ namespace MediaBrowser.Controller.Providers
return entries;
}
public IEnumerable<FileSystemMetadata> GetFiles(string path)
public List<FileSystemMetadata> GetFiles(string path)
{
return GetFiles(path, false);
}
public IEnumerable<FileSystemMetadata> GetFiles(string path, bool clearCache)
public List<FileSystemMetadata> GetFiles(string path, bool clearCache)
{
return GetFileSystemEntries(path, clearCache).Where(i => !i.IsDirectory);
var list = new List<FileSystemMetadata>();
var items = GetFileSystemEntries(path, clearCache);
foreach (var item in items)
{
if (!item.IsDirectory)
{
list.Add(item);
}
}
return list;
}
public FileSystemMetadata GetFile(string path)

View File

@@ -6,7 +6,7 @@ namespace MediaBrowser.Controller.Providers
public interface IDirectoryService
{
FileSystemMetadata[] GetFileSystemEntries(string path);
IEnumerable<FileSystemMetadata> GetFiles(string path);
List<FileSystemMetadata> GetFiles(string path);
FileSystemMetadata GetFile(string path);
}
}

View File

@@ -1,7 +1,6 @@
using MediaBrowser.Controller.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Controller.Providers
{
@@ -51,7 +50,15 @@ namespace MediaBrowser.Controller.Providers
UserDataList = new List<UserItemData>();
}
var userData = UserDataList.FirstOrDefault(i => string.Equals(userId, i.UserId.ToString("N"), StringComparison.OrdinalIgnoreCase));
UserItemData userData = null;
foreach (var i in UserDataList)
{
if (string.Equals(userId, i.UserId.ToString("N"), StringComparison.OrdinalIgnoreCase))
{
userData = i;
}
}
if (userData == null)
{

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
namespace MediaBrowser.Controller.Providers
{
@@ -6,11 +5,11 @@ namespace MediaBrowser.Controller.Providers
{
public string[] AlbumArtists { get; set; }
public string Album { get; set; }
public List<string> Artists { get; set; }
public string[] Artists { get; set; }
public SongInfo()
{
Artists = new List<string>();
Artists = EmptyStringArray;
AlbumArtists = EmptyStringArray;
}
}