Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Changes to allow for 1080p WEB-DLs #499

Closed
wants to merge 1 commit into from

5 participants

@Mochaka

Allow users to download 1080p WEB-DL releases, as they are now going to be released regularly.

@Amelandbor

This would be great to have. For updating the db you have to add a class to maindb.py if I read the code correctly.

@pokonski

So it's just a matter of modifying the "quality" column in the "history" SQLite table?

@thezoggy

thats one piece of the puzzle.. other is the ep composite quality.. can see where im at with it so far: http://sickbeard.com/forums/viewtopic.php?f=8&t=5188&start=30#p24646

@pokonski

Sweet, will test your branch :)

@thezoggy

This pull request should be closed. as Pull #564 is what should be used

@midgetspy midgetspy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 4, 2012
  1. Changes to allow for 1080p WEB-DLs

    Mochaka authored
This page is out of date. Refresh to see the latest.
View
8 data/interfaces/default/apiBuilder.tmpl
@@ -190,14 +190,15 @@ addList("show.setquality", "$curShow.name", "&tvdbid=$curShow.tvdbid", "quality"
//build out generic quality options
addOptGroup("quality", "Quality Templates");
addOption("quality", "SD", "&initial=sdtv|sddvd");
-addOption("quality", "HD", "&initial=hdtv|hdwebdl|hdbluray");
-addOption("quality", "ANY", "&initial=sdtv|sddvd|hdtv|hdwebdl|hdbluray|unknown");
+addOption("quality", "HD", "&initial=hdtv|hdwebdl|fullhdwebdl|hdbluray");
+addOption("quality", "ANY", "&initial=sdtv|sddvd|hdtv|hdwebdl|fullhdwebdl|hdbluray|unknown");
endOptGroup("quality");
addOptGroup("quality", "Inital (Custom)");
addList("quality", "SD TV", "&initial=sdtv", "quality-archive");
addList("quality", "SD DVD", "&initial=sddvd", "quality-archive");
addList("quality", "HD TV", "&initial=hdtv", "quality-archive");
addList("quality", "720p Web-DL", "&initial=hdwebdl", "quality-archive");
+addList("quality", "1080p Web-DL", "&initial=fullhdwebdl", "quality-archive");
addList("quality", "720p BluRay", "&initial=hdbluray", "quality-archive");
addList("quality", "1080p BluRay", "&initial=fullhdbluray", "quality-archive");
addList("quality", "Unknown", "&initial=unknown", "quality-archive");
@@ -212,12 +213,13 @@ addOptGroup("quality-archive", "Archive (Custom)");
addList("quality-archive", "SD DVD", "&archive=sddvd");
addList("quality-archive", "HD TV", "&archive=hdtv");
addList("quality-archive", "720p Web-DL", "&archive=hdwebdl");
+addList("quality-archive", "1080p Web-DL", "&archive=fullhdwebdl");
addList("quality-archive", "720p BluRay", "&archive=hdbluray");
addList("quality-archive", "1080p BluRay", "&archive=fullhdbluray");
addList("quality-archive", "Unknown", "&archive=unknown");
endOptGroup("quality-archive");
addOptGroup("quality-archive", "Random (Custom)");
-addList("quality-archive", "HD TV/1080p BluRay", "&archive=hdtv|fullhdbluray");
+addList("quality-archive", "HD TV/1080p BluRay/WEB-DL", "&archive=hdtv|fullhdbluray|fullhdwebdl");
addList("quality-archive", "720p Web-DL/720p BluRay", "&archive=hdwebdl|hdbluray");
endOptGroup("quality-archive");
View
10 sickbeard/common.py
@@ -73,8 +73,10 @@ class Quality:
SDDVD = 1<<1 # 2
HDTV = 1<<2 # 4
HDWEBDL = 1<<3 # 8
- HDBLURAY = 1<<4 # 16
- FULLHDBLURAY = 1<<5 # 32
+ FULLHDWEBDL = 1<<4 # 16
+ HDBLURAY = 1<<5 # 32
+ FULLHDBLURAY = 1<<6 # 64
+
# put these bits at the other end of the spectrum, far enough out that they shouldn't interfere
UNKNOWN = 1<<15
@@ -85,6 +87,7 @@ class Quality:
SDDVD: "SD DVD",
HDTV: "HD TV",
HDWEBDL: "720p WEB-DL",
+ FULLHDWEBDL: "1080p WEB-DL",
HDBLURAY: "720p BluRay",
FULLHDBLURAY: "1080p BluRay"}
@@ -145,6 +148,8 @@ def nameQuality(name):
return Quality.HDTV
elif checkName(["720p", "web.dl"], all) or checkName(["720p", "itunes", "h.?264"], all):
return Quality.HDWEBDL
+ elif checkName(["1080p", "web.dl"], all) or checkName(["1080p", "itunes", "h.?264"], all):
+ return Quality.FULLHDWEBDL
elif checkName(["720p", "bluray", "x264"], all) or checkName(["720p", "hddvd", "x264"], all):
return Quality.HDBLURAY
elif checkName(["1080p", "bluray", "x264"], all) or checkName(["1080p", "hddvd", "x264"], all):
@@ -195,6 +200,7 @@ def statusFromName(name, assume=True):
Quality.SNATCHED_PROPER = [Quality.compositeStatus(SNATCHED_PROPER, x) for x in Quality.qualityStrings.keys()]
HD = Quality.combineQualities([Quality.HDTV, Quality.HDWEBDL, Quality.HDBLURAY], [])
+FULLHD = Quality.combineQualities([Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], [])
SD = Quality.combineQualities([Quality.SDTV, Quality.SDDVD], [])
ANY = Quality.combineQualities([Quality.SDTV, Quality.SDDVD, Quality.HDTV, Quality.HDWEBDL, Quality.HDBLURAY, Quality.UNKNOWN], [])
BEST = Quality.combineQualities([Quality.SDTV, Quality.HDTV, Quality.HDWEBDL], [Quality.HDTV])
View
15 sickbeard/providers/newzbin.py
@@ -102,6 +102,8 @@ def getQuality(self, item):
quality = Quality.HDTV
elif self._is_WEBDL(attr_dict):
quality = Quality.HDWEBDL
+ elif self._is_FULLWEBDL(attr_dict):
+ quality = Quality.FULLHDWEBDL
elif self._is_720pBluRay(attr_dict):
quality = Quality.HDBLURAY
elif self._is_1080pBluRay(attr_dict):
@@ -172,6 +174,19 @@ def _is_WEBDL(self, attrs):
return video_fmt and source and subs
+ def _is_FULLWEBDL(self, attrs):
+
+ # Video Fmt: H.264/x264, 720p
+ video_fmt = 'Video Fmt' in attrs and ('H.264/x264' in attrs['Video Fmt']) \
+ and ('1080p' in attrs['Video Fmt'])
+
+ # Source: WEB-DL
+ source = 'Source' in attrs and 'WEB-DL' in attrs['Source']
+
+ # Subtitles: (None)
+ subs = 'Subtitles' not in attrs
+
+ return video_fmt and source and subs
def _is_720pBluRay(self, attrs):
# Video Fmt: H.264/x264, 720p
View
23 sickbeard/webapi.py
@@ -606,6 +606,7 @@ def _getQualityMap():
Quality.SDDVD: 'sddvd',
Quality.HDTV: 'hdtv',
Quality.HDWEBDL: 'hdwebdl',
+ Quality.FULLHDWEBDL: 'fullhdwebdl',
Quality.HDBLURAY: 'hdbluray',
Quality.FULLHDBLURAY: 'fullhdbluray',
Quality.UNKNOWN: 'unknown',
@@ -1529,8 +1530,8 @@ class CMD_SickBeardSetDefaults(ApiCall):
def __init__(self, args, kwargs):
# required
# optional
- self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
- self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
self.future_show_paused, args = self.check_params(args, kwargs, "future_show_paused", None, False, "bool", [])
self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", None, False, "bool", [])
self.status, args = self.check_params(args, kwargs, "status", None, False, "string", ["wanted", "skipped", "archived", "ignored"])
@@ -1544,6 +1545,7 @@ def run(self):
'sddvd': Quality.SDDVD,
'hdtv': Quality.HDTV,
'hdwebdl': Quality.HDWEBDL,
+ 'fullhdwebdl': Quality.FULLHDWEBDL,
'hdbluray': Quality.HDBLURAY,
'fullhdbluray': Quality.FULLHDBLURAY,
'unknown': Quality.UNKNOWN,
@@ -1679,8 +1681,8 @@ def __init__(self, args, kwargs):
self.location, args = self.check_params(args, kwargs, "location", None, True, "string", [])
self.tvdbid, args = self.check_params(args, kwargs, "tvdbid", None, True, "int", [])
# optional
- self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
- self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, "bool", [])
# super, missing, help
ApiCall.__init__(self, args, kwargs)
@@ -1708,6 +1710,7 @@ def run(self):
'sddvd': Quality.SDDVD,
'hdtv': Quality.HDTV,
'hdwebdl': Quality.HDWEBDL,
+ 'fullhdwebdl': Quality.FULLHDWEBDL,
'hdbluray': Quality.HDBLURAY,
'fullhdbluray': Quality.FULLHDBLURAY,
'unknown': Quality.UNKNOWN,
@@ -1756,8 +1759,8 @@ def __init__(self, args, kwargs):
self.tvdbid, args = self.check_params(args, kwargs, "tvdbid", None, True, "int", [])
# optional
self.location, args = self.check_params(args, kwargs, "location", None, False, "string", [])
- self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
- self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
self.flatten_folders, args = self.check_params(args, kwargs, "flatten_folders", str(sickbeard.FLATTEN_FOLDERS_DEFAULT), False, "bool", [])
self.status, args = self.check_params(args, kwargs, "status", None, False, "string", ["wanted", "skipped", "archived", "ignored"])
self.lang, args = self.check_params(args, kwargs, "lang", "en", False, "string", self.valid_languages.keys())
@@ -1786,6 +1789,7 @@ def run(self):
'sddvd': Quality.SDDVD,
'hdtv': Quality.HDTV,
'hdwebdl': Quality.HDWEBDL,
+ 'fullhdwebdl': Quality.FULLHDWEBDL,
'hdbluray': Quality.HDBLURAY,
'fullhdbluray': Quality.FULLHDBLURAY,
'unknown': Quality.UNKNOWN,
@@ -2140,8 +2144,8 @@ def __init__(self, args, kwargs):
# optional
# this for whatever reason removes hdbluray not sdtv... which is just wrong. reverting to previous code.. plus we didnt use the new code everywhere.
# self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", _getQualityMap().values()[1:])
- self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
- self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.initial, args = self.check_params(args, kwargs, "initial", None, False, "list", ["sdtv", "sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
+ self.archive, args = self.check_params(args, kwargs, "archive", None, False, "list", ["sddvd", "hdtv", "hdwebdl", "fullhdwebdl", "hdbluray", "fullhdbluray", "unknown", "any"])
# super, missing, help
ApiCall.__init__(self, args, kwargs)
@@ -2161,6 +2165,7 @@ def run(self):
"sddvd",
"hdtv",
"hdwebdl",
+ "fullhdwebdl",
"hdbluray",
"unknown"
],
@@ -2170,6 +2175,7 @@ def run(self):
4,
8,
16,
+ 32,
32768
],
"newQuality": 32799
@@ -2179,6 +2185,7 @@ def run(self):
'sddvd': Quality.SDDVD,
'hdtv': Quality.HDTV,
'hdwebdl': Quality.HDWEBDL,
+ 'fullhdwebdl': Quality.FULLHDWEBDL,
'hdbluray': Quality.HDBLURAY,
'fullhdbluray': Quality.FULLHDBLURAY,
'unknown': Quality.UNKNOWN,
Something went wrong with that request. Please try again.