Skip to content
Taylor Thurlow edited this page Feb 28, 2014 · 25 revisions

Here, we'll design the oft-requested attachments feature (see #111).

Important use cases

Upon import of audio files into the Beets library, users may wish to...

  • Move the accompanying .log file into the same directory as the imported audio files.
  • Move the accompanying .CUE file into the same directory as the imported audio files.
  • Move album artwork associated with the audio files.
    • There could be multiple image files.
  • Have the ability to move arbitrary files associated with the audio files, by way of a prompt questioning the user whether or not to import 'file-x.x' or by way of user declaration in an optional command, "include files of .xx".
  • Declare a white list of file extensions they wish to import with the audio files.
  • Support sub-directories
  • Enable copy/move of Artist level images to corresponding Artist in beets structure, that is if pinkfloyd.jpg is present in the pink floyd artist folder move it to the pink floyd root level in the beets output
  • Be able to query the database to see all albums with attachments and those without. ie. Find all albums without a .log file (so a user can re-rip those albums, for example).
  • Track the attachments in the database
    • Move the attachments (should attachments be allowed to be stored anywhere other than the album folder, or can we think of an example in which the user would want to associate an attachment with an album that would need to be stored elsewhere?)
    • Rename the attachments
    • Ability to query the database to see which attachments exist and where

Optional use cases

  • A configuration option to convert auto-downloaded image formats to the preferred format of the user (jpg/png) would allow for easy standardization in filetypes. (Does this feature belong in the attachments section?)
  • Incorporate a log checker function to be able to see a list of all "100% Accurate Rip" Logs and those that aren't 100%.
  • Convert cue sheets / log files to UTF-8.
  • If a log or cue file is found, rename the file to $artist - $album.cue/log or other given variables names.
  • If several images are present in the original folder, put them in an "artwork" directory in the new library folder (front.jpg, back.jpg, cd.jpg). This however, may cause an issue with media players that rely on an artwork file in the same directory as the files being played.
  • Possibility to use the CUE file to split large FLAC files
  • Possibility to detect which attachments are meant to exist and those that are clutter

Beets functionality

Beets would need new functionality to cover the above use cases, this is a list of what Beets would need to do.

  • Upon import, Beets would need to be able to analyse a folder and prompt the user that additional attachments exist.
  • Beets would need to be able to offer options to the user when importing, ie. beets import --attachments=log,cue ...
  • Include functionality so that Beets reviews the library filesystem and if attachments exist in folders (for example, users have manually copied these attachments over - common amongst users who use log files), that haven't been logged in the database, it should "import" them and associate them with the album in question.
  • Include functionality so that existing attachments can be modified (renamed, moved(?), and queried/searched).

Beets attach queries

TBC...

Clone this wiki locally