Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/blame/commit/d4eeafe53ff8ae2f287f5dca49a873cd71f4c3da/Emby.Naming/Video/FileStack.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/Emby.Naming/Video/FileStack.cs

57 lines
1.8 KiB

using System;
using System.Collections.Generic;
using Jellyfin.Extensions;
namespace Emby.Naming.Video
{
4 years ago
/// <summary>
/// Object holding list of files paths with additional information.
/// </summary>
public class FileStack
{
4 years ago
/// <summary>
/// Initializes a new instance of the <see cref="FileStack"/> class.
/// </summary>
/// <param name="name">The stack name.</param>
/// <param name="isDirectory">Whether the stack files are directories.</param>
/// <param name="files">The stack files.</param>
public FileStack(string name, bool isDirectory, IReadOnlyList<string> files)
{
Name = name;
IsDirectoryStack = isDirectory;
Files = files;
}
4 years ago
/// <summary>
/// Gets the name of file stack.
4 years ago
/// </summary>
public string Name { get; }
4 years ago
/// <summary>
/// Gets the list of paths in stack.
4 years ago
/// </summary>
public IReadOnlyList<string> Files { get; }
4 years ago
/// <summary>
/// Gets a value indicating whether stack is directory stack.
4 years ago
/// </summary>
public bool IsDirectoryStack { get; }
4 years ago
/// <summary>
/// Helper function to determine if path is in the stack.
/// </summary>
/// <param name="file">Path of desired file.</param>
/// <param name="isDirectory">Requested type of stack.</param>
/// <returns>True if file is in the stack.</returns>
public bool ContainsFile(string file, bool isDirectory)
{
if (string.IsNullOrEmpty(file))
{
return false;
}
return IsDirectoryStack == isDirectory && Files.Contains(file, StringComparison.OrdinalIgnoreCase);
}
}
}