Commit Graph
15 Commits
Author SHA1 Message Date
Divarion-D 6cc892f9a7 refactor: eliminate proxy functions, migrate to direct class method calls
312 files changed, 2866 insertions(+), 24110 deletions(-)

Proxy function replacements (130+ functions):
- goHome() -> AdminHelpers::goHome()
- checkPermissions() -> PageAuthorization::checkPermissions()
- getBouquet/getCategory/etc -> Service::getById()
- deleteStream/deleteLine/etc -> Repository/Service::delete()
- APIRequest/systemapirequest -> ApiClient::request/systemRequest()
- prepareArray/preparecolumn -> QueryHelper methods
- confirmIDs/parserelease/etc -> AdminHelpers methods
- getSettings/clearSettingsCache -> SettingsManager methods
- destroySession -> SessionManager::clearContext()
- getMag/getEnigma/deleteMAG/etc -> MagService/EnigmaService
- getSeriesTrailer/getMovieTMDB/etc -> TMDbService methods

Removed legacy files:
- src/includes/admin.php (main proxy hub)
- src/includes/libs/ (35+ files moved to core/modules)
- src/includes/python/ (moved to bin/python)
- src/includes/api/ (moved to Controllers)
- src/includes/ts.php, reseller_api.php
- src/infrastructure/legacy/admin_proxies.php
- tools/run_scan.sh, update_redis_conf.sh

Additional fixes:
- SQL query placeholder migration (BouquetService, CategoryService)
- PHP 8.x null-safe access (live.php, server_view.php, stream.php)
- TmdbCron: extracted variable for repeated similar_text calls
2026-04-09 21:24:48 +03:00
Divarion-D ac0c3753e7 fix(docs): update release checklist to include disabling development mode 2026-04-07 20:26:06 +03:00
Divarion-D 1657cc7afd feat(lb): download distribution-specific binaries from GitHub 2026-04-07 19:49:44 +03:00
Divarion-D 1719c926c0 Bump version to 2.0.2 2026-04-06 21:54:11 +03:00
Divarion-D 738973c5db docs(php): add standardized file headers across codebase
- Add @author, @copyright, @link, @version, @license to 399 PHP files
- MERGE mode: inject metadata into 243 existing docblocks (preserving docs)
- INSERT mode: create new docblocks for 156 files without headers
- Skip 3 files that already had correct headers
- Exclude third-party libs (TMDb, mobiledetect, Dropbox, etc.)
- Exclude bin/, ministra/, content/, tmp/, resources/, module views
- Update tools/add_headers.php to v2 with MERGE strategy
2026-04-05 22:38:36 +03:00
Divarion-D c75777ed87 chore: remove FFmpeg 4.3, 4.4, 5.1 binaries and references
Drop three legacy FFmpeg versions (4.3, 4.4, 5.1), freeing ~288 MB.
Remaining supported versions: 8.0, 7.1, 4.0 (legacy fallback).

- Remove FFMPEG/FFPROBE_BIN_43/44/51 constants from Binaries.php
- Remove switch cases from FfmpegPaths.php (fallback → 4.0)
- Remove version options from admin settings UI dropdown
- Remove chmod lines from Makefile
- Update README.md version list
- Delete src/bin/ffmpeg_bin/{4.3,4.4,5.1}/ directories
2026-03-18 21:47:16 +03:00
Divarion-D 5e0ce36e77 Bump version to 2.0.1 2026-03-17 21:06:17 +03:00
Divarion-D c4d9a6ec76 chore: disable DEVELOPMENT mode for release 2026-03-15 16:07:55 +03:00
Divarion-D 038a7de356 feat: Migrate legacy CLI scripts to console.php and extract streaming middleware
CLI consolidation:
- Delete 13 legacy CLI scripts from includes/cli/ (ondemand, proxy, queue, record, scanner, signals, startup, thumbnail, tools, update, watchdog, plex_item, watch_item)
- Convert status and tools entry points to thin proxies that delegate to console.php
- Update all shell_exec() calls across admin controllers, views, and API layer to use console.php command syntax instead of direct CLI file paths
- Update src/service to launch daemons via console.php (signals, watchdog, queue, cache_handler, startup)
- Update Python src/update script to call console.php update instead of includes/cli/update.php
- Update test_installer to use console.php startup

Streaming deduplication:
- Extract StreamAuthMiddleware — common response headers and token decryption shared by live/vod/timeshift
- Extract ShutdownHandler — unified shutdown logic replacing 3 duplicate function shutdown() blocks
- Refactor live.php, vod.php, timeshift.php to use new middleware classes
- Add streaming micro-router to www/stream/index.php as fallback entry point

Routing fixes:
- Fix admin index.php redirect to use relative path (supports access code prefixes)
- Add access code root redirect in public/index.php to prevent broken CSS/JS asset resolution
- Fix init.php for CLI compatibility: guard $_SERVER access, define PHP_ERRORS safely

Migrations:
- 001_update_crontab_filenames.sql — strip .php suffix from crontab filenames
- Fix cache.php view query to match new filename format (cache_engine instead of cache_engine.php)
2026-03-14 23:57:33 +03:00
Divarion-D dd1dcefd15 Refactor global variable usage and clean up code
- Updated multiple files to use global variables for `$db` and `$rSettings` instead of calling `SettingsManager::getAll()` repeatedly.
- Removed unnecessary variable assignments and improved code readability.
- Deleted unused scripts for cleaning and scanning PHP file headers.
- Removed a file containing PHP syntax errors.
- Adjusted various repository and service classes to streamline database interactions.
2026-03-08 16:19:30 +03:00
Divarion-D 3d8abedafd Stage 8 has been completed 2026-03-07 21:53:45 +03:00
Divarion-D 80a25d3140 Complete stage 8.1 and 8.2 2026-03-03 20:00:34 +03:00
Divarion-D e2c9cb97ce Stage 7 has been completed 2026-02-27 22:32:39 +03:00
Divarion-D 5ee46d1d3d Refactor permission management and authentication processes
- Moved advanced permissions loading to a separate file for better organization and maintainability.
- Updated permission checks to utilize a centralized Authorization class for improved code clarity.
- Refactored login processes in both admin and reseller APIs to use a dedicated Authenticator class, streamlining the authentication logic.
- Introduced RedisManager for handling Redis connections and signal management.
- Adjusted error reporting settings in Logger to reduce verbosity in production.
- Enhanced playlist generation logic to correctly handle proxy IPs.
- Improved handling of optional parameters in streaming URL generation to prevent potential errors.
2026-02-20 21:53:34 +03:00
Divarion-D c54d322a89 Refactor database interactions and logging mechanisms across streaming and playlist modules
- Replaced instances of `Database` with `DatabaseHandler` in `playlist.php` and `xplugin.php` for improved database handling.
- Updated logging calls from `StreamingUtilities::clientLog` to `DatabaseLogger::clientLog` in various stream handling files (`auth.php`, `live.php`, `vod.php`, `timeshift.php`, `rtmp.php`) to centralize logging functionality.
- Refactored bruteforce checking methods to utilize `BruteforceGuard` instead of `CoreUtilities` for consistency and better encapsulation.
- Enhanced error handling by ensuring all relevant error logs are captured through the new logging structure.
2026-02-20 19:56:08 +03:00