示例#1
0
        private void BuildData()
        {
            // find actors that have been in more than one thing
            lock (TheTVDB.LocalCache.Instance.SERIES_LOCK)
            {
                theData = new DataArr(mDoc.TvLibrary.Count);
                foreach (ShowConfiguration ser in mDoc.TvLibrary.Shows)
                {
                    CachedSeriesInfo?si = ser.CachedShow;
                    foreach (string aa in ser.Actors.Select(act => act.ActorName.Trim()).Where(aa => !string.IsNullOrEmpty(aa)))
                    {
                        theData.Set(ser.ShowName, aa, true);
                    }

                    if (cbGuestStars.Checked && si != null)
                    {
                        foreach (Episode ep in si.Episodes)
                        {
                            foreach (string g in ep.GuestStars)
                            {
                                theData.Set(ser.ShowName, g.Trim(), false);
                            }
                        }
                    }
                }
            }

            theData.RemoveEmpties();
        }
示例#2
0
        private void BuildData()
        {
            // find actors that have been in more than one thing
            // Dictionary<String^, List<String> ^> ^whoInWhat = gcnew Dictionary<String^, List<String> ^>;
            TheTVDB.Instance.GetLock("Actors");
            theData = new DataArr(mDoc.Library.Count);
            foreach (ShowItem ser in mDoc.Library.Shows)
            {
                SeriesInfo si = TheTVDB.Instance.GetSeries(ser.TvdbCode);
                foreach (Actor act in si.GetActors())
                {
                    string aa = act.ActorName.Trim();
                    if (!string.IsNullOrEmpty(aa))
                    {
                        theData.Set(si.Name, aa, true);
                    }
                }

                if (cbGuestStars.Checked)
                {
                    foreach (KeyValuePair <int, Season> kvp in si.AiredSeasons) //We can use AiredSeasons as it does not matter which order we do this in Aired or DVD
                    {
                        foreach (Episode ep in kvp.Value.Episodes.Values)
                        {
                            foreach (string g in ep.GuestStars)
                            {
                                string aa = g.Trim();
                                if (!string.IsNullOrEmpty(aa))
                                {
                                    theData.Set(si.Name, aa, false);
                                }
                            }
                        }
                    }
                }
            }

            TheTVDB.Instance.Unlock("Actors");
            theData.RemoveEmpties();
        }
示例#3
0
        private void BuildData()
        {
            // find actors that have been in more than one thing
            lock (TheTVDB.SERIES_LOCK)
            {
                theData = new DataArr(mDoc.Library.Count);
                foreach (ShowItem ser in mDoc.Library.Shows)
                {
                    SeriesInfo si = TheTVDB.Instance.GetSeries(ser.TvdbCode);
                    foreach (string aa in ser.Actors.Select(act => act.ActorName.Trim()).Where(aa => !string.IsNullOrEmpty(aa)))
                    {
                        theData.Set(si?.Name, aa, true);
                    }

                    if (cbGuestStars.Checked && si != null)
                    {
                        foreach (KeyValuePair <int, Season> kvp in si.AiredSeasons
                                 ) //We can use AiredSeasons as it does not matter which order we do this in Aired or DVD
                        {
                            foreach (Episode ep in kvp.Value.Episodes.Values)
                            {
                                foreach (string g in ep.GuestStars)
                                {
                                    string aa = g.Trim();
                                    if (!string.IsNullOrEmpty(aa))
                                    {
                                        theData.Set(si.Name, aa, false);
                                    }
                                }
                            }
                        }
                    }
                }
            }

            theData.RemoveEmpties();
        }