|
9 | 9 | import com.liskovsoft.mediaserviceinterfaces.ServiceManager; |
10 | 10 | import com.liskovsoft.mediaserviceinterfaces.RemoteControlService; |
11 | 11 | import com.liskovsoft.mediaserviceinterfaces.data.Command; |
| 12 | +import com.liskovsoft.sharedutils.helpers.Helpers; |
12 | 13 | import com.liskovsoft.sharedutils.helpers.MessageHelpers; |
13 | 14 | import com.liskovsoft.sharedutils.mylogger.Log; |
14 | 15 | import com.liskovsoft.sharedutils.rx.RxHelper; |
@@ -302,10 +303,13 @@ private void processCommand(Command command) { |
302 | 303 | getPlayer().showOverlay(false); |
303 | 304 | } |
304 | 305 | movePlayerToForeground(); |
305 | | - Video newVideo2 = Video.from(command.getVideoId()); |
306 | | - newVideo2.remotePlaylistId = command.getPlaylistId(); |
307 | | - newVideo2.playlistIndex = command.getPlaylistIndex(); |
308 | | - newVideo2.isRemote = true; |
| 306 | + Video subsVideo = Video.from(command.getVideoId()); |
| 307 | + if (Helpers.equals(getVideo(), subsVideo)) { |
| 308 | + subsVideo = getVideo(); |
| 309 | + } |
| 310 | + subsVideo.remotePlaylistId = command.getPlaylistId(); |
| 311 | + subsVideo.playlistIndex = command.getPlaylistIndex(); |
| 312 | + subsVideo.isRemote = true; |
309 | 313 | mNewVideoPositionMs = command.getCurrentTimeMs(); |
310 | 314 |
|
311 | 315 | String langCode = command.getSubLanguageCode(); |
@@ -334,7 +338,7 @@ private void processCommand(Command command) { |
334 | 338 | getPlayer().setButtonState(R.id.lb_control_closed_captioning, PlayerUI.BUTTON_OFF); |
335 | 339 | //getMainController().onButtonClicked(R.id.lb_control_closed_captioning, PlayerUI.BUTTON_ON); |
336 | 340 | } |
337 | | - openNewVideo(newVideo2); |
| 341 | + openNewVideo(subsVideo); |
338 | 342 | break; |
339 | 343 | case Command.TYPE_UPDATE_PLAYLIST: |
340 | 344 | if (getPlayer() != null && mConnected) { |
|
0 commit comments