Skip to content

Commit

Permalink
chore: purge old code
Browse files Browse the repository at this point in the history
close: `.DS_Store` being renamed #12
  • Loading branch information
yzqzss committed Nov 20, 2023
1 parent e15aa3e commit fe99bc4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions biliarchiver/_biliarchiver_upload_bvid.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@ def _upload_bvid(

# identifier format: BiliBili-{bvid}_p{pid}-{upper_part}
upper_part = human_readable_upper_part_map(string=bvid, backward=True)
OLD_videos_basepath: Path = config.storage_home_dir / "videos" / bvid
videos_basepath: Path = config.storage_home_dir / "videos" / f"{bvid}-{upper_part}"

if os.path.exists(OLD_videos_basepath):
print(f"检测到旧的视频主目录 {OLD_videos_basepath},将其重命名为 {videos_basepath}...")
os.rename(OLD_videos_basepath, videos_basepath)

if not os.path.exists(videos_basepath):
raise VideosBasePathNotFoundError(f"{videos_basepath}")
Expand Down
9 changes: 0 additions & 9 deletions biliarchiver/archive_bvid.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,10 @@ async def archive_bvid(
) # 开个大会员呗,能下 4k 呢。
assert logined is True, _("请先检查 SESSDATA 是否过期,再将 logined 设置为 True") # 防误操作
upper_part = human_readable_upper_part_map(string=bvid, backward=True)
OLD_videos_basepath: Path = config.storage_home_dir / "videos" / bvid
videos_basepath: Path = (
config.storage_home_dir / "videos" / f"{bvid}-{upper_part}"
)

if os.path.exists(OLD_videos_basepath):
print(
_("检测到旧的视频目录 {},将其重命名为 {}...").format(
OLD_videos_basepath, videos_basepath
)
)
os.rename(OLD_videos_basepath, videos_basepath)

if os.path.exists(videos_basepath / "_all_downloaded.mark"):
# print(f"{bvid} 所有分p都已下载过了")
print(_("{} 所有分p都已下载过了").format(bvid))
Expand Down

0 comments on commit fe99bc4

Please sign in to comment.