@xriss/weerss 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/weerss.js +26 -13
package/package.json
CHANGED
package/weerss.js
CHANGED
|
@@ -485,17 +485,25 @@ weerss.move=async function(args)
|
|
|
485
485
|
let show=await shows.get_show(base+ext)
|
|
486
486
|
if( show )
|
|
487
487
|
{
|
|
488
|
-
let xtra=""
|
|
489
|
-
if(show.year)
|
|
490
|
-
{
|
|
491
|
-
xtra=xtra+" ("+show.year+")"
|
|
492
|
-
}
|
|
493
|
-
|
|
494
488
|
let SxxExx=("S"+show.season.toString().padStart(2, "0")+"E"+show.episode.toString().padStart(2, "0") )
|
|
495
489
|
|
|
496
490
|
// console.log(base , show.tvmaze.name , show.season , show.episode)
|
|
497
|
-
let showname=show.tvmaze.name.replace(/[/\\?%*:|"<>]/g, "-") // remove problematic chars
|
|
498
|
-
|
|
491
|
+
// let showname=show.tvmaze.name.replace(/[/\\?%*:|"<>]/g, "-") // remove problematic chars
|
|
492
|
+
|
|
493
|
+
let tvname=sanitize(show.tvmaze.name,{replacement:""})
|
|
494
|
+
let country=show.tvmaze.network && show.tvmaze.network.country && show.tvmaze.network.country.code
|
|
495
|
+
let year=show.tvmaze.premiered && show.tvmaze.premiered.substr(0,4)
|
|
496
|
+
if(country)
|
|
497
|
+
{
|
|
498
|
+
tvname=tvname+" ("+country+")" // put country in dirname
|
|
499
|
+
}
|
|
500
|
+
if(year)
|
|
501
|
+
{
|
|
502
|
+
tvname=tvname+" ("+year+")" // put year in dirname
|
|
503
|
+
}
|
|
504
|
+
let esctvname=`'${tvname.replace(/'/g, `'\\''`)}'`
|
|
505
|
+
|
|
506
|
+
let to = tvname+"/Season "+show.season+"/"+tvname+" "+SxxExx+ext
|
|
499
507
|
console.log(file)
|
|
500
508
|
|
|
501
509
|
if( dest )
|
|
@@ -566,12 +574,17 @@ weerss.dirs=async function(args)
|
|
|
566
574
|
console.log(`echo ${escfile}`)
|
|
567
575
|
if( show.tvmaze )
|
|
568
576
|
{
|
|
569
|
-
|
|
570
|
-
let
|
|
571
|
-
|
|
577
|
+
//console.log(show.tvmaze)
|
|
578
|
+
let tvname=sanitize(show.tvmaze.name,{replacement:""})
|
|
579
|
+
let country=show.tvmaze.network && show.tvmaze.network.country && show.tvmaze.network.country.code
|
|
580
|
+
let year=show.tvmaze.premiered && show.tvmaze.premiered.substr(0,4)
|
|
581
|
+
if(country)
|
|
582
|
+
{
|
|
583
|
+
tvname=tvname+" ("+country+")" // put country in dirname
|
|
584
|
+
}
|
|
572
585
|
if(year)
|
|
573
586
|
{
|
|
574
|
-
tvname=tvname+" ("+year+")" //
|
|
587
|
+
tvname=tvname+" ("+year+")" // put year in dirname
|
|
575
588
|
}
|
|
576
589
|
let esctvname=`'${tvname.replace(/'/g, `'\\''`)}'`
|
|
577
590
|
let good=shows.good_show(show,weerss.config.show.rules)
|
|
@@ -593,7 +606,7 @@ weerss.dirs=async function(args)
|
|
|
593
606
|
console.log(`rm -rf ${escfile}`)
|
|
594
607
|
}
|
|
595
608
|
|
|
596
|
-
await new Promise(resolve => setTimeout(resolve, 500))
|
|
609
|
+
// await new Promise(resolve => setTimeout(resolve, 500))
|
|
597
610
|
|
|
598
611
|
}catch(e){console.log(e)}
|
|
599
612
|
}
|