def METHOD_NAME(self, targetdir):
    if not os.path.isdir(targetdir):
        raise OSError('Target directory doesn\'t exist.')
    process = Popen('7z x -y -xr!__MACOSX -xr!.DS_Store -xr!thumbs.db -xr!Thumbs.db -o"' + targetdir + '" "' +
                    self.filepath + '"', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
    process.communicate()
    if process.returncode != 0 and distro.id() == 'fedora':
        process = Popen('unrar x -y -x__MACOSX -x.DS_Store -xthumbs.db -xThumbs.db "' + self.filepath + '" "' +
                targetdir + '"', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
        process.communicate()
        if process.returncode != 0:
            raise OSError('Failed to extract archive.')
    elif process.returncode != 0 and platform.system() == 'Darwin':
        process = subprocess.run(f"unar '{self.filepath}' -f -o '{targetdir}'", 
            stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
        if process.returncode != 0:
            raise Exception(process.stdout.decode("utf-8"))
    elif process.returncode != 0:
        raise OSError('Failed to extract archive. Check if p7zip-rar is installed.')
    tdir = os.listdir(targetdir)
    if 'ComicInfo.xml' in tdir:
        tdir.remove('ComicInfo.xml')
    if len(tdir) == 1 and os.path.isdir(os.path.join(targetdir, tdir[0])):
        for f in os.listdir(os.path.join(targetdir, tdir[0])):
            move(os.path.join(targetdir, tdir[0], f), targetdir)
        os.rmdir(os.path.join(targetdir, tdir[0]))
    return targetdir