Skip to main content
Operations for managing scenes (videos). Bases: StashClientProtocol Mixin for scene-related client methods.

Functions

find_scene

Find a scene by its ID. Parameters: Returns: Raises: Examples: Find a scene and check its title:
Access scene relationships:
Check scene paths:

find_scenes

Find scenes matching the given filters. Parameters: Returns: Examples: Find all organized scenes:
Find scenes with specific performers:
Find scenes with high rating and sort by date:
Paginate results:

create_scene

Create a new scene in Stash. Parameters:
NameTypeDescriptionDefault
sceneScene

Scene object with the data to create. Required fields: - title: Scene title - urls: List of URLs associated with the scene - organized: Whether the scene is organized

Note: created_at and updated_at are handled by Stash

required
Returns: Raises: Examples: Create a basic scene:
Create scene with relationships:
Create scene with metadata:

update_scene

Update an existing scene in Stash. Parameters: Returns: Raises: Examples: Update scene title and rating:
Update scene relationships:
Update scene metadata:
Update scene URLs:
Remove scene relationships:

find_duplicate_scenes

Find groups of scenes that are perceptual duplicates. Parameters: Returns:

parse_scene_filenames

Parse scene filenames using the given configuration. Parameters: Returns:

scene_wall

Get random scenes for the wall. Parameters: Returns:

bulk_scene_update

Update multiple scenes at once. Parameters: Returns:

scenes_update

Update multiple scenes with individual data. Parameters: Returns:

scene_generate_screenshot

Generate a screenshot for a scene. Parameters: Returns: Raises:

find_scene_by_hash

Find a scene by its hash (checksum or oshash). Parameters: Returns: Examples: Find scene by MD5 checksum:
Find scene by OSHash:
Using the input type:

scene_destroy

Delete a scene. Parameters: Returns: Raises: Examples: Delete a scene without deleting the file:
Delete a scene and its file:
Using the input type:

scenes_destroy

Delete multiple scenes. Parameters: Returns: Raises: Examples: Delete multiple scenes without deleting files:
Delete multiple scenes and their files:
Using the input type:

scene_merge

Merge multiple scenes into one destination scene. Parameters: Returns: Raises: Examples: Merge two scenes into one:
Merge scenes and update metadata:

scene_add_o

Add O-count entry for a scene. Parameters: Returns: Examples: Add O-count with current time:
Add O-count with specific times:

scene_delete_o

Delete O-count entry from a scene. Parameters: Returns: Examples: Remove last O-count entry:
Remove specific timestamp:

scene_reset_o

Reset scene O-count to 0. Parameters: Returns:
Example

scene_save_activity

Save scene playback activity. Parameters: Returns: Examples: Save resume point:
Save play duration:
Save both:

scene_reset_activity

Reset scene activity tracking. Parameters: Returns: Examples: Reset resume point:
Reset play duration:
Reset both:

scene_add_play

Add play count entry for a scene. Parameters: Returns: Examples: Add play with current time:
Add play with specific times:

scene_delete_play

Delete play count entry from a scene. Parameters: Returns: Examples: Remove last play entry:
Remove specific timestamp:

scene_reset_play_count

Reset scene play count to 0. Parameters: Returns:
Example

find_scenes_by_path_regex

Find scenes by path regex pattern. Parameters: Returns:

scene_streams

Get streaming endpoints for a scene. Parameters: Returns: Examples: Get streaming endpoints:
Access specific stream properties:

merge_scene_markers

Merge scene markers from source scenes to target scene. This utility method copies all markers from one or more source scenes to a target scene. Useful when consolidating duplicate scenes or merging content. Parameters: Returns: Examples: Merge markers from a single source:
Merge markers from multiple sources:
Use with scene merge workflow:

find_duplicate_scenes_wrapper

Find duplicate scenes with sensible default parameters. This is a convenience wrapper around find_duplicate_scenes() that provides better defaults for common use cases. A distance of 0 finds exact phash matches (true duplicates), while higher values find similar scenes. Parameters: Returns: Examples: Find exact duplicates (phash distance = 0):
Find similar scenes (allow small phash differences):
Find duplicates with similar duration:
Use in cleanup workflow: