# This file includes media player data for Anisthesia. It is used to detect
# running players and retrieve information about current media.
#
# Please read before editing this file:
# - Indentation is significant. You must use tabs rather than spaces.
# - Regular expressions begin with a '^' character. ECMAScript grammar is used.
#
# The latest version of this file can be found at:
# <https://github.com/erengy/anisthesia>
#
# This file is in the public domain.

5KPlayer
	windows:
		win32:
			Qt5QWindowIcon
	executables:
		win32:
			5KPlayer.exe
	strategies:
		open_files

Ace Player HD
	windows:
		win32:
			QWidget
	executables:
		win32:
			ace_player.exe
	strategies:
		# Must be enabled from: Advanced Preferences -> Interface -> Main
		# interfaces -> Qt -> Show playing item name in window title
		#
		# We use the last alternative to avoid detecting other windows such as
		# Preferences dialog, which has the same generic class name.
		window_title:
			^Ace Player HD.*|(.+) - Ace Player HD.*|.+

ALLPlayer
	windows:
		win32:
			TApplication
	executables:
		win32:
			ALLPlayer.exe
	strategies:
		open_files

Baka MPlayer
	windows:
		win32:
			Qt5QWindowIcon
	executables:
		win32:
			Baka MPlayer.exe
	strategies:
		open_files
		# We cannot avoid detecting other windows such as Preferences dialog, which
		# has the same generic class name.
		window_title:
			^Baka MPlayer|(.+)

BESTplayer
	windows:
		win32:
			TBESTplayerApp.UnicodeClass
	executables:
		win32:
			BESTplayer.exe
	strategies:
		open_files
		window_title:
			^BESTplayer.*|(.+) - BESTplayer.*

bomi
	windows:
		win32:
			Qt5QWindowGLOwnDCIcon
	executables:
		win32:
			bomi.exe
	strategies:
		open_files
		window_title:
			^bomi|(.+) - bomi

BS.Player
	windows:
		win32:
			BSPlayer
	executables:
		win32:
			bsplayer.exe
	strategies:
		open_files

DivX Player
	windows:
		win32:
			Qt5QWindowIcon
			QWidget
	executables:
		win32:
			DivX Player.exe
			DivX Plus Player.exe
	strategies:
		open_files

GOM Player
	windows:
		win32:
			GomPlayer1.x
			GomPlayerPlus32_2.x
			GomPlayerPlus64_2.x
	executables:
		win32:
			GOM.exe
			GOM64.exe
	strategies:
		open_files
		window_title:
			^GOM Player(?: Plus)|(.+)(?:\[Subtitle\]) - GOM Player(?: Plus)

Kantaris
	windows:
		win32:
			^WindowsForms10\.Window\.20008\.app\..+
	executables:
		win32:
			Kantaris.exe
			KantarisMain.exe
	strategies:
		open_files
		window_title:
			^Kantaris.*|(.+) \d{2}:\d{2}:\d{2} - \d{2}:\d{2}:\d{2}

KMPlayer
	windows:
		win32:
			KMPlayer 64X
			TApplication
	executables:
		win32:
			KMPlayer.exe
			KMPlayer64.exe
	strategies:
		open_files
		window_title:
			^(?:The )?KMPlayer|(?:\[\d+/\d+\] )?(.+) - (?:The )?KMPlayer|(.+)

Kodi
	windows:
		win32:
			Kodi
			XBMC
	executables:
		win32:
			kodi.exe
			XBMC.exe
	strategies:
		open_files

Light Alloy
	windows:
		win32:
			TApplication
	executables:
		win32:
			LA.exe
	strategies:
		open_files
		window_title:
			^Light Alloy.*|(.+) - Light Alloy.*

Media Player Classic
	windows:
		win32:
			MediaPlayerClassicW
	executables:
		win32:
			mplayerc.exe
			mplayerc64.exe
	strategies:
		open_files
		# Depends on: Options -> Player -> Title bar
		window_title:
			^Media Player Classic|(.+) - Media Player Classic

Media Player Classic Qute Theater
	windows:
		win32:
			^Qt.+QWindowIcon
		x11:
			mpc-qt
	executables:
		win32:
			mpc-qt.exe
		posix:
			mpc-qt
	strategies:
		open_files
		# Depends on: Options -> Player -> Title bar
		#
		# We use the last alternative to avoid detecting other windows such as
		# Options dialog, which has the same generic class name.
		window_title:
			^Media Player Classic Qute Theater|Media Player Classic Qute Theater - (.+)|.+

