Пример #1
0
        internal Serie(Server a_server, string a_url, string a_title, ulong a_id, SerieState a_state,
                       bool a_chapters_downloaded_first_time)
            : base(a_id)
        {
            m_chapters = new ChaptersCachedList(this);
            URL        = HtmlDecode(a_url);
            Server     = a_server;
            m_state    = a_state;
            ChaptersDownloadedFirstTime = a_chapters_downloaded_first_time;

            if (m_state == SerieState.Downloading)
            {
                m_state = SerieState.Initial;
            }
            if (m_state == SerieState.Waiting)
            {
                m_state = SerieState.Initial;
            }

            a_title = a_title.Trim();
            a_title = a_title.Replace("\t", " ");
            while (a_title.IndexOf("  ") != -1)
            {
                a_title = a_title.Replace("  ", " ");
            }

            Title = HtmlDecode(a_title);
        }
Пример #2
0
        internal Server(string a_url, string a_name, ulong a_id, ServerState a_state,
                        bool a_series_downloaded_first_time)
            : base(a_id)
        {
            m_series = new SeriesCachedList(this);
            URL      = a_url;
            Name     = a_name;
            m_state  = a_state;
            SeriesDownloadedFirstTime = a_series_downloaded_first_time;

            if (m_state == ServerState.Downloading)
            {
                m_state = ServerState.Initial;
            }
            if (m_state == ServerState.Waiting)
            {
                m_state = ServerState.Initial;
            }
            if (m_state == ServerState.Downloaded)
            {
                m_state = ServerState.Initial;
            }
        }