mov-cli / mov-cli

Watch everything from your terminal.
https://mov-cli.github.io/
MIT License
411 stars 36 forks source link

[BUG] Unable to use custom players #276

Closed jamieslyman closed 1 month ago

jamieslyman commented 1 month ago

Describe the bug: I am unable to specify a custom player, using any value other than mpv or vlc causes a TypeError

Expected behavior: Custom player is opened

Error:

mov-cli -s films -p syncplay --debug barbie

Good Night, jamie.
    It's 09:59 PM on a wonderful Sunday! 

[DEBUG] (mov_cli) - Config -> {'version': 1, 'player': 'syncplay', 'debug': True, 'parser': 'lxml', 'ui': {'fzf': True}, 'plugins': {'test': 'mov-cli-test', 'films': 'mov-cli-films', 'anime': 'mov-cli-anime', 'youtube': 'mov-cli-youtube'}, 'scrapers': {'default': 'films'}}
[DEBUG] (mov_cli) - Scraper args picked up on --> []
[INFO] (mov_cli) - Using 'films.DEFAULT' scraper...
[INFO] (mov_cli) - Searching for 'barbie'...
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://api.themoviedb.org/3/search/movie?query=barbie&include_adult=false&language=en-US&page=1&api_key=d39245e111947eb92b947e3a8aacc89f
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://api.themoviedb.org/3/search/tv?query=barbie&include_adult=false&language=en-US&page=1&api_key=d39245e111947eb92b947e3a8aacc89f
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/346698
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/617932
[ERROR] (mov_cli) - [HTTPClient] GET Request to https://vidsrc.to/embed/movie/617932 failed! (<Response [404 Not Found]>)
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/tv/244901/1/1
[ERROR] (mov_cli) - [HTTPClient] GET Request to https://vidsrc.to/embed/tv/244901/1/1 failed! (<Response [404 Not Found]>)
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/377897
[INFO] (mov_cli) - Scrapping media for 'Barbie'...
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/embed/movie/346698
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/ajax/embed/episode/ofRmMs1n/sources
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidsrc.to/ajax/embed/source/oPJlOslnVw==
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://github.com/Ciarands/vidsrc-keys/blob/main/keys.json
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidplay.online/futoken
[DEBUG] (mov_cli) - [HTTPClient] GET -> https://vidplay.online/mediainfo/U3RPsqsb_IbIsYMmKbttTTHPJP4akgg=,204,134,165,123,202,226,202,171,184,162,214,148,164,179,184,208?sub.info=https%3A%2F%2Fvidsrc.to%2Fajax%2Fembed%2Fepisode%2FofRmMs1n%2Fsubtitles&t=4xjRCPwlAlIOzw%3D%3D&ads=0&src=vidsrc&autostart=true
Traceback (most recent call last):
  File "/home/jamie/.local/bin/mov-cli", line 8, in <module>
    sys.exit(app())
             ^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/mov_cli/cli/__main__.py", line 133, in app
    uwu_app() # Wait whaaaaa.
    ^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/typer/main.py", line 328, in __call__
    raise e
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/typer/main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/typer/core.py", line 721, in main
    return _main(
           ^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/typer/core.py", line 225, in _main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/typer/main.py", line 685, in wrapper
    return callback(**use_params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/mov_cli/cli/__main__.py", line 112, in mov_cli
    option = play(media, choice, chosen_scraper, chosen_episode, config, scrape_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jamie/.local/share/pipx/venvs/mov-cli/lib/python3.11/site-packages/mov_cli/cli/play.py", line 27, in play
    chosen_player = config.player(platform = platform)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'CustomPlayer' object is not callable

Platform (please complete the following information):

Version 4.2.7

r3tr0ananas commented 1 month ago

It should be fixed now. Please update mov-cli and try again.

jamieslyman commented 1 month ago

Can confirm, works now! Thanks!