Add SQL query patterns documentation and Linux package build scripts

- Created `TV_SHOWS_SQL_QUERY_PATTERNS.md` to document SQL query patterns for TV shows, including performance issues and missing indexes.
- Added `README.md` for Linux package building, detailing steps for creating Debian and Red Hat packages.
- Implemented build scripts for Debian and Red Hat, including service files and post-installation hooks.
- Added necessary scripts for managing Jellyfin service lifecycle on both Debian and Red Hat systems.
- Included package specifications and installation instructions for both distributions.
This commit is contained in:
2026-07-14 10:32:56 -04:00
parent e51d3577ce
commit 8914f4dce9
29 changed files with 4123 additions and 31 deletions
@@ -1286,6 +1286,7 @@ namespace Emby.Server.Implementations.Library
var refreshQueue = includeRefreshState ? ProviderManager.GetRefreshQueue() : null;
return _fileSystem.GetDirectoryPaths(_configurationManager.ApplicationPaths.DefaultUserViewsPath)
.Order()
.Select(dir => GetVirtualFolderInfo(dir, topLibraryFolders, refreshQueue))
.ToList();
}
@@ -1475,6 +1476,25 @@ namespace Emby.Server.Implementations.Library
return _itemRepository.GetItemCounts(query);
}
public async Task<ItemCounts> GetItemCountsAsync(InternalItemsQuery query, CancellationToken cancellationToken = default)
{
if (query.Recursive && !query.ParentId.IsEmpty())
{
var parent = GetItemById(query.ParentId);
if (parent is not null)
{
SetTopParentIdsOrAncestors(query, [parent]);
}
}
if (query.User is not null)
{
AddUserToQuery(query, query.User);
}
return await _itemRepository.GetItemCountsAsync(query, cancellationToken).ConfigureAwait(false);
}
public IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery query, List<BaseItem> parents)
{
SetTopParentIdsOrAncestors(query, parents);
@@ -53,6 +53,7 @@ namespace Emby.Server.Implementations.Library
var folders = _libraryManager.GetUserRootFolder()
.GetChildren(user, true)
.OfType<Folder>()
.OrderBy(f => f.Name)
.ToList();
var groupedFolders = new List<ICollectionFolder>();