36 Commits

Author SHA1 Message Date
Viren070 923e97a7e5 Update middleware.py 2025-07-31 16:11:31 +01:00
Viren070 1c4bfa2d1f fix: add secret_str when using encoded_user_data (#501)
* fix: add secret_str handling in middleware when using encoded_user_data

* fix: fallback only

* fix: get directly

* fix: use request.scope

* fix: await

* style: format
2025-04-30 04:52:26 +05:30
Mohamed Zumair f5c1164d65 Add support for frontend API for configuration and app related data (#481) 2025-03-24 01:05:22 +05:30
mhdzumair 197617a770 Add support for passing b64 encoded userdata via Header API key without encrypted format
This change introduces API call with 'encoded_user_data' Header value. This simplifies the API call from other scraper Addons instead of encrypting and storing the encrypted userdata
2025-02-23 21:11:14 +05:30
mhdzumair e9f07caf7c Handle Unauthorized MediaFusion configuration for /streams endpoint 2025-01-18 22:01:36 +05:30
mhdzumair 9c2258a38a Handle invalid configuration in stream endpoints and show instruction stream 2025-01-18 10:17:18 +05:30
mhdzumair 89dd0a00fc Implement new UserData management
Store UserData in redis if compress + encryption data length is more than 1000, or else directly setup in the url secret string. Replaces legacy encryption and decryption methods with an optimized `CryptoUtils` class supporting compression, improved encryption, and Redis-based storage.
2024-12-24 21:40:48 +05:30
mhdzumair d163109ce1 Refactor Dramatiq TaskManager Middleware
Introduced `TaskInfo` dataclass and caching mechanism for task metadata to improve performance. Refactored Redis operations into a dedicated helper method with error handling. Enhanced code readability and reduced redundancy by modularizing task key generation and processing logic.
2024-12-15 22:58:40 +05:30
mhdzumair fa425a00aa Add support for preserving and resetting sensitive credentials config fields
Introduced mechanisms to handle preconfigured sensitive fields with masking and reset options in the UI. Extended User functionality to reuse existing encrypted configuration for sensitive fields when editing. Improved styling and user experience for managing credentials and secure configurations.
2024-12-15 00:16:58 +05:30
mhdzumair 7619c12d14 Handle decryption errors and log failures. 2024-11-29 07:46:23 +05:30
mhdzumair eaf1fbdd96 Add support for disabling streaming providers and error handling
Introduce a system for toggling streaming providers, allowing specific providers to be disabled via configuration. Enhance error handling in user data decryption by adding validation checks and returning precise error messages in JSON responses. These changes improve flexibility for administrators and provide better feedback to users.
2024-11-28 18:44:52 +05:30
mhdzumair 1483336adc Refactor Redis client imports and configuration
Moved Redis client setup to a new module `redis_database` and updated all references across the codebase. Also added a new configuration setting for redis_max_connections for better resource management.
2024-11-28 16:08:34 +05:30
mhdzumair 4d96ae86cc Refactor middleware error handling and update middleware order to print access logs
Consolidate error handling logic across middleware components to improve maintainability. Adjust the order of middleware addition in the app for improved logging and user data access.
2024-11-02 22:59:20 +05:30
Mohamed Zumair ecaf7e5cf1 Added filter for only show cached stream, Redis lock for prevent concurrent live scrape, bug fixes & improvements (#325)
* cleanup lifespan vars

* Show API process time in logs

* store the cache validation of full URL for live sports event

* Add support for filter only show cached streams

* Update default configs

* properly handle prowlarr exception on MaxProcessLimitReached

* Add redis lock mechanism to prevent concurrent live scrapers from multiple instances of stremio addon installation users
2024-10-15 18:43:03 +05:30
Mohamed Zumair 64773baecb Add torrent blocking feature for DMCA (#302) 2024-09-28 09:44:53 +05:30
mhdzumair 3119d809eb validate secret str character limit and correctly capture the results 2024-09-16 12:50:51 +05:30
Mohamed Zumair 649de9e503 Update Python version & refactror Redis client usage and streaming provider route endpoints (#277)
* Update Python version

* Refactor Redis client

* Refactor streaming routes endpoint functions
2024-09-05 06:46:07 +05:30
mhdzumair 5488504de5 Add metrics dashboard UI for viewing torrents info, scrapy schedule info & etc 2024-06-07 23:14:08 +05:30
mhdzumair ade259cd57 PikPak: Fix auth errror & Update streaming provider username field to email 2024-05-26 07:21:54 +05:30
mhdzumair a35d6a938c prowlarr: Refactor update torrent stream data & add support for title matching with AKA titles 2024-05-25 22:45:40 +05:30
mhdzumair 27679ce6e1 feat: Add support for quickly trigger IMDb data update within stremio 2024-05-15 11:28:25 +05:30
mhdzumair f73b1e436f add Prometheus metrics & API metrics endpoint to get stats 2024-05-01 12:39:49 +05:30
mhdzumair 7986ef9078 Refactor taskmanager middleware & wrapper function 2024-04-28 22:43:14 +05:30
mhdzumair 3779efbd6b Implement TaskManager for dramatiq worker to maintain minimum iterval before triggering same scraper task & worker improvments 2024-04-27 17:08:55 +05:30
mhdzumair 5721e48b42 Add MaxTasksPerChild middleware for Dramatiq broker to resolve memory leak 2024-04-24 09:28:44 +05:30
mhdzumair 59d04f1475 add user IP to RealDebrid POST requests 2024-04-21 20:25:33 +05:30
mhdzumair 9fb15eb804 Add is_public_instance flag for community instances 2024-03-24 01:10:54 +05:30
mhdzumair f04d537ee2 Add tamilultra scrapy & add support for trigger scrapers & consolidate apscheduler, background worker & bugfixes 2024-03-17 17:41:03 +05:30
mhdzumair 336b5bdb42 Handle disconnected clients with a 204 response 2024-03-10 22:49:58 +05:30
mhdzumair dfa7b0ea0a #124: Add feature to secure the API of self-hosted resources with Password 2024-02-24 23:53:07 +05:30
mhdzumair 799abad5cd modulerize & refactor routes for streaming provider 2024-02-16 01:45:30 +05:30
mhdzumair f84723a124 Add rate limiting middleware and rate_limiter utility and userdata middleware 2024-02-14 08:13:34 +05:30
mhdzumair ecfed4aadd Add get_client_ip function to extract client's real IP address 2024-02-12 02:09:18 +05:30
mhdzumair 078635a172 Fix issue with fetching streams from Prowlarr
Update configurations and logging

Refactor IMDB movie retrieval

Update deployment settings

Remove unused deployment

Update resource limits for dramatiq worker
2024-02-04 10:51:43 +05:30
mhdzumair 05a19df8a4 Update url_path in custom_log method 2024-01-27 07:32:43 +05:30
mhdzumair 5e44cfcb44 Setup Secure server logging & disable uvicorn access logs 2024-01-26 19:34:18 +05:30