- db: add method for creating tracks
New tracks can now be created and added to the Rekordbox collection. Note that the user still has to reload tags/analyze the newly added tracks in Rekordbox.
- db: fix missing proxy association in table dict
The association proxies were missing in theto_dict
method. The keys are now also cached.
v0.3.2 - 2024-01-05
This release fixes smart-playlist related bugs and improves the database table relationships.
- db: Add method for creating smart playlists
This will set the ID in the smart list to the newly created playlist ID before generating the XML string
- db: add missing UUID entries
The UUID was not set when creating the following db entries:- album
- artist
- genre
- label
- db: add missing relationships in
DjmdContent
Linked tables and corresponding relationships:DjmdCue
:Cues
DjmdSongMyTag
:MyTags
DjmdActiveCensor
:ActiveCensors
DjmdMixerParam
:MixerParams
- db: add My-Tag names association to the
DjmdContent
table
It is now possible to get a list of the corresponding My-tag names from theDjmdContent
instance. - db: add album artist association to the
DjmdAlbum
andDjmdContent
tables
It is now possible to get the album artist instance or name directly from theDjmdContent
instance. - db: fix smart list filter bugs (#110)
- db: fix
Kind
notes inDjmdCue
table
v0.3.1 - 2023-12-28
This release improves the Rekordbox v6 database key extraction and adds a new handler for smart playlists.
- add method to return the contents of a playlist in the RBv6 db directly
The database can now be queried directly for the contents contained in a playlist. This works for regular playlists as well as for smart playlists. The fullDjmdContent
instances of specific columns can be returned. - add RBv6 smart playlist handler
Add a handler for the smart playlists of Rekordbox. The conditions are stored as an XML string. The smart playlist handler supports parsing and writing the XML string. - add DB key extraction method for newer Rekordbox versions (#97).
The key can now also be extracted with newer Rekordbox versions.frida
is used to inject code to intercept the key when the DB is opened.
- populate configuration just-in-time
Previously the config was populated when importingpyrekordbox
. Now the config is updated the first time it is used. - use association proxies in
DjmdContent
table
This makes it possible to filter queries using these associations, for exampleDjmdContent.ArtistName
- add Playlist type enums and attributes
0.3.0 - 2023-12-12
This release fixes bugs and imrpoves error handling.
- The
bank
field of PSSI ANLZ tag can also have a value of 0 (#108)
This fixes an issue where the XOR mask was applied to un-garbled PSSI tags. - check if RBv6 db key seems valid (#105)
Check the key if it is passed manually to the db handler and raise an exception if it doesn't look valid. Only the first few characters are checked. - also change
OrgFolderPath
andFileNameL
inupdate_content_path
(#104)
There were columns missing in theupdate_content_path
method. These changes make the file paths consistent. Thank you @ben-hearn-sb for the help! - rename the
xml
module torbxml
to prevent conflict with builtin.
Note that the old module namexml
is deprecated and will be removed in version0.4.0
.
- add Rekordbox6 database key extraction alternatives
0.2.3 - 2023-11-17
- drop Python 3.7 support
Python 3.7 reached its end of lifetime in June 2023. - raise ImportError if RBv6 db is locked and sqlcipher is not available
Pyrekordbox falls back tosqlite3
ifsqlcipher3
is not available. This can lead to errors if the RBv6 database is locked and the user does not havesqlcipher3
installed. - don't pass deleted RBv6 instance to USN callback
This sometimes raised anObjectDeletedError
0.2.2 - 2023-10-26
- add new albums to the RBv6 db
New entries can now be added to theDjmdAlbum
table. - add new genres to the RBv6 db
New entries can now be added to theDjmdGenre
table. - add new artists to the RBv6 db
New entries can now be added to theDjmdArtist
table. - add new labels to the RBv6 db
New entries can now be added to theDjmdLabel
table. - support renamed Rekordbox application directory
The user can now specify the directory name of the Rekordbox application directory. This supports multiple Rekordbox installations of the same major version.
- don't raise error if key is in cache
This fixes an issue when using the database handler for Rekordbox>6.6.5 with the cached key. - de-obfuscate PSSI tag data on exported ANLZ files
The PSSI tag data of ANLZ files that rekordbox 6 exports is garbled with an XOR mask. If the first few known fields of the PSSI tag are not valid values this indicates a garbled tag and the data is de-obfuscated. Thank you @troyhacks for the de-obfuscation. - add disabled context manager to the RBv6
RekordboxAgentRegistry
- only re-enable RBV6 USN tracking if it was enabled
- add missing documentation of the PSSI tag of ANLZ files
- Fix typo in djmdCue table documentation
- update quickstart documentation
0.2.1 - 2023-10-20
This release migrates to SqlAlchemy 2.0 and fixes some bugs.
- migrate to SqlAlchemy 2.0
- add getters/setters for the mixer gain/peak settings in the RBv6 db (#88).
The gain and peak values are stored as high/low binary values. It is now possible to get or set the gain/peak as a simple decibel value. Thank you @gsuberland for the help! - automatically set
updated_at
of tables in the RBv6 db
Theupdated_at
column is automatically updated viaonupdate
if rows are modified. This only happens if the user did not set the column manually. - flush the RBv6 db changes before applying USN auto-increment.
This allows the user to usebefore_flush
events more easily without affecting the USN changes
pyrekordbox
now only supports sqlcipher3
. pysqlcipher3
is no longer supported
since it is not compatible with SqlAlchemy 2.0.
0.2.0 - 2023-10-03
This release adds methods for updating playlists/playlist folders and their contents.
- create or delete playlists/playlist folders in the RBv6 db
It is now possible to create playlists or playlist folders with arbitrary seq number using the Rekordbox v6 database handler. Any playlist or playlist folder can also be deleted. All corresponding songs or sub-playlists will also be deleted. - add or remove tracks in RBv6 playlists
It is now possible to add songs with arbitrary track number to playlists in the Rekordbox v6 database handler. Any song can also be removed from playlists. The track numbers of the other songs in the playlist get updated accordingly. To make sure all changes are compatible with Rekordbox, a new handler for themasterPlaylists6.xml
auxiliary file was added. - move songs in playlists and playlists/playlists folders in the RBv6 db
The track number of songs in playlists can now be updated. The track numbers of the other songs are updated accordingly. Playlists or playlist folders can also be rearranged or moved to a new parent folder. - add method for renaming playlists/playlist folders in the RBv6 db
The update time and USN are updated accordingly. - add method for creating a decrypted copy of the RBv6 database (#86)
- generalize getters of list content tables in the RBv6 db
This makes all getters consistent. - fix USN tracking and update times in playlist updates of the RBv6 db
- prevent commits to the RBv6 db if Rekordbox is running
- improve
Parent
relationship in nested tables.
TheParent
relationship in nested tables (like playlists) are now declared viabackref
. This fixes a bug when deleting rows. - set
updated_at
in the playlist XML when committing the RBv6 db
0.1.8 - 2023-09-15
- add methods for converting RBv6 tables to a dictionary
This can be used to save the database contents to an open file format, for example JSON.
- add getters for the
db_directory
andshare_directory
to the RBv6 database handler
This makes it easier to access the additional data of Rekordbox (ANLZ or artwork files). - improve
columns
method of RBv6 tables
Thecolumns
method now returns the actual columns of the table (without relationships). To get a list of the column names with the relationships, use thekeys
method. - fix wrong ANLZ root directory in the RBv6 database handler
The user can now also specify the ANLZ root directory if a database object is opened in an unusual location by supplying thedb_dir
argument. - cache XML track list to speed up checking for duplicates
The TrackID and Location of each track element is cached to prevent checking each XML element when adding new tracks. In addition, the track count is now incremented/decremented when adding/removing tracks. This makes it much faster to add or remove elements in the XML track collection. - fix bug when adding tempo and position marks to XML track elements
Adding new tempo of position marks was not possible due to the wrong object being passed asparent
element. - warn when opening the database and Rekordbox is running
- bump furo version to fix RDT issue
- remove sphinx_toggleprompt (incompatible with sphinx>=7)
- Use RTD's new build process and config
0.1.7 - 2023-08-16
This release attempts to add a workaround for the broken key extraction and fixes some bugs.
- add CLI command to download and cache the RB6 db key from the web (#64)
Pyrekordbox tries to download the key from projects that have hard-coded the key (see issue #77). If the download was successful it writes it to the cache file.
- add method for writing the RB6 db key cache manually (#64)
If the extraction of the Rekordbox database key fails (>=6.6.5), the user can now write the key manually to the cache file. After updating the cache the database can be opened without providing the key as argument. To make this work pyrekordbox now caches the decrypted key, not the password for decrypting the key. If an old cache file is found it is upgraded automatically. - move
install_sqlcipher.py
script to CLI command
The script is now available aspyrekordbox install-sqlcipher
. - add missing relationships in the RB6 database table declarations
Affected tables and corresponding relationships:DjmdAlbum
:AlbumArtist
DjmdCategory
:MenuItem
DjmdCue
:Content
DjmdSort
:MenuItem
- fix copy/paste error in date getter of the
RekordboxAgentRegistry
Theget_date
method was actually setting the value.
- add section for downloading or manually writing the RB6 db key cache
- add basic docstrings to the
RekordboxAgentRegistry
object - add basic docstrings to the Rekordbox database tables
0.1.6 - 2023-08-13
This release contains improvements of the handling of incompatible Rekordbox versions and improves the documentation.
- raise exception with hint when opening the RB6 database if the key extraction failed (#64)
- cache pw extracted from the rekordbox
app.asar
file
This speeds up the initialization of the package
- fix modified path in update filename example (#81)
- add workaround for key extraction of the RBv6 database (#64)
- migrate documentation to markdown
- small fixes in documentation
0.1.5 - 2023-04-09
This release contains bug fixes and improves error handling.
- Improve RBv6 configuration handling
Don't warn if no Rekordbox installation was found instead raise an error if no config exists when opening theRekordbox6Database
. - improve error handling for incompatible RB versions (#64)
- fix sqlalchemy iso-format error
Using SQLAlchemy v2 results in ValueError's. - don't fail on incompatible Rekordbox database
This allows the library to be used with reduced functionality, for example, RekordboxXML still works.
0.1.4 - 2022-10-30
This release improves the Rekordbox v6 database handling and fixes bugs in the USN tracking.
- add
Parent
andChildren
relationships to nested RBv6 list-tables.
This enables walking thorugh the nested list structure. Affected tables:DjmdHistory
DjmdHotCueBanklist
DjmdMyTag
DjmdPlaylist
DjmdRelatedTracks
DjmdSampler
- fix small error in query handling and also try to import
sqlcipher3
- improve RBv6 database update tracking and USN handling
The updates to the database are now tracked directly in the table/database objects. All the logic for handling the local update sequence number was moved to a dedicated objectRekordboxAgentRegistry
. - prevent autoflush in
autoincrement_local_usn
in the RBv6 database object - small improvements of the
Rekordbox6Database
- fix bug in
pformat
of RBv6 database tables
0.1.3 - 2022-10-28
This release mainly consists of improvements on the Rekordbox v6 database handling.
- support Python3.11
- add auto-increment of USN's for uncommited changes to the RBv6 database
The newautoincrement_usn
method auto-increments the local USN for each uncommited created, changed or deleted row. Therb_local_usn
attribute of added or changed rows are updated according to the update sequence - add session-event callbacks to the RBv6 database object
- add update and transaction tracking to the RBv6 database object
This feature is intended for automatic tracking of the USN's. - add local USN handlers to RBv6 database object
Methods added:get_local_usn
set_local_usn
increment_local_usn
- add process-id getters
- make
columns
in the RBv6 table classes a class method - fix small bug in
read_rekordbox6_asar
- fix bugs in RBv6 database object
- add missing My-Setting docstrings
- add missing Rekordbox v6 database docstrings
- add missing XML docstrings
0.1.2 - 2022-10-19
This release contains documentation fixes.
- fix typos and formatting
- fix light theme styling
0.1.1 - 2022-10-19
AnlzFile
now stores the path of the parsed file- add
update_content_path
andupdate_content_filename
to RB6 database
These methods update the file path in the entire Rekordbox collection (database and ANLZ files)
- fix bugs in PQTZ/PQT2 tag handler of ANLZ files
- improve ANLZ file path handling
- fix bug when reading the pyrekordbox config files
- remove wrong type hint in
AbstractAnlzTag
- Use path instead of extension as key in
read_anlz_files
output
This helps for saving ANLZ files after making changes.
- update Quick-Start and change reference labels
- add initial version of API Reference
- fix links in ANLZ file documentation
0.1.0 - 2022-10-16
- add
set_content_path
toRekordbox6Database
object - add
set_path
toAnlzFile
object - add name properties for linked tables in the
DjmdContent
table of the RB6 database
The new properties include:- ArtistName
- AlbumName
- GenreName
- RemixerName
- LabelName
- OrgArtistName
- KeyName
- ColorName
- ComposerName
- add relationship for
Content
in the RB6 database tables
- return first query result when using ID as argument
- add type annotation to
read_mysetting_file
- fix
items()
method in MySettings objects - also try to import
pysqlcipher3
on Windows
- add missing
FolderPath
in RB6 database documentation - add MySettings tutorial to documentation
- Add simple XML playlist tutorial
- Add logo to documentation
- Update installation guide for SQLCipher
0.0.8 - 2022-10-15
- add relationships between lists and contents (#37)
Affected tables:- DjmdHistory
- DjmdMyTag
- DjmdPlaylist
- DjmdRelatedTracks
- DjmdSampler
- fix incorrect table in
get_related_tracks
- fix incorrect foreign key in
DjmdHotCueBanklist
- remove duplicate entry in the Rekordbox v6 database format documentation
0.0.7 - 2022-06-12
- add SQLCipher support for macOS (see #27)
- add installation instructions for SQLCipher on macOS
0.0.6 - 2022-05-27
- fix encoding errors on MacOS
- improve ANLZ getters
0.0.5 - 2022-05-06
- improve XML playlist handling and fix refactoring bugs
- raise ValueError if duplicate track is added
Checks for- Location
- TrackID
- improve XML key errors
- add implementation of crc16xmodem to support Python 3.10 (#21)
0.0.4 - 2022-05-06
- add auto-increment of XML TrackID when adding new tracks
- fix wrong MySetting default values
- simplify names of playlist (folder) creation methods
- add method to remove tracks in XML database and fix bug in track count update
- fix position argument of XPath in XML file (starts at 1)
- file paths in the XML file are now encoded and decoded as URI's
- fix XML tests with new API
- Improve Rekordbox XML handling and API
The attributes of track can now be accessed with a dict interface. Additionally, the object attributes now correspond to the keys in the XML file
0.0.3 - 2022-04-24
- add get-methods for
master.db
database tables
- fix table name in
get_artist
- fix typo in settingFile table name
- switch back to rtd theme since furo code blocks don't render properly
- use furo sphinx theme
- add quick-start
- add installation section
- add tutorial sections
- rename file-format headers
- add development section
contains the change-log and contributing information
0.0.2 - 2022-04-20
- use SQLAlchemy for the Rekordbox6
master.db
database
- fix import error and README.md
- set logging level to warning
- fix loading the Rekordbox setting file twice in config initialization
- add context for Rekordbox 6 database
- inherit AnlzFile from Mapping to implement dict interface
- unify binary file API
The Settings files now also use theparse
andparse_file
class-methods
- add missing djmd tables to
master.db
database documentation