From 53cb610bdcbd32a417a58890061b36b2f2f9ea6a Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 24 Aug 2014 03:28:15 +0200 Subject: Add categories field to the file metadata (see #7). --- mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua') diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua index 3a6eedd..9b4fa96 100755 --- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua +++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua @@ -20,6 +20,7 @@ local LrView = import 'LrView' local bind = LrView.bind +local Info = require 'Info' local MediaWikiInterface = require 'MediaWikiInterface' local MediaWikiExportServiceProvider = {} @@ -87,8 +88,9 @@ MediaWikiExportServiceProvider.processRenderedPhotos = function(functionContext, local license = exportSettings.info_license local other = exportSettings.info_other local categories = exportSettings.info_categories + local additionalCategories = photo:getPropertyForPlugin(Info.LrToolkitIdentifier, 'categories') - local fileDescription = MediaWikiInterface.buildFileDescription(description, source, timestamp, author, license, other, categories) + local fileDescription = MediaWikiInterface.buildFileDescription(description, source, timestamp, author, license, other, categories, additionalCategories) MediaWikiInterface.uploadFile(pathOrMessage, fileDescription) LrFileUtils.delete(pathOrMessage) -- cgit v1.2.1