View Single Post
  #129  
Old 19.07.2017, 13:04
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 957
Default

Related Topic: #74182
Code:
// Extract/set package name from file name
// Tigger Required: "Packagizer Hook"
// Forum Topic: https://board.jdownloader.org/showthread.php?t=74182

var fn = link.getName();
var re = /(.+).s\d{2}e\d{2}.+/i;
var re2 = /[._]/g;
var pn = re.test(fn) ? fn.match(re)[1].replace(re2, " ") : false;

if (pn) link.setPackageName(pn);
Reply With Quote