Skip to content

Fix annotation export crash when viewed container is a Subset#244

Merged
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
jhery-rdo:fix/annotation-export-subset-crash
Apr 27, 2026
Merged

Fix annotation export crash when viewed container is a Subset#244
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
jhery-rdo:fix/annotation-export-subset-crash

Conversation

@jhery-rdo
Copy link
Copy Markdown
Contributor

Summary

  • The annotations exporter assumed the viewed container is always a Playlist, accessing the playhead via session.viewed_container.playhead
  • When media is loaded into a Subset (e.g. by a Python plugin like rdo_browser), this crashes with 'Subset' object has no attribute 'playhead'
  • Replace all 5 call sites with self.current_playhead(), which is provided by PluginBase and returns the active playhead regardless of container type

Changes

  • annotations_exporter.py — replace self.connection.api.session.viewed_container.playhead with self.current_playhead() at lines 162, 235, 257, 317, 318

Test plan

  • Open media via a plugin that sets the viewer to a Subset
  • Export annotations using each scope: Current Frame, Current Media, Current Playlist / Timeline
  • Verify export completes without crash and output is correct
  • Confirm standard Playlist-based workflow still works as before

The annotations exporter accessed the playhead via
session.viewed_container.playhead, which assumes the viewed container
is always a Playlist. When media is loaded by a Python plugin (e.g.
rdo_browser) that sets the viewer to a Subset, this crashes with
"'Subset' object has no attribute 'playhead'" because the Subset
class does not expose a playhead property.

Replace all 5 call sites with self.current_playhead(), which is
provided by PluginBase and returns the active playhead regardless
of the viewed container type.
@tedwaine tedwaine merged commit d68c9f4 into AcademySoftwareFoundation:develop Apr 27, 2026
1 of 3 checks passed
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.

2 participants