def populate_entry_fields(entry, parser, config):
 entry[u'series_parser'] = copy(parser)
 entry[u'series_name'] = parser.name
 if ((u'quality' in entry) and (entry[u'quality'] != parser.quality)):
  log.verbose((u'Found different quality for %s. Was %s, overriding with %s.' % (entry[u'title'], entry[u'quality'], parser.quality)))
 entry[u'quality'] = parser.quality
 entry[u'proper'] = parser.proper
 entry[u'proper_count'] = parser.proper_count
 entry[u'release_group'] = parser.group
 if (parser.id_type == u'ep'):
  entry[u'series_season'] = parser.season
  entry[u'series_episode'] = parser.episode
 elif (parser.id_type == u'date'):
  entry[u'series_date'] = parser.id
  entry[u'series_season'] = parser.id.year
 else:
  entry[u'series_season'] = time.gmtime().tm_year
 entry[u'series_episodes'] = parser.episodes
 entry[u'series_id'] = parser.pack_identifier
 entry[u'series_id_type'] = parser.id_type
 if config:
  if (u'path' in config):
   log.debug(u'setting %s custom path to %s', entry[u'title'], config.get(u'path'))
   config.setdefault(u'set', {}).update(path=config[u'path'])
  if (u'set' in config):
   set = plugin.get_plugin_by_name(u'set')
   set.instance.modify(entry, config.get(u'set'))

def populate_entry_fields ( entry , parser , config ) : entry [ u'series_parser' ] = copy ( parser ) entry [ u'series_name' ] = parser . name if ( ( u'quality' in entry ) and ( entry [ u'quality' ] != parser . quality ) ) : log . verbose ( ( u'Found different quality for %s. Was %s, overriding with %s.' % ( entry [ u'title' ] , entry [ u'quality' ] , parser . quality ) ) ) entry [ u'quality' ] = parser . quality entry [ u'proper' ] = parser . proper entry [ u'proper_count' ] = parser . proper_count entry [ u'release_group' ] = parser . group if ( parser . id_type == u'ep' ) : entry [ u'series_season' ] = parser . season entry [ u'series_episode' ] = parser . episode elif ( parser . id_type == u'date' ) : entry [ u'series_date' ] = parser . id entry [ u'series_season' ] = parser . id . year else : entry [ u'series_season' ] = time . gmtime ( ) . tm_year entry [ u'series_episodes' ] = parser . episodes entry [ u'series_id' ] = parser . pack_identifier entry [ u'series_id_type' ] = parser . id_type if config : if ( u'path' in config ) : log . debug ( u'setting %s custom path to %s' , entry [ u'title' ] , config . get ( u'path' ) ) config . setdefault ( u'set' , { } ) . update ( path = config [ u'path' ] ) if ( u'set' in config ) : set = plugin . get_plugin_by_name ( u'set' ) set . instance . modify ( entry , config . get ( u'set' ) )
populates all series_fields for given entry based on parser .