File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ export default {
7474 document . documentElement . appendChild ( div ) ;
7575
7676 const formatter = UfsGlobal . Utils . getNumberFormatter ( "compactShort" ) ;
77+ function getNow ( ) {
78+ // return year + month + day + hour + minute + second
79+ const day = new Date ( ) ;
80+ return (
81+ [ day . getFullYear ( ) , day . getMonth ( ) + 1 , day . getDate ( ) ] . join ( "-" ) +
82+ "_" +
83+ [ day . getHours ( ) , day . getMinutes ( ) , day . getSeconds ( ) ] . join ( "-" )
84+ ) ;
85+ }
7786
7887 const app = new Vue ( {
7988 template : /*html*/ `
@@ -290,7 +299,7 @@ export default {
290299 if ( ! total ) return ;
291300 let success = 0 ;
292301 await download ( {
293- folderName : "tiktok_videos" ,
302+ folderName : "tiktok_videos_" + getNow ( ) ,
294303 expectBlobTypes : [ "video/mp4" , "image/jpeg" ] ,
295304 data : this . videoToDownload
296305 . map ( ( _ , i ) => {
@@ -345,7 +354,7 @@ export default {
345354 if ( ! total ) return ;
346355 let success = 0 ;
347356 await download ( {
348- folderName : "tiktok_musics" ,
357+ folderName : "tiktok_musics_" + getNow ( ) ,
349358 data : this . audioToDownload . map ( ( _ , i ) => ( {
350359 url : _ . music . playUrl ,
351360 filename :
You can’t perform that action at this time.
0 commit comments