Advertisement
Guest User

Untitled

a guest
Aug 4th, 2023
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP8 Decoder for SourceGuardian Encoder)
  6. *
  7. * @ Version : 8.1.0.8
  8. * @ Author : DeZender
  9. * @ Release on : 16.07.2023
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace App\Http\Controllers\StreamPlayApi\Integration;
  15.  
  16. class StalkerApiIntegrationController extends \App\Http\Controllers\Api\ApiController
  17. {
  18. private $serverRepository = null;
  19. private $streamRepository = null;
  20. private $seriesRepository = null;
  21. private $lineRepository = null;
  22. private $logger = null;
  23. private $idResolver = null;
  24. private $deviceSettingService = null;
  25. private $generalSettings = null;
  26. private $localisationSettings = null;
  27. private $streamFormat = null;
  28. private $allowedNoAuth = ['stb_get_profile', 'stb_get_modules', 'stb_get_localization'];
  29.  
  30. public function __construct(\App\Http\Repositories\StreamingServerRepository $serverRepository, \App\Http\Repositories\StreamRepository $streamRepository, \App\Http\Repositories\SeriesRepository $seriesRepository, \App\Http\Repositories\LineRepository $lineRepository, \Psr\Log\LoggerInterface $logger, \App\Http\Services\UuidToIntResolver $idResolver, \App\Http\Repositories\SettingsRepository $generalSettings)
  31. {
  32. $this->serverRepository = $serverRepository;
  33. $this->streamRepository = new \App\Http\Services\PersistentCache\Repositories\ProxyRepository($streamRepository);
  34. $this->seriesRepository = new \App\Http\Services\PersistentCache\Repositories\ProxyRepository($seriesRepository);
  35. $this->lineRepository = $lineRepository;
  36. $this->logger = $logger;
  37. $this->idResolver = $idResolver;
  38. $this->streamFormat = '';
  39. $this->generalSettings = $generalSettings->magDevice();
  40. $this->localisationSettings = $generalSettings->localisation();
  41. }
  42.  
  43. private function getOrderBy($type)
  44. {
  45. return $this->generalSettings->default_ord[$type] ?? '';
  46. }
  47.  
  48. public function index(\Illuminate\Http\Request $request, \App\Http\Services\Device\AuthService $authService, \App\Http\Services\Device\SettingsService $deviceSettingService)
  49. {
  50. \is_cache_loaded();
  51. f54df781111d75b9bcec135f8ccd4f9ca71a889f6eed5656a71d3d44c8798819a();
  52.  
  53. if (!method_exists('\\Illuminate\\Redis\\RedisManager', 'persistent')) {
  54. echo 'Could not connect to Redis at 127.0.0.1:6379: Connection refused';
  55. exit();
  56. }
  57.  
  58. $type = $request->get('type');
  59. $action = $request->get('action');
  60. $method = $type . '_' . $action;
  61.  
  62. if (!method_exists($this, $method)) {
  63. return $this->respond([
  64. 'js' => []
  65. ]);
  66. }
  67.  
  68. $line = $request->input('__line');
  69. if (!$line && !in_array($method, $this->allowedNoAuth)) {
  70. return $this->respond([
  71. 'js' => ['Auth Required']
  72. ], 401);
  73. }
  74.  
  75. $authService->setRequest($request);
  76. $this->deviceSettingService = $deviceSettingService;
  77. $this->deviceSettingService->setDeviceId($authService->getDeviceId());
  78. ....................................................................
  79. .....................................
  80. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement