reordered list

This commit is contained in:
Karl Hudgell 2024-06-21 12:16:46 +01:00
parent 7fa0a5abca
commit 94e9923d0c
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -67,7 +67,7 @@ def add_episodes_from_folder(folder_path: str, season:int) -> None:
season (int): Season number for for the podcast
"""
file_list = os.listdir(folder_path)
list_of_episodes = [x for x in file_list if "mp3" in x]
list_of_episodes = sorted([x for x in file_list if "mp3" in x], key=lambda x: int(x.split()[1].split('.')[0]))
# file_list.pop(0)
for file in list_of_episodes:
filename = file[:-4]