Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-7480

Fetch and store image file size for cover art from IA

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Cover art, Schema Change
    • None

      If we stored information about file sizes in our database, we would be able to do things like display the file size (MBS-6641) and warn people before they try to load a really huge image. If we know the file size, we also know that the image has been processed by the IA, which means if we have that information for thumbnails, we could then not show images which don't have a thumbnail yet on the front page (MBS-7407) and we could determine whether to show a thumbnail or a message about the image not being available without needing any JS (which would fix MBS-4622 and avoid things like MBS-7037 in the future). We would also be able to produce our own alerts if images or thumbnails are missing.

      The IA buckets contain an XML file (ending in _files.xml) which contains some information about the files in the bucket, including the file size. We would presumably need a script which can fetch the information from the IA and three columns to store the data in (one for the original image and two for the thumbnails).

          [MBS-7480] Fetch and store image file size for cover art from IA

          Invisible Man added a comment -

          @Michael Wiencek:

          May I ask what further information are included in your mentioned "IA bucket" XML file?

          Do you have special reason why not to include the cover art width and height in the same change?

          Invisible Man added a comment - @Michael Wiencek: May I ask what further information are included in your mentioned "IA bucket" XML file? Do you have special reason why not to include the cover art width and height in the same change?

          yvanzo added a comment -

          Only the database schema has been changed so far. Added columns are still empty.

          yvanzo added a comment - Only the database schema has been changed so far. Added columns are still empty.

          Michael Wiencek added a comment - https://github.com/metabrainz/musicbrainz-server/pull/1024

          I propose we'll add four INTEGER columns to the cover_art_archive.cover_art table, to store the file sizes (in bytes): filesize, thumb_250_filesize, thumb_500_filesize, thumb_1200_filesize.

          Michael Wiencek added a comment - I propose we'll add four INTEGER columns to the cover_art_archive.cover_art table, to store the file sizes (in bytes): filesize, thumb_250_filesize, thumb_500_filesize, thumb_1200_filesize.

            bitmap Michael Wiencek
            nikki nikki
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Version Package