Skip to content

The swiss knife of Denon's Engine PRIME

License

Notifications You must be signed in to change notification settings

draeron/primetools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primetools

A small tools for synchronising meta data between ITunes and Denon's Prime Engine.

This tool came with my necessity to import particular meta data from ITunes to PRIME Engine, mainly time added / modified. Also due since I lost my Engine PRIME database, I needed a way to restore crates/playlists saved on a exported disk back into my desktop database, a functionality which should be there but doesn't exists.

Disclaimer

This goes without saying that you should use this at your own risk. This tool could easily wipeout any of the database it connects to. Make some backup prior to using it.

For that reason, I don't plan on providing compiled binary.

Compiling

You will require both the golang toolchain and a CGO compatible C compiler such as GCC because of the dependency on sqlite.

The code should compile on non-windows platforms but it's been only developped on that OS.

git clone https://github.com/draeron/primetools.git
cd primetools
go build

Et voilà! You should have a single binary called primetools.exe.

Feature Matrix

Sources

Source Files ITunes PRIME Rekordbox
Rating [x] [x] [x] [x]
Playlists [x] [x] [x]
Crates [x] [x]
Time [x] [x] [x] [x]

Targets

Target Files ITunes* PRIME Traktor
Add Files [x] [ ]
Fix Renames [x] [x]
Fix Duplicate [ ] [ ]
Sync Rating [x] [x] [x] [x]
Sync Time [x] [x] [x]
Dump Crates [x]
Dump Playlist [x] [x]
Import Crates [ ] [x]
Import Playlist [ ] [x]

Legend

[x]   Implemented
[ ]   Need Implementation
empty Not Applicable

MacOS

Writing to Itunes is done implemented through windows COM interface. On MacOS this require going through sytstem javascript scripting which I haven't explored. Since I use only Windows I haven't implemented a writer for MacOS. You can still use the tools to import mort of the meta data through the .plist file.

Traktor

Traktor is only supported because I can read the proper POPM id3 frame (ie: rating) that is used by Traktor. Meta data from NML is not implemented.

What about Serato ?

Since I don't really use Rekorbox and Serato but the code is modular enough that they could be eventually implemented. If someone submit a pull request for it I would gladly review and merge it.

Known Issues

  1. My code doesn't likes slash character in playlist / crate names since that's the character used for expressing folder structure.

  2. There might be collisions/issues with unicode characters, the reason being Itunes and PRIME doesn't store strings in the same unicode format so I had to do some approximation based on nearest non-accented character.

Usage

Most of the command line documentation can be fetch through primetools help command.

Dumping crates/playlists to files

Let's you want to dump crates saved on a external disk (export) located on the P drive which have 'fancy' in their name/path.

primetools dump crates -sp "p:" -o crates.yaml -n "*fancy*"

Dump Help:

NAME:
   primetools dump - the swiss knife of Denon's Engine PRIME

USAGE:
   primetools dump [command options] [arguments...]

DESCRIPTION:
   dump data about a library

OPTIONS:
   --source value, -s value         (default: ITunes)
   --source-path value, --sp value
   --output value, -o value         (default: "-")
   --format value, -f value         (default: Auto)
   --name value, -n value

Fixing missing file

Let's say you moved files around and want to fix those files. This will search in the specified folder for a file that matches the same meta data. If the meta data has changed, it won't works. Also, if more than one match is found, the program will ask which one you want to use as a fix.

primetools fix missing -s prime -p M:\\super\\folder\\to\\search
USAGE:
    primetools fix [command options] [arguments...]

DESCRIPTION:
    try to fix problem database [Duplicate, Missing]

OPTIONS:
    --source value, -s value         (default: ITunes)
    --source-path value, --sp value
    --yes, -y                        Do not prompt for write confirmation (default: false)
    --search-path value, -p value    path to search for music file
    --dryrun, --ro                   (default: false)

Syncing

If you want to sync the added date from ITunes to PRIME.

primetools sync added -s itunes -t prime
USAGE:
   primetools sync [command options] [arguments...]

DESCRIPTION:
   sync assets from a source to a destination [Ratings, Added, Modified, PlayCount]

OPTIONS:
   --source value, -s value         (default: ITunes)
   --source-path value, --sp value
   --target value, -t value         (default: PRIME)
   --target-path value, --tp value
   --dryrun, --ro                   (default: false)

Importing crates / playlist

You can import crates/playlist from . Note that if a list already exists, its content will be overriden. The tools doesn't support merging.

primetools import -s crates.yaml
USAGE:
   primetools import [command options] [arguments...]

DESCRIPTION:
   import playlist/crates

OPTIONS:
   --target value, -t value         (default: PRIME)
   --target-path value, --tp value
   --source value, -s value         file to use as source
   --name value, -n value           Names of crate/playlist to import, can be glob (*something*), 
                                    if none is given, will import all object in dump file.
   --ignore-missing                 Ignore track which aren't found in target, otherwise the 
                                    operation will fail. (default: false)
   --dryrun, --ro                   (default: false)

Ref

About

The swiss knife of Denon's Engine PRIME

Topics

Resources

License

Stars

Watchers

Forks

Languages