protected override void OnInfo(int itemIndex) { GUIListItem item = facadeLayout[itemIndex]; if (item == null) { return; } IMDBMovie movie = item.AlbumInfoTag as IMDBMovie; if (movie == null) { return; } if (movie.ID >= 0) { GUIVideoInfo videoInfo = (GUIVideoInfo)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_INFO); videoInfo.Movie = movie; videoInfo.FolderForThumbs = string.Empty; GUIWindowManager.ActivateWindow((int)Window.WINDOW_VIDEO_INFO); } // F3 key actor info action if (movie.ActorID >= 0) { IMDBActor actor = VideoDatabase.GetActorInfo(movie.ActorID); if (actor != null) { OnVideoArtistInfo(actor); } } }
protected override void OnPageDestroy(int newWindowId) { if ((_scanThread != null) && (_scanThread.IsAlive)) { _scanThread.Abort(); _scanThread = null; } // Refresh actor info if (_currentActor != null) { _currentActor = VideoDatabase.GetActorInfo(_currentActor.ID); SaveState(); //Clean properties _currentActor.ResetProperties(); } ReleaseResources(); base.OnPageDestroy(newWindowId); }
protected override void OnShowContextMenu() { GUIListItem item = facadeLayout.SelectedListItem; int itemNo = facadeLayout.SelectedListItemIndex; if (item == null) { return; } GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; } IMDBMovie movie = item.AlbumInfoTag as IMDBMovie; if (movie == null) { Dialog_ProtectedContent(dlg); return; } // Actor group view if (handler.CurrentLevelWhere == "actor") { dlg.Reset(); dlg.SetHeading(498); // menu IMDBActor actor = VideoDatabase.GetActorInfo(movie.ActorID); if (actor != null) { dlg.AddLocalizedString(368); //IMDB } if (protectedShares.Count > 0) { if (ageConfirmed) { dlg.AddLocalizedString(1240); //Lock content } else { dlg.AddLocalizedString(1241); //Unlock content } } dlg.DoModal(GetID); if (dlg.SelectedId == -1) { return; } switch (dlg.SelectedId) { case 368: // IMDB OnVideoArtistInfo(actor); break; case 1240: // Protected content case 1241: // Protected content OnContentLock(); break; } return; } // Context menu on folders (Group names) if (movie.ID < 0) { Dialog_ProtectedContent(dlg); return; } // Context menu on movie title dlg.Reset(); dlg.SetHeading(498); // menu if (handler.CurrentLevelWhere == "title") { dlg.AddLocalizedString(368); //IMDB dlg.AddLocalizedString(208); //play dlg.AddLocalizedString(926); //add to playlist dlg.AddLocalizedString(925); //delete } if (protectedShares.Count > 0) { if (ageConfirmed) { dlg.AddLocalizedString(1240); //Lock content } else { dlg.AddLocalizedString(1241); //Unlock content } } dlg.DoModal(GetID); if (dlg.SelectedId == -1) { return; } switch (dlg.SelectedId) { case 925: // Delete OnDeleteItem(item); break; case 368: // IMDB OnInfo(itemNo); break; case 208: // play OnClick(itemNo); break; case 926: //add to playlist OnQueueItem(itemNo); break; case 1240: //Lock content case 1241: //Unlock content OnContentLock(); break; } }