af1152b001
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
// <copyright file="TVUtils.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
{
|
|
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
/// <summary>
|
|
/// Class TVUtils.
|
|
/// </summary>
|
|
public static class TVUtils
|
|
{
|
|
/// <summary>
|
|
/// Gets the air days.
|
|
/// </summary>
|
|
/// <param name="day">The day.</param>
|
|
/// <returns>List{DayOfWeek}.</returns>
|
|
[return: NotNullIfNotNull("day")]
|
|
public static DayOfWeek[]? GetAirDays(string? day)
|
|
{
|
|
if (!string.IsNullOrEmpty(day))
|
|
{
|
|
if (string.Equals(day, "Daily", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
return new[]
|
|
{
|
|
DayOfWeek.Sunday,
|
|
DayOfWeek.Monday,
|
|
DayOfWeek.Tuesday,
|
|
DayOfWeek.Wednesday,
|
|
DayOfWeek.Thursday,
|
|
DayOfWeek.Friday,
|
|
DayOfWeek.Saturday
|
|
};
|
|
}
|
|
|
|
if (Enum.TryParse(day, true, out DayOfWeek value))
|
|
{
|
|
return new[]
|
|
{
|
|
value
|
|
};
|
|
}
|
|
|
|
return Array.Empty<DayOfWeek>();
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|