I see the problem then: HDTV doesn't mean HD :/ A lot of hdtv are 360p and 480p.
This is how I search for quality:
Code: Select all
// 480p
if (title.match(/480[pix]/i)) {
return '480p';
}
// 720p
if (title.match(/720[pix]/i) && !title.match(/dvdrip|dvd\Wrip/i)) {
return '720p';
}
// 1080p
if (title.match(/1080[pix]/i)) {
return '1080p';
}
// not found, trying harder
if (title.match(/DSR|DVDRIP|DVD\WRIP/i)) {
return '480p';
}
if (title.match(/hdtv/i) && !title.match(/720[pix]/i)) {
return '480p';
}
return false;
Notice the last test:
Code: Select all
title.match(/hdtv/i) && !title.match(/720[pix]/i)
For all non-regex people, this means it searches in the title if it has "HTDV" (case-insensitive: "HDtv" or "hdtv" or "hDtV" works). Then, it searches if the title has "720p", "720i" or "720x". If we found "HDTV" but there is no trace of "720[pix]", it means it's 480p, which is always the case.
If all you want is finding out if it's HD or not, then simply don't try to match with /hdtv/ because it's not a trustable word.