core.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:axel 作者: craigcabrey 项目源码 文件源码
def handle_sonarr(torrent):
    for index, file in torrent.files().items():
        file_path = os.path.join(torrent.downloadDir, file['name'])
        if file_path.endswith('rar'):
            with tempfile.TemporaryDirectory() as temp_dir:
                paths = extract(file_path, temp_dir)

                if paths:
                    # Move extracted files to sonarr drone factory
                    for path in paths:
                        shutil.chown(path, group=plex_group)
                        os.chmod(path, 0o664)
                        shutil.move(path, drone_factory)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号