nsandlin / linepig

ID resource for erigonine spiders, using KE Emu & IMu.
http://linepig.fieldmuseum.org/
4 stars 0 forks source link

Fix detection of Multimedia urls #47

Closed nsandlin closed 5 years ago

nsandlin commented 6 years ago

The code is looking for a MIME type, but more-recent imports do not have it. Can we look for something that both groups have - Pete's suggestion: "http" in the Multimedia field - so that all already-imported Multimedia urls are detected, and backlog of new imports can proceed.

CURRENT LINEPIG CODE: // If the attached Multimedia record is an external link, return that URL. if (!empty($record['RelRelatedMediaRef_tab'][0])) { if ($record['RelRelatedMediaRef_tab'][0]['MulMimeType'] == "x-url") { return $record['RelRelatedMediaRef_tab'][0]['MulIdentifier']; } }

EXAMPLES: Ceraticelus bulbosus female habitus - coll record is linked in LinEpig https://linepig.fieldmuseum.org/multimedia/963926 Association: Ceraticelus bulbosus, (x-url/application) => 561520 MIME Type: x-url; MIME Format: application

Ceraticelus carinatus female habitus - coll record missing https://linepig.fieldmuseum.org/multimedia/1761662 Association: Ceraticelus carinatus, (application/x-unknown) => 1734723 MIME Type: application; MIME Format: x-unknown

nsandlin commented 5 years ago

checking for "http" as the first four chars of the MulIdentifier var