Esempio n. 1
0
        public Season(DirectoryInfo d, Series seriesparent)
            : base(d)
        {
            if (backdropImage == "/Images/nobackdrop.jpg")
                backdropImage = seriesparent.backdropImage;
            if (folderImage == "/Images/nofolder.jpg")
                folderImage = seriesparent.folderImage;

            title = d.Name;
            _series = seriesparent;

            Episodes = new MediaCollection { };

            Regex videos = new Regex(".*\\.(avi|mkv|mp4|mpg|mpeg|ogm|wmv|divx|dvr-ms)$");

            foreach (FileInfo f in d.GetFiles())
            {
                if (videos.IsMatch(f.Name))
                {
                    Episode ep = new Episode(f, this);
                    if (ep.Valid)
                        Episodes.Add(ep);
                }
            }

            LoadImage(backdropImage);
            LoadImage(folderImage);
        }
Esempio n. 2
0
        public void fetchContents()
        {
            MediaItem mi = null;
            foreach (DirectoryInfo d in _dir.GetDirectories())
            {
                if (File.Exists(d.FullName + "/series.xml"))
                {
                    mi = new Series(d, this);
                }
                else if (File.Exists(d.FullName + "/mymovies.xml"))
                {
                    mi = new Movie(d, this);
                }
                else
                {
                    continue;
                }

                _contents.Add(mi);
            }
        }