Skip to content

Commit

Permalink
Revert "Merge pull request #212 from tsynik/main"
Browse files Browse the repository at this point in the history
This reverts commit 106e061, reversing
changes made to 557978a.
  • Loading branch information
yumata committed May 30, 2024
1 parent 106e061 commit 2eff086
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
11 changes: 4 additions & 7 deletions src/components/settings/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,23 @@ function init(){
else if(Platform.macOS()){
select('player',{
'inner': '#{settings_param_player_inner}',
'iina': 'IINA',
'iina': 'iina',
'nplayer': 'nPlayer',
'infuse': 'Infuse',
'vlc': 'VLC',
},'inner')

select('player_iptv',{
'inner': '#{settings_param_player_inner}',
'iina': 'IINA',
'iina': 'iina',
'nplayer': 'nPlayer',
'infuse': 'Infuse',
'vlc': 'VLC',
},'inner')

select('player_torrent',{
'inner': '#{settings_param_player_inner}',
'iina': 'IINA',
'iina': 'iina',
'nplayer': 'nPlayer',
'infuse': 'Infuse',
'vlc': 'VLC',
},'inner')
}
else if(Platform.is('apple')){
Expand Down Expand Up @@ -190,7 +187,7 @@ function init(){
select('keyboard_type', {
'lampa': '#{settings_param_keyboard_lampa}',
'integrate': '#{settings_param_keyboard_system}'
}, Platform.screen('mobile') || Platform.is('apple_tv') || Platform.macOS() ? 'integrate' : 'lampa')
}, Platform.screen('mobile') || Platform.is('apple_tv') ? 'integrate' : 'lampa')


//язык и комбинации для поиска
Expand Down
33 changes: 16 additions & 17 deletions src/interaction/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,34 +627,33 @@ function start(data, need, inner){

if(launch_player == 'lampa' || launch_player == 'inner' || data.url.indexOf('youtube.com') >= 0) inner()
else if(Platform.is('apple')){
data.url = data.url.replace('&preload','&play')
data.url = data.url.replace('&preload','&play').replace(/\s/g,'%20')

if(Storage.field(player_need) == 'vlc') window.open('vlc:https://' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'nplayer') window.open('nplayer-' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'infuse') window.open('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'svplayer') window.open('svplayer:https://x-callback-url/stream?url='+encodeURIComponent(data.url))
if(Storage.field(player_need) == 'vlc') window.open('vlc:https://' + data.url)
else if(Storage.field(player_need) == 'nplayer') window.open('nplayer-' + data.url)
else if(Storage.field(player_need) == 'infuse') window.open('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'svplayer')window.open('svplayer:https://x-callback-url/stream?url='+encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'ios'){
html.addClass('player--ios')

inner()
}
else inner()
}
else if(Platform.macOS()){
data.url = data.url.replace('&preload','&play')

if(Storage.field(player_need) == 'vlc') window.open('vlc:https://' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'iina') window.open('iina:https://weblink?url=' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'nplayer') window.open('nplayer-' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'infuse') window.open('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
data.url = data.url.replace('&preload','&play').replace(/\s/g,'%20')
if(Storage.field(player_need) == 'vlc') window.open('vlc-x-callback:https://x-callback-url/stream?url=' + data.url)
else if(Storage.field(player_need) == 'iina') window.open('iina:https://weblink?url=' + data.url)
else if(Storage.field(player_need) == 'nplayer') window.open('nplayer-' + data.url)
else if(Storage.field(player_need) == 'infuse') window.open('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
else inner()
}
else if(Platform.is('apple_tv')){
data.url = data.url.replace('&preload','&play')

if(Storage.field(player_need) == 'vlc') window.location.assign('vlc-x-callback:https://x-callback-url/stream?url=' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'infuse') window.location.assign('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'svplayer') window.location.assign('svplayer:https://x-callback-url/stream?url=' + encodeURIComponent(data.url))
else if (Storage.field(player_need) == 'tvos') window.location.assign('lampa:https://video?player=tvos&src=' + encodeURIComponent(data.url) + '&playlist=' + encodeURIComponent(JSON.stringify(data.playlist)))
data.url = data.url.replace('&preload','&play').replace(/\s/g,'%20')
if(Storage.field(player_need) == 'vlc') window.location.assign('vlc-x-callback:https://x-callback-url/stream?url=' + encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'infuse') window.location.assign('infuse:https://x-callback-url/play?url='+encodeURIComponent(data.url))
else if(Storage.field(player_need) == 'svplayer')window.location.assign('svplayer:https://x-callback-url/stream?url=' + encodeURIComponent(data.url))
else if (Storage.field(player_need) == 'tvos') window.location.assign('lampa:https://video?player=tvos&src=' + encodeURIComponent(data.url) + '&playlist=' + encodeURIComponent(JSON.stringify(data.playlist)))
else inner()
}
else if(Platform.is('webos') && (Storage.field(player_need) == 'webos' || launch_player == 'webos')){
Expand Down

0 comments on commit 2eff086

Please sign in to comment.