Kaynağa Gözat

add an option for Find Movies in URL, limit the amount of actors

unknown 10 yıl önce
ebeveyn
işleme
9dc173eb0c

+ 3 - 1
Arzon/Arzon.cs

@@ -238,6 +238,8 @@ namespace Gets
 
                 //AV女優:
                 var item1 = docc.DocumentNode.SelectSingleNode("//table[@class='item']/tr[1]/td[2]").InnerText.Trim();
+                var actorsArr = item1.Split(new char[] { ' ', '\n' }, StringSplitOptions.RemoveEmptyEntries).ToList<string>();
+
                 //AVメーカー    制造厂
                 var item2 = docc.DocumentNode.SelectSingleNode("//table[@class='item']/tr[2]/td[2]").InnerText.Trim();
                 //AVレーベル    唱片公司
@@ -271,7 +273,7 @@ namespace Gets
 
                 Movie m = new Movie()
                 {
-                    Actor = basic.Actor,
+                    Actor = actorsArr,
                     Title = titleCleaner(Title),
                     Lable = item9,
                     Maker = item2,//ideapocket

+ 36 - 7
PicSo/Form1.Designer.cs

@@ -66,11 +66,13 @@
             this.btn_LocalSearch = new System.Windows.Forms.Button();
             this.txt_LocalSearchKeyWord = new System.Windows.Forms.TextBox();
             this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.txt_FindStatus = new System.Windows.Forms.TextBox();
             this.btnFind = new System.Windows.Forms.Button();
             this.txt_url = new System.Windows.Forms.TextBox();
-            this.txt_FindStatus = new System.Windows.Forms.TextBox();
+            this.nud_ActorLessThan = new System.Windows.Forms.NumericUpDown();
             this.bc = new AVSORTER.BasicContainer();
             this.movieContainer1 = new PicSo.MovieContainer();
+            this.label3 = new System.Windows.Forms.Label();
             this.contextMenuStrip1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.groupBox2.SuspendLayout();
@@ -78,6 +80,7 @@
             this.tabControl1.SuspendLayout();
             this.tabPage2.SuspendLayout();
             this.tabPage3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nud_ActorLessThan)).BeginInit();
             this.SuspendLayout();
             // 
             // contextMenuStrip1
@@ -442,6 +445,8 @@
             // 
             // tabPage3
             // 
+            this.tabPage3.Controls.Add(this.label3);
+            this.tabPage3.Controls.Add(this.nud_ActorLessThan);
             this.tabPage3.Controls.Add(this.txt_FindStatus);
             this.tabPage3.Controls.Add(this.btnFind);
             this.tabPage3.Controls.Add(this.txt_url);
@@ -453,6 +458,14 @@
             this.tabPage3.Text = "tabPage3";
             this.tabPage3.UseVisualStyleBackColor = true;
             // 
+            // txt_FindStatus
+            // 
+            this.txt_FindStatus.Location = new System.Drawing.Point(6, 62);
+            this.txt_FindStatus.Multiline = true;
+            this.txt_FindStatus.Name = "txt_FindStatus";
+            this.txt_FindStatus.Size = new System.Drawing.Size(953, 187);
+            this.txt_FindStatus.TabIndex = 2;
+            // 
             // btnFind
             // 
             this.btnFind.Location = new System.Drawing.Point(6, 33);
@@ -470,13 +483,17 @@
             this.txt_url.Size = new System.Drawing.Size(953, 21);
             this.txt_url.TabIndex = 0;
             // 
-            // txt_FindStatus
+            // nud_ActorLessThan
             // 
-            this.txt_FindStatus.Location = new System.Drawing.Point(6, 62);
-            this.txt_FindStatus.Multiline = true;
-            this.txt_FindStatus.Name = "txt_FindStatus";
-            this.txt_FindStatus.Size = new System.Drawing.Size(953, 187);
-            this.txt_FindStatus.TabIndex = 2;
+            this.nud_ActorLessThan.Location = new System.Drawing.Point(278, 33);
+            this.nud_ActorLessThan.Name = "nud_ActorLessThan";
+            this.nud_ActorLessThan.Size = new System.Drawing.Size(48, 21);
+            this.nud_ActorLessThan.TabIndex = 3;
+            this.nud_ActorLessThan.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
             // 
             // bc
             // 
