Esempio n. 1
0
        public void RemoveTVShowStoredString(TVShowStoredString item)
        {
            for (int index = 0; index < this.SHOW_DATA.Count; index++)
            {
                if (this.SHOW_DATA[index].StartsWith(item.ShowTitle))
                {
                    this.SHOW_DATA.RemoveAt(index);

                    this.Save();
                    return;
                }
            }

            throw new KeyNotFoundException();
        }
Esempio n. 2
0
        public TVShowStoredString GetTVShowStoredStringByIMDB_ID(string IMDB_ID)
        {
            StringCollection showItems = this.SHOW_DATA;

            foreach (string showItem in showItems)
            {
                var item = new TVShowStoredString(showItem);
                if (item.IMDB_ID == IMDB_ID)
                {
                    return(item);
                }
            }

            return(null);
        }
Esempio n. 3
0
        public TVShowStoredString GetTVShowStoredStringByTitle(string showTitle)
        {
            StringCollection showItems = this.SHOW_DATA;

            foreach (string showItem in showItems)
            {
                var item = new TVShowStoredString(showItem);
                if (item.ShowTitle == showTitle)
                {
                    return(item);
                }
            }

            return(null);
        }
Esempio n. 4
0
        public void AddOrUpdateTVShowStoredString(string showTitle, string IMDB_ID, string website)
        {
            var item       = new TVShowStoredString(showTitle, IMDB_ID, website);
            var storedItem = GetTVShowStoredStringByTitle(showTitle);

            if (storedItem != null)
            {
                if (item.Equals(storedItem))
                {
                    return;
                }

                this.RemoveTVShowStoredString(storedItem);
            }

            this.SHOW_DATA.Add(new TVShowStoredString(showTitle, IMDB_ID, website).GetStoredFormat());
            this.Save();
        }