'For a given file path searches for files with the same name but different extension and returns their absolute paths
:param subfolders:
:param subtitles_only:
:param file_path: The file to check for associated files
:param base_name_only: False add extra \'.\' (conservative search) to file_path minus extension
:return: A list containing all files which are associated to the given file'

def list_associated_files(self, file_path, base_name_only=False, subtitles_only=False, subfolders=False):

    def recursive_glob(treeroot, pattern):
        results = []
        for (base, _, files) in os.walk(treeroot):
            goodfiles = fnmatch.filter(files, pattern)
            results.extend((os.path.join(base, f) for f in goodfiles))
        return results
    if (not file_path):
        return []
    globbable_file_path = fixGlob(file_path)
    file_path_list = []
    if subfolders:
        base_name = os.path.basename(globbable_file_path).rpartition(u'.')[0]
    else:
        base_name = globbable_file_path.rpartition(u'.')[0]
    if (not base_name_only):
        base_name += u'.'
    if (not base_name):
        return []
    if subfolders:
        filelist = recursive_glob(os.path.dirname(globbable_file_path), (base_name + u'*'))
    else:
        filelist = []
        checklist = glob.glob(os.path.join(os.path.dirname(globbable_file_path), u'*'))
        for filefound in checklist:
            file_name = filefound.rpartition(u'.')[0]
            if (not base_name_only):
                file_name += u'.'
            if (file_name.lower() == base_name.lower().replace(u'[[]', u'[').replace(u'[]]', u']')):
                filelist.append(filefound)
    for associated_file_path in filelist:
        if (associated_file_path == file_path):
            continue
        if (subtitles_only and (not (associated_file_path[(len(associated_file_path) - 3):] in subtitle_extensions))):
            continue
        if re.search(u'(^.+\\.(rar|r\\d+)$)', associated_file_path):
            continue
        if os.path.isfile(associated_file_path):
            file_path_list.append(associated_file_path)
    if file_path_list:
        self._log((u'Found    the    following    associated    files:    ' + str(file_path_list)), sickrage.srCore.srLogger.DEBUG)
    else:
        self._log(u'No    associated    files    were    during    this    pass', sickrage.srCore.srLogger.DEBUG)
    return file_path_list