Memento
	windows:
		win32:
			^Qt.+QWindowIcon
	executables:
		win32:
			memento.exe
	strategies:
		open_files
		window_title:
			^Memento|(.+) - Memento

Miro
	windows:
		win32:
			gdkWindowToplevel
	executables:
		win32:
			Miro.exe
	strategies:
		open_files

MPC-BE
	windows:
		win32:
			MediaPlayerClassicW
			MPC-BE
	executables:
		win32:
			mpc-be.exe
			mpc-be64.exe
	strategies:
		open_files
		# Depends on: Options -> Player -> Title bar
		window_title:
			^MPC-BE.*|(.+) - MPC-BE.*

MPC-HC
	windows:
		win32:
			MediaPlayerClassicW
	executables:
		win32:
			mpc-hc.exe
			mpc-hc64.exe
			# Some codec installers append "_nvo" to the filename, if NVIDIA Optimus
			# is present on the system. Similarly, various guides recommend
			# appending "-gpu", etc. in order to fix some GPU-related issues.
			^mpc-hc.+
			# LAV Filters Megamix
			iris
			shoukaku
	strategies:
		open_files
		# Depends on: Options -> Player -> Title bar
		window_title:
			^Media Player Classic Home Cinema|MPC-HC|(.+)

MPCSTAR
	windows:
		win32:
			^wxWindow@.*
			wxWindowClassNR
	executables:
		win32:
			mpcstar.exe
	strategies:
		open_files
		window_title:
			^MPCSTAR.*|(.+) - MPCSTAR.*

MPDN
	windows:
		win32:
			^WindowsForms10\.Window\.8\.app\..+
	executables:
		win32:
			MediaPlayerDotNet.exe
	strategies:
		open_files
		window_title:
			^MPDN - Media Player .NET \((?:32|64)-bit Edition\)|(.*) - MPDN \((?:32|64)-bit Edition\)

mpv
	windows:
		win32:
			mpv
	executables:
		win32:
			mpv.exe
	strategies:
		open_files
		# May be in an unexpected format if "--title" option is used. Ideally, it
		# should return only "${filename}", "${path}" or "${media-title}".
		window_title:
			^No file - mpv|(.+) - mpv|mpv - (.+)

mpv.net
	windows:
		win32:
			^WindowsForms10\.Window\.8\.app\..+
	executables:
		win32:
			mpvnet.exe
	strategies:
		open_files
		window_title:
			^mpv\.net.*|(.+) - mpv\.net.*

MV2Player
	windows:
		win32:
			TApplication
	executables:
		win32:
			Mv2Player.exe
			Mv2PlayerPlus.exe
	strategies:
		open_files
		# Depends on: Options -> Player -> Constant app. title
		window_title:
			^MV2 Player|(.+)

PotPlayer
	windows:
		win32:
			PotPlayer
			PotPlayer64
	executables:
		win32:
			PotPlayer.exe
			PotPlayer64.exe
			PotPlayerMini.exe
			PotPlayerMini64.exe
			# LAV Filters Megamix
			sumire.exe
			zuikaku.exe
	strategies:
		open_files
		window_title:
			^PotPlayer|(.+) - PotPlayer

SMPlayer
	windows:
		win32:
			# Qt5QWindowIcon, Qt5152QWindowIcon, etc.
			^Qt.+QWindowIcon
			# Older versions
			QWidget
	executables:
		win32:
			smplayer.exe
			smplayer2.exe
	strategies:
		# "open_files" strategy does not work here, because files are loaded by
		# a child process of SMPlayer (mplayer or mpv, depending on the selected
		# multimedia engine).
		#
		# We use the last alternative to avoid detecting other windows such as
		# Preferences dialog, which has the same generic class name.
		window_title:
			^SMPlayer|(.+) - SMPlayer|.+

Splash
	windows:
		win32:
			DX_DISPLAY0
	executables:
		win32:
			Splash.exe
			SplashLite.exe
	strategies:
		open_files

SPlayer
	windows:
		win32:
			MediaPlayerClassicW
	executables:
		win32:
			splayer.exe
	strategies:
		open_files
		# Does not work in theater mode.
		window_title:
			^SPlayer|(?:\[(?:GPU Accel\+)?EVR\] )?(.+) - SPlayer

