Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/src/commit/b25c6acb6b31b95f5768b0976de799092a69c84f/Jellyfin.Data/DayOfWeekHelper.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/Jellyfin.Data/DayOfWeekHelper.cs

33 lines
1.3 KiB

#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
namespace Jellyfin.Data
{
public static class DayOfWeekHelper
{
public static DayOfWeek[] GetDaysOfWeek(DynamicDayOfWeek day)
{
return day switch
{
DynamicDayOfWeek.Everyday => new[] { DayOfWeek.Sunday, DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday },
DynamicDayOfWeek.Weekday => new[] { DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday },
DynamicDayOfWeek.Weekend => new[] { DayOfWeek.Sunday, DayOfWeek.Saturday },
_ => new[] { (DayOfWeek)day }
};
}
public static bool Contains(this DynamicDayOfWeek dynamicDayOfWeek, DayOfWeek dayOfWeek)
{
return dynamicDayOfWeek switch
{
DynamicDayOfWeek.Everyday => true,
DynamicDayOfWeek.Weekday => dayOfWeek is >= DayOfWeek.Monday and <= DayOfWeek.Friday,
DynamicDayOfWeek.Weekend => dayOfWeek is DayOfWeek.Saturday or DayOfWeek.Sunday,
_ => (DayOfWeek)dynamicDayOfWeek == dayOfWeek
};
}
}
}