mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
add comment
This commit is contained in:
parent
708b2bd0a5
commit
3ded1db9ec
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ class SoundOrVideoTag:
|
|||
"Prepend the media folder to the filename."
|
||||
if os.path.isfile(absolute_path := os.path.abspath(self.filename)):
|
||||
# Add-ons can use absolute paths to play arbitrary files on disk.
|
||||
# Example: sound.av_player.play_tags([SoundOrVideoTag("/path/to/file")])
|
||||
head, tail = os.path.split(absolute_path)
|
||||
tail = hooks.media_file_filter(tail)
|
||||
return os.path.join(head, tail)
|
||||
|
|
|
|||
Loading…
Reference in a new issue