GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Music Tags

About:
A Script AddIn for DOpus which adds a new command, MusicTags, that will allow you to view and edit music metadata in a dialog based on mp3tag.

Caution: There is no undo function. By default, a log file is created, detailing all changes, which can be viewed with Music Tags built in viewer or with any text editor.

Double Caution: I have only tested with my collection of .mp3 files which is not exhaustive. The Script is using DOpus's built in metadata editing tools so it will be as compatible with your files as DOpus is. Some filetypes have slightly different metadata and the script does not yet take this into account. With these files, you may see error dialogs from DOpus when attempting to write certain metadata. Because of this I recommend experimenting on copies of your files first.

History:

  • 1.0 (25/5/20)
    • Initial Release.

Installation:

  • Download: MusicTags 1.0.js.txt (41.7 KB)
  • Drag the .js.txt file to Preferences / Toolbars / Scripts.

Usage:

  • Download: Music Tags.dcf (691 Bytes)
  • Select "Settings / Customize Toolbar..." from your Lister and then drag the button file to any toolbar you like.

Select as many files as you like and click the Music Tags button. The Script will ignore all non-music files selected. You can then select individual music files in the dialog or multiple files (there are buttons to Select All and to Select None) using drag select, and ctrl or shift click as normal. If an individual file is selected the metadata for it is shown on the left. If multiple files are selected, the script will make comparisons of all files and the metadata on the left will show <keep> for items that differ between files, or the actual metadata if it's the same.

The drop down boxes for each metadata item will populate with all metadata found for that item in the selected files.

The Reload button will reload the file list, useful sometimes as the writing of metadata can take a little time to complete meaning the file list is showing old metadata. Click this to ensure you're seeing the current status of all files.

You can edit any of the items on the left, including leaving them blank, the Save button will prompt you to confirm your changes, then write the metadata for all selected files.

Right clicking any file in the list will bring up a small menu, from here you can open the file using the default Open action, Show it in the DOpus viewer or view the Properties for the file. Identical to the options available in the configuration for double-clicking a file.

Cover art is for display only, it's not editable at this stage. If multiple files are selected, the cover art for them is compared and only displayed if it's the same.

A number of configuration items are available in the Preferences / Toolbars / Scripting page.

  • columns_order : This is the display order for the columns in the main dialog. The Filename column is always first though and not configurable. You cannot turn off any columns at this stage.
  • confirm_save : Shows a confirmation dialog before saving changes.
  • dblclk_action : Choose the default action for double clicking files in the list.
  • log_changes : Writes a log file detailing all metadata changes made.
  • log_folder : Destination folder for the log file.
  • show_cover_art : Show cover art for the selected files.

The new command MusicTags has only one possible argument:

ARGUMENT  TYPE  POSSIBLE VALUES  DESCRIPTION
------------------------------------------------------------------------------
LOGREADER  /S     <no value>     Opens the log reader without showing the main
                                 Music Tags dialog.```

The button included above has two functions, left click it to launch Music Tags with your selected music files and right click it to show the Log Reader.

Log File:
The script will create a log file (by default this will be located at: /desktop\MusicTags.log). You can change the location in the configuration, or even turn off logging completely.

There are three ways to view the log file:

  1. With any text editor/viewer.

  2. From the main Music Tags dialog there's a View Log... button which will open the Log Reader.

  3. By creating a DOpus toolbar button (hotkey or menu item) which has the following command:
    MusicTags LOGREADER. This will open the Log Reader without the main Music Tags dialog (and this is not dependant on any files being selected in the Lister).

The log file will look similar to this:

--------------------
25-May-2020 16:08:12
--------------------
"01 - Rock N Roll Train.mp3" [Album] From="White Ice" To="Black Ice"
"02 - Skies On Fire.mp3" [Album] From="White Ice" To="Black Ice"
"03 - Big Jack.mp3" [Album] From="White Ice" To="Black Ice"
"04 - Anything Goes.mp3" [Album] From="White Ice" To="Black Ice"
"05 - War Machine.mp3" [Album] From="White Ice" To="Black Ice"

Log Reader:
The Log Reader provides an easy way to view the log file:

The Log Reader has a filter which allows you to type part of a filename to filter the list of log entries shown. The Reset button will clear the filter and display all log entries. Alternatively you can double click an entry in the list to filter based on that entries filename.
You can launch the Log Reader from within the Music Tags dialog (There's a View Log... button in the dialog). Alternatively you can use the MusicTags command with the LOGREADER argument to just use the log reader alone.

3 Likes