Skip to content

Commit

Permalink
Avoid parsing of air-by-date results with non air-by-date shows
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox committed Jul 16, 2016
1 parent 2144897 commit 9dd0916
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sickbeard/name_parser/parser.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# coding=utf-8

#
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
# This file is part of Medusa.
#
# SickRage is free software: you can redistribute it and/or modify
# Medusa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickRage is distributed in the hope that it will be useful,
# Medusa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
# along with Medusa. If not, see <http://www.gnu.org/licenses/>.

from __future__ import unicode_literals

Expand Down Expand Up @@ -240,8 +240,9 @@ def _parse_string(self, name): # pylint: disable=too-many-locals, too-many-bran
new_season_numbers = []
new_absolute_numbers = []

# if we have an air-by-date show then get the real season/episode numbers
if bestResult.is_air_by_date:
# if we have an air-by-date show and the result is air-by-date,
# then get the real season/episode numbers
if bestResult.show.air_by_date and bestResult.is_air_by_date:
airdate = bestResult.air_date.toordinal()
main_db_con = db.DBConnection()
sql_result = main_db_con.select(
Expand Down

0 comments on commit 9dd0916

Please sign in to comment.