Skip to content

Commit

Permalink
add Doodstream and SpeedFiles to menu and args
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush committed Nov 27, 2024
1 parent 29ab798 commit 4a79118
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/aniworld/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def process_url(url):
self.provider_selector = self.add(
npyscreen.TitleSelectOne,
name="Provider",
values=["Vidoza", "VOE"],
max_height=2, # count of values
values=["Vidoza", "VOE", "Doodstream", "SpeedFiles"],
max_height=4, # count of values
value=[["Vidoza", "VOE"].index(aniworld_globals.DEFAULT_PROVIDER)],
scroll_exit=True
)
Expand Down Expand Up @@ -331,7 +331,7 @@ def get_language_code(self, language):

def validate_provider(self, provider_selected):
logging.debug("Validating provider: %s", provider_selected)
valid_providers = ["Vidoza", "Streamtape", "VOE"]
valid_providers = ["Vidoza", "Streamtape", "VOE", "SpeedFiles", "Doodstream"]
while provider_selected[0] not in valid_providers:
logging.debug("Invalid provider selected, falling back to Vidoza")
npyscreen.notify_confirm(
Expand Down Expand Up @@ -498,7 +498,7 @@ def parse_arguments():
action_group.add_argument(
'-p', '--provider',
type=str,
choices=['Vidoza', 'Streamtape', 'VOE', 'Doodstream'],
choices=['Vidoza', 'Streamtape', 'VOE', 'Doodstream', 'SpeedFiles'],
help='Provider choice'
)

Expand Down
4 changes: 3 additions & 1 deletion src/aniworld/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
streamtape_get_direct_link,
vidoza_get_direct_link,
voe_get_direct_link,
speedfiles_get_direct_link
)


Expand Down Expand Up @@ -399,7 +400,8 @@ def execute(params: Dict[str, Any]) -> None:
"Vidoza": vidoza_get_direct_link,
"VOE": voe_get_direct_link,
"Doodstream": doodstream_get_direct_link,
"Streamtape": streamtape_get_direct_link
"Streamtape": streamtape_get_direct_link,
"SpeedFiles": speedfiles_get_direct_link
}

selected_episodes = params['selected_episodes']
Expand Down
6 changes: 4 additions & 2 deletions src/aniworld/extractors/provider/doodstream.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
def doodstream_get_direct_link() -> str:
return "Doodstream support is not implemented yet."
def doodstream_get_direct_link(soup: str) -> str:
# return "Doodstream support is not implemented yet."
print(soup)
return
6 changes: 4 additions & 2 deletions src/aniworld/extractors/provider/speedfiles.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
def speedfiles_get_direct_link() -> str:
return "Speedfiles support is not implemented yet."
def speedfiles_get_direct_link(soup) -> str:
# return "Speedfiles support is not implemented yet."
print(soup)
return

0 comments on commit 4a79118

Please sign in to comment.