public void Resume(Item item) { if (item.IsPlayable) { item.Resume(); } }
public void Resume(Item item) { if (item.IsPlayable) { currentPlaybackController = item.PlaybackController; //async this so it doesn't slow us down if the service isn't responding for some reason MediaBrowser.Library.Threading.Async.Queue("Cancel Svc Refresh", () => { MBServiceController.SendCommandToService(IPCCommands.CancelRefresh); //tell service to stop }); //put this on a thread so that we can run it sychronously, but not tie up the UI MediaBrowser.Library.Threading.Async.Queue("Resume Action", () => { if (Application.CurrentInstance.RunPrePlayProcesses(item, false)) { item.Resume(); this.lastPlayed = item; } }); } }
public void Navigate(Item item) { if (item.BaseItem is Person) { NavigateToActor(item); return; } if (item.BaseItem is Movie) { if (item.HasDataForDetailPage) { // go to details screen Dictionary<string, object> properties = new Dictionary<string, object>(); properties["Application"] = this; properties["Item"] = item; session.GoToPage("resx://MediaBrowser/MediaBrowser.Resources/MovieDetailsPage", properties); return; } } MediaBrowser.Library.FolderModel folder = item as MediaBrowser.Library.FolderModel; if (folder != null) { if (!Config.Instance.RememberIndexing) folder.DisplayPrefs.IndexBy = IndexType.None; if (Config.Instance.AutoEnterSingleDirs && (folder.Children.Count == 1)) Navigate(folder.Children[0]); else OpenFolderPage(folder); } else { item.Resume(); } }