55 Commits

Author SHA1 Message Date
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
JPVenson
439a997fca Readded custom serialisation 2024-10-10 18:01:14 +00:00
JPVenson
b09a41ad1f WIP porting new Repository structure 2024-10-09 10:36:08 +00:00
Bond-009
2b1a915ead Merge pull request #7604 from Jellifi007/fixes-diactritics
Co-authored-by: Cody Robibero <cody@robibe.ro>
(cherry picked from commit 8d1d9734381472b301deb0118bbb8da2a769a65e)
Signed-off-by: crobibero <cody@robibe.ro>
2022-05-20 18:30:56 -04:00
Rich Lander
e3df4dcaae Fix warnings in MediaBrowser.Controller 2021-08-13 20:34:36 -07:00
Rich Lander
a7cc77e7fa Fix partial set of MediaBrowser.Controller/Entities warnings 2021-07-23 13:49:18 -07:00
Bond_009
981cf4cfa0 Remove our own RemoveDiacritcs string extension in favor of Diacritics.Net 2021-06-22 09:48:40 +02:00
crobibero
6bcbc2b88a Reduce warnings in MediaBrowser.Controller 2021-05-13 07:33:11 -06:00
Bond_009
fb090df0b5 Enable nullable reference types for MediaBrowser.Controller 2021-05-07 00:39:20 +02:00
Bond_009
404bb4f835 Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release 2020-08-22 21:56:24 +02:00
Bond-009
9af6eda0b4
Merge pull request #3343 from telans/comment-stops
Add full stop at end of comments (SA1629)
2020-06-16 11:54:58 +02:00
telans
247f9c61e6
fix SA1513/SA1516 2020-06-16 16:11:30 +12:00
telans
9018f8d8be
Add full stop at end of comments (SA1629) 2020-06-16 10:37:52 +12:00
Bond_009
5edb8159a7 Fix Json serialization error 2019-10-15 17:49:49 +02:00
Erwin de Haan
a36658f6f0 ReSharper Reformat: Properties to expression bodied form. 2019-01-13 21:31:14 +01:00
Erwin de Haan
ba610b5094 Find+Sed BOM removal *.cs: Jellyfin.Server-MediaBrowser.Controller 2019-01-13 21:01:16 +01:00
Erwin de Haan
26ca4b607b Visual Studio Reformat: MediaBrowser.Controller 2019-01-13 20:25:32 +01:00
Bond_009
b1ccd6bad9 Fix build post GPL change 2018-12-30 22:44:39 +01:00
Andrew Rabert
a86b71899e Add GPL modules 2018-12-27 18:27:57 -05:00
stefan
48facb797e Update to 3.5.2 and .net core 2.1 2018-09-12 19:26:21 +02:00
Luke Pulverenti
e441e2f53d update active recordings 2017-08-24 15:52:19 -04:00
Luke Pulverenti
da77b05817 update data queries 2017-05-21 03:25:49 -04:00
Luke Pulverenti
b38b7a7062 rework filestream 2017-03-13 00:08:23 -04:00
Luke Pulverenti
b91f1e4d16 support dummied up image a/r's 2017-02-10 15:06:52 -05:00
Luke Pulverenti
3edf91ce56 update music artists 2017-01-05 23:38:03 -05:00
Luke Pulverenti
ac2c45dd6a update dlna genre views 2016-12-20 14:59:25 -05:00
Luke Pulverenti
62f84acd26 fix auto-organize 2016-11-21 13:49:07 -05:00
Luke Pulverenti
ef6b90b8e6 make controller project portable 2016-10-25 15:02:04 -04:00
Luke Pulverenti
0f8ccfaf49 prep for portable common 2016-10-23 15:47:34 -04:00
Luke Pulverenti
07791d46a5 rework scheduled tasks in preparation of common project going portable 2016-10-23 15:14:57 -04:00
Luke Pulverenti
cc62faa1c2 update season queries 2016-08-18 01:56:10 -04:00
Luke Pulverenti
d9ee4f81fd rework storage of PresentationUniqueKey 2016-08-12 15:11:45 -04:00
Luke Pulverenti
f9847be17c update item by name queries 2016-06-17 09:06:13 -04:00
Luke Pulverenti
ae168bc563 update tag saving 2016-06-02 13:43:29 -04:00
Luke Pulverenti
6adc668bed update icons 2016-05-07 13:47:41 -04:00
Luke Pulverenti
6330b13262 support multiple user data keys 2016-04-30 19:05:21 -04:00
Luke Pulverenti
818662e051 use ImageMagick scale method 2015-10-28 00:06:13 -04:00
Luke Pulverenti
b1be09242c update people saving 2015-06-28 21:10:45 -04:00
Luke Pulverenti
d451386f5d sync updates 2015-02-18 23:37:44 -05:00
Luke Pulverenti
b6d59c7688 fixes #1001 - Support downloading 2015-02-06 00:39:07 -05:00
Luke Pulverenti
f5919990c9 fix failing scan 2015-01-26 17:47:16 -05:00
Luke Pulverenti
a1a56557ec sync updates 2015-01-25 01:34:50 -05:00
Luke Pulverenti
6755937800 sync updates 2015-01-24 17:33:26 -05:00
Luke Pulverenti
98012480f7 fix ipad login issue 2014-07-14 21:25:58 -04:00
Luke Pulverenti
d494944767 calculate item by name counts on the fly 2014-03-09 18:14:44 -04:00
Luke Pulverenti
12757d094b use music brainz values from audio files with bottom up refresh 2014-02-07 17:40:03 -05:00
Luke Pulverenti
245e92c9cc updated nuget 2013-12-02 16:46:22 -05:00
Luke Pulverenti
803e8b4a2e improved performance of item counts 2013-09-11 13:54:59 -04:00
Luke Pulverenti
229e050cd3 fixes #532 - Add ability to sort music artists/genres by song or music video count 2013-09-10 16:23:41 -04:00
Luke Pulverenti
740a10a4e3 de-normalize item by name data. create counts during library scan for fast access. 2013-09-10 14:56:00 -04:00