@@ -500,6 +517,15 @@
             this.movieContainer1.Size = new System.Drawing.Size(913, 375);
             this.movieContainer1.TabIndex = 2;
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(87, 38);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(185, 12);
+            this.label3.TabIndex = 4;
+            this.label3.Text = "不统计演员人数超过此数量的影片";
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -525,6 +551,7 @@
             this.tabPage2.PerformLayout();
             this.tabPage3.ResumeLayout(false);
             this.tabPage3.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.nud_ActorLessThan)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -573,6 +600,8 @@
         private System.Windows.Forms.Button btnFind;
         private System.Windows.Forms.TextBox txt_url;
         private System.Windows.Forms.TextBox txt_FindStatus;
+        private System.Windows.Forms.NumericUpDown nud_ActorLessThan;
+        private System.Windows.Forms.Label label3;
     }
 }
 

+ 26 - 21
PicSo/Form1.cs

@@ -460,33 +460,38 @@ namespace PicSo
                 no++;
                 worker.ReportProgress(0, no.ToString() + "/" + totalNo.ToString());
                 worker.ReportProgress(0,mv.AVCode + "\t" + mv.Title);
-                Gets.MyWebClient wc = new Gets.MyWebClient();
-                wc.ReferURL = mvb.ItemURL;
-                string fn = mvb.Title + ".jpg";
-                fn = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmallImageFindInURL", Path.ChangeExtension(fn, "jpg"));
-                try
+                if (mv.Actor!=null && mv.Actor.Count <= nud_ActorLessThan.Value)
                 {
-                    if (!Directory.Exists(Path.GetDirectoryName(fn)))
+                    Gets.MyWebClient wc = new Gets.MyWebClient();
+                    wc.ReferURL = mvb.ItemURL;
+                    string fn = mvb.Title + ".jpg";
+                    fn = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmallImageFindInURL", Path.ChangeExtension(fn, "jpg"));
+                    try
                     {
-                        Directory.CreateDirectory(Path.GetDirectoryName(fn));
-                    }
-                    if (!File.Exists(fn))
-                    {
-                        wc.DownloadFile(mvb.Img_s, fn);
-                    }
-                    else
-                    {
-                        Console.WriteLine("已有封面" + fn);
-                    }
-                    worker.ReportProgress(0, mv.AVCode + "\t封面OK!");
+                        if (!Directory.Exists(Path.GetDirectoryName(fn)))
+                        {
+                            Directory.CreateDirectory(Path.GetDirectoryName(fn));
+                        }
+                        if (!File.Exists(fn))
+                        {
+                            wc.DownloadFile(mvb.Img_s, fn);
+                        }
+                        else
+                        {
+                            Console.WriteLine("已有封面" + fn);
+                        }
+                        worker.ReportProgress(0, mv.AVCode + "\t封面OK!");
 
+                    }
+                    catch
+                    { }
+                    mv.CoverFile = fn;
+                    list.Add(mv);
                 }
-                catch (Exception s)
+                else
                 {
-                    throw new Exception("下载缩略图失败!");
+                    worker.ReportProgress(0, mv.AVCode + "\t演员人数超限制\t" + mv.Title);
                 }
-                mv.CoverFile = fn;
-                list.Add(mv);
             }
             StringBuilder sb = new StringBuilder();
             foreach (AVSORTER.Movie item in list)

BIN
PicSo/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache


+ 0 - 0
read


+ 0 - 1
readme.md

@@ -1,4 +1,3 @@
 AVSorter
-========
 Html reader for arzon.jp.
 Search Japanese AV using a key-word and geting detail information.If you already have the Video file, it could move the file to some (new) folder by the video's actor,procuder etc. and save the video info at local database in order to query some time.