190 Commits

Author SHA1 Message Date
Cody Robibero
beca405ad4 Refactor to pull item counts in a single query 2025-08-11 21:06:04 -06:00
Evan
0a4ff3f3c0 Fix GetBaseItemDto to return related item counts via SQL count
For API call /Items/{item id} GetBaseItemDto will return the counts of related items e.g. artists, albums, songs.  GetBaseItemDto currently does this by calling GetTaggedItems which retrieves the objects into memory to count them.  Replace with SQL count.

Fixes:
This should be an improvement for any large libraries, but especially large music libraries.  Example:

Request Library -> Genres -> any very popular genre in your large library, e.g. Classical
Number of albums = 1552, songs = 23515, ...

- Before change: Try to retrieve 1552 albums, 23515 songs, ... in memory, API never returns, database on fire
- After change: API returns in 367ms and Genre view opens with 200 albums in 2 seconds

I verified the numbers returned are correct but note that there is a bug somewhere else in Jellyfin that is setting TopParentId to NULL for a large portion of my MusicArtists, which causes them to not be counted by the existing GetCount().  This is not related to this change, also happens with the existing code, and does not seem to affect the Web UI.

Includes Cory's changes in:
- https://github.com/jellyfin/jellyfin/pull/14610#issuecomment-3172211468
- https://github.com/jellyfin/jellyfin/pull/14610#issuecomment-3172239154
2025-08-10 18:02:17 +08:00
Cody Robibero
afa2103d42 Use dto instead of db object when returning trickplay 2025-06-16 18:55:21 -06:00
Tim Eisele
df5671263f
Merge pull request #13847 from Shadowghost/rework-chapter-management
Rework chapter management
2025-04-26 14:01:12 +02:00
Tim Eisele
086fbd49cf
Cleanup ItemFields (#13818)
* Cleanup ItemFields

* Update MediaBrowser.Model/Querying/ItemFields.cs
2025-03-31 17:46:21 -06:00
JPVenson
42bdb22bfb Fixed namespaces 2025-03-25 16:45:00 +01:00
JPVenson
b09a41ad1f WIP porting new Repository structure 2024-10-09 10:36:08 +00:00
Bond_009
2b3ebb0751 Enable nullable for DtoService and DtoOptions 2024-07-29 21:05:40 +02:00
Bond_009
2ad872001d Address comments 2024-04-28 17:16:33 +02:00
Bond_009
88a38a61b5 Improve audio normalization
* Move calculation of LUFS to a scheduled task as it's pretty slow
* Correctly calculate album LUFS
* Don't try to convert replaygain tags to LUFS values
2024-04-28 15:18:53 +02:00
Bond-009
7d28d08e08
Enable more warnings as errors (#11288) 2024-04-12 17:45:01 -06:00
Niels van Velzen
84b933d835
Use enum for BaseItemDto.ExtraType (#11261) 2024-03-31 14:48:46 -06:00
Cody Robibero
0bc41c015f
Store lyrics in the database as media streams (#9951) 2024-02-26 05:09:40 -07:00
Patrick Barron
0370167b8d Add IRecordingsManager service 2024-02-21 09:42:14 -05:00
Niels van Velzen
55916a09eb
Remove some unused client capabilities and sync code (#10812) 2024-01-06 13:33:48 -07:00
Nick
cd662506a1 Merge branch 'master' into trickplay 2023-10-18 19:27:05 -07:00
Nick
5a860710a8 Make TrickplayManifest dictionary key a string rather than Guid 2023-09-04 12:30:20 -07:00
TelepathicWalrus
4c7fb8f452
Album gain (#10085)
* Add LUFSAlbum DTO

* Get loudest track for smallest gain

* Move gain search to musicalbum
use baseitem LUFS for album

* Use .Max for enumerable

* Update DTO to be consistent with other DTOs

* Remove albumlufs,
Move dto for all types
2023-08-18 10:25:56 +02:00
Nick
fc61933748 Minor code changes 2023-06-26 22:04:39 -07:00
Nick
ab20ceaad6 Migrate to trickplay table to EF. Rename vars/methods/members to have consistent use of tile and thumbnail 2023-06-26 17:40:10 -07:00
nicknsy
d84370a6f7 Make trickplay response ids have no dashes 2023-06-22 16:23:51 -07:00
nicknsy
ca7d1a1300 Trickplay generation, manager, storage 2023-06-22 16:19:59 -07:00
TelepathicWalrus
603fce59df
Audio normalization (#9222)
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
Co-authored-by: Bond-009 <bond.009@outlook.com>
2023-05-15 13:12:24 +02:00
Stepan Goremykin
b6cfdb8b92 Simplify conditional expression 2023-04-06 19:30:17 +02:00
Stepan Goremykin
26958162d0 Remove unused using directives 2023-04-06 19:17:28 +02:00
Cody Robibero
89be3aa37f
Convert Person.Type to use PersonKind enum (#9487) 2023-03-25 11:52:02 -06:00
Bond_009
4b01aaa0f7 Allocate less Lists 2023-03-01 00:44:57 +01:00
Shadowghost
07dc163844 Fix playlist parental control and no parental control skipping forbidden unrated items 2023-02-20 11:53:20 +01:00
Bond_009
6481376b81 Use DistinctBy introduced in .NET 6 2022-12-19 15:21:42 +01:00
Bond_009
52194f56b5 Replace != null with is not null 2022-12-05 15:01:13 +01:00
Bond_009
c7d50d640e Replace == null with is null 2022-12-05 15:00:20 +01:00
Claus Vium
05c20001c8
Merge pull request #8381 from 1hitsong/lyric-lrc-file-support 2022-10-07 15:21:42 +02:00
LogicalPhallacy
e8893f3d41 Backport pull request #8399 from jellyfin/release-10.8.z
Respect visibility for people items (rebased)

Original-merge: e6124bc154c9f95fdd491f309623def6b3df0171

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2022-09-23 23:09:38 -04:00
1hitsong
f4fd908f8d Create ILyricManager 2022-09-15 20:49:25 -04:00
1hitsong
d9be3874ba Auto stash before merge of "lyric-lrc-file-support" and "origin/lyric-lrc-file-support" 2022-09-15 19:45:26 -04:00
1hitsong
9d5cf67dfe Create ILyricsProvider 2022-09-11 15:50:27 -04:00
Cody Robibero
8568913df0 Merge pull request #7634 from neilsb/patch-1
Correct LocalTrailerCount in API

(cherry picked from commit fcb65ac38df99d85c48f3918b420172c737d9b0e)
Signed-off-by: crobibero <cody@robibe.ro>
2022-04-28 09:26:45 -04:00
Bond_009
f50a250cd9 Optimize Guid comparisons
* Use Guid.Equals(Guid) instead of the == override
* Ban the usage of Guid.Equals(Object) to prevent accidental boxing
* Compare to default(Guid) instead of Guid.Empty
2022-02-21 14:15:09 +01:00
Bond_009
adad13b865 Remove some dead code 2022-02-17 08:15:26 +01:00
Niels van Velzen
2afcaa6ae1 Use Guid for BaseItemDto parent ids 2022-01-22 22:29:02 +01:00
Niels van Velzen
e86f778c05 Use Guid for BaseItemPerson.Id 2022-01-22 15:46:12 +01:00
Dmitry Lyzo
54549cd5b5
Remove unnecessary array allocation
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2022-01-15 15:54:14 +03:00
Dmitry Lyzo
5aa748058e Fix duplication of local trailers 2022-01-14 23:06:45 +03:00
Bond_009
ea8f40e84a More cleanup 2021-12-27 14:20:05 +00:00
Cody Robibero
8c7dd0a691
Merge pull request #6819 from cvium/why_should_we_use_the_imageinfo_when_we_can_guess 2021-12-24 02:02:37 +00:00
cvium
b880dc8a4a Use our own Contains extension 2021-12-20 13:31:07 +01:00
Cody Robibero
32629cd7da Use BaseItemKind where possible 2021-12-12 06:11:27 -07:00
cvium
e3f0a53f59 Small optimization to child count field 2021-11-19 09:15:06 +01:00
cvium
5d19c26d59 Simplify 2021-11-10 23:46:56 +01:00
cvium
0415d1ccef Reduce indentation 2021-11-10 23:29:41 +01:00