Review main Abandoned

57835[TASK] Use extractors to get meta data

Andreas Kienast CR 0 V 0 Hard +468 −162 updated 08/09/18, 14:14

Commit message

The method `MetaDataRepository::findByFile()` is only capable to enrich
the metadata record if the file belongs to a driver of type "Local".

This is an issue for any file whose origin is a custom FAL driver, adding
metadata "on demand" is only possible with abusing signals emitted by
FAL.

This patch makes use of the Extractor API to fetch the metadata of any
file that is fetched the first time. In the same time, a new
`LocalExtractor` is introduced to get an image's dimensions.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 8

Review log 1014

  1. Andreas Kienast uploaded patch set 1 08/08/18, 14:54

  2. TYPO3com voted on patch set 1 V -1 08/08/18, 15:02 Completed build in 07m 20s on Wed, 8 Aug, 05:02 PM Test Summary: 9 of 33855 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26265

  3. Markus Klein commented on patch set 1 08/08/18, 15:04

    MetaDataRepository.php:240

    sure about that. is it possible the Repo is called for files from different storages/drivers?

    ExtractorService.php:54

    an empty value by default?

    ExtractorService.php:99

    maybe make it protected so it is mockable?
  4. Andreas Kienast commented on patch set 1 08/08/18, 16:03

    MetaDataRepository.php:240 Reply

    Well, the repository class is callable from anywhere. The ExtractorService only stores the resolved extractors per driver, that should be fine. If not, it's of course changeable.

    ExtractorService.php:54 Reply

    Because of the array_merge() call below, to ensure there is at least _one_ item. I do it that way, because executing array_merge in a loop is expensive, see https://github.com/kalessil/phpinspectionsea/blob/master/docs/performance.md#slow-array-function-used-in-loop

    ExtractorService.php:99 Reply

    Ack
  5. Andreas Kienast uploaded patch set 2 08/08/18, 18:18

  6. TYPO3com voted on patch set 2 V +1 08/08/18, 18:25 Completed build in 07m 19s on Wed, 8 Aug, 08:25 PM Test Summary: 33702 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26266

  7. Andreas Kienast uploaded patch set 3 08/08/18, 18:34

  8. TYPO3com voted on patch set 3 V +1 08/08/18, 18:40 Completed build in 06m 07s on Wed, 8 Aug, 08:40 PM Test Summary: 33702 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26267

  9. Andreas Kienast commented on patch set 3 CR -1 08/08/18, 18:46

    I need to take another look, there's a potential recursion now.
  10. Andreas Kienast uploaded patch set 4 08/08/18, 19:47

  11. TYPO3com voted on patch set 4 V +1 08/08/18, 19:54 Completed build in 06m 49s on Wed, 8 Aug, 09:54 PM Test Summary: 33702 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26268

  12. Andreas Kienast commented on patch set 4 V -1 08/09/18, 13:02

    Metadata don't get loaded anymore for newly uploaded files
  13. Andreas Kienast commented on patch set 4 08/09/18, 13:48

    Meh, stale cache hit me once more. But the current state outrules the possible exclusion of meta data.
  14. Andreas Kienast abandoned the change 08/09/18, 14:14

    Does not solve the real issue