Пример #1
0
        public csEPI getEpisode()
        {
            csEPI epi = new csEPI();

            dtEPI.FillByID(ds.EPI_Episodes, epi_ID);
            if (ds.EPI_Episodes.Count > 0)
                epi = (csEPI)getClassFromDataRow(ds.EPI_Episodes.Rows[0], epi);

            return epi;
        }
Пример #2
0
        private void setEpisodesDataTheTVDB(XmlDocument xmlDoc, string lan, csSER oSER, XmlDocument xmlDocBanner)
        {

            XmlNodeList xmlList = xmlDoc.SelectNodes("//Data/Episode");
            foreach (XmlNode node in xmlList)
            {
                //XML Felder: Combined_episodenumber, Combined_season, DVD_chapter, DVD_discid, DVD_episodenumber, DVD_season, Director, EpImgFlag
                //GuestStars, ProductionCode, Writer, airsafter_season, airsbefore_episode, airsbefore_season, filename, lastupdated
                //thumb_added, thumb_height, thumb_width, Rating, RatingCount

                if (oSER == null)
                    return;

                csSEA oSEA = new csSEA();
                oSEA.SEA_theTVDB_ID = xmlNodeInnerText(node, "seasonid");
                oSEA.SEA_SER = oSER.SER_ID;
                oSEA.SEA_NumberText = xmlNodeInnerText(node, "SeasonNumber");
                oSEA.SEA_Number = vInt(xmlNodeInnerText(node, "SeasonNumber"));
                oSEA.LastChanged = vDateTimeUTC(xmlNodeInnerText(node, "lastupdated"));

                oSEA.updateSeason();

                if (!setBannersTheTVDB(xmlDocBanner, oSER.SER_theTVDB_ID, oSEA.SEA_NumberText, oSEA.SEA_theTVDB_ID, false)) {
                    setBannersTheTVDB(xmlDocBanner, oSER.SER_theTVDB_ID, oSEA.SEA_NumberText, oSEA.SEA_theTVDB_ID, true);
                }

                if (string.IsNullOrEmpty(oSEA.SEA_ID))
                    return;

                csEPI epi = new csEPI();
                epi.EPI_theTVDB_ID = xmlNodeInnerText(node, "id");
                epi.EPI_SEA = oSEA.SEA_ID;
                epi.EPI_Name_German = xmlNodeInnerText(node, "EpisodeName");
                epi.EPI_NumberOfSeason = vInt(xmlNodeInnerText(node, "EpisodeNumber"));
                epi.EPI_FirstAired_English = vDateTime(xmlNodeInnerText(node, "FirstAired")); 
                epi.EPI_imdb_ID = xmlNodeInnerText(node, "IMDB_ID");
                epi.EPI_Languages = xmlNodeInnerText(node, "Language"); 
                epi.EPI_DescriptionShort_German = xmlNodeInnerText(node, "Overview");
                epi.EPI_Description_German = xmlNodeInnerText(node, "Overview");
                epi.EPI_Number = vInt(xmlNodeInnerText(node, "absolute_number"));
                epi.EPI_NumberText = xmlNodeInnerText(node, "absolute_number");
                epi.LastChanged = vDateTimeUTC(xmlNodeInnerText(node, "lastupdated"));

                epi.updateEpisode();
            }
        }