UMPlayer
	windows:
		win32:
			QWidget
	executables:
		win32:
			umplayer.exe
	strategies:
		# "open_files" strategy does not work here, because files are loaded by
		# a child process of UMPlayer (mplayer).
		#
		# We use the last alternative to avoid detecting other windows such as
		# Preferences dialog, which has the same generic class name.
		window_title:
			^UMPlayer|(.+) - UMPlayer|.+

VLC media player
	windows:
		win32:
			# Qt5QWindowIcon, Qt5151QWindowIcon, etc.
			^Qt.+QWindowIcon
			# Older versions
			QWidget
			# Skinnable interface
			SkinWindowClass
		x11:
			vlc
	executables:
		win32:
			vlc.exe
		posix:
			vlc
	strategies:
		open_files
		# Must be enabled from: Advanced Preferences -> Interface -> Main
		# interfaces -> Qt -> Show playing item name in window title
		#
		# We use the last alternative to avoid detecting other windows such as
		# Preferences dialog, which has the same generic class name.
		window_title:
			^VLC media player|(.+) - VLC media player|.+

WebTorrent Desktop
	windows:
		win32:
			Chrome_WidgetWin_1
	executables:
		win32:
			WebTorrent.exe
	strategies:
		window_title:
			^WebTorrent(?: \(BETA\))?|Main Window|Preferences|About WebTorrent.*|(.+)

Winamp
	windows:
		win32:
			Winamp v1.x
	executables:
		win32:
			winamp.exe
	strategies:
		open_files
		window_title:
			^Winamp [\d.]+ Build \d+|\d+\. (.+) - Winamp(?: \[.+\])?

Windows Media Player
	windows:
		win32:
			WMPlayerApp
			WMP Skin Host
	executables:
		win32:
			wmplayer.exe
	strategies:
		open_files

Zoom Player
	windows:
		win32:
			TApplication
	executables:
		win32:
			zplayer.exe
	strategies:
		open_files
		window_title:
			^Zoom Player|(.+) - Zoom Player (?:FREE|MAX)

################################################################################
# Web browsers

Brave Browser
	windows:
		win32:
			Chrome_WidgetWin_1
	executables:
		win32:
			brave.exe
	strategies:
		ui_automation
		window_title:
			^(.+) \(Private\)(?: - Brave)?|(.+) - Brave|(.+)
	type:
		web_browser

Google Chrome
	windows:
		win32:
			Chrome_WidgetWin_1
	executables:
		win32:
			chrome.exe
	strategies:
		ui_automation
		window_title:
			^(.+) \(Incognito\)(?: - Google Chrome)?|(.+) - Google Chrome|(.+)
	type:
		web_browser

Internet Explorer
	windows:
		win32:
			IEFrame
	executables:
		win32:
			iexplore.exe
	strategies:
		ui_automation
		window_title:
			^(.+) - Internet Explorer(?: - \[InPrivate\])?
	type:
		web_browser

Microsoft Edge
	windows:
		win32:
			Chrome_WidgetWin_1
	executables:
		win32:
			msedge.exe
	strategies:
		ui_automation
		window_title:
			^(.+) and \d+ more pages? - .+|(.+) - [^-]+ - Microsoft.*Edge|(.+)
	type:
		web_browser

Mozilla Firefox
	windows:
		win32:
			MozillaUIWindowClass
			MozillaWindowClass
	executables:
		win32:
			firefox.exe
	strategies:
		ui_automation
		window_title:
			^(?:Mozilla Firefox|Firefox Developer Edition)|(.+) (?:-|—) (?:Mozilla Firefox|Firefox Developer Edition)(?: \(Private Browsing\))?
	type:
		web_browser

Opera
	windows:
		win32:
			Chrome_WidgetWin_1
	executables:
		win32:
			opera.exe
	strategies:
		ui_automation
		window_title:
			^(.+) - Opera(?: \(Private\))?
	type:
		web_browser

Waterfox
	windows:
		win32:
			MozillaWindowClass
	executables:
		win32:
			waterfox.exe
	strategies:
		ui_automation
		window_title:
			^(.+) - Waterfox(?: \(Private Browsing\))?
	type:
		web_browser
