This release is a pre-release and may not be stable for production use.
Mopidy-Bookmarks
Provides bookmarks functionalities to mopidy.
Bookmarks are playlist that can be synced with the current playback state, so that you can easily stop listening to some tracklist, listen to something else, and later resume at the position where you stopped. This is most usefull when listening to audiobooks.
This extension can only be used with a compatible mopidy client. For now, only mopidy-mowecl is compatible.
Inner design and operation
Bookmarks are exposed as regular mopidy playlists, under the bookmark: uri.
A websocket interface gives additional control:
start syncing the current tracklist with a bookmark, i.e. store current track and time along with the playlist.
resume a given bookmark (i.e. restore tracklist and start playing).
stop the syncing.
When synchronising between a bookmark and playback state, the current track and current time will be saved periodically (every 0.5 second by default). As soon as the tracklist changes, or the stop_sync command is received, synchronisation will stop.
All the data is stored in a sqlite database.
Usage
Access to the bookmarks API is provided by a websocket server, which works in exactly the same way as the mopidy websocket server. It can thus be used with the Mopidy-js client by connecting to the address mopidy-host:port/bookmarks/ws.
Create the clients
const mopidyClient = new Mopidy({ webSocketUrl: "ws://localhost:6680/mopidy/ws/", }); const bookmarksClient = new Mopidy({ webSocketUrl: "ws://localhost:6680/bookmarks/ws/", });To create a bookmark, simply create a new playlist (here from current tracklist):
const BookmarkName = "my bookmark"; const tracks = await mopidyClient.tracklist.getTracks(); const BMPlaylist = await mopidyClient.playlists.create({ name: BookmarkName, uri_scheme: "bookmark", }) BMPlaylist.tracks = tracks; await mopidyClient.play.save({playlist: BMPlaylist})You can then start syncronisation:
bookmarksClient.startSync({uri: BMPlaylist.uri })
Stop synchronisation manually at any time:
bookmarksClient.stopSync()
And restore tracklist and playback state with the resume command:
bookmarksClient.resume({uri: BMPlaylist.uri })- Finally, you can react to change in synchronisation status with the following:
bookmarksClient.on("event:syncStatusUpdate", (newStatus) => ... )
API
Commands
start_sync(uri): Starts syncing the given bookmark with the playback state.
The tracklist must correspond to the tracks of the bookmark.
Parameters
- uristr
The uri of the bookmark to resume
Returns
- bool
True if syncing started, else False
resume(uri): Resumes playback from a bookmark.
Populates the tracklist with the tracks of the bookmark, resumes playback from the saved position and sync the bookmark with the current playback state (track and time).
Parameters
- uristr
The uri of the bookmark to resume
Returns
- bool
True if a bookmark was found for the given uri, else False
get_current_bookmark(): Get the current synced bookmark if any.
Returns
- mopidy.models.Ref or None
A ref to the current bookmark if any, else None
stop_sync(): Stop syncing the current bookmark.
Events
sync_status_update: When sync status changes.
The event payload is an object of the form {bookmark: data}, where data is the name of the bookmark being synchronised, or null if synchronisation has stopped.
Installation
Install by running:
python3 -m pip install Mopidy-Bookmarks
Note that this extension is a dependency of mopidy-mowecl, so it will already be installed if you are using this client.
Configuration
Mopidy-Bookmarks provides the following configuration keys (and their default values).
[bookmarks] enabled = true # sync period, in milliseconds sync_period = 500 # set this to false to enable limits defined below # (usefull if mopidy listens on a public network e.g.) disable_limits = true # max number of bookmarks max_bookmarks = 100 # max size of data for one bookmark max_bookmark_length = 100000 # max number of items in store max_store_items = 10 # max store item length max_store_item_length = 1000
Project resources
Credits
Original author: Mathias Millet
Current maintainer: Mathias Millet
Metadata
Release files for Mopidy-Bookmarks 0.2.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mopidy_bookmarks-0.2.0rc1.tar.gz | 20.2 kB | With provenance | Details for mopidy_bookmarks-0.2.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mopidy_bookmarks-0.2.0rc1-py3-none-any.whl | Python 3 | none | any | Details for mopidy_bookmarks-0.2.0rc1-py3-none-any.whl |
Total release size: 37.4 kB
Release files / mopidy_bookmarks-0.2.0rc1.tar.gz
| Download URL | mopidy_bookmarks-0.2.0rc1.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fd52ec34b6d356c60bc6675e5e1f419d940bdb1f8438acf27eaf9c3fcf287e1
|
|
BLAKE2b-256 checksum How to use checksums |
8cd2020d4b09c429b35a42d87e64579f6ecc400a4e65d7830b8f078fd3cb59b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / mopidy_bookmarks-0.2.0rc1-py3-none-any.whl
| Download URL | mopidy_bookmarks-0.2.0rc1-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
383b71e75d600be4e66ab8e7260254ba0c6c80f6954fbea50ea03c9ac2b7c946
|
|
BLAKE2b-256 checksum How to use checksums |
93792536db27137d742dbcbb779901c39b5d159469ea46f22af8f19b481c18c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for Mopidy-Bookmarks 0.2.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mopidy_bookmarks-0.2.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.