astippich added a comment.

  In D25517#587776 <https://phabricator.kde.org/D25517#587776>, @bruns wrote:
  
  > I have thought about this and have come to the conclusion this is not 
really future proof.
  >
  > The `Property::FrontCover` is IMHO fine, i.e. the changes to 
`propertyinfo.cpp` and `properties.h` could go in as is.
  >
  > The request of additional properties should be done differently. How about 
the following:
  >
  > 1. divide properties into (currently) two sets, "Simple Metadata" (all the 
current ones but frontcover) and "Complex Metadata" (currently frontcover).
  > 2. allow to specify extra properties for SimpleExtractionResult
  
  
  Not strictly against your proposal, but how much do we gain? What is your 
concern about future proof?
  From my Elisa application perspective, it would be very convenient to use the 
proposed ExtractionResult::ExtractEverythingIncludingImageData (or renamed 
ExtractionResult::ExtractEverything for KF6) and the 
ExtractionResult::ExtractImageData flags.
  For the current proposal the API does not need to be changed.
  
  >   SimpleExtractionResult result(fileName, mimeType);
  >   result.setExtraProperties({Property::FrontCover});
  >   plugin.extract(&result);
  >    
  > 
  > You can then also do:
  > 
  >   SimpleExtractionResult result(fileName, mimeType, 
ExtractionResult::ExtractNothing);
  >   result.setExtraProperties({Property::FrontCover, Property::BandLogo});
  >   plugin.extract(&result);
  >    
  
  This is also possible with the current proposal (when the extractors honor 
the ExtractionResult::ExtractNothing/ExtractMetaData flags properly, which I 
think currently none does) by just setting the 
ExtractionResult::ExtractImageData.
  It is just that one does not have fine-grained control over each individual 
"complex" property, but IMHO we do not need that.
  I also fear that it may not be clear to distinguish between "simple" and 
"complex" properties and that users of the API would expect that every property 
works for the setExtraProperties, which would require an immense amount of work 
for all extractors.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D25517

To: astippich, #baloo, bruns, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, fbampaloukas, GB_2, 
domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams

Reply via email to