The docs state:
This tool relies on Rekordbox marking a track as "played" before we know it's the most recently played track. I've found this currently happens one minute into playback. This is not optimal, as I'd really love to know this immediately. However, this is what Rekordbox is doing and I'll keep looking to see if there's any other way to work with this.
While I want to thank you for the excellent project, I agree it would be awesome to know the now playing track faster than one minute. I've started to do some R&D myself and wanted to share notes for discussion.
Just brainstorming I can think of a few strategies:
- Use the database. Very elegant approach already implemented here. Maybe there are other tables that expose info earlier?
- Read into the
rekordbox process. Would likely need very low level hacking, and probably hit OS security challenges
- Kuvo. I don't use this but it sounds like rekordbox can publish track info to the service
- Pro DJ Link / Link Export. I see other software scrapes stuff from this protocol.
Because the DB solution is so simple, I've poked around myself. Here are some notes on my progress.
Have supbox log the encryption key:
diff --git a/database.go b/database.go
index 3fe4f0f..2186540 100644
--- a/database.go
+++ b/database.go
@@ -3,10 +3,12 @@ package main
import (
"database/sql"
"fmt"
+ "log"
)
func getDatabaseDSN(filePath string, encryptionKey string) string {
dsn := fmt.Sprintf("file:"+filePath+"?_key='%s'", encryptionKey)
+ log.Printf("DSN=%q", dsn)
return dsn
}
Use that with the sqlcipher / sqlite interactive CLI, to poke at the database:
brew install sqlcipher
sqlcipher ~/Library/Pioneer/rekordbox/master.db
> pragma key="402fd482c<REDACTED>";
> SELECT h.ID, Title, Name, ImagePath FROM djmdSongHistory AS h JOIN djmdContent AS c on h.ContentID = c.ID LEFT JOIN djmdArtist as a on c.ArtistID = a.ID GROUP BY h.created_at ORDER BY h.created_at DESC LIMIT 1;
Look at the other tables:
sqlite> .tables
agentRegistry djmdDevice djmdSampler
cloudAgentRegistry djmdGenre djmdSongHistory
contentActiveCensor djmdHistory djmdSongHotCueBanklist
contentCue djmdHotCueBanklist djmdSongMyTag
contentFile djmdKey djmdSongPlaylist
djmdActiveCensor djmdLabel djmdSongRelatedTracks
djmdAlbum djmdMenuItems djmdSongSampler
djmdArtist djmdMixerParam djmdSongTagList
djmdCategory djmdMyTag djmdSort
djmdCloudProperty djmdPlaylist hotCueBanklistCue
djmdColor djmdProperty imageFile
djmdContent djmdRecommendLike settingFile
djmdCue djmdRelatedTracks uuidIDMap
Nothing immediately jumps out as better than the djmdSongHistory but I'll dig around more.
Anyone else have any ideas?
The docs state:
While I want to thank you for the excellent project, I agree it would be awesome to know the now playing track faster than one minute. I've started to do some R&D myself and wanted to share notes for discussion.
Just brainstorming I can think of a few strategies:
rekordboxprocess. Would likely need very low level hacking, and probably hit OS security challengesBecause the DB solution is so simple, I've poked around myself. Here are some notes on my progress.
Have supbox log the encryption key:
Use that with the sqlcipher / sqlite interactive CLI, to poke at the database:
Look at the other tables:
Nothing immediately jumps out as better than the
djmdSongHistorybut I'll dig around more.Anyone else have any ideas?