Plugin MpWifi

From VoxCommando
Revision as of 11:25, 13 January 2021 by James (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Go to the main Plugins page.

Go to the complete Plugin List.


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
  1. WindowID : Id of window to open [integer]
  2. 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
  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
  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

MpWifi.GetNPCustom


  • Parameters: 1
  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
  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
  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
  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
  1. MovieTitle : Name of movie to find [string]

MvpcPlayMovie

MpWifi.MvpcPlayMovie
Play the Moving Pictures movie <MovieTitle> immediately.

  • Parameters: 1
  1. MovieTitle : Name of movie to play [string]

PlayChannel

MpWifi.PlayChannel
Tunes MP to channel number: <Channel>

  • Parameters: 1-2
  1. Channel : [integer]
  2. FullScreen : True means start in fullscreen [boolean]

PlayVideoFile

MpWifi.PlayVideoFile
Plays the file located at <FilePath>

  • Parameters: 1
  1. FilePath : FullPath to the video file [']

Powermode

MpWifi.Powermode
valid values for <Mode>:
logoff, suspend, hibernate, reboot, shutdown, exit

  • Parameters: 1
  1. Mode : Powermode to set [']

RefreshNowPlaying

MpWifi.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
  1. Position : position to seek to (% or seconds) [integer]
  2. 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
  1. JSON string : Serialized String [string]

ShowNowPlaying

MpWifi.ShowNowPlaying

ShowPlaylist

MpWifi.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
  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
  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
  1. TvSeriesID : ID of the TV Show to browse [string]
  2. Season : Season of the TV Show to browse [']

TvsPlayRandom

MpWifi.TvsPlayRandom


  • Parameters: 1-2
  1. SeriesName : [string]
  2. AskToResume : [boolean]

TvsEpisode

MpWifi.TvsEpisode


  • Parameters: 3-4
  1. SeriesName : [string]
  2. Season# : [integer]
  3. Episode# : [integer]
  4. 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
  1. Amount : +/- amount [integer]

SetVolume

MpWifi.SetVolume
Sets the absolute volume to <Volume>

  • Parameters: 1
  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
  1. Percent : Mute to this percent of original volume (0-100) [integer]

SoftUnMute

MpWifi.SoftUnMute
Restores volume to original level