Fixes failing test EmbyHelper_GetMediaUrl_AppEmbyMedia_UsesCorrectHashFormat.
The check was using && (AND) instead of || (OR), so when a
custom URL explicitly containing 'app.emby.media' was passed,
the path was not being set to 'item' correctly.
Resolves#5319
Previously, Ombi would fall back to individual episode searches
when Sonarr had more episodes than Ombi requested.
This caused issues with older TV shows where backends don't support
individual episode searches, resulting in silent failures.
Now we do a season search when Sonarr has equal or more episodes
than requested (the common case), which handles incomplete Ombi metadata
and respects user intent for full season requests.
Fixes#5312 - Wrong Emby Web URL generated by Ombi
The /web/index.html path causes 404 errors on app.emby.media.
Now properly handles both explicit app.emby.media URLs and default case.
Changes:
- app.emby.media URLs omit /web/index.html (e.g., https://app.emby.media/#!/item?id=1)
- Custom Emby server URLs still include /web/index.html (e.g., http://google.com/web/index.html#!/item?id=1)
- Default URL (no custom server) also uses app.emby.media format without /web/index.html
- Updated test expectations to match fix
Fixes#5306 - Sonarr items are not showing as available
Root cause:
SonarrSync was deleting ALL episodes from SonarrEpisodeCache at the start of
the job, then re-adding them one series at a time. If the job failed
partway through (API timeout, network issue, etc.), the cache would be
left incomplete with only some series' episodes. This caused shows to be
incorrectly marked as unavailable.
Changes:
- Moved DELETE FROM SonarrEpisodeCache inside the series loop
- Now deletes episodes per series (by TvDbId) before adding new ones
- If job fails mid-way, cache for already-processed series remains intact
This ensures that partial failures don't result in completely empty cache.
Fixes failing test in PR #689 - EmbyHelper_GetMediaUrl_AppEmbyMedia_UsesCorrectHashFormat
The test expected app.emby.media URLs to NOT include /web/index.html,
but the helper was always adding it for all URLs.
Changes:
- app.emby.media URLs now omit /web/index.html (e.g., https://app.emby.media/#!/item?id=1)
- Custom Emby server URLs still include /web/index.html (e.g., http://google.com/web/index.html#!/item?id=1)
- Default URL (no custom server) now also uses app.emby.media format without /web/index.html
Fixes failing test in PR #689 - EmbyHelper_GetMediaUrl_AppEmbyMedia_UsesCorrectHashFormat
The test expected app.emby.media URLs to NOT include /web/index.html,
but the helper was always adding it for all URLs.
Changes:
- app.emby.media URLs now omit /web/index.html (e.g., https://app.emby.media/#!/item?id=1)
- Custom Emby server URLs still include /web/index.html (e.g., http://google.com/web/index.html#!/item?id=1)
- Default URL (no custom server) now also uses app.emby.media format without /web/index.html
Fixes#5288 - Request/count API endpoint: pending field false
Changes:
- Added Denied property to RequestCountModel
- Updated RequestCount method to count denied requests separately
- Fixed pending count to exclude denied requests
- Denied requests are now properly tracked and not included in pending
This fixes the issue where denied requests were being counted as pending
in the API response, which affected third-party tools like Homepage.
Fixes#5287 - Issue importing users from Plex
The ImportAdmin method was calling .Equals() on potentially null
ProviderUserId strings, causing a NullReferenceException when
importing Plex users. Changed to use string.Equals() which
handles nulls properly.
This could occur when:
- ProviderUserId is null for existing users in the database
- plexAdmin.id is null in the Plex API response
Fixes failing test EmbyHelper_GetMediaUrl_AppEmbyMedia_UsesCorrectHashFormat.
The check was using && (AND) instead of || (OR), so when a
custom URL explicitly containing 'app.emby.media' was passed,
the path was not being set to 'item' correctly.
Resolves#5319
Previously, Ombi would fall back to individual episode searches
when Sonarr had more episodes than Ombi requested.
This caused issues with older TV shows where backends don't support
individual episode searches, resulting in silent failures.
Now we do a season search when Sonarr has equal or more episodes
than requested (the common case), which handles incomplete Ombi metadata
and respects user intent for full season requests.
- Use #!/item instead of #!/details when targeting app.emby.media
- Fixes issue #5312 where URLs with #!/details path return 404
- Add unit test to verify correct format
Co-authored-by: Jamie <jamie@tidusjar.com>
- Use #!/item instead of #!/details when targeting app.emby.media
- Fixes issue #5312 where URLs with #!/details path return 404
- Add unit test to verify correct format
Co-authored-by: Jamie <jamie@tidusjar.com>