Metadata class wrapper for .metadata.json#597
Open
dale-wahl wants to merge 22 commits into
Open
Conversation
…to copy existing vids
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new, unified interface for reading and writing media archive metadata across processors, and refactors several processors to use this interface. The changes improve code maintainability, consistency, and reliability when working with media metadata. Additionally, a new
MediaArchiveLibraryclass is added to facilitate efficient reuse of previously downloaded media files. Several processors are updated to use the new metadata methods, and error handling is improved throughout.Unified media metadata handling and library:
read_media_metadataandnew_media_metadatamethods to theDataSetclass incommon/lib/dataset.py, providing a standard way to read and write media archive metadata using theMediaArchiveMetadataclass. This ensures all processors interact with metadata in a consistent manner.MediaArchiveLibraryclass incommon/lib/media_archive_library.py, which aggregates metadata from previous downloader runs, allowing processors to efficiently check for and reuse previously downloaded media files.MetadataExceptionclass tocommon/lib/exceptions.pyfor more precise error handling when working with metadata files.Notes and findings
MediaArchiveLibraryreplaced theDataSetVideoLibraryand is still only used by the video downloader, BUT could presumably be used by any downloader.stem.jsonand return only that with no proper mapping to verify. It was already an existing potential issue, I am just flagging it here.