Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function IMDBName(){
- var filename = document.getElementById("torrent").value;
- var filename = filename.toString();
- var lowcase = filename.toLowerCase();
- var start = lowcase.lastIndexOf("\\"); //for Google Chrome on windows
- if (start == -1){
- start = lowcase.lastIndexOf("\/"); // for Google Chrome on linux
- if (start == -1){
- start == 0;
- }
- else{
- start = start + 1;
- }
- }
- else{
- start = start + 1;
- }
- var end = lowcase.lastIndexOf("torrent");
- var noext = filename.substring(start,end-1);
- noext = noext.toLowerCase();
- noext = noext.replace(/480p|720p|720i|1080p|1080i|x264|h.264|sd|blueray|bluray|xvid|dvd|dvdr|rip|dvd-rip|pdtv|tvrip|dsrip|webrip|proper|vcd|xxx|cam|ts|tc|scr|screen|screener|dvdscr|dvdscreen|pal|ntsc|complete|limited|extended|dc|internal|subbed|se|no|de|dutch|nordic|it|multi|multisubs|italian|german|swedish|norwegian|rated|unrated|r1|r2|r3|r4|r5|r6|repack|rerip|readnfo/g,''); //Big ass filter
- noext = noext.replace(/\./g,' ');
- noext = noext.replace(/-.*/g,'');
- noext = noext.replace(/^[ ]+|[ ]+$/g,'');
- noext = noext.replace(/\s+/g,'%20');
- return noext;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement