Plugin MpWifi
Go to the main Plugins page.
Go to the complete Plugin List.
Contents
- 1 Plugin Description
- 2 Actions for the MpWifi plugin
- 2.1 ActivateWindow
- 2.2 Connect
- 2.3 Command
- 2.4 GetNP
- 2.5 GetNPCustom
- 2.6 isConnected
- 2.7 Key
- 2.8 RequestMusicBySQL
- 2.9 RequestMusicPlaylist
- 2.10 Moving Pictures
- 2.11 PlayChannel
- 2.12 PlayVideoFile
- 2.13 Powermode
- 2.14 RefreshNowPlaying
- 2.15 Seek
- 2.16 Serial
- 2.17 ShowNowPlaying
- 2.18 ShowPlaylist
- 2.19 TV Series
- 2.20 Volume
Plugin Description
Communicates with MediaPortal via the plugin WifiRemote. Complex commands for controlling and querying MediaPortal are available.
Actions for the MpWifi plugin
ActivateWindow
MpWifi.ActivateWindow
for IDs see:
http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/18_Contribute/7_Skins/Skin_Architecture/Window_IDs
- Parameters: 1-2
- WindowID : Id of window to open [integer]
- LoadParam : Some plugins can be opened with a parameter [string]
Connect
MpWifi.Connect
Connects to the MediaPortal wifiremote plugin.
If <Host> is specified the plugin settings will be changed temporarily and it will attempt to connect to the new host.
- Parameters: 0-1
- Host : Host address (name or IP) of machine running MediaPortal [string]
Command
MpWifi.Command
Sends a button code to the mediaportal WifiRemote plugin.
Code can be one of:
stop, record, pause, play, rewind, forward, replay, skip, back,
info, menu, up, down, left, right, ok, volup, voldown, volmute,
chup, chdown, dvdmenu, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, clear, enter,
teletext, red, blue, yellow, green, home, basichome, nowplaying,
tvguide, tvrecs, dvd, playlists, first, last, fullscreen, subtitles, audiotrack,
screenshot, aspectratio
- Parameters: 1
- Code : Command to send [string]
GetNP
MpWifi.GetNP
Get Now Playing information for any media type (Music, Movie, or Series) using format strings defined in plugin settings.
GetNPCustom
- Parameters: 1
- FormatString : see description [string]
isConnected
MpWifi.isConnected
Returns True if connected to MediaPortal via WifiRemote or False if not connected
Key
MpWifi.Key
Possible values for <Key>:
All values accepted by SendKeys.SendWait() including the curly brackets {}
see: http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx
- Parameters: 1
- Key : Key to send [']
RequestMusicBySQL
MpWifi.RequestMusicBySQL
Performs an sql query againsts MediaPortals music database and then plays what it finds.
example parameters:
irating>3
strArtist like '%| {1} |%'
strAlbum like '%{1}%'
iyear>1979 and iyear<1990
strGenre like '%| {1} |%'
- Parameters: 1
- Where : SQL where clause. See description for examples. [']
RequestMusicPlaylist
MpWifi.RequestMusicPlaylist
You don't need to enter the whole path or the file extension. Just the name of the playlist.
- Parameters: 1
- Playlist : Name of playlist to play [']
Moving Pictures
MvpcFindMovie
MpWifi.MvpcFindMovie
Go to the Moving Pictures details page for the movie <MovieTitle>
- Parameters: 1
- MovieTitle : Name of movie to find [string]
MvpcPlayMovie
MpWifi.MvpcPlayMovie
Play the Moving Pictures movie <MovieTitle> immediately.
- Parameters: 1
- MovieTitle : Name of movie to play [string]
PlayChannel
MpWifi.PlayChannel
Tunes MP to channel number: <Channel>
- Parameters: 1-2
- Channel : [integer]
- FullScreen : True means start in fullscreen [boolean]
PlayVideoFile
MpWifi.PlayVideoFile
Plays the file located at <FilePath>
- Parameters: 1
- FilePath : FullPath to the video file [']
Powermode
MpWifi.Powermode
valid values for <Mode>:
logoff, suspend, hibernate, reboot, shutdown, exit
- Parameters: 1
- Mode : Powermode to set [']
RefreshNowPlaying
Seek
MpWifi.Seek
<Position> will have different meanings depending on <SeekType>
<SeekType> default 0
0=percentage, absolute,
1=percentage, relative,
2=seconds, absolute,
3=seconds, relative
- Parameters: 1-2
- Position : position to seek to (% or seconds) [integer]
- SeekType : type of position (0-3) [integer]
Serial
MpWifi.Serial
sends a json string, (automatically adds the autologon key)
Example param: {"Type":"position","Position":15,"SeekType":0}
- Parameters: 1
- JSON string : Serialized String [string]
ShowNowPlaying
ShowPlaylist
TV Series
TvsView
MpWifi.TvsView
Views/Filters are set in TvSeries plugin settings in MediaPortal Configuration.
Typical Views are:
All, Favourites, Online Favourites, Unwatched, Genres, Recently Added, etc.
- Parameters: 1
- ViewName : The name of the TvSeries View to open [string]
TvsPlayUnwatched
MpWifi.TvsPlayUnwatched
Opens the Tv-Series Plugin and shows all the unwatched episodes for the series specified by <TvSeries>
- Parameters: 1
- TvSeries : Name of the Tv Series (show) to browse [string]
TvsFindShow
MpWifi.TvsFindShow
Opens the Tv-Series Plugin and finds the series specified by <TvSeriesID>
- Parameters: 1-2
- TvSeriesID : ID of the TV Show to browse [string]
- Season : Season of the TV Show to browse [']
TvsPlayRandom
- Parameters: 1-2
- SeriesName : [string]
- AskToResume : [boolean]
TvsEpisode
- Parameters: 3-4
- SeriesName : [string]
- Season# : [integer]
- Episode# : [integer]
- AskToResume : [boolean]
Volume
AdjustVolume
MpWifi.AdjustVolume
Adjusts the volume by <Amount> relative to current volume.
Use positive values to increase volume.
Use negative values to reduce volume.
- Parameters: 1
- Amount : +/- amount [integer]
SetVolume
MpWifi.SetVolume
Sets the absolute volume to <Volume>
- Parameters: 1
- Volume : <1-100> absolute solume [integer]
SoftMute
MpWifi.SoftMute
Reduces volume to <Percent>% of its current level. Use SoftUnMute to restore it later.
- Parameters: 1
- Percent : Mute to this percent of original volume (0-100) [integer]
SoftUnMute
MpWifi.SoftUnMute
Restores volume to original level