Index: channels/youtube.py ================================================================== --- channels/youtube.py +++ channels/youtube.py @@ -110,10 +110,17 @@ "select": "=No Region|AR=Argentina|AU=Australia|AT=Austria|BE=Belgium|BR=Brazil|CA=Canada|CL=Chile|CO=Colombia|CZ=Czech Republic|EG=Egypt|FR=France|DE=Germany|GB=Great Britain|HK=Hong Kong|HU=Hungary|IN=India|IE=Ireland|IL=Israel|IT=Italy|JP=Japan|JO=Jordan|MY=Malaysia|MX=Mexico|MA=Morocco|NL=Netherlands|NZ=New Zealand|PE=Peru|PH=Philippines|PL=Poland|RU=Russia|SA=Saudi Arabia|SG=Singapore|ZA=South Africa|KR=South Korea|ES=Spain|SE=Sweden|CH=Switzerland|TW=Taiwan|AE=United Arab Emirates|US=United States", "value": "UK", "description": "Filter by region id.", "category": "auth", }, + { + "name": "youtube_wadsworth", + "type": "boolean", + "value": 0, + "description": "Apply Wadsworth constant.", + "category": "filter", + }, ] # from GET https://www.googleapis.com/youtube/v3/videoCategories?part=id%2Csnippet& videocat_id = { "Film & Animation": 1, @@ -300,11 +307,11 @@ elif "resourceId" in row["snippet"]: id = row["snippet"]["resourceId"]["videoId"] data.update(dict( url = "http://youtube.com/v/" + id, - homepage = "https://youtube.com/watch?v=" + id, + homepage = "https://youtube.com/watch?v=" + id + ("&wadsworth=1" if conf.youtube_wadsworth else ""), format = self.fmt, title = row["snippet"]["title"], )) # optional values