@xriss/weerss 0.0.16 → 0.0.18
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/shows.js +14 -20
- package/weerss.js +4 -0
package/package.json
CHANGED
package/shows.js
CHANGED
|
@@ -253,13 +253,18 @@ if(weerss.config.debug)
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
// is this show good?
|
|
256
|
-
shows.good_show=function(show,rules)
|
|
256
|
+
shows.good_show=function(show,rules,moretags)
|
|
257
257
|
{
|
|
258
258
|
if( !rules ) { return true }
|
|
259
259
|
|
|
260
260
|
let tvmaze=show.tvmaze||{}
|
|
261
261
|
|
|
262
262
|
let flags={}
|
|
263
|
+
if( tvmaze.schedule && tvmaze.schedule.days )
|
|
264
|
+
{
|
|
265
|
+
if( tvmaze.schedule.days.length > 1 ) // flag as soapie if multiple days a week
|
|
266
|
+
{ flags[ "soapie" ]=true }
|
|
267
|
+
}
|
|
263
268
|
if( tvmaze.language ) { flags[ tvmaze.language.trim().toLowerCase() ]=true }
|
|
264
269
|
if( tvmaze.type ) { flags[ tvmaze.type.trim().toLowerCase() ]=true }
|
|
265
270
|
if( tvmaze.genres )
|
|
@@ -267,6 +272,13 @@ shows.good_show=function(show,rules)
|
|
|
267
272
|
{
|
|
268
273
|
flags[ genre.trim().toLowerCase() ]=true
|
|
269
274
|
}
|
|
275
|
+
if( moretags )
|
|
276
|
+
{
|
|
277
|
+
for( let tag of moretags )
|
|
278
|
+
{
|
|
279
|
+
flags[ tag.trim().toLowerCase() ]=true
|
|
280
|
+
}
|
|
281
|
+
}
|
|
270
282
|
|
|
271
283
|
return check_flags(flags,rules)
|
|
272
284
|
}
|
|
@@ -274,23 +286,5 @@ shows.good_show=function(show,rules)
|
|
|
274
286
|
// is this episode good?
|
|
275
287
|
shows.good_episode=function(show,rules)
|
|
276
288
|
{
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
let tvmaze=show.tvmaze||{}
|
|
280
|
-
let flags={}
|
|
281
|
-
|
|
282
|
-
if( tvmaze.language ) { flags[ tvmaze.language.trim().toLowerCase() ]=true }
|
|
283
|
-
if( tvmaze.type ) { flags[ tvmaze.type.trim().toLowerCase() ]=true }
|
|
284
|
-
if( tvmaze.genres )
|
|
285
|
-
for( let genre of tvmaze.genres || [] )
|
|
286
|
-
{
|
|
287
|
-
flags[ genre.trim().toLowerCase() ]=true
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
for( let tag of show.tags || [] )
|
|
291
|
-
{
|
|
292
|
-
flags[ tag.trim().toLowerCase() ]=true
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
return check_flags(flags,rules)
|
|
289
|
+
return shows.good_show( show , rules , show.tags )
|
|
296
290
|
}
|
package/weerss.js
CHANGED
|
@@ -501,10 +501,12 @@ weerss.move=async function(args)
|
|
|
501
501
|
let tvname=sanitize(show.tvmaze.name,{replacement:""})
|
|
502
502
|
let country=show.tvmaze.network && show.tvmaze.network.country && show.tvmaze.network.country.code
|
|
503
503
|
let year=show.tvmaze.premiered && show.tvmaze.premiered.substr(0,4)
|
|
504
|
+
/*
|
|
504
505
|
if(country)
|
|
505
506
|
{
|
|
506
507
|
tvname=tvname+" ("+country+")" // put country in dirname
|
|
507
508
|
}
|
|
509
|
+
*/
|
|
508
510
|
if(year)
|
|
509
511
|
{
|
|
510
512
|
tvname=tvname+" ("+year+")" // put year in dirname
|
|
@@ -586,10 +588,12 @@ weerss.dirs=async function(args)
|
|
|
586
588
|
let tvname=sanitize(show.tvmaze.name,{replacement:""})
|
|
587
589
|
let country=show.tvmaze.network && show.tvmaze.network.country && show.tvmaze.network.country.code
|
|
588
590
|
let year=show.tvmaze.premiered && show.tvmaze.premiered.substr(0,4)
|
|
591
|
+
/*
|
|
589
592
|
if(country)
|
|
590
593
|
{
|
|
591
594
|
tvname=tvname+" ("+country+")" // put country in dirname
|
|
592
595
|
}
|
|
596
|
+
*/
|
|
593
597
|
if(year)
|
|
594
598
|
{
|
|
595
599
|
tvname=tvname+" ("+year+")" // put year in dirname
|