Commit Graph

5 Commits

Author SHA1 Message Date
fallenbagel
df4315aaba refactor(MediaRequest): consolidate lifecycle hooks into subscriber & restrict cascade to prevent recursion (#4124)
* fix(mediarequest entity): narrow cascade to insert & remove to prevent hook recursion

Restrict cascade options on the MediaRequest→Media relation to only `insert` and `remove`to avoid
nested subscriber/AfterUpdate recursion when saving entities.

* fix(mediarequest): move methods modifying MediaRequest to its Subscriber

* fix(mediasubscriber): use event.manager for parent media updates on remove

Replace `getRepository(Media)` calls with `event.manager` in the `afterRemove` hook so that
parent-media status resets run within the same transaction/QueryRunner (important for postgresql.
Doesnt affect sqlite).

* refactor(mediasubscriber): make afterInsert and afterUpdate async and await internal operations

This should prevent unhandled promise rejections and ensure sequential execution of lifecycle
actions

---------

Co-authored-by: Gauthier <mail@gauthierth.fr>
2025-05-05 17:04:11 +09:00
Brandon Cohen
7f868f38e6 fix: filter specials from modal all seasons and watchlist (#4108)
* fix: filter specials from modal all seasons and watchlist

* fix: skip specials when marking available

* fix: edge case where specials were marked as completed
2025-04-20 00:30:58 +00:00
Brandon Cohen
8cd53cdc3c fix: handle partial seasons more reliably (#4116)
refactor: remove matchingOldSeason variable
2025-04-19 08:20:30 +09:00
Brandon Cohen
9275a097f7 fix: correct notification sending for wrong status (#4113) 2025-04-17 01:23:30 +09:00
Brandon Cohen
605f187b27 fix: availability sync requests (#3460)
* fix: modified media status handling when media has been deleted

fix: requests will now be updated to completed on scan

fix: modified components to display deleted as a status

fix: corrected media status switching away from deleted

fix: modified components to display deleted as a status

fix: corrected media status switching away from deleted

fix: base scanner will set requests to completed correctly

fix: mark available button correctly sets requests as completed

fix: status will now stay deleted after declined request

refactor: request completion handling moved to entity

fix: prevented notifications from sending to old deleted requests

refactor: cleaned up code and added more detail to logs

refactor: updated to reflect latest availability sync changes

* fix: fetch requests only if necessary in db and remove unneeded code

* fix: update request button logic to accomodate specials

fix: remove completed filtering in tv details

* fix: correctly set seasons status when using the manual button

* refactor: improve reliability of season request completion

refactor: remove seasonrequest code

* fix: send notification for 4k movies

fix: same for shows

* feat: add completed filter to requests list

refactor: correct label
2025-04-15 11:48:07 +09:00