Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
episode parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ninthy committed Oct 16, 2021
1 parent daa8b12 commit 411541e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@
selected_episode_answers = prompt(q.get_select_episodes_question(selected_season["episodes"]))["selected_episodes"]
if len(selected_episode_answers) == 0:
continue
first_index = int(selected_episode_answers[0][0]) - 1
last_index = int(selected_episode_answers[-1][0]) + 1
total_episodes = selected_season["episodes"][first_index:last_index]


episodes = selected_season["episodes"]
selected_res_answer = prompt(q.get_select_res_question())["selected_res"]
total_episodes = []
for episode in episodes:
for i in selected_episode_answers:
idx = int(i[0])
if int(episode["sequence"]) == idx:
total_episodes.append(episode)
continue

episodes = diziroll.get_episodes_from_season(total_episodes, selected_res_answer, selected_season)
if not is_downloadable:
query = "mpv "+' '.join([('--{ "' +i[0]+'" --sub-files="' + i[1] + '" --force-media-title="' +i[2]+ '" --term-playing-msg="'+i[2] + '" --title="'+i[2] +'" --}') for i in episodes])
Expand Down

0 comments on commit 411541e

Please sign in to comment.