qiushang před 4 měsíci
rodič
revize
a2e53f9cce
1 změnil soubory, kde provedl 13 přidání a 4 odebrání
  1. 13 4
      src/renderer/components/home.vue

+ 13 - 4
src/renderer/components/home.vue

@@ -282,6 +282,7 @@
 					}
 					await this.downloadImage(url, outputPath, item);
 					item.loading = false;
+					this.$forceUpdate();
 					this.$message({message: '恭喜你,下载已完成!', type: 'success'});
 					electronApi.call('showItemInfolder',[this.downloadDir + separator + pjson.softInfo.softName +'\\tty.tty']);
 					return false;
@@ -311,6 +312,7 @@
 						let outData = res.stdout ? res.stdout.toString() : '{}';
 						item.status = '3';
 						item.loading = false;
+						this.$forceUpdate();
 						if(Number(this.usageTimes) >= 1){
 							let data = Number(this.usageTimes) - 1;
 							this.usageTimes -= 1;
@@ -326,6 +328,7 @@
 					}).catch(err =>{
 						item.status = '4';
 						item.loading = false;
+						this.$forceUpdate();
 						console.log(err);
 					})
 				}
@@ -371,7 +374,7 @@
 					}).catch(err =>{
 						this.parseLoading = false;
 						this.tabLoading = false;
-						// console.log('err1',err.stderr.toString());
+						console.log('err1',err.stderr.toString());
 						let errStr = err.stderr.toString();
 						if(errStr.indexOf('Unsupported URL') > -1){
 							this.videoParsing(formatUrl);
@@ -594,8 +597,6 @@
 								this.videoList.push(vinfo);
 							}
 							
-							console.log(this.videoList);
-							
 							this.parseLoading = false;
 							this.tabLoading = false;
 						}catch(e){
@@ -735,7 +736,7 @@
 										videoArr.map((item, index) => {
 											let vinfo = {
 												title: title,
-												tag: '',
+												tag: 'other',
 												format_id: index,
 												ext: 'mp4',
 												resolution: '-',
@@ -747,9 +748,17 @@
 												status: '1',
 												loading: false
 											}
+											
+											for(let j = 0; j < this.videoList.length; j++){
+												if(this.videoList.urlList[0] == item){
+													
+												}
+											}
 											this.videoList.push(vinfo);
 										});
 									}
+									
+									console.log(this.videoList);
 									await page.close();
 									this.parseLoading = false;
 									this.tabLoading = false;