You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manual page for metaflac implies that more than one image can be attached to any given flac file as does RFC9639. However this fails due to error opening the flac file.
The following example shows that I can add album art but adding artist art fails:
metaflac --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac #works
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"
The FLAC file could not be opened. Most likely the file does not exist
or is not readable.
The following example, after removing album art, shows that I can add artist art but adding album art fails, demonstrating that both images are fine and correctly defined:
metaflac --remove --block-number=3 01\ Laundromat\ Blues.flac
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" 01\ Laundromat\ Blues.flac #works
metaflac --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"
The FLAC file could not be opened. Most likely the file does not exist
or is not readable.
The following example, after removing album art, shows a failing attempt to add both images in one command:
metaflac --remove --block-number=3 01\ Laundromat\ Blues.flac
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"
The FLAC file could not be opened. Most likely the file does not exist
or is not readable.
It seems to me that the code assumes there can only ever be one image per flac file, unless I have misunderstood the manual page.
The text was updated successfully, but these errors were encountered:
I don't seem to be able to reproduce this. Please share the version number of metaflac.
Besides that omission, I have a theory: perhaps the padding block is big enough to allow adding for the first picture, but for adding the second picture, a tempfile is needed. Perhaps the directory permissions do not allow for creating a new temp file? The error is consistent with being unable to open a tempfile.
It was a good theory, which seems to have been correct. The directory containing the flac files was missing write permission. Now it works as expected.
Add some heuristic to metaflac to detect this situation and explain to the user. Usually an operation where reading works fine but writing back fails could explain such a situation.
The manual page for metaflac implies that more than one image can be attached to any given flac file as does RFC9639. However this fails due to error opening the flac file.
The following example shows that I can add album art but adding artist art fails:
The following example, after removing album art, shows that I can add artist art but adding album art fails, demonstrating that both images are fine and correctly defined:
The following example, after removing album art, shows a failing attempt to add both images in one command:
It seems to me that the code assumes there can only ever be one image per flac file, unless I have misunderstood the manual page.
The text was updated successfully, but these errors were encountered: