Skip to content

Fix overridable methods in MediaPipeline #6365

Closed
@wRAR

Description

@wRAR

MediaPipeline defines several empty or almost empty "overridable" methods, which return things inconsistent with their overrides. I propose making all of them raise NotImplementedError. Alternatively MediaPipeline should just be made an abstract class and all those methods made abstract methods, but I have no idea if that will break anything (e.g. do all children always override all of those methods?).

Another problem is existing tests, that test specifically that e.g. MediaPipeline.media_downloaded() returns a response, which makes no sense to me (normally media_downloaded() returns a file info dict), so all those need to be changed or removed.

And another problem, indirectly related to this, is that this interface is very poorly documented, most of these functions are not mentioned in the docs at all, so it's not always clear what should they take and return (and the code uses many of them as callbacks in long callback chains so it's not clear even from the code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions