mov-cli / mov-cli

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

[IMPORTANT] v4.2 breaking changes!!! #255

Closed THEGOLDENPRO closed 1 month ago

THEGOLDENPRO commented 2 months ago

This is a warning to plugin developers about future breaking changes, they aren't happening now but will do so in the future (versions after 4.1 but not 4.1) current breaking changes and it will break post v4.1 plugins. However this one is less breaking than the last breaking change.

Two lines must be changed in your scrapers to avoid your plugin from breaking, **kwargs should be added:

- def scrape(self, metadata: Metadata, episode: Optional[EpisodeSelector] = None):
+ def scrape(self, metadata: Metadata, episode: Optional[EpisodeSelector] = None, **kwargs):
    """
    Where your searching and scraping for the media should be performed done. 
    Should return an instance of Media.
    """
    ...

and

- def scrape_metadata_episodes(self, metadata: Metadata):
+ def scrape_metadata_episodes(self, metadata: Metadata, **kwargs):
    """Returns episode count for each season in that Movie/Series."""
    ...

UPDATE (21/03/2024)

Another breaking change will take place; Scraper.scrape_metadata_episodes() will be removed in v4.2.0.

Rename scrape_metadata_episodes to scrape_episodes.

- def scrape_metadata_episodes(self, metadata: Metadata, **kwargs):
+ def scrape_episodes(self, metadata: Metadata, **kwargs):
    """Returns episode count for each season in that Movie/Series."""
    ...
THEGOLDENPRO commented 1 month ago

Don't unpin this yet