Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1998

Audio file properties "discNumber" and "composer" not working as expected

    XMLWordPrintable

Details

    • Bug
    • Status: Reported
    • Not Evaluated
    • Resolution: Unresolved
    • 1.1.2
    • None
    • Document Gallery
    • None
    • Nokia N9, MeeGo 1.2 Harmattan, PR1.1 (20.2011.40-4_PR_009)

    Description

      Querying audio file properties returns invalid results for the properties
      QDocumentGallery::discNumber
      QDocumentGallery::composer

      Here's some example code that I'm using:

      QStringList GalleryScanner::gAudioPropertyNames = QStringList()
      << QDocumentGallery::filePath
      << QDocumentGallery::albumTitle
      << QDocumentGallery::albumArtist
      << QDocumentGallery::artist
      << QDocumentGallery::composer
      << QDocumentGallery::audioBitRate
      << QDocumentGallery::audioCodec
      << QDocumentGallery::channelCount
      << QDocumentGallery::description
      << QDocumentGallery::discNumber
      << QDocumentGallery::trackNumber
      << QDocumentGallery::duration
      << QDocumentGallery::genre
      << QDocumentGallery::keywords
      << QDocumentGallery::comments
      << QDocumentGallery::performer
      << QDocumentGallery::producer
      << QDocumentGallery::sampleRate
      << QDocumentGallery::title;

      QDocumentGallery* gallery = new QDocumentGallery();
      QGalleryQueryRequest* query = new QGalleryQueryRequest(gallery);
      query->setRootType(QDocumentGallery::Audio);
      query->setPropertyNames( gAudioPropertyNames );
      query->execute();
      while (query->state() == QGalleryAbstractRequest::Active)
      query->waitForFinished(100);
      QGalleryResultSet* result=query->resultSet();

      int disckey = result->propertyKey(QDocumentGallery::discNumber);
      int discnumber = result->metaData(disckey).toInt();
      // wrong: discnumber is always 1
      int composerkey = result->propertyKey(QDocumentGallery::composer);
      QString composer = result->metaData(composer).toString();
      // wrong: composer is always empty

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            djcb Dirk-Jan C. Binnema
            pschaefer Peter Schäfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes