Custom album art sizes

I received an email yesterday:

I have recently purchased a new Audi. The MMI system of the car allows a maximum resolution of 800x800. However with bliss it appears that I need to select either 500x500 or 900x900, with no 800x800 option being available. Is this correct?

It's true that bliss currently imposes a constrained list of possibilities. However it is, in fact, possible to set custom maximum and minimum sizes for artwork. All it takes is editing a text file on the computer bliss runs on.

The first thing to say is that this is unsupported behaviour and may change in the future. Where possible, you should always use the settings page to change settings. In addition, there's an open idea in our ideas forum calling for custom sizes, so please click Vote on that one if you think it's a good idea.

However, the bliss settings are stored in a plain text file, and as such are changeable via editing the file.

The settings file

The settings file can be found in the following location, depending on your platform:

Windows XP C:\Documents and Settings\[username]\.bliss
Windows Vista, 7, 8 and 10 C:\Users\[username]\.bliss
Mac OS X (see below) /Users/[username]/Library/Application Support/bliss
Linux /home/[username]/.bliss
VortexBox /root/.bliss

Inside that folder is a file called settings. Open that in a text editor. On Windows, I would recommend not using Notepad because of the way it treats line breaks. You can use Wordpad, but make sure when you save you do so without adding an extension. You can find some text editor alternatives here.

You'll see all of bliss's settings:

#
#Fri Jan 05 16:52:15 GMT 2018
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.allowableImageFormats=JPG
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMaxHeight=500
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMaxWidth=500
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMinHeight=300
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMinWidth=300
[...]

The right hand side of the equals sign is generally the value of the setting. Some settings are scalar (like the sizing rules), some take from a list of discrete values which are not always obvious, so are less 'hackable'.

Warnings

As this is unsupported, the way bliss behaves when you edit the settings file is not documented. Always edit the settings file with bliss stopped. You should start bliss after completing your edits so that it re-reads the settings file.

To avoid losing your current settings, backup the settings file, creating a copy. If bliss subsequently fails to start, or throws errors when running, you can easily stop bliss, restore the backup, and restart.

In addition, the behaviour of the settings page is not written to cope with these changes. Generally it should not cause problems. If you subsequently change a rule setting in the UI (in this example, for instance, change the allowable image formats) that might mean your other custom settings are overwritten.

Setting a custom maximum resolution

Back to it. The maximum resolution settings are of the form:

com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMax(Height|Width)

Therefore, to set the maximum resolution to 800x800 edit those settings as follows:

com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMaxHeight=800
com.elsten.bliss.music.policy.coverartpolicy.CoverArtPolicy.approxMaxWidth=800

After saving the file, start bliss and rescan your library; bliss will assess the artwork according to the new settings.

Hope this helps anyone looking to fine tune their settings!

Thanks to unsplash-logoMichał Parzuchowski for the image above.
tags: hacking
blog comments powered by Disqus

The Music Library Management blog

Dan Gravell

I'm Dan, the founder and programmer of bliss. I write bliss to solve my own problems with my digital music collection.