File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,11 @@ public static function refreshProfile(PlaylistProfile $profile): bool
377377 return false ;
378378 }
379379
380- $ xtream = XtreamService::make (xtream_config: $ xtreamConfig );
380+ // Pass playlist for context (passes user agent, ssl settings, etc.)
381+ $ xtream = XtreamService::make (
382+ playlist: $ profile ->playlist ,
383+ xtream_config: $ xtreamConfig
384+ );
381385
382386 if (! $ xtream ) {
383387 Log::warning ("Cannot refresh profile {$ profile ->id }: failed to create XtreamService " );
Original file line number Diff line number Diff line change @@ -60,15 +60,16 @@ public function init(
6060 $ this ->xtream_config = $ xtream_config ;
6161
6262 // Setup server, user, and pass
63- if ($ playlist ) {
63+ // Prefer Xtream config if provided directly
64+ if ($ xtream_config ) {
65+ $ this ->server = $ xtream_config ['url ' ] ?? '' ;
66+ $ this ->user = $ xtream_config ['username ' ] ?? '' ;
67+ $ this ->pass = $ xtream_config ['password ' ] ?? '' ;
68+ } elseif ($ playlist ) {
6469 $ config = $ playlist ->xtream_config ;
6570 $ this ->server = $ config ['url ' ] ?? '' ;
6671 $ this ->user = $ config ['username ' ] ?? '' ;
6772 $ this ->pass = $ config ['password ' ] ?? '' ;
68- } elseif ($ xtream_config ) {
69- $ this ->server = $ xtream_config ['url ' ] ?? '' ;
70- $ this ->user = $ xtream_config ['username ' ] ?? '' ;
71- $ this ->pass = $ xtream_config ['password ' ] ?? '' ;
7273 } else {
7374 return false ;
7475 }
You can’t perform that action at this time.
0 commit comments