Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Create a parent MediaStorage entity with common metadata #1739

Closed
obulat opened this issue Jun 3, 2021 · 0 comments · Fixed by WordPress/openverse-catalog#83
Closed

Comments

@obulat
Copy link
Contributor

obulat commented Jun 3, 2021

Problem Description

Currently, the catalog only has data for images. To add audio, we need to create the Storage class for audio. The first step for this is extracting common media metadata from ImageStore class to MediaStore class. This MediaStore class will be the base for other media types in the future.

Solution Description

The solution would be to extract the common columns that would be used for any media type into an abstract base class, MediaStore. This class would handle data cleaning and saving the buffer to the disk. The add_item method for cleaning and storing the media items would be implemented in the child classes: ImageStore, AudioStore, etc, as they have some logic specific to the media type.

Alternatives

An alternative could be to create a completely separate AudioStore class. This would be problematic as it would make us have duplicate code.

Additional context

@obulat obulat transferred this issue from WordPress/openverse-catalog Apr 17, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Apr 17, 2023
@obulat obulat moved this from 📋 Backlog to ✅ Done in Openverse Backlog Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant