Skip to content

YT-dlp enhanced JSON handling with additional logging and data extraction. - #2810

Open
ZealousLover wants to merge 1 commit into
stashapp:masterfrom
ZealousLover:master
Open

YT-dlp enhanced JSON handling with additional logging and data extraction.#2810
ZealousLover wants to merge 1 commit into
stashapp:masterfrom
ZealousLover:master

Conversation

@ZealousLover

Copy link
Copy Markdown

Fixed some misaligned values (e.g. 'extractor' is
not 'tubesite' and 'uploader' is 'studio')

Added converting chapters to scene markers.

Examples to test

  • Use yt-dlp to download from various sites. Include the parameter --write-info-json to generate the metadata JSON file for the download
  • Add the video it to your Stash library by placing it in the content directory along with the JSON output

From the "Scenes" tab

  • Open the tagger interface
  • Choose "YT-dlp" in the "Source" menu
  • Press "Scrape All"

From a scene:

  • On the "Edit" tab, select "YT-dlp" from the "Scrape With" dropdown

From "Settings"->"Tasks"

  • In "Identify" select the "Identify" button
  • Under "Sources" click the "+" button
  • Add "YT-dlp" as a source (default, true, or merge for each item you want extracted from the JSON)
  • (optionally, remove existing other scrapers to isolate test)
  • Click the "Identify" button at the bottom

Short description

The previous version was extracting various items with some assumption about thier meaning.

The "details" field should be a description of the video and the YT-dlp JSON includes a "description" which is now added. Previously, "details" was only populated with various additional metadata like "uploaded by", "extractor", etc. This additional metadata is appended to the end of the new "details" that includes the "description."

The "extractor" field was being used as the "tubesite" which may not always be the same. Now, "extractor" merely points to the YT-dlp extractor name and is included at the end of "details"

The "tubesite" extra metadata is extrapolated from the URL instead of assuming "extractor", which may include the "generic" extractor name. This is now part of the appended data in "details."

Many of the YT-dlp extractors use "uploader" to indicate the channel or production studio for porn sites, (see pornhub.py), this scraper now makes that correlation too.

The YT-dlp JSON supports "chapters" which can be adapted to "Scene Markers" in Stash. This scraper now looks for chapters and create scene markers for the chapters. The primary tag is also created if one does not exist.

Fixed some misaligned values (e.g. 'extractor' is
not 'tubesite' and 'uploader' is 'studio')

Added converting chapters to scene markers.
@ZealousLover ZealousLover changed the title Enhanced JSON handling with additional logging and data extraction. YT-dlp enhanced JSON handling with additional logging and data extraction. Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant