reordered list
This commit is contained in:
parent
7fa0a5abca
commit
94e9923d0c
@ -67,7 +67,7 @@ def add_episodes_from_folder(folder_path: str, season:int) -> None:
|
|||||||
season (int): Season number for for the podcast
|
season (int): Season number for for the podcast
|
||||||
"""
|
"""
|
||||||
file_list = os.listdir(folder_path)
|
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)
|
# file_list.pop(0)
|
||||||
for file in list_of_episodes:
|
for file in list_of_episodes:
|
||||||
filename = file[:-4]
|
filename = file[:-4]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user