Thann / play-with-mpv

Chrome extension that allows you to play videos in webpages like youtube with MPV instead
https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji
The Unlicense
349 stars 80 forks source link

play-with-mpv opens the video twice (in separate mpv windows). #44

Open tylerpnn opened 3 years ago

tylerpnn commented 3 years ago

Note: I am on windows. Using python 3.9.

The first time I open a video using the extension, it opens the video only once. But after I close that window and open any other video via the extension, it opens the video twice. I have double and triple checked that there is only one instance of play-with-mpv.exe running. If i force quit the process, it always works correctly for the first video, but opens two instances of mpv for every video after that.

Haxprox commented 3 years ago

The issue you've described is about mpv directly. Two solutions can be here:

  1. https://github.com/mpv-player/mpv/issues/4954#issuecomment-515701451
  2. Use SMplayer instead but a bit preconfigured in advance: Option -> Preference -> Interface -> Instances -> "Use only one running instance of SMplayer"

The code for changing mpv player to SMplayer can be found here: https://github.com/Thann/play-with-mpv/blob/07a9c1dd57d9e16538991b13fd3e2ed54d6e3a2d/play_with_mpv.py#L50

Works for me perfectly.