@xriss/weerss 0.0.15 → 0.0.16
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 +17 -9
package/package.json
CHANGED
package/weerss.js
CHANGED
|
@@ -288,16 +288,20 @@ weerss.getlist=async function()
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
for( let idx=bucket.length-1 ; idx
|
|
291
|
+
for( let idx=bucket.length-1 ; idx>=0 ; idx-- ) // remove huge/small files
|
|
292
292
|
{
|
|
293
|
-
|
|
293
|
+
let it=bucket[ idx ]
|
|
294
|
+
if( it && it.torrent && it.torrent.file_length )
|
|
294
295
|
{
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
if( it.torrent.file_length > weerss.config.episode.maxsize ) // 3GB
|
|
297
|
+
{
|
|
298
|
+
bucket.splice( idx , 1 )
|
|
299
|
+
}
|
|
297
300
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
if( it.torrent.file_length < weerss.config.episode.minsize ) // 3GB
|
|
302
|
+
{
|
|
303
|
+
bucket.splice( idx , 1 )
|
|
304
|
+
}
|
|
301
305
|
}
|
|
302
306
|
}
|
|
303
307
|
|
|
@@ -305,14 +309,18 @@ weerss.getlist=async function()
|
|
|
305
309
|
if( weerss.config.episode.best == "small" )
|
|
306
310
|
{
|
|
307
311
|
bucket.sort(function(a,b){
|
|
308
|
-
|
|
312
|
+
let al=(a && a.torrent && a.torrent.file_length) || 0
|
|
313
|
+
let bl=(b && b.torrent && b.torrent.file_length) || 0
|
|
314
|
+
return al - bl
|
|
309
315
|
})
|
|
310
316
|
}
|
|
311
317
|
else
|
|
312
318
|
if( weerss.config.episode.best == "large" )
|
|
313
319
|
{
|
|
314
320
|
bucket.sort(function(a,b){
|
|
315
|
-
|
|
321
|
+
let al=(a && a.torrent && a.torrent.file_length) || 0
|
|
322
|
+
let bl=(b && b.torrent && b.torrent.file_length) || 0
|
|
323
|
+
return bl - al
|
|
316
324
|
})
|
|
317
325
|
}
|
|
318
326
|
else
|