[motherless] Add group support #7787
Merged
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.
Fixes #7774
Additions & Fixes
Added
MotherlessGroupExtractor
to support/g/
,/gi/
, and/gv/
URLs.Moved
_pagination
,_extract_data
, and_parse_thumb_data
methods fromMotherlessGalleryExtractor
toMotherlessExtractor
for reuse in both galleries and groups.Extended
_extract_media
to handle group metadata.Fixed thumbnail and group metadata being lost after calling
_extract_media
andfile.update(data)
.Updated unit tests with working group/gallery URLs and replaced obsolete/dead ones.
Replaced URL regex
\w+
with[^/]+
to match valid filenames containing dashes in unit tests.Updated docs to list "Groups" as a supported Motherless content type.
Known Issue
_extract_gallery_title
and_extract_group_title
may return incorrect titles. As far as I can tell, this isn't a regression — the issue existed before this PR — and I’m currently unsure how to best fix it without dropping caching or changing the key strategy.