Skip to content

Commit

Permalink
Merge branch 'fix_naming_RG_empty_when_release_group_empty'
Browse files Browse the repository at this point in the history
* fix_naming_RG_empty_when_release_group_empty:
  Fix replace empty release group with SiCKBEARD
  • Loading branch information
Patrick Vos committed Apr 6, 2014
2 parents f64b94f + 30973a6 commit a211e87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sickbeard/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,13 +1529,17 @@ def _format_pattern(self, pattern=None, multi=None):
if self.show.air_by_date:
result_name = result_name.replace('%RN', '%S.N.%A.D.%E.N-SiCKBEARD')
result_name = result_name.replace('%rn', '%s.n.%A.D.%e.n-sickbeard')

else:
result_name = result_name.replace('%RN', '%S.N.S%0SE%0E.%E.N-SiCKBEARD')
result_name = result_name.replace('%rn', '%s.n.s%0se%0e.%e.n-sickbeard')

logger.log(u"Episode has no release name, replacing it with a generic one: " + result_name, logger.DEBUG)

if not replace_map['%RG']:
result_name = result_name.replace('%RG', 'SiCKBEARD')
result_name = result_name.replace('%rg', 'sickbeard')
logger.log(u"Episode has no release name, replacing it with a generic one: " + result_name, logger.DEBUG)
logger.log(u"Episode has no release group, replacing it with a generic one: " + result_name, logger.DEBUG)

# split off ep name part only
name_groups = re.split(r'[\\/]', result_name)
Expand Down

0 comments on commit a211e87

Please sign in to comment.