Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-932

Enhance detection of files which need saving

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 1.3.2
    • File Move & Rename
    • None

      At the moment the only method of checking whether a file needs saving is if the metadata has changed. This ticket is to highlight other things that should be included in this test:

      1. "Write tags to files" is set and writeable metadata has changed. We need to have a list of ~ prefixed metadata that is written to files and needs to be checked.
      2. "Move files" is selected and file is not in the correct location.
      3. "Rename files" is selected and the filename has changed.
      4. "Embed cover images into tags" is not set and "Clear existing tags" is set and file contains embedded images
      5. "Embed cover images into tags" is set and "Clear existing tags" is set and there are embedded images and there are no downloaded images.
      6. "Embed cover images into tags" is set, and there are downloaded images and embedded images differ from images downloaded.
      7. File is ID3 and "Write tags to files" is set and ID3v23/4 version in settings is different from the version used in the file.
      8. File is ID3 and Text Encoding setting differs from the text encoding setting in any of the existing tags. (This will need code to capture the list of encodings in tags in the file.)

      The Album should be shown as needing saving (i.e. icon stared) if:

      1. Any of the files underneath need saving (see above)
      2. "Save cover images as separate files" is set and "Move files" is set and the downloaded images do not exist exactly in the target directory.
      3. "Save cover images as separate files" is set and "Move files" is not set and the downloaded images do not exist exactly in all the directories that files are located in.

      There may well be other combinations that I have not thought out.

      I would suggest that we have some sort of isDirty function so that this can be re-run on loaded Albums/Tracks/Files by Options code when any of the options above are changed. We should also provide some way for plugins to mark a file as dirty in case the plugin implements new functionality.

      If we can fully identify the list of reasons a file / album needs to be changed, then we can also implement functionality to avoid doing the save if it is not needed. See PICARD-300.

            samj1912 Sambhav Kothari
            sophist Sophist
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package