Anki add-on: Play Only One in the Group

An Anki Addon that allows to play only one item in a group during autoplaying Wrap a group of fields in a custom tag in order to play only one item in the group. In the sample below, there are seven audios on the card, which are all wrapped in an only-one tag. If autoplay is enabled (this is the default case), only the first audio - hobby1 will be played. And if you press 'R' or 'F5', this audio will be replayed. But if you press 'N', the next audio in the group - hobby2 will be played, once again 'N' and hobby3, and so on, until the last audio hobby7, then back to the first one - hobby1. Instead, if you press 'P', there will a reversed playing order - hobby1, hobby7, hobby6, ..., hobby3, hobby2, hobby1, ... BTW, at any time if you press 'R' or 'F5', the audio last time played will be replayed, that may be any of hobby1, hobb2, ..., hobby7. <only-one> hobby1:{{hobby1}}<br/> hobby2:{{hobby2}}<br/> hobby3:{{hobby3}}<br/> hobby4:{{hobby4}}<br/> hobby5:{{hobby5}}<br/> hobby6:{{hobby6}}<br/> hobby7:{{hobby7}}<br/> </only-one> P.S. I have added a shortcut Ctrl+R for replay on the review page, because each time when I am dictating in an input box, 'R' cannot be used, and F5 is not convenient. Changelog: 2022-11-02: Added * and - as shortcuts for the finish and cancel of voice recording. <br> Thanks to the praise in the feedback on 2022/10/28. But it is a pity that it is impossible to make it usable in anki version 2.1.49 because the addon uses some features that are only available since anki version 2.1.52. For the sample deck, I don't know how to make one now and I have not enough time for it at present, maybe in the future I can try to learn how to achieve it. 2022-09-30: Adapt to both Qt5 and Qt6. 2022-09-28: Shortcuts updated: V - Record Own Voice; Shift+V - Replay Own Voice On Mac, when recording own voice, enable by pressing the space key to end recording On Mac, when recording own voice, enable by pressing 'Q' to cancel recording Shortcut added: G - Replay Own Voice 2022-09-28: Shortcuts updated: J - Replay Audio; K - Pause Audio; L - Audio -5s; ";" or Ö - Audio +5s 2022-09-28: Set the item in an Only One Group as current after it is clicked by the user to play.

GitHub repository: longqinsi/play-only-one-in-the-group
Repository description: An Anki Addon that allows to play only one item in a group during autoplaying
Languages: Python, JavaScript, Shell, CSS