diff --git a/gui/slick/images/network/avrotros.png b/gui/slick/images/network/avrotros.png new file mode 100644 index 0000000000000000000000000000000000000000..f06f6bcb00f6512e527e4f9b0f290086acc192d1 Binary files /dev/null and b/gui/slick/images/network/avrotros.png differ diff --git a/gui/slick/js/core.js b/gui/slick/js/core.js index 32ba8b947abbc19be4b84b7d54ba2d762006b009..e1cb8c23f8c927a803edaac5059793fd0c72ce70 100644 --- a/gui/slick/js/core.js +++ b/gui/slick/js/core.js @@ -1626,8 +1626,8 @@ var SICKRAGE = { $('#torrent_auth_type_option').show(); } else if (selectedProvider.toLowerCase() === 'qbittorrent'){ client = 'qbittorrent'; - $('#torrent_path_option').hide(); - $('#torrent_label_option').hide(); + $('#label_warning_qbittorrent').show(); + $('#label_anime_warning_qbittorrrent').show(); $('#torrent_label_anime_option').hide(); $('#host_desc_torrent').text('URL to your qbittorrent client (e.g. http://localhost:8080)'); } else if (selectedProvider.toLowerCase() === 'mlnet'){ diff --git a/gui/slick/js/core.min.js b/gui/slick/js/core.min.js index cafbadcdf14649b20160670b8b1aeb477f850f23..8c06f8ad2a4bae5d25b12933e3defc490d19df09 100644 Binary files a/gui/slick/js/core.min.js and b/gui/slick/js/core.min.js differ diff --git a/gui/slick/js/vender.min.js b/gui/slick/js/vender.min.js index eaccd1e2eca7ca8bbe64db35dfe67708146d1e6b..67c2941115056c256e3843c86d0d820c9700fa96 100644 Binary files a/gui/slick/js/vender.min.js and b/gui/slick/js/vender.min.js differ diff --git a/gui/slick/views/config_search.mako b/gui/slick/views/config_search.mako index 6fce79b211d20566e8b6dd9711ccabb931524541..d5d87f199e82fd4f7c533fcc337d822676f60a04 100644 --- a/gui/slick/views/config_search.mako +++ b/gui/slick/views/config_search.mako @@ -565,6 +565,9 @@ <span id="label_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> </span> + <span id="label_warning_qbittorrent" style="display:none"><p>(blank spaces are not allowed)</p> + <div class="clear-left"><p>note: for QBitTorrent 3.3.1 and up</p></div> + </span> </span> </label> </div> @@ -577,6 +580,9 @@ <span id="label_anime_warning_deluge" style="display:none"><p>(blank spaces are not allowed)</p> <div class="clear-left"><p>note: label plugin must be enabled in Deluge clients</p></div> </span> + <span id="label_anime_warning_qbittorrent" style="display:none"><p>(blank spaces are not allowed)</p> + <div class="clear-left"><p>note: for QBitTorrent 3.3.1 and up </p></div> + </span> </span> </label> </div> diff --git a/lib/network_timezones/README.md b/lib/network_timezones/README.md index 17601aba297bf2f1e44aab6925b108c95d3e68e7..633853c29ace51df25c00257e2a9da109df19886 100644 --- a/lib/network_timezones/README.md +++ b/lib/network_timezones/README.md @@ -1,7 +1,7 @@ Network Timezones for Sickbeard ==================== -This holds all the timezone autoupdade info for Sickbeard. Sickbeard uses this data to display the Schedule in the local timezone. +This holds all the timezone autoupdade info for Sickbeard. Sickbeard uses this data to display the Coming Episodes in the local timezone. ---------- diff --git a/lib/network_timezones/network_timezones.txt b/lib/network_timezones/network_timezones.txt index 8ee2e8ec023684e92929283e1e183baec204f52f..7056906f8488c03adc53eeb1779a74b3df4a6cce 100644 --- a/lib/network_timezones/network_timezones.txt +++ b/lib/network_timezones/network_timezones.txt @@ -1,6 +1,7 @@ [v] (AU):Australia/Sydney [v] HITS (AU):Australia/Sydney ¡Sorpresa! (US):US/Eastern ++Globosat:America/Sao_Paulo 1+1:Europe/Kiev 111 Greats (AU):Australia/Sydney 13TH STREET (AU):Australia/Sydney @@ -49,10 +50,10 @@ ABC (JA):Asia/Tokyo ABC (PH):Asia/Manila ABC (UK):Europe/London ABC (US):US/Eastern -ABC:US/Eastern ABC Family:US/Eastern ABC News 24:Australia/Sydney abc spark (CA):Canada/Eastern +ABC:US/Eastern ABC1:Australia/Sydney ABC2:Australia/Sydney ABC3:Australia/Sydney @@ -179,6 +180,7 @@ aurora (AU):Australia/Sydney Australian Christian Channel:Australia/Sydney aux (CA):Canada/Eastern AVRO:Europe/Amsterdam +AVROTROS:Europe/Amsterdam AWE (US):US/Eastern AXN (HK):Asia/Hong_Kong AXN (JP):Asia/Tokyo @@ -191,6 +193,7 @@ AZN Television (US):US/Eastern azteca america (US):US/Eastern B4U Movies:Europe/London B4U Music:Europe/London +B92:Europe/Belgrade BabyFirstTV:US/Eastern BabyTV (UK):Europe/London Babytv (US):US/Eastern @@ -204,6 +207,7 @@ BAY NEWS 9 (US):US/Eastern Bay TV Clywd (UK):Europe/London Bay TV Liverpool (UK):Europe/London Bay TV Swansea (UK):Europe/London +BBC:Europe/London BBC ALBA:Europe/London BBC America:US/Eastern BBC Canada:Canada/Eastern @@ -235,6 +239,7 @@ BBC Three:Europe/London BBC TWO Northern Ireland:Europe/London BBC TWO Scotland:Europe/London BBC TWO Wales:Europe/London +BBC TWO:Europe/London BBC Two:Europe/London BBC UKTV (AU):Australia/Sydney BBC World News:Europe/London @@ -260,11 +265,13 @@ biTe (CA):Canada/Eastern BiZ TELEVISION (US):US/Eastern BKN (AU):Australia/Sydney blip (US):US/Eastern +Blip:US/Eastern BLISS (UK):Europe/London Bloomberg Television (UK):Europe/London Bloomberg TELEVISION (US):US/Eastern Blue Ridge Communications (US):US/Eastern -BNN:Europe/Amsterdam +BNN (NL):Europe/Amsterdam +BNN:Canada/Eastern BNT1:Europe/Sofia Book TELEVISION (CA):Canada/Eastern Boomerang (AU):Australia/Sydney @@ -278,10 +285,11 @@ Bounce TV:US/Eastern BoxNation (UK):Europe/London BR:Europe/Berlin BR-alpha:Europe/Berlin +Bravo (CA):Canada/Eastern Bravo (UK):Europe/London Bravo (US):US/Eastern -Bravo:US/Eastern Bravo!:Canada/Eastern +Bravo:US/Eastern bravotv.com (US):US/Eastern Brit Asia TV (UK):Europe/London British Eurosport 2:Europe/London @@ -304,11 +312,15 @@ Cambridge Presents (UK):Europe/London CAN TV19 (US):US/Eastern Canadian Learning Television:Canada/Eastern Canal 10 Saeta:America/Montevideo -Canal 13 (AR):AmericaArgentinaBuenos_Aires +Canal 13 (AR):America/Buenos_Aires Canal 13:America/Santiago Canal 4 Montecarlo:America/Montevideo -Canal 9 (AR):AmericaArgentinaBuenos_Aires +Canal 5:America/Mexico_City +Canal 9 (AR):America/Buenos_Aires +Canal D:Canada/Eastern Canal de las Estrellas Latinoamerica (US):US/Eastern +Canal de las Estrellas:America/Mexico_City +Canal Famille:Canada/Eastern Canal J:Europe/Paris Canal Off:America/Sao_Paulo Canal Once:America/Mexico_City @@ -334,8 +346,8 @@ Casa:Canada/Eastern CATHOLICTV (US):US/Eastern CBBC:Europe/London CBC (CA):Canada/Eastern -CBC:Canada/Eastern CBC (JP):Asia/Tokyo +CBC:Canada/Eastern CBCnews network (CA):Canada/Eastern CBeebies (US):US/Eastern CBeebies:Europe/London @@ -360,11 +372,13 @@ Celebrity Shop (UK):Europe/London Centric (US):US/Eastern Centric:US/Eastern Česká televize:Europe/Prague +Ceskoslovenská televize:Europe/Prague CGN TV (US):US/Eastern CGV:Asia/Seoul Challenge:Europe/London Channel [V]:Asia/Shanghai Channel 10 (IL):Asia/Jerusalem +Channel 101:US/Eastern Channel 2:Asia/Jerusalem Channel 3:Asia/Bangkok Channel 4:Europe/London @@ -401,6 +415,7 @@ Cine 5:Europe/Istanbul Cinelatino (US):US/Eastern Cinemax:US/Eastern Citv (UK):Europe/London +CITV:Europe/London City Channel:Europe/Dublin City:Canada/Eastern clásico TV (US):US/Eastern @@ -425,6 +440,7 @@ CNL Russian (US):US/Eastern CNN (UK):Europe/London CNN en Español (US):US/Eastern CNN:US/Eastern +CNNI:US/Eastern Colorado's Own Channel 2 (US):US/Eastern Colors (UK):Europe/London Colors:Asia/Kolkata @@ -442,9 +458,13 @@ comcast SPORTSNET NORTHWEST (US):US/Eastern comcast SPORTSNET PHILADELPHIA (US):US/Eastern Comcast Television (US):US/Eastern Comcast/Charter Sports Southeast (US):US/Eastern +Comédie !:Europe/Paris +Comédie+:Europe/Paris +Comedy (CA):Canada/Eastern Comedy Central (DE):Europe/Berlin Comedy Central (NL):Europe/Amsterdam COMEDY CENTRAL (UK):Europe/London +Comedy Central (US):US/Eastern COMEDY CENTRAL EXTRA (UK):Europe/London Comedy Central:US/Eastern comedy channel (AU):Australia/Sydney @@ -487,15 +507,19 @@ CTC:Asia/Tokyo CTi TV:Asia/Taipei CTS (TW):Asia/Taipei CTS:Asia/Tokyo +CTV (CN):Asia/Shanghai +CTV (JP):Asia/Tokyo CTV News Channel (CA):Canada/Eastern CTV two (CA):Canada/Eastern CTV:Canada/Eastern Cuatro:Europe/Madrid CÚLA4 (IE):Europe/Dublin Current TV:US/Eastern +CW Seed:US/Eastern CWSEED.com (US):US/Eastern D8:Europe/Paris DaAi TV:Asia/Taipei +Dailymotion:US/Eastern Dangerjane.tv (US):US/Eastern Dare to Dream Network (US):US/Eastern Das Erste:Europe/Berlin @@ -520,10 +544,12 @@ Deutsche Welle TV:Europe/Berlin DFamilia (US):US/Eastern Discovery Channel (Asia):Asia/Singapore Discovery CHANNEL (AU):Australia/Sydney +Discovery Channel (Australia):Australia/Sydney Discovery Channel (CA):Canada/Eastern Discovery CHANNEL (UK):Europe/London Discovery en Español (US):US/Eastern Discovery Family (US):US/Eastern +Discovery Family:US/Eastern Discovery fit&health (US):US/Eastern Discovery HD World:Asia/Singapore Discovery HISTORY (UK):Europe/London @@ -537,6 +563,7 @@ DISCOVERY SCIENCE (CA):Canada/Eastern Discovery Science (UK):Europe/London Discovery Science:US/Eastern Discovery Shed. (UK):Europe/London +Discovery Shed:Europe/London Discovery turbo MAX (AU):Australia/Sydney Discovery Turbo UK:Europe/London Discovery Turbo:US/Eastern @@ -546,12 +573,14 @@ Dish TV:US/Eastern DiSNEY CHANNEL (AU):Australia/Sydney Disney Channel (Germany):Europe/Berlin DiSNEY CHANNEL (UK):Europe/London +Disney Channel (US):US/Eastern Disney Channel:US/Eastern Disney Cinemagic:Europe/London DiSNEY Junior (AU):Australia/Sydney Disney Junior (CA):Canada/Eastern DiSNEY Junior (UK):Europe/London DiSNEY Junior (US):US/Eastern +Disney Junior:US/Eastern Disney XD (CA):Canada/Eastern DiSNEY XD (UK):Europe/London Disney XD:US/Eastern @@ -559,9 +588,12 @@ DiSNEY.com (US):US/Eastern diva tv (UK):Europe/London Divine TV (US):US/Eastern diy network (CA):Canada/Eastern +DIY Network Canada:Canada/Eastern DIY Network:US/Eastern dk4:Europe/Copenhagen DM Digital (UK):Europe/London +DMAX (DE):Europe/Berlin +DMAX (IT):Europe/Rome DMAX (UK):Europe/London DMAX:Europe/Berlin documentary (CA):Canada/Eastern @@ -592,6 +624,7 @@ E4:Europe/Dublin EBS:Asia/Seoul EBU (EU):CET ECC TV (RU):Europe/Kaliningrad +E-Channel:Asia/Seoul Eden:Europe/London één:Europe/Brussels EICB (US):US/Eastern @@ -646,12 +679,14 @@ euronews (UK):Europe/London EUROSPORT (AU):Australia/Sydney Eurosport:Europe/London EuroWorld Sport (CA):Canada/Eastern +Évasion:Canada/Eastern EWTN TV (UK):Europe/London Exitos TV (US):US/Eastern eXPO CHANNEL (AU):Australia/Sydney extra (AU):Australia/Sydney Extreme Sports Channel (UK):Europe/London Faith World TV (UK):Europe/London +Family (CA):Canada/Eastern Family Friendly Entertainment (US):US/Eastern Family Gekijou (JP):Asia/Tokyo family MOVIES (AU):Australia/Sydney @@ -661,6 +696,7 @@ FEARnet:US/Eastern FEM:Europe/London FIGHT NETWORK (CA):Canada/Eastern FIGHT NOW tv (US):US/Eastern +Filles TV:Europe/Paris FILM 4 (UK):Europe/London Fire Hit TV (UK):Europe/London Fitness Channel (UK):Europe/London @@ -687,7 +723,6 @@ FOX (PT):Europe/Lisbon Fox (SV):America/El_Salvador FOX (UK):Europe/London FOX (US):US/Eastern -FOX:US/Eastern FOX 11 (US):US/Eastern FOX 31 DENVER (US):US/Eastern FOX 32 (US):US/Eastern @@ -740,6 +775,7 @@ FOX SPORTS:Australia/Sydney FOX Traveller:Asia/Kolkata FOX Türkiye:Europe/Istanbul Fox:Europe/Rome +FOX:US/Eastern Fox8:Australia/Sydney France 2:Europe/Paris France 24 (UK):Europe/London @@ -749,6 +785,7 @@ France 5:Europe/Paris France Ô:Europe/Paris FRANCE24 (US):US/Eastern Fred TV:US/Eastern +Freeform:US/Eastern Frost Great Outdoors (US):US/Eastern FSTV (US):US/Eastern FTV:Asia/Taipei @@ -760,6 +797,7 @@ funnyordie.com (US):US/Eastern fuse:US/Eastern Fusion (US):US/Eastern FX (AU):Australia/Sydney +FX (US):US/Eastern FX CANADA:Canada/Eastern FX MOVIE CHANNEL (US):US/Eastern FX:US/Eastern @@ -768,6 +806,7 @@ fyi (CA):Canada/Eastern FYI:US/Eastern G4 Canada:Canada/Eastern G4:US/Eastern +Gaiam TV:US/Eastern Galavisión (US):US/Eastern Gamavision (MX):America/Mexico_City Game Show Network (US):US/Eastern @@ -800,6 +839,7 @@ GOLD (AU):Australia/Sydney GOLD (UK):Europe/London GOLD2 (AU):Australia/Sydney GOLF CHANNEL (US):US/Eastern +Golf Channel:US/Eastern GOLTV (US):US/Eastern Good Food (UK):Europe/London Gospel Channel (UK):Europe/London @@ -846,6 +886,7 @@ HIFI:Canada/Eastern High Street TV (UK):Europe/London Hír TV:Europe/Budapest HISTORY (AU):Australia/Sydney +History (CA):Canada/Eastern HISTORY (UK):Europe/London History en Español (US):US/Eastern History Television:Canada/Eastern @@ -874,6 +915,7 @@ Hunan TV:Asia/Shanghai IBC (PH):Asia/Manila iCHANNEL (CA):Canada/Eastern ICI Explora:Canada/Eastern +ICI Tou.tv:Canada/Eastern ICTV (AU):Australia/Sydney ICTV:Europe/Kiev Ideal Extra (UK):Europe/London @@ -898,6 +940,7 @@ INVESTIGATION DISCOVERY (UK):Europe/London Investigation Discovery:US/Eastern ion LIFE (US):US/Eastern Ion Television:US/Eastern +iQiyi:Asia/Shanghai IQRA TV (UK):Europe/London ishop tv (AU):Australia/Sydney Islam Channel (UK):Europe/London @@ -922,7 +965,9 @@ ITV1:Europe/London ITV2:Europe/London ITV3:Europe/London ITV4:Europe/London +ITV & TVE:Europe/London itvBe (UK):Europe/London +ITVBe:Europe/London ivfilms.net (US):US/Eastern Jak-TV (ID):Asia/Jakarta Jetix (NL):Europe/Amsterdam @@ -939,6 +984,7 @@ Joi:Europe/Rome jTBC:Asia/Seoul jts.tv (US):US/Eastern JUCE TV (US):US/Eastern +June:Europe/Paris Jupiter Broadcasting :US/Eastern JUS ONE (US):US/Eastern JUS PUNJABI (US):US/Eastern @@ -955,6 +1001,7 @@ Kanal 7:Europe/Istanbul Kanal A (Turkey):Europe/Istanbul Kanal D:Europe/Istanbul KARE 11 (US):US/Eastern +Kansai TV:Asia/Tokyo Kashish TV:Asia/Karachi KBS TV1:Asia/Seoul KBS TV2:Asia/Seoul @@ -1063,9 +1110,11 @@ MAX (NL):Europe/Amsterdam MBC Drama:Asia/Seoul MBC Every 1:Asia/Seoul MBC Plus Media:Asia/Seoul +MBC Queen:Asia/Seoul MBC:Asia/Seoul MBN:Asia/Seoul MBS:Asia/Tokyo +MCM:Europe/Paris MDR:Europe/Berlin MDV (AU):Australia/Sydney Mega Channel:Europe/Athens @@ -1090,6 +1139,7 @@ M-Net:Africa/Johannesburg Mnet:Asia/Seoul MNN:US/Eastern MOJO (US):US/Eastern +Mondo TV:Europe/Rome MoonTV:Europe/Helsinki More Than Movies (UK):Europe/London More4:Europe/London @@ -1113,8 +1163,8 @@ MTV (CA):Canada/Eastern MTV (FI):Europe/Helsinki MTV (UK):Europe/London MTV (US):US/Eastern -MTV:US/Eastern MTV Base:Europe/London +MTV Brazil:America/Sao_Paulo MTV Central (DE):Europe/Berlin MTV CLASSIC (AU):Australia/Sydney MTV CLASSIC (UK):Europe/London @@ -1131,10 +1181,12 @@ MTV MUSIC (UK):Europe/London MTV Nederland:Europe/Amsterdam MTV Poland:Europe/Warsaw MTV ROCKS (UK):Europe/London +MTV:US/Eastern MTV2 (CA):Canada/Eastern MTV2:US/Eastern MTV3:Europe/Helsinki mtvU (US):US/Eastern +Much (CA):Canada/Eastern Much TV:Asia/Taipei MuchMusic (CA):Canada/Eastern Multimedios Television (US):US/Eastern @@ -1154,6 +1206,7 @@ my9 (US):US/Eastern Mya:Europe/Rome MyDestination.tv (US):US/Eastern mynetworkTV (US):US/Eastern +MyNetworkTV:US/Eastern myspace.com (US):US/Eastern mystery TV (CA):Canada/Eastern MYXTV (US):US/Eastern @@ -1171,14 +1224,17 @@ NATIONAL GEOGRAPHIC CHANNEL (AU):Australia/Sydney NATIONAL GEOGRAPHIC CHANNEL (CA):Canada/Eastern National Geographic Nederland-België:Europe/Amsterdam National Jewish Television (US):US/Eastern +NAVER tvcast:Asia/Seoul NBA League Pass (US):US/Eastern NBA TV (US):US/Eastern +NBA TV:US/Eastern NBC 4 NEW YORK (US):US/Eastern NBC 4 Southern California (US):US/Eastern NBC 4 WASHINGTON D.C. (US):US/Eastern NBC 5 Chicago (US):US/Eastern NBC:US/Eastern NBCSN (US):US/Eastern +NBCSN:US/Eastern NBN (AU):Australia/Sydney NCRV:Europe/Amsterdam NDR:Europe/Berlin @@ -1221,6 +1277,7 @@ NFL Sunday Ticket (US):US/Eastern NFL Sunday Ticket Redzone (US):US/Eastern NHK World (UK):Europe/London NHK:Asia/Tokyo +NHK Animax:Asia/Tokyo NHL Center Ice (US):US/Eastern NHL NETWORK (US):US/Eastern NHNZ:Pacific/Auckland @@ -1240,8 +1297,10 @@ nickelodeon (UK):Europe/London Nickelodeon:US/Eastern nickToons (UK):Europe/London NickToons Network:US/Eastern +NickToons:US/Eastern Niconico:Asia/Tokyo Nine Network:Australia/Sydney +Nippon Television:Asia/Tokyo NITV (AU):Australia/Sydney Noggin:US/Eastern Nolife:Europe/Paris @@ -1257,6 +1316,7 @@ Nova TV (HR):Europe/Zagreb NovaTV:Europe/Sofia NPS (NL):Europe/Amsterdam NRB (US):US/Eastern +NRJ 12:Europe/Paris NRK Super:Europe/Oslo NRK1:Europe/Oslo NRK2:Europe/Oslo @@ -1266,8 +1326,11 @@ NT1:Europe/Paris NTA:Africa/Lagos NTD (AU):Australia/Sydney NTR:Europe/Amsterdam +NTV (JP):Asia/Tokyo +NTV (TW):Asia/Taipei NTV (UK):Europe/London NTV:Asia/Tokyo +n-tv:Europe/Berlin NUVOtv (US):US/Eastern NVTV (UK):Europe/London NWCN (US):US/Eastern @@ -1279,6 +1342,7 @@ OCN:Canada/Eastern OCS:Europe/Paris Oireachtas TV (IE):Europe/Dublin Olive TV (UK):Europe/London +Olive:Asia/Seoul OLN:Canada/Eastern OMNI TELEVISION (CA):Canada/Eastern Omni:Canada/Eastern @@ -1289,6 +1353,7 @@ one (AU):Australia/Sydney ONE (NZ):Pacific/Auckland One America NEWS NETWORK (US):US/Eastern One World Sport (US):US/Eastern +OnStyle:Asia/Seoul Open Heaven TV (UK):Europe/London Oprah Winfrey Network:US/Eastern Ora TV:US/Eastern @@ -1315,6 +1380,7 @@ Pac-12 Mountain (US):US/Eastern Pac-12 Network (US):US/Eastern Pac-12 Oregon (US):US/Eastern Pac-12 Washington (US):US/Eastern +Pakapaka:America/Buenos_Aires Pakistan Television Corporation (PK):Asia/Karachi palladia (US):US/Eastern Paramount Comedy:Europe/London @@ -1415,6 +1481,7 @@ RECIPE.TV (US):US/Eastern Record TV (UK):Europe/London Record:America/Sao_Paulo Red Hot TV:Europe/London +Rede Bandeirantes:America/Sao_Paulo Rede Globo:America/Sao_Paulo RedeTV! (BR):America/Sao_Paulo ReelzChannel:US/Eastern @@ -1434,6 +1501,7 @@ RIPE TV (US):US/Eastern Rishtey (UK):Europe/London RKK (NL):Europe/Amsterdam RLTV:US/Eastern +RMC Découverte:Europe/Paris rmusic TV:Europe/London rocketjump.com (US):US/Eastern Rocks & Co. (UK):Europe/London @@ -1456,6 +1524,7 @@ RT America (US):US/Eastern RT:Europe/Kaliningrad RTBF:Europe/Brussels rté jr (IE):Europe/Dublin +RTÉjr:Europe/Dublin RTÉ NEWS NOW (IE):Europe/Dublin RTÉ One:Europe/Dublin RTÉ Two:Europe/Dublin @@ -1510,6 +1579,7 @@ Sat. 1 Comedy (DE):Europe/Berlin SAT.1:Europe/Berlin SBS (AU):Australia/Sydney SBS 6:Europe/Amsterdam +SBS Plus:Asia/Seoul SBS:Asia/Seoul SBS2 (AU):Australia/Sydney SBT:America/Sao_Paulo @@ -1542,10 +1612,10 @@ Shopping Channel (CA):Canada/Eastern Show TV:Europe/Istanbul showcase (AU):Australia/Sydney Showcase (CA):Canada/Eastern -Showcase:Canada/Eastern Showcase (UK):Europe/London SHOWCASE (US):US/Eastern Showcase 2 (UK):Europe/London +Showcase:Canada/Eastern SHOWTIME BEYOND (US):US/Eastern SHOWTIME eXtreme (US):US/Eastern Showtime:US/Eastern @@ -1572,6 +1642,8 @@ Sky Atlantic HD (DE):Europe/Berlin Sky Atlantic:Europe/London Sky Box Office:Europe/London SKY Business TV (AU):Australia/Sydney +Sky Cinema (IT):Europe/Rome +Sky Cinema (UK):Europe/London Sky Cinema:Europe/London Sky Deutschland:Europe/Berlin SKY International (AU):Australia/Sydney @@ -1597,6 +1669,7 @@ sky NEWS BUSINESS (AU):Australia/Sydney Sky News Ireland:Europe/Dublin sky NEWS WEATHER (AU):Australia/Sydney Sky News:Europe/London +SKY PerfecTV!:Asia/Tokyo SKY Racing (AU):Australia/Sydney sky Real Lives (UK):Europe/London SKY Ringside (AU):Australia/Sydney @@ -1614,6 +1687,7 @@ Sky2:Europe/London Sky3:Europe/London SkyPerfecTV (JP):Asia/Tokyo Sleuth (TV):US/Eastern +Sleuth:US/Eastern Slice:Canada/Eastern Smart Live Casino (UK):Europe/London Smash Hits:Europe/London @@ -1670,6 +1744,7 @@ STAR Gold:Asia/Kolkata Star Life Ok (UK):Europe/London STAR Movies:Asia/Hong_Kong STAR News:Asia/Kolkata +STAR One:Asia/Kolkata Star Plus (UK):Europe/London STAR Plus:Asia/Kolkata STAR Sports Asia:Asia/Hong_Kong @@ -1696,6 +1771,8 @@ STQ (AU):Australia/Sydney STUDIO (AU):Australia/Sydney Studio 23:Asia/Manila STV (AU):Australia/Sydney +STV (TW):Asia/Taipei +STV (UK):Europe/London STV Edinburgh (UK):Europe/London STV Glasgow (UK):Europe/London STV:Europe/London @@ -1718,6 +1795,7 @@ Super Channel 3 (CA):Canada/Eastern Super Channel 4 (CA):Canada/Eastern Super Channel:Canada/Eastern SUPER ÉCRAN (CA):Canada/Eastern +Super Écran:Canada/Eastern Super RTL (DE):Europe/Berlin Super!:Europe/Rome Superstation WGN:US/Eastern @@ -1727,6 +1805,7 @@ SVT2:Europe/Stockholm SVT24:Europe/Stockholm SVTB:Europe/Stockholm Swarnawahini:Asia/Colombo +Swearnet:Canada/Eastern SWR:Europe/Berlin Syfy (AU):Australia/Sydney Syfy (UK):Europe/London @@ -1736,6 +1815,7 @@ Syfy:US/Eastern Syndicated (AU):Australia/Sydney Syndicated (JP):Asia/Tokyo Syndicated (UK):Europe/London +Syndicated:US/Eastern Syndication (CA):Canada/Eastern Syndication:US/Eastern tagesschau24 (DE):Europe/Berlin @@ -1749,6 +1829,7 @@ TBN Russia (US):US/Eastern TBS (DE):Europe/Berlin TBS (JP):Asia/Tokyo TBS:US/Eastern +TBS Superstation:US/Eastern TCM:Europe/London TCN (AU):Australia/Sydney TCT (US):US/Eastern @@ -1784,6 +1865,7 @@ Tempo Network (US):US/Eastern TEN Sports:Asia/Kolkata TENNIS CHANNEL (US):US/Eastern TestTube:US/Eastern +téva:Europe/Paris TevéCiudad:America/Montevideo TF1:Europe/Paris TF6 (FR):Europe/Paris @@ -1805,6 +1887,7 @@ The CW:US/Eastern The Den:Europe/Dublin The Family Channel:US/Eastern The Hub:US/Eastern +The History Channel:US/Eastern The Movie Network:Canada/Eastern The Sportsman Channel:US/Eastern The Verge:US/Eastern @@ -1850,6 +1933,7 @@ Travel + Escape (CA):Canada/Eastern travel CHANNEL (UK):Europe/London Travel Channel:US/Eastern Treehouse TV:Canada/Eastern +Trend E:Asia/Seoul Trinity Broadcasting Network (US):US/Eastern TROS:Europe/Amsterdam TRT 1:Europe/Istanbul @@ -1907,6 +1991,8 @@ TV Land:US/Eastern TV Markíza (SK):Europe/Bratislava TV Net:Europe/Istanbul TV Nova:Europe/Prague +TV One (NZ):Pacific/Auckland +TV One (US):US/Eastern TV ONE:Pacific/Auckland TV One:US/Eastern TV Osaka:Asia/Tokyo @@ -1921,8 +2007,11 @@ TV Venezuela (US):US/Eastern TV11:Europe/Stockholm TV2 (NO):Europe/Oslo TV2:Pacific/Auckland +TV3 (ES):Europe/Madrid TV3 (IE):Europe/Dublin +TV3 (NO):Europe/Oslo TV3 (NZ):Pacific/Auckland +TV3 (SE):Europe/Stockholm TV3 Puls:Europe/Copenhagen TV3:Europe/Stockholm TV3+:Europe/Copenhagen @@ -1936,8 +2025,11 @@ TV4ME (AU):Australia/Sydney TV5 Monde:Europe/Paris TV5MONDE Europe (UK):Europe/London TV6:Europe/Stockholm +TV7 (BG):Europe/Sofia +TV7 (SE):Europe/Stockholm TV7:Europe/Stockholm TV8:Europe/Stockholm +TVA (JP):Asia/Tokyo TVA:Canada/Eastern TVB Jade (HK):Asia/Hong_Kong TVB Pearl (HK):Asia/Hong_Kong @@ -1973,6 +2065,8 @@ TVP:Europe/Warsaw TVP1:Europe/Warsaw TVP2:Europe/Warsaw TVQ (AU):Australia/Sydney +TVQ (Australia):Australia/Sydney +TVQ (Japan):Asia/Tokyo TVRI:Asia/Jakarta TVS China:Asia/Shanghai TVS Sydney:Australia/Sydney @@ -1995,6 +2089,7 @@ UKTV Food:Europe/London UKTV Gold:Europe/London UKTV History:Europe/London UKTV Style:Europe/London +UKTV Yesterday:Europe/London Ülke TV:Europe/Istanbul Ummah Channel (UK):Europe/London UMP Movies (UK):Europe/London @@ -2003,6 +2098,7 @@ UND SPORTS NETWORK (US):US/Eastern unIMÁS East (US):US/Eastern UNIVERSAL CHANNEL (AU):Australia/Sydney UNIVERSAL CHANNEL (UK):Europe/London +Universal Channel:America/Sao_Paulo Universal Christian (US):US/Eastern UNIVERSAL HD (US):US/Eastern UNIVERSAL SPORTS NETWORK (US):US/Eastern @@ -2031,6 +2127,7 @@ UNTAMED SPORTS tv (US):US/Eastern UNTV (US):US/Eastern UNTV 37:Asia/Manila UP (US):US/Eastern +UP TV:US/Eastern UPN:US/Eastern USA Network:US/Eastern Ustream:US/Eastern @@ -2085,7 +2182,7 @@ W9:Europe/Paris Wah Lai Toi (MY):Asia/Kuala_Lumpur Wakker Nederland (NL):Europe/Amsterdam WAPA-TV (US):US/Eastern -Warner Channel (AR):AmericaArgentinaBuenos_Aires +Warner Channel (AR):America/Buenos_Aires Warner Channel:US/Eastern Watch:Europe/London watchmenmotioncomic.com (US):US/Eastern @@ -2115,11 +2212,13 @@ WORLD MOVIES (AU):Australia/Sydney Worship (US):US/Eastern WOW (AU):Australia/Sydney WOWOW:Asia/Tokyo +WPIX:US/Eastern WTV (AU):Australia/Sydney WWE Network (US):US/Eastern WWJ-TV Detroit (US):US/Eastern Xbox Video:US/Eastern XY TV:US/Eastern +Yahoo! Japan:Asia/Tokyo Yahoo! Screen:US/Eastern YES (US):US/Eastern yes:Asia/Jerusalem @@ -2136,6 +2235,9 @@ YourTV Manchester (UK):Europe/London youtoo SOCIAL TV (US):US/Eastern YouTube (UK):Europe/London YouTube:US/Eastern +YTV (CA):Canada/Eastern +YTV (JP):Asia/Tokyo +YTV (UK):Europe/London YTV:Canada/Eastern Z LIVING (US):US/Eastern ZDF.Kultur:Europe/Berlin @@ -2179,4 +2281,4 @@ ZUUS Latino (US):US/Eastern ערוץ 10:Asia/Jerusalem ערוץ הילדים:Asia/Jerusalem קשת:Asia/Jerusalem -רשת:Asia/Jerusalem \ No newline at end of file +רשת:Asia/Jerusalem diff --git a/lib/network_timezones/zoneinfo-2015d.tar.gz b/lib/network_timezones/zoneinfo-2015d.tar.gz deleted file mode 100644 index 2fb3727d8fcc4c190aa6558dae994c2027f52572..0000000000000000000000000000000000000000 Binary files a/lib/network_timezones/zoneinfo-2015d.tar.gz and /dev/null differ diff --git a/lib/network_timezones/zoneinfo-2015g.tar.gz b/lib/network_timezones/zoneinfo-2015g.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a56bdfa19ab3c1185fe54e281a3401ace6a1a9d3 Binary files /dev/null and b/lib/network_timezones/zoneinfo-2015g.tar.gz differ diff --git a/lib/network_timezones/zoneinfo.txt b/lib/network_timezones/zoneinfo.txt index 43c38a542e96d4bb513147290049c787f7168eb0..2e694f23381c9bc15bc491fee0f02741fb6abb7a 100644 --- a/lib/network_timezones/zoneinfo.txt +++ b/lib/network_timezones/zoneinfo.txt @@ -1 +1 @@ -zoneinfo-2015d.tar.gz 63bc91eee048e6acc2ffeb557f76d119 \ No newline at end of file +zoneinfo-2015g.tar.gz beb8b857a5eb96a759303603878a158b \ No newline at end of file diff --git a/sickbeard/clients/generic.py b/sickbeard/clients/generic.py index bcea0118ceec9836ce9ececa6917ce590555d03b..40970480a9abeaab4ebc234528d2381f5db83875 100644 --- a/sickbeard/clients/generic.py +++ b/sickbeard/clients/generic.py @@ -173,9 +173,10 @@ class GenericClient(object): logger.log(u'Calling ' + self.name + ' Client', logger.DEBUG) - if not self._get_auth(): - logger.log(self.name + u': Authentication Failed', logger.ERROR) - return r_code + if not self.auth: + if not self._get_auth(): + logger.log(self.name + u': Authentication Failed', logger.ERROR) + return r_code try: # Sets per provider seed ratio diff --git a/sickbeard/clients/qbittorrent_client.py b/sickbeard/clients/qbittorrent_client.py index a89f7ae6057d15a7f786aabb3c5f48f032520337..d68e12f75e94843318f73c11b07e6cb282199ea6 100644 --- a/sickbeard/clients/qbittorrent_client.py +++ b/sickbeard/clients/qbittorrent_client.py @@ -84,7 +84,7 @@ class qbittorrentAPI(GenericClient): if self.api > 6: self.url = self.host + 'command/setLabel' - data = {'hashes': result.hash, 'label': label} + data = {'hashes': result.hash.lower(), 'label': label} return self._request(method='post', data=data, cookies=self.session.cookies) return None @@ -94,7 +94,7 @@ class qbittorrentAPI(GenericClient): if result.priority == 1: self.url = self.host + 'command/increasePrio' - data = {'hashes': result.hash} + data = {'hashes': result.hash.lower()} return self._request(method='post', data=data, cookies=self.session.cookies) def _set_torrent_pause(self, result): diff --git a/sickbeard/dailysearcher.py b/sickbeard/dailysearcher.py index 4df2176dc326b66a7d1781990afc71fd84fe5413..0d47acd9622e033e196c161bef54b24cf4e4ae90 100644 --- a/sickbeard/dailysearcher.py +++ b/sickbeard/dailysearcher.py @@ -88,7 +88,7 @@ class DailySearcher(object): if air_time > curTime: continue - ep = show.getEpisode(int(sqlEp["season"]), int(sqlEp["episode"])) + ep = show.getEpisode(sqlEp["season"], sqlEp["episode"]) with ep.lock: if ep.season == 0: logger.log(u"New episode " + ep.prettyName() + " airs today, setting status to SKIPPED because is a special season") diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index a3670695940da91582f75e9c6399b23f17e7a569..372fd5d50cfc6427e0887c6b81cf9f9135ef76b2 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -1733,7 +1733,7 @@ def getTVDBFromID(indexer_id, indexer): tvdb_id = '' if indexer == 'IMDB': url = "http://www.thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=%s" % indexer_id - data = getURL(url, session=session) + data = getURL(url, session=session, need_bytes=True) if data is None: return tvdb_id try: @@ -1747,7 +1747,7 @@ def getTVDBFromID(indexer_id, indexer): return tvdb_id elif indexer == 'ZAP2IT': url = "http://www.thetvdb.com/api/GetSeriesByRemoteID.php?zap2it=%s" % indexer_id - data = getURL(url, session=session) + data = getURL(url, session=session, need_bytes=True) if data is None: return tvdb_id try: diff --git a/sickbeard/network_timezones.py b/sickbeard/network_timezones.py index 8fe7ee8b5974efa57c110e5507740b54eef321b7..8db68734247fc9456405a7f89bfc4bae72c06cc5 100644 --- a/sickbeard/network_timezones.py +++ b/sickbeard/network_timezones.py @@ -65,7 +65,7 @@ def update_network_dict(): existing = network in network_list if not existing: queries.append(['INSERT OR IGNORE INTO network_timezones VALUES (?,?);', [network, timezone]]) - elif network_list[network] is not timezone: + elif network_list[network] != timezone: queries.append(['UPDATE OR IGNORE network_timezones SET timezone = ? WHERE network_name = ?;', [timezone, network]]) if existing: diff --git a/sickbeard/providers/extratorrent.py b/sickbeard/providers/extratorrent.py index ba8a2e3d40c42fe24cea8c1c63db1390541e1e73..9445bdcdcee39cf2348035ab99a6d1f2f5b60bdf 100644 --- a/sickbeard/providers/extratorrent.py +++ b/sickbeard/providers/extratorrent.py @@ -19,13 +19,11 @@ import re import traceback -import xmltodict -from xml.parsers.expat import ExpatError - from sickbeard import logger from sickbeard import tvcache from sickbeard.common import USER_AGENT from sickrage.helper.common import try_int +from sickbeard.bs4_parser import BS4Parser from sickrage.providers.torrent.TorrentProvider import TorrentProvider @@ -58,17 +56,15 @@ class ExtraTorrentProvider(TorrentProvider): for mode in search_strings.keys(): logger.log(u"Search Mode: %s" % mode, logger.DEBUG) for search_string in search_strings[mode]: - if mode != 'RSS': logger.log(u"Search string: %s " % search_string, logger.DEBUG) try: self.search_params.update({'type': ('search', 'rss')[mode == 'RSS'], 'search': search_string}) - if self.custom_url: - url = self.custom_url + '/rss.xml' - data = self.get_url(url, params=self.search_params) - else: - data = self.get_url(self.urls['rss'], params=self.search_params) + + url = self.urls['rss'] if not self.custom_url else self.urls['rss'].replace(self.urls['index'], self.custom_url) + + data = self.get_url(url, params=self.search_params) if not data: logger.log(u"No data returned from provider", logger.DEBUG) continue @@ -77,45 +73,33 @@ class ExtraTorrentProvider(TorrentProvider): logger.log(u'Expected xml but got something else, is your mirror failing?', logger.INFO) continue - try: - data = xmltodict.parse(data) - except ExpatError: - logger.log(u"Failed parsing provider. Traceback: %r\n%r" % (traceback.format_exc(), data), logger.ERROR) - continue - - if not all([data, 'rss' in data, 'channel' in data['rss'], 'item' in data['rss']['channel']]): - logger.log(u"Malformed rss returned, skipping", logger.DEBUG) - continue - - # https://github.com/martinblech/xmltodict/issues/111 - entries = data['rss']['channel']['item'] - entries = entries if isinstance(entries, list) else [entries] - - for item in entries: - title = item['title'].decode('utf-8') - # info_hash = item['info_hash'] - size = int(item['size']) - seeders = try_int(item['seeders'], 0) - leechers = try_int(item['leechers'], 0) - download_url = item['enclosure']['@url'] if 'enclosure' in item else self._magnet_from_details(item['link']) - - if not all([title, download_url]): - continue - - # Filter unseeded torrent - if seeders < self.minseed or leechers < self.minleech: + with BS4Parser(data, 'html5lib') as parser: + for item in parser.findAll('item'): + title = re.sub(r'^<!\[CDATA\[|\]\]>$', '', item.find('title').text) + # info_hash = item.get('info_hash', '') + size = try_int(item.find('size').text, -1) + seeders = try_int(item.find('seeders').text) + leechers = try_int(item.find('leechers').text) + enclosure = item.find('enclosure') + download_url = enclosure['url'] if enclosure else self._magnet_from_details(item.find('link').text) + + if not all([title, download_url]): + continue + + # Filter unseeded torrent + if seeders < self.minseed or leechers < self.minleech: + if mode != 'RSS': + logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format(title, seeders, leechers), logger.DEBUG) + continue + + item = title, download_url, size, seeders, leechers if mode != 'RSS': - logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format(title, seeders, leechers), logger.DEBUG) - continue - - item = title, download_url, size, seeders, leechers - if mode != 'RSS': - logger.log(u"Found result: %s " % title, logger.DEBUG) + logger.log(u"Found result: %s " % title, logger.DEBUG) - items[mode].append(item) + items[mode].append(item) except (AttributeError, TypeError, KeyError, ValueError): - logger.log(u"Failed parsing provider. Traceback: %r" % traceback.format_exc(), logger.ERROR) + logger.log(u"Failed parsing provider. Traceback: %r" % traceback.format_exc(), logger.WARNING) # For each search mode sort all the items by seeders if available items[mode].sort(key=lambda tup: tup[3], reverse=True) diff --git a/sickbeard/providers/newznab.py b/sickbeard/providers/newznab.py index 58736c70de227522be9d0b0062fee888fe154d71..723bdffaa5cd0cba1ac8fa51760a6237969388ab 100644 --- a/sickbeard/providers/newznab.py +++ b/sickbeard/providers/newznab.py @@ -404,7 +404,7 @@ class NewznabProvider(NZBProvider): for sqlshow in sqlResults: self.show = Show.find(sickbeard.showList, int(sqlshow["showid"])) if self.show: - curEp = self.show.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) + curEp = self.show.getEpisode(sqlshow["season"], sqlshow["episode"]) searchStrings = self._get_episode_search_strings(curEp, add_string='PROPER|REPACK') for searchString in searchStrings: for item in self.search(searchString): diff --git a/sickbeard/providers/torrentz.py b/sickbeard/providers/torrentz.py index 662e8058464d25d799a3c50b4d09fdd9ac71db0e..817c6bf933ca8c3de3da53fbc88013abb881ce4e 100644 --- a/sickbeard/providers/torrentz.py +++ b/sickbeard/providers/torrentz.py @@ -18,17 +18,13 @@ # along with SickRage. If not, see <http://www.gnu.org/licenses/>. import re -import time import traceback -import xmltodict from six.moves import urllib -from xml.parsers.expat import ExpatError -import sickbeard from sickbeard import logger from sickbeard import tvcache -from sickbeard.common import cpu_presets from sickbeard.common import USER_AGENT +from sickbeard.bs4_parser import BS4Parser from sickrage.providers.torrent.TorrentProvider import TorrentProvider @@ -77,47 +73,32 @@ class TORRENTZProvider(TorrentProvider): logger.log(u'Wrong data returned from: ' + search_url, logger.DEBUG) continue - if not data.startswith('<?xml'): - logger.log(u'Expected xml but got something else, is your mirror failing?', logger.INFO) - continue - try: - data = xmltodict.parse(data) - except ExpatError: - logger.log(u"Failed parsing provider. Traceback: %r\n%r" % (traceback.format_exc(), data), logger.ERROR) - continue - - if not all([data, 'rss' in data, 'channel' in data['rss'], 'item' in data['rss']['channel']]): - logger.log(u"Malformed rss returned or no results, skipping", logger.DEBUG) - continue - - time.sleep(cpu_presets[sickbeard.CPU_PRESET]) - - # https://github.com/martinblech/xmltodict/issues/111 - entries = data['rss']['channel']['item'] - entries = entries if isinstance(entries, list) else [entries] + with BS4Parser(data, 'html5lib') as parser: + for item in parser.findAll('item'): + if item.category and 'tv' not in item.category.text: + continue - for item in entries: - if item.get('category', None) and 'tv' not in item.get('category', ''): - continue + title = item.title.text.rsplit(' ', 1)[0].replace(' ', '.') + t_hash = item.guid.text.rsplit('/', 1)[-1] - title = item.get('title', '').rsplit(' ', 1)[0].replace(' ', '.') - t_hash = item.get('guid', '').rsplit('/', 1)[-1] + if not all([title, t_hash]): + continue - if not all([title, t_hash]): - continue + # TODO: Add method to generic provider for building magnet from hash. + download_url = "magnet:?xt=urn:btih:" + t_hash + "&dn=" + title + self._custom_trackers + size, seeders, leechers = self._split_description(item.find('description').text) - # TODO: Add method to generic provider for building magnet from hash. - download_url = "magnet:?xt=urn:btih:" + t_hash + "&dn=" + title + self._custom_trackers - size, seeders, leechers = self._split_description(item.get('description', '')) + # Filter unseeded torrent + if seeders < self.minseed or leechers < self.minleech: + if mode != 'RSS': + logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format(title, seeders, leechers), logger.DEBUG) + continue - # Filter unseeded torrent - if seeders < self.minseed or leechers < self.minleech: - if mode != 'RSS': - logger.log(u"Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format(title, seeders, leechers), logger.DEBUG) - continue + items[mode].append((title, download_url, size, seeders, leechers)) - items[mode].append((title, download_url, size, seeders, leechers)) + except (AttributeError, TypeError, KeyError, ValueError): + logger.log(u"Failed parsing provider. Traceback: %r" % traceback.format_exc(), logger.WARNING) # For each search mode sort all the items by seeders if available items[mode].sort(key=lambda tup: tup[3], reverse=True) diff --git a/sickbeard/search.py b/sickbeard/search.py index 43635288ca64d014eb7ee99a69ba53d2a82c06e2..58145a60e973d7dbcd4b0cdaebd7ffd3078d30f0 100644 --- a/sickbeard/search.py +++ b/sickbeard/search.py @@ -355,7 +355,7 @@ def wantedEpisodes(show, fromDate): elif cur_quality in allowed_qualities: continue - epObj = show.getEpisode(int(result["season"]), int(result["episode"])) + epObj = show.getEpisode(result["season"], result["episode"]) epObj.wantedQuality = [i for i in all_qualities if i > cur_quality and i != common.Quality.UNKNOWN] wanted.append(epObj) @@ -372,8 +372,6 @@ def searchForNeededEpisodes(): didSearch = False - origThreadName = threading.currentThread().name - show_list = sickbeard.showList fromDate = datetime.date.fromordinal(1) episodes = [] @@ -383,13 +381,20 @@ def searchForNeededEpisodes(): sickbeard.name_cache.buildNameCache(curShow) episodes.extend(wantedEpisodes(curShow, fromDate)) + if not episodes: + # nothing wanted so early out, ie: avoid whatever abritrarily + # complex thing a provider cache update entails, for example, + # reading rss feeds + logger.log(u"No episodes needed.", logger.INFO) + return foundResults.values() + + origThreadName = threading.currentThread().name + providers = [x for x in sickbeard.providers.sortedProviderList(sickbeard.RANDOMIZE_PROVIDERS) if x.is_active() and x.enable_daily] for curProvider in providers: threading.currentThread().name = origThreadName + " :: [" + curProvider.name + "]" curProvider.cache.updateCache() - threading.currentThread().name = origThreadName - for curProvider in providers: threading.currentThread().name = origThreadName + " :: [" + curProvider.name + "]" curFoundResults = {} diff --git a/sickbeard/searchBacklog.py b/sickbeard/searchBacklog.py index be2398b002318beb9df0a5fbc496034b31d1f70f..efd21b5d517742b8c39b1e99905b30be70698eab 100644 --- a/sickbeard/searchBacklog.py +++ b/sickbeard/searchBacklog.py @@ -165,7 +165,7 @@ class BacklogSearcher(object): elif cur_quality in allowed_qualities: continue - ep_obj = show.getEpisode(int(result["season"]), int(result["episode"])) + ep_obj = show.getEpisode(result["season"], result["episode"]) if ep_obj.season not in wanted: wanted[ep_obj.season] = [ep_obj] diff --git a/sickbeard/subtitles.py b/sickbeard/subtitles.py index 4155bd8c6294e429cce8af25cf14dfae49395924..d84b0b1a9ed6cc28302af32d2850531cfed88471 100644 --- a/sickbeard/subtitles.py +++ b/sickbeard/subtitles.py @@ -497,7 +497,7 @@ class SubtitlesFinder(object): logger.log(u'Show with ID %s not found in the database' % ep_to_sub['showid'], logger.DEBUG) continue - episode_object = show_object.getEpisode(int(ep_to_sub["season"]), int(ep_to_sub["episode"])) + episode_object = show_object.getEpisode(ep_to_sub["season"], ep_to_sub["episode"]) if isinstance(episode_object, str): logger.log(u'%s S%02dE%02d not found in the database' % (ep_to_sub['show_name'], ep_to_sub['season'], ep_to_sub['episode']), logger.DEBUG) diff --git a/sickbeard/traktChecker.py b/sickbeard/traktChecker.py index d1976b88e71e2f98d5e5070cf7fc0475841da077..14d3b92e7aa00fe97f5c7a058005c7609f74db26 100644 --- a/sickbeard/traktChecker.py +++ b/sickbeard/traktChecker.py @@ -39,7 +39,7 @@ def setEpisodeToWanted(show, s, e): """ Sets an episode to wanted, only if it is currently skipped """ - epObj = show.getEpisode(int(s), int(e)) + epObj = show.getEpisode(s, e) if epObj: with epObj.lock: diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 4bb071446b08f92b62381d8b19bcaaadf926d9cc..eed757342723fc6d7c330def5cf4685029fb58e7 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -224,7 +224,7 @@ class TVShow(object): ep_list = [] for cur_result in results: - cur_ep = self.getEpisode(int(cur_result["season"]), int(cur_result["episode"])) + cur_ep = self.getEpisode(cur_result["season"], cur_result["episode"]) if not cur_ep: continue @@ -236,7 +236,7 @@ class TVShow(object): "SELECT season, episode FROM tv_episodes WHERE showid = ? AND season = ? AND location = ? AND episode != ? ORDER BY episode ASC", [self.indexerid, cur_ep.season, cur_ep.location, cur_ep.episode]) for cur_related_ep in related_eps_result: - related_ep = self.getEpisode(int(cur_related_ep["season"]), int(cur_related_ep["episode"])) + related_ep = self.getEpisode(cur_related_ep["season"], cur_related_ep["episode"]) if related_ep and related_ep not in cur_ep.relatedEps: cur_ep.relatedEps.append(related_ep) ep_list.append(cur_ep) @@ -244,6 +244,9 @@ class TVShow(object): return ep_list def getEpisode(self, season=None, episode=None, file=None, noCreate=False, absolute_number=None, forceUpdate=False): + season = try_int(season, None) + episode = try_int(episode, None) + absolute_number = try_int(absolute_number, None) # if we get an anime get the real season and episode if self.is_anime and absolute_number and not season and not episode: diff --git a/sickbeard/webapi.py b/sickbeard/webapi.py index 3d407287cae355bf86642cac9147a086b0fe164e..81d1a2ab028e0a10e6c0b54be871bd9b35a81a9f 100644 --- a/sickbeard/webapi.py +++ b/sickbeard/webapi.py @@ -789,7 +789,7 @@ class CMD_EpisodeSearch(ApiCall): return _responds(RESULT_FAILURE, msg="Show not found") # retrieve the episode object and fail if we can't get one - ep_obj = show_obj.getEpisode(int(self.s), int(self.e)) + ep_obj = show_obj.getEpisode(self.s, self.e) if isinstance(ep_obj, str): return _responds(RESULT_FAILURE, msg="Episode not found") @@ -958,7 +958,7 @@ class CMD_SubtitleSearch(ApiCall): return _responds(RESULT_FAILURE, msg="Show not found") # retrieve the episode object and fail if we can't get one - ep_obj = show_obj.getEpisode(int(self.s), int(self.e)) + ep_obj = show_obj.getEpisode(self.s, self.e) if isinstance(ep_obj, str): return _responds(RESULT_FAILURE, msg="Episode not found") diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index beed26dafef3b55db286e88916d936e93f4bc529..841fca286dc73d8f7cb70d8406327bcfb587d9c8 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -666,9 +666,9 @@ class Home(WebRoot): return "Invalid show paramaters" if absolute: - epObj = showObj.getEpisode(absolute_number=int(absolute)) + epObj = showObj.getEpisode(absolute_number=absolute) elif season and episode: - epObj = showObj.getEpisode(int(season), int(episode)) + epObj = showObj.getEpisode(season, episode) else: return "Invalid paramaters" @@ -1742,7 +1742,7 @@ class Home(WebRoot): logger.log(u"Something went wrong when trying to setStatus, epInfo[0]: %s, epInfo[1]: %s" % (epInfo[0], epInfo[1]), logger.DEBUG) continue - epObj = showObj.getEpisode(int(epInfo[0]), int(epInfo[1])) + epObj = showObj.getEpisode(epInfo[0], epInfo[1]) if not epObj: return self._genericMessage("Error", "Episode couldn't be retrieved") @@ -1913,11 +1913,11 @@ class Home(WebRoot): related_eps_result = myDB.select("SELECT season, episode FROM tv_episodes WHERE location = ? AND episode != ?", [ep_result[0]["location"], epInfo[1]]) - root_ep_obj = show_obj.getEpisode(int(epInfo[0]), int(epInfo[1])) + root_ep_obj = show_obj.getEpisode(epInfo[0], epInfo[1]) root_ep_obj.relatedEps = [] for cur_related_ep in related_eps_result: - related_ep_obj = show_obj.getEpisode(int(cur_related_ep["season"]), int(cur_related_ep["episode"])) + related_ep_obj = show_obj.getEpisode(cur_related_ep["season"], cur_related_ep["episode"]) if related_ep_obj not in root_ep_obj.relatedEps: root_ep_obj.relatedEps.append(related_ep_obj) @@ -3073,7 +3073,7 @@ class Manage(Home, WebRoot): season, episode = epResult.split('x') show = Show.find(sickbeard.showList, int(cur_indexer_id)) - show.getEpisode(int(season), int(episode)).download_subtitles() + show.getEpisode(season, episode).download_subtitles() return self.redirect('/manage/subtitleMissed/') diff --git a/sickrage/providers/torrent/TorrentProvider.py b/sickrage/providers/torrent/TorrentProvider.py index 85053687253e5a6c6e3bbe7d9dbc244dcd543b1a..e0b91945b7076427d7c201d006713306c57ea699 100644 --- a/sickrage/providers/torrent/TorrentProvider.py +++ b/sickrage/providers/torrent/TorrentProvider.py @@ -54,7 +54,7 @@ class TorrentProvider(GenericProvider): show = Show.find(sickbeard.showList, int(result['showid'])) if show: - episode = show.getEpisode(int(result['season']), int(result['episode'])) + episode = show.getEpisode(result['season'], result['episode']) for term in self.proper_strings: search_strings = self._get_episode_search_strings(episode, add_string=term)