mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
update active recordings
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user