def short_group_names(groups):
 groups = groups.split(u',')
 shortGroupList = []
 if sickrage.srCore.ADBA_CONNECTION:
  for groupName in groups:
   try:
    group = sickrage.srCore.ADBA_CONNECTION.group(gname=groupName)
   except AniDBCommandTimeoutError:
    sickrage.srCore.srLogger.debug(u'Timeout while loading group from AniDB. Trying next group')
   except Exception:
    sickrage.srCore.srLogger.debug(u'Failed while loading group from AniDB. Trying next group')
   else:
    for line in group.datalines:
     if line[u'shortname']:
      shortGroupList.append(line[u'shortname'])
     elif (groupName not in shortGroupList):
      shortGroupList.append(groupName)
 else:
  shortGroupList = groups
 return shortGroupList

def short_group_names ( groups ) : groups = groups . split ( u',' ) shortGroupList = [ ] if sickrage . srCore . ADBA_CONNECTION : for groupName in groups : try : group = sickrage . srCore . ADBA_CONNECTION . group ( gname = groupName ) except AniDBCommandTimeoutError : sickrage . srCore . srLogger . debug ( u'Timeout while loading group from AniDB. Trying next group' ) except Exception : sickrage . srCore . srLogger . debug ( u'Failed while loading group from AniDB. Trying next group' ) else : for line in group . datalines : if line [ u'shortname' ] : shortGroupList . append ( line [ u'shortname' ] ) elif ( groupName not in shortGroupList ) : shortGroupList . append ( groupName ) else : shortGroupList = groups return shortGroupList
find anidb short group names for release groups .