Tag extensions

It is possible to access more tag information with Texel - when suported from the tag format. E.g. ID3V2 supports lyrics and images like a band photo or the CD cover. As images may take a lot of memory these additional parameters are stored in a part of track information which is loaded from the music file upon request to memory. Therefore just a fraction of all files have extension information in memory. A cache stores the extensions up to an limit (by default 1000 entries). When tag extensions are altered they are taken out of the cache and will be kept until stored back to disc. Therefore high memory consumption can still occur when altering too many extensions without saving in between.

Therefore these tag extensions have the following drawbacks:

  • Tag extensions are not available when editing offline and the track files are not available on disc storage

  • Mass operations on tag extensions take time as in worst case all tracks must be loaded again.

  • When saving the track list extended information is not stored there. It must be reloaded when Texel is restarted.

However, extensions are a very flexible mechanism to search or alter additional, maybe memory consuming attributes.

Cover images

One element of the tag extensions are support of cover images. Several tag formats support the storage of images. Texel allows you to view cover images, alter them and load the right images from sources in the internet.

Searching for cover images in the internet

You can search for covers on the internet. Just mark the tracks where a cover should be added to (complete line in the spreadsheet) and choose add cover image. A dialog will pop up which allows you to chose the desired cover images. For every artist/album combination a selection can be made it is than added to all corresponding titles.

Settings for cover images

Settings are configured in the preferences section. Choose Edit/Preferences to open the preferences dialog. The selection on the left offers you an entry Covers. Clicking on it reveals the cover settings dialog.

Image processing

These options apply to images which are newly added to a track. Already existing images are left untouched by default. Here you can define if a image shall be shrinked to a certain size when its to large. Simply mark the checkbox Shrink image to. You can enter the maximal size for images. An image is always shrinked with the aspect kept, that is the image is not streched or shriked in only one dimension. If an image is smaller than the desired size its left untouched.


Settings for cover images

In this group you can also define in whcih format an image is saved. Possible formats are JEPG or PNG. Both image formats compress the image data for storage to save disc space. However, JEPG features a lossy compression which makes smaller images. Typical that will be the format of you choice and you should leave the checkbox as is. However you can switch to PNG as default format. If you check the switch Do not convert JPEG and PNG images in JPEG or PNG format are left as is (to avoid reformat quality losses) but images in other formats like GIF and TIFF are converted to either JPEG or PNG. Image formats are auto-detected.

When you check Save filename in description the source URL (from internet but also local filenames) is added automatically as the image description.

Image search

Here you can limit the number of images to query if the source supports it. You can also limit the displayed result only to square images. Actually also nearly square images are taken. The idea is to limit the displayed results to cover images only. Please be aware that This filter is applied after quering the images from the source. Therefore the result list may be smaller than the defined number of query results, but never be higher. If the image size is unknown from the preview this filter is ignored. Apply this filter by checking the checkbox Display square images only.

Image sources

You can query several sources at the same time. This dialog provides all configured sources. You may select as many as you like. Some may be limited to special covers only. All sources are queried in parallel.

Important

Please be aware that queuring more source does not lead to a better result. You do simply have to browse through more suggestions. You also increase traffic on your internet connection and waste resources on the provides side.

Add a new coversource

Coversources can be added by configuration. To add a new source you must be able to understand enough HTML to retrieve the image URLs from the search overview page. You must also be familiar with reguar expressions as these are used to extract the URLs from the HTML page. This knowledge is than put into a new section of the ressource file.

Overview of the configuration file properties

The section starts with

[CoverSource][your name]

active

If set to true, this source is used for searching. Defaults to false.

queryurl

URL to query album and artist. Calling this URL should result in the preview page. Please use ${Artist} and ${Album} where artist and album to search for shall be inserted.

regexp.result

Set this property when the resul URL does not contain an image only but a complete HTML page where the image is only embeded. This regular expression retrieves the image from this page.

desc

Description of the source. You should add here which kind o covers can be found here to make sure the potential user knows what to expect when he activates the source. The description is displayed as tooltip in the settings dialog. Defaults to the group name.

name

Name of the source. This is the displayed name in the settings dialog for this source. Defaults to the group name.

regex.preview

Regular expression to search the queries result page. This regular expression must return the URL of the preview and the URL of the image source. It may additionally return the image dimension (of the downloadable image, not the preview) and a description. These information are extracted using the QT regexp capturing notation with "()". See the QT's QRegExp documentation. The order of the elements is described in the pos.* properties.

pos.preview

Position of the preview URL in the regular expression of regex.preview. The first bracket pair is at position 0. If this property is omited it defaults to 0.

pos.url

Position of the image URL in the regular expression of regex.preview. The first bracket pair is at position 0. If this property is omited it defaults to 1.

pos.desc

Position of the description in the regular expression of regex.preview. The first bracket pair is at position 0. If this property is omited it defaults to non existant.

pos.height

Position of the imahe height in the regular expression of regex.preview. The first bracket pair is at position 0. If this property is omited it defaults to non existant.

pos.width

Position of the image width in the regular expression of regex.preview. The first bracket pair is at position 0. If this property is omited it defaults to non existant.

Step by Step

This description tells you step by step how to add a new cover source to Texel.

  1. Check first if the cover source page follows the procedure Texel supports. Generally the procedure should be

    1. First page is for entering the search arguments. Executing the search should result in calling a new URL where the entered search arguments appear in. Texel will fill in artist and album name.

    2. The page which appears when the created URL is entered should contain preview images and a link to the original images. Also a more complex step is supported where the preview leads to a new page where the image is just a part from.

    3. Clicking on the preview leads either directly to the image or ro a page where the image is embedded in. Both ways are supported, but just fixed for a certain source. This means that either all previews lead to an embedding page or none.

  2. Create in the file texelrc a new section

    [CoverSource][your name]

    . A good choice for the name is the hostname of the cover source page.

  3. Call the page where you can enter the search criteria. When executing the search and gaining the preview search results take the URL and replace the searched artist with ${Artist} and the album with ${Album}. Store the URL with the replaced sections in the property queryurl.

  4. Open the source from the preview page. Now comes the tricky part. You must identify the code where the preview image is shown and the URL to the destination page is also contained. Build a reguar expression to match it. Store this regular expression into the property regex.preview. Update the pos.* properties according to the order of the information in the regular expressions.

  5. When the cover image must be grepped out of another page load it, check again the source and create another regular expression to retrieve the image out of the page. Typically parts of the URL are helpful as often the server for cover images is the same. Store this information into the property regexp.result.

  6. Store a description into the property desc.