Added exif dateTaken data to the database and provide it via the API
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
This commit is contained in:
Родитель
59f9a7b7c3
Коммит
0d94e249b2
|
@ -119,6 +119,19 @@
|
|||
<type>float</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>date_taken</name>
|
||||
<type>integer</type>
|
||||
<notnull>false</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
<index>
|
||||
<name>maps_date_taken</name>
|
||||
<field>
|
||||
<name>date_taken</name>
|
||||
<sorting>ascending</sorting>
|
||||
</field>
|
||||
</index>
|
||||
</declaration>
|
||||
</table>
|
||||
</database>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<description><![CDATA[Simple maps app to display a leaflet map.]]></description>
|
||||
<licence>agpl</licence>
|
||||
<author mail="vinzenz.rosenkranz@gmail.com" >Vinzenz Rosenkranz</author>
|
||||
<version>0.0.2</version>
|
||||
<version>0.0.3</version>
|
||||
<namespace>Maps</namespace>
|
||||
<category>multimedia</category>
|
||||
<bugs>https://github.com/nextcloud/maps/issues</bugs>
|
||||
|
|
|
@ -19,11 +19,13 @@ class Geophoto extends Entity {
|
|||
protected $fileId;
|
||||
protected $lat;
|
||||
protected $lng;
|
||||
protected $dateTaken;
|
||||
protected $userId;
|
||||
|
||||
public function __construct() {
|
||||
$this->addType('fileId', 'integer');
|
||||
$this->addType('lat', 'float');
|
||||
$this->addType('lng', 'float');
|
||||
$this->addType('dateTaken', 'integer');
|
||||
}
|
||||
}
|
|
@ -57,6 +57,7 @@ class GeophotoService {
|
|||
$file_object->fileId = $photoEntity->getFileId();
|
||||
$file_object->lat = $photoEntity->getLat();
|
||||
$file_object->lng = $photoEntity->getLng();
|
||||
$file_object->dateTaken = $photoEntity->getDateTaken();
|
||||
/* 30% longer
|
||||
* $file_object->folderId = $cache->getParentId($path);
|
||||
*/
|
||||
|
|
|
@ -81,6 +81,7 @@ class PhotofilesService {
|
|||
$photoEntity->setLat($exif->lat);
|
||||
$photoEntity->setLng($exif->lng);
|
||||
$photoEntity->setUserId($userId);
|
||||
$photoEntity->setDateTaken($exif->dateTaken);
|
||||
$this->photoMapper->insert($photoEntity);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче