SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Tutorial: SongKong Command Line

Previous
Next

SongKong also offers a command line that is useful for running SongKong as part of an automated script approach.

From the command line most tasks can be run against selected folder

    -a
       auto edit
    -b
       remove specified fields with metagrater
    -c
       match one album, must also specify release id using -o
       musicbrainzOrDiscogsId=url
    -d
       delete duplicates in specified files
    -f
       rename or move files
    -m
       fix songs in specified files
    -n
       import naim metadata files for specified files
    -s
       create status report for specified files
    -u
       undo any changes made to songs in specified files by SongKong
    -w
       watch folder in specified folder

and using a selected profile with the -p option, and additional overrides of settings with the -o option

-o
   overrideOption1=value1, overideOption2=value2
-p
   profile

Alternatively can be run in usual desktop mode with -g option

-g
   run in gui

Or with Remote Web UI using the -r option

-r
   run in remote mode, access via browser (i.e http://localhost:4567)

Example 1

e.g on linux run Fix Songs against /music folder using the last used fix songs profile

songkong -m /music

Example 2

e.g on linux run Fix Songs against /music folder using the default fix songs profile by specifying the -p option.

songkong -m -p /home/paul/.songkong/songkong_fixsongs.properties /music

Example 3

e.g on linux run Match to One Album against /music/david guetta/guetta blaster folder using the last selected match to one songs profile and matched to a specified MusicBrainz release url using the -o optionName=optionValue option

songkong -c /music/david guetta/guetta blaster -o musicbrainzOrDiscogsId=https://musicbrainz.org/release/937a3bdd-761f-4326-b22c-fdfcc1af6b5d

Example 4

Run in remote mode so can be via accessed via web-browser

songkong -r

We cannot run in remote or desktop mode and use the command line at same time, we can only do one or another. Similarly if we start SongKong in Desktop mode and then initiate Remote mode by selecting Start Remote Mode then desktop mode is disabled until select Stop Remote Mode

Only one instance of SongKong should be running at same time because multiple instances will try and access the same internal database and this is only designed to be used by one instance of SongKong.

SongKong is already optimized to use multiple cpus and fix multiple folders in parallel so there is no need to try and parallelize things by attempting to run multiple versions of SongKong.

Previous
Next

I assume this tutorial is valid for a local installation of SongKong on a Linux client.
If SongKong is running in a Docker container (e.g. on Synology NAS) what would be the approach to use the command line interface, e.g. the Fix Songs feature triggered by the Synology task scheduler?

When create a container based on songkong/songkong Image you can go to the Environment tab and modify the Command option from

-r

to

-m /music

Then once it started, i selected Details on the container and then Terminal and could see it had started correctly

confirmed this, by going to Log tab

and then once completed processing it automatically terminates

Or from command line I think you can use standard image and just need to run something like

docker run -v /CONFIGFOLDER:/songkong -v /MUSICFOLDER:/music songkong/songkong -m /music/DATEFOLDER 

replacing CONFIGFOLDER, MUSICFOLDER and DATEFOLDER with actual values.

So this is how you can run commandline from Docker version, but I dont know about the Synology Task Scheduler.