public void PlayTrailers() { var movie = BaseItem as Movie; if (movie.ContainsTrailers) { var trailerFiles = movie.TrailerFiles.ToArray(); string filename = null; if (trailerFiles.Length == 1) { filename = trailerFiles[0]; } if (trailerFiles.Length > 1) { filename = PlayableItem.CreateWPLPlaylist(BaseItem.Name, trailerFiles); } if (filename != null) { foreach (var controller in Kernel.Instance.PlaybackControllers) { if (controller.CanPlay(filename)) { controller.PlayMedia(filename); controller.GoToFullScreen(); break; } } } } }
public void PlayProtected(PlayableItem playable) { //save parameters where we can get at them after pin entry this.playable = playable; //now present pin screen - it will call our callback after finished pinCallback = PlayPinEntered; if (!string.IsNullOrEmpty(playable.ParentalControlPin)) { customPIN = playable.ParentalControlPin; // use custom pin for this item } else { customPIN = Config.Instance.ParentalPIN; // use global pin } Logger.ReportInfo("Request to play protected content"); PromptForPin(pinCallback, Application.CurrentInstance.StringData("EnterPINToPlayDial")); }