public void PlayAllDisks(Library.Code.V3.MovieItem item) { if (this.Enabled) { string itemRating = item.TitleObject.ParentalRating.ToUpperInvariant().Replace("-", ""); if (!string.IsNullOrEmpty(itemRating) && itemRating != "UNRATED") { if (MCMovieRatings.ContainsKey(itemRating) && MCMovieRatings[itemRating] > this.MaxAllowed) { controls.PromptForPin(delegate(bool goodPin) { if (goodPin) { item.PlayAllDisks(); } }); } else { item.PlayAllDisks(); } } else { if (this.BlockUnrated) { controls.PromptForPin(delegate(bool goodPin) { if (goodPin) { item.PlayAllDisks(); } }); } else { item.PlayAllDisks(); } } } else { item.PlayAllDisks(); } }
public void DeleteTitle(Library.Code.V3.MovieItem item) { foreach (Disk d in item.TitleObject.Disks) { string status = deleteDisk(d); if (!string.IsNullOrEmpty(status)) { this.MediaCenterEnvironment.Dialog( string.Format("Unable to delete this movie: {0}", status), "Failed", DialogButtons.Ok, 5, false); return; } else { TitleCollectionManager.DeleteTitle(item.TitleObject); } } }
public bool ItemIsAllowed(Library.Code.V3.MovieItem item) { if (this.Enabled) { string itemRating = item.TitleObject.ParentalRating.ToUpperInvariant(); if (string.IsNullOrEmpty(itemRating)) { if (MCMovieRatings[itemRating] <= this.MaxAllowed) { return(true); } } else { if (this.BlockUnrated) { return(false); } } } return(true); }