Add resume book as default home section

This commit is contained in:
Bill Thornton 2022-02-28 16:33:17 -05:00
parent cd4d51a515
commit f32b2cb592

View File

@ -126,9 +126,11 @@ namespace Jellyfin.Api.Controllers
HomeSectionType.SmallLibraryTiles, HomeSectionType.SmallLibraryTiles,
HomeSectionType.Resume, HomeSectionType.Resume,
HomeSectionType.ResumeAudio, HomeSectionType.ResumeAudio,
HomeSectionType.ResumeBook,
HomeSectionType.LiveTv, HomeSectionType.LiveTv,
HomeSectionType.NextUp, HomeSectionType.NextUp,
HomeSectionType.LatestMedia, HomeSectionType.None, HomeSectionType.LatestMedia,
HomeSectionType.None,
}; };
if (!Guid.TryParse(displayPreferencesId, out var itemId)) if (!Guid.TryParse(displayPreferencesId, out var itemId))
@ -182,7 +184,7 @@ namespace Jellyfin.Api.Controllers
var order = int.Parse(key.AsSpan().Slice("homesection".Length)); var order = int.Parse(key.AsSpan().Slice("homesection".Length));
if (!Enum.TryParse<HomeSectionType>(displayPreferences.CustomPrefs[key], true, out var type)) if (!Enum.TryParse<HomeSectionType>(displayPreferences.CustomPrefs[key], true, out var type))
{ {
type = order < 7 ? defaults[order] : HomeSectionType.None; type = order < 8 ? defaults[order] : HomeSectionType.None;
} }
displayPreferences.CustomPrefs.Remove(key); displayPreferences.CustomPrefs.Remove(key);