public void Init(int animeID, int episodeNumber, AniDBFileStatus FileStatus)
        {
            // MYLISTADD aid={int4 aid}&generic=1&epno={int4 episode number}

            commandText = "MYLISTADD aid=" + animeID.ToString();
            commandText += "&generic=1";
            commandText += "&epno=" + episodeNumber.ToString();
            commandText += "&viewed=0";
            commandText += "&state=" + (int) FileStatus;
        }
Ejemplo n.º 2
0
		public void Init(IHash fileData, AniDBFileStatus FileStatus)
		{
			FileData = fileData;

			commandID = fileData.Info;

			commandText = "MYLISTADD size=" + fileData.FileSize.ToString();
			commandText += "&ed2k=" + fileData.ED2KHash;
			commandText += "&viewed=0";
			commandText += "&state=" + (int)FileStatus;
		}
        /*public void Init(IHash fileData, bool watched)
        {
            FileData = fileData;
            IsWatched = watched;

            commandID = fileData.Info;

            commandText = "MYLISTADD size=" + fileData.FileSize.ToString();
            commandText += "&ed2k=" + fileData.ED2KHash;
            commandText += "&viewed=" + (IsWatched ? "1" : "0"); //viewed
            commandText += "&edit=1";
        }*/
        public void Init(IHash fileData, bool watched, DateTime? watchedDate, bool isEdit, AniDBFileStatus? fileState)
        {
            FileData = fileData;
            IsWatched = watched;

            commandID = fileData.Info;

            commandText = "MYLISTADD size=" + fileData.FileSize.ToString();
            commandText += "&ed2k=" + fileData.ED2KHash;
            commandText += "&viewed=" + (IsWatched ? "1" : "0"); //viewed
            if (fileState.HasValue)
                commandText += "&state=" + (int) fileState;
            if (watchedDate.HasValue)
                commandText += "&viewdate=" + Utils.GetAniDBDateAsSeconds(watchedDate.Value).ToString();
            if (isEdit)
                commandText += "&edit=1";
        }