public AnimePicturesSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Config.IsSupportKeyword = true; Config.IsSupportRating = true; Config.IsSupportScore = true; }
internal TypeListItem(string display, string fileName = "", string filePath = "", string versionListUrl = "", string fileSystem = "FAT32", DownloadTypes dlType = DownloadTypes.File) { Display = display; FileName = fileName; FilePath = filePath; FileSystem = fileSystem; DLType = dlType; VersionListUrl = versionListUrl; }
public KawaiinyanSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Config = new MoeSiteConfig { IsSupportKeyword = true, IsSupportResolution = true, IsSupportScore = true }; }
public DownloadResultForm( Results result, string title, DownloadTypes downloadType, string playlistName, bool toMP3, bool addMetadata, string info) { InitializeComponent(); if (result == Results.Error) { ResultPictureBox.Image = Properties.Resources.error; } TitleLabel.Text = title; switch (downloadType) { case DownloadTypes.Video: TypeLabel.Text += "Vídeo(s)"; ExportSaveFileDialog.FileName = "Video_"; break; case DownloadTypes.Playlist: TypeLabel.Text += "Lista de reproducción"; ExportSaveFileDialog.FileName = "Playlist_"; break; case DownloadTypes.Channel: TypeLabel.Text += "Canal"; ExportSaveFileDialog.FileName = "Channel_"; break; } if (downloadType != DownloadTypes.Video) { NameLabel.Enabled = true; NameLabel.Text = " " + playlistName + " "; ExportSaveFileDialog.FileName += playlistName + "_"; } MP3CheckBox.Checked = toMP3; MetadataCheckBox.Checked = addMetadata; InfoTextBox.Text = info.Replace("\n", "\r\n"); ExportSaveFileDialog.FileName += DateTime.Now.ToFileTime(); ExportSaveFileDialog.InitialDirectory = Directory.GetCurrentDirectory(); ShowDialog(); }
public SankakuIdolSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Config = new MoeSiteConfig { IsSupportKeyword = true, IsSupportRating = true, IsSupportResolution = true, IsSupportScore = true }; }
public EshuuSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Config.IsSupportKeyword = true; Config.IsSupportRating = true; Config.IsSupportResolution = true; Config.IsSupportScore = true; Lv2Cat = new Categories(Config); Lv2Cat.Adds("标签", "来源", "画师", "角色"); }
public WorldCosplaySite() { DownloadTypes.Add("大图", DownloadTypeEnum.Large); Config = new MoeSiteConfig { IsSupportKeyword = true, IsSupportRating = true, IsSupportResolution = true, IsSupportScore = true }; }
public QueueEntry(long _id, string _path, string _token, Action <DownloadEngine.DownloadStatus, long, DownloadTypes> _completeFunction, DownloadTypes _type, bool _highResImage = false) { id = _id; path = _path; token = _token; completeFunction = _completeFunction; type = _type; highResImage = _highResImage; }
public YuriimgSite() { DownloadTypes.Add("预览图", DownloadTypeEnum.Medium); DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Config = new MoeSiteConfig { IsSupportKeyword = true, IsSupportRating = true, IsSupportResolution = true, IsSupportScore = true }; }
public BilibiliSite() { Config.IsSupportKeyword = true; Config.IsSupportScore = true; Lv2Cat = new Categories(Config); Lv2Cat.Adds("画友", "摄影(COS)", "摄影(私服)"); Lv2Cat.EachSubAdds("最新", "最热"); DownloadTypes.Add("原图", DownloadTypeEnum.Origin); LoginPageUrl = "https://passport.bilibili.com/login"; }
public HttpInfinitePlaySource(string address, DownloadTypes downloadMode, IEventAggregator positionEventAggregator) { OnGetPosition += RefreshPositions; _positionEventAggregator = positionEventAggregator; _subscriptionToken = _positionEventAggregator.GetEvent<HttpPositionEvent>().Subscribe(GetReadPosition); _downloadType = downloadMode; _downloadProcURL = (_downloadType == DownloadTypes.NoDownload) ? null : new DOWNLOADPROC(DownloadProc); Path = address; DownloadStream = Bass.BASS_StreamCreateURL(Path, 0, BASSFlag.BASS_STREAM_AUTOFREE|BASSFlag.BASS_STREAM_STATUS |BASSFlag.BASS_SAMPLE_FLOAT, _downloadProcURL, IntPtr.Zero); BASSError error = Bass.BASS_ErrorGetCode(); if (DownloadStream == 0) throw new ArgumentException("Parameter cannot be null", error.ToString()); _syncProcMeta = new SYNCPROC(SyncMethodMeta); Bass.BASS_ChannelSetSync(DownloadStream, BASSSync.BASS_SYNC_WMA_META, 0, _syncProcMeta, IntPtr.Zero); Bass.BASS_ChannelSetSync(DownloadStream, BASSSync.BASS_SYNC_OGG_CHANGE, 0, _syncProcMeta, IntPtr.Zero); Bass.BASS_ChannelSetSync(DownloadStream, BASSSync.BASS_SYNC_META, 0, _syncProcMeta, IntPtr.Zero); Bass.BASS_ChannelSetSync(DownloadStream, BASSSync.BASS_SYNC_WMA_CHANGE, 0, _syncProcMeta, IntPtr.Zero); _previousTags = new List<Tag>(); Tags = new TrackTags(DownloadStream, SourceType); Tags.GetIcyMetaTags(DownloadStream); ChannelInfo = Bass.BASS_ChannelGetInfo(DownloadStream); if (ProcessMusic()) { _bufferFileStream = new FileStream("RadioBuffer", FileMode.OpenOrCreate, FileAccess.ReadWrite); _DSPHandler = new DSPPROC(DSPProc); _streamProc = new STREAMPROC(StreamRead); DSP = Bass.BASS_ChannelSetDSP(DownloadStream, _DSPHandler, IntPtr.Zero, 0); Stream = Bass.BASS_StreamCreate(ChannelInfo.freq, ChannelInfo.chans, BASSFlag.BASS_STREAM_DECODE|BASSFlag.BASS_SAMPLE_FLOAT, _streamProc, IntPtr.Zero); Bass.BASS_ChannelPlay(DownloadStream, false); Bass.BASS_ChannelSetAttribute(DownloadStream, BASSAttribute.BASS_ATTRIB_VOL, 0); StreamFX = BassFx.BASS_FX_TempoCreate(Stream, BASSFlag.BASS_FX_FREESOURCE | BASSFlag.BASS_SAMPLE_FX); } else { error = Bass.BASS_ErrorGetCode(); throw new ArgumentException("Parameter cannot be null", error.ToString()); } }
public DeviantartSite() { LoginPageUrl = "https://www.deviantart.com/users/login"; Config.IsSupportAccount = true; Config.IsSupportKeyword = true; DownloadTypes.Add("原图", DownloadTypeEnum.Origin); DownloadTypes.Add("大图", DownloadTypeEnum.Large); Lv2Cat = new Categories(Config) { "最新/搜索", // 0 "热门" // 1 }; }
protected BooruSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); if (SiteType == SiteTypeEnum.Xml) { DownloadTypes.Add("Jpeg图", DownloadTypeEnum.Large); } DownloadTypes.Add("预览图", DownloadTypeEnum.Medium); Config.IsSupportKeyword = true; Config.IsSupportRating = true; Config.IsSupportResolution = true; Config.IsSupportScore = true; }
public ZeroChanSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); DownloadTypes.Add("预览图", DownloadTypeEnum.Medium); Config = new MoeSiteConfig { IsSupportKeyword = true, IsSupportResolution = true, IsSupportScore = true, ImageOrders = new ImageOrders { new() { Name = "最新", Order = ImageOrderBy.Date }, new() { Name = "最热", Order = ImageOrderBy.Popular } } }; }
public PixivSite(bool isR18 = false) { IsR18 = isR18; InitCat(); DownloadTypes.Add("原图", DownloadTypeEnum.Origin); DownloadTypes.Add("大图", DownloadTypeEnum.Large); LoginPageUrl = "https://accounts.pixiv.net/login"; Mirrors.Add(new MirrorSiteConfig { Name = "pixiviz", HomeUrl = "https://pixiviz.pwp.app/" }); }
public MiniTokyoSite() { Config.IsSupportKeyword = true; Config.IsSupportResolution = true; Config.IsSupportScore = true; //var lv3 = new Categories(Config, "最新", "最热"); //Lv2Cat.Add(new Category(Config, "壁纸", lv3)); //Lv2Cat.Add(new Category(Config, "扫描图", lv3)); //Lv2Cat.Add(new Category(Config, "手机壁纸", lv3)); //Lv2Cat.Add(new Category(Config, "Indy Art", lv3)); Lv2Cat = new Categories(Config); Lv2Cat.Adds("最新", "壁纸", "扫描图", "手机壁纸", "Indy Art"); Lv2Cat.EachSubAdds("最新", "最热"); DownloadTypes.Add("原图", DownloadTypeEnum.Origin); }
public async Task <FileStreamResult> Download( [Required][FromRoute] FormType form, [FromQuery] DownloadTypes type = DownloadTypes.Excel, [FromQuery] long start = 0, [FromQuery] long end = -1) { switch (type) { case DownloadTypes.Excel: return(await DownloadExcel(form, start, end)); case DownloadTypes.CSV: return(await DownloadCSV(form, start, end)); } return(null);//error }
public CustomSite(CustomSiteConfig config) { CustomConfig = config; Config = config.Config; LoginPageUrl = config.LoginUrl; DownloadTypes.Add("原图", DownloadTypeEnum.Origin); Lv2Cat = new Categories(Config); if (CustomConfig.Config.IsSupportAccount) { if (CustomConfig.LoginUrl == null) { LoginPageUrl = config.HomeUrl; } } }
private InformationType EvaluateInformationType(XmlAttribute o) { //XmlNode node = null; //string nodeName = null; string attributeName = null; string attributeValue = null; attributeName = o.Name.ToLower().Trim(); attributeValue = o.Value.Trim(); //node = o.ParentNode; //nodeName = node.Name.ToLower().Trim(); if (DownloadTypes.Guess(attributeValue) != DownloadTypes.Categories.Undefined) { return(InformationType.MildlyInteresting); } return(InformationType.NeutralData); }
public SankakuChanSite() { DownloadTypes.Add("原图", DownloadTypeEnum.Origin); LoginPageUrl = "https://login.sankakucomplex.com/login"; Config.IsSupportKeyword = true; Config.IsSupportRating = true; Config.IsSupportResolution = true; Config.IsSupportScore = true; Config.IsSupportAccount = true; Config.IsSupportStarButton = true; Config.IsSupportMultiKeywords = true; Config.ImageOrders.Add(new ImageOrder { Name = "最新", Order = ImageOrderBy.Date }); Config.ImageOrders.Add(new ImageOrder { Name = "最受欢迎", Order = ImageOrderBy.Popular }); Lv2Cat = new Categories(Config); Lv2Cat.Adds("最新/搜索", "收藏"); }
public void WriteXml(System.Xml.XmlWriter writer) { var s = new XmlSerializer(typeof(string)); var b = new XmlSerializer(typeof(bool)); var l = new XmlSerializer(typeof(List <AutoAnswer>)); writer.WriteStartElement("TaskInfo"); //taskid writer.WriteStartElement("TaskId"); s.Serialize(writer, TaskId.ToString()); writer.WriteEndElement(); //pluginname writer.WriteStartElement("PluginName"); s.Serialize(writer, PluginName); writer.WriteEndElement(); //url writer.WriteStartElement("Url"); s.Serialize(writer, Url); writer.WriteEndElement(); //title writer.WriteStartElement("Title"); s.Serialize(writer, Title); writer.WriteEndElement(); //status writer.WriteStartElement("Status"); DownloadStatus tmpds = Status; if (tmpds == DownloadStatus.正在下载 || tmpds == DownloadStatus.正在停止 || tmpds == DownloadStatus.等待开始) { tmpds = DownloadStatus.已经停止; } s.Serialize(writer, tmpds.ToString()); writer.WriteEndElement(); //createtime writer.WriteStartElement("CreateTime"); s.Serialize(writer, CreateTime.ToString()); writer.WriteEndElement(); //finishtime if (FinishTime != null) { writer.WriteStartElement("FinishTime"); s.Serialize(writer, FinishTime.ToString()); writer.WriteEndElement(); } //savedirectory writer.WriteStartElement("SaveDirectory"); s.Serialize(writer, SaveDirectory.ToString()); writer.WriteEndElement(); //PartCount writer.WriteStartElement("PartCount"); s.Serialize(writer, PartCount.ToString()); writer.WriteEndElement(); //CurrentPart writer.WriteStartElement("CurrentPart"); s.Serialize(writer, CurrentPart.ToString()); writer.WriteEndElement(); //is be added writer.WriteStartElement("IsBeAdded"); b.Serialize(writer, IsBeAdded); writer.WriteEndElement(); //partialfinished writer.WriteStartElement("PartialFinished"); b.Serialize(writer, PartialFinished); writer.WriteEndElement(); //partialfinished detail writer.WriteStartElement("PartialFinishedDetail"); s.Serialize(writer, PartialFinishedDetail); writer.WriteEndElement(); //autoanswer writer.WriteStartElement("AutoAnswers"); l.Serialize(writer, AutoAnswer); writer.WriteEndElement(); //extract cache writer.WriteStartElement("ExtractCache"); b.Serialize(writer, ExtractCache); writer.WriteEndElement(); //FilePath writer.WriteStartElement("Files"); foreach (string item in FilePath) { writer.WriteStartElement("File"); s.Serialize(writer, item); writer.WriteEndElement(); } writer.WriteEndElement(); //SubFilePath writer.WriteStartElement("SubFiles"); foreach (string item in SubFilePath) { writer.WriteStartElement("SubFile"); s.Serialize(writer, item); writer.WriteEndElement(); } writer.WriteEndElement(); //DownloadType writer.WriteStartElement("DownloadType"); s.Serialize(writer, DownloadTypes.ToString("D")); writer.WriteEndElement(); //proxy XmlSerializer sProxy = new XmlSerializer(typeof(AcDownProxy)); writer.WriteStartElement("Proxy"); sProxy.Serialize(writer, new AcDownProxy().FromWebProxy(Proxy)); writer.WriteEndElement(); //source url writer.WriteStartElement("SourceUrl"); s.Serialize(writer, SourceUrl); writer.WriteEndElement(); //comment writer.WriteStartElement("Comment"); s.Serialize(writer, Comment); writer.WriteEndElement(); //hash writer.WriteStartElement("Hash"); s.Serialize(writer, Hash); writer.WriteEndElement(); //Progress writer.WriteStartElement("Progress"); s.Serialize(writer, GetProgress().ToString()); writer.WriteEndElement(); //settings XmlSerializer sSettings = new XmlSerializer(typeof(SerializableDictionary <string, string>)); writer.WriteStartElement("Settings"); sSettings.Serialize(writer, Settings); writer.WriteEndElement(); writer.WriteEndElement(); }
public DownloadType Find(string extension) { return(DownloadTypes.Find(a => String.Equals(a.Extension, extension, StringComparison.OrdinalIgnoreCase) && a.Active == true)); }