Introduced create_service_session to handle session creation with optional rate limiting and caching.
Replaced direct requests with session-based requests across multiple modules.
Added TraktAPI, OverseerrAPI, ListrrAPI, and PlexAPI classes to encapsulate API interactions.
Updated scrapers and content modules to use new API classes and session management.
Implemented unit tests for request handling and session creation.
Improved error handling and logging for API requests.
Removed redundant rate limiter and request handling code.
I've not enabled any caching atm - but we have the option for ANY session to have an independant sqlite cache now fully controllable with cache age etc
The service session constructor takes in parms to enable rate-limiting, caching or both ratelimiting and caching.
I've separated some API concerns from services, into separate classes, and updated all modules with the refactors
Seems to be working for me locally
Also - i've added rate limiting back to real debrid because its been updated to use the new session system.
replaced resquests class also has all unit tests added.
create_service_session
to handle session creation with optional rate limiting and caching.TraktAPI
,OverseerrAPI
,ListrrAPI
, andPlexAPI
classes to encapsulate API interactions.I've not enabled any caching atm - but we have the option for ANY session to have an independant sqlite cache now fully controllable with cache age etc
The service session constructor takes in parms to enable rate-limiting, caching or both ratelimiting and caching.
I've separated some API concerns from services, into separate classes, and updated all modules with the refactors
Seems to be working for me locally
Also - i've added rate limiting back to real debrid because its been updated to use the new session system.
replaced resquests class also has all unit tests added.