Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/339595 )
Change subject: Revert "Support "videoinfo" in batching" ...................................................................... Revert "Support "videoinfo" in batching" * Batching already returns thumbdata in the proposed api from T51896, so let's make use of that by implementing getAPIData in the TimedMediaHandler extension. This reverts commit 2ed7d11109d95b1261a9f246406160f242c73948. Change-Id: I308b7ff963b63d06f6380e45ec596eac296d9aa5 --- M lib/config/WikiConfig.js M lib/mw/ApiRequest.js M lib/mw/Batcher.js 3 files changed, 6 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/95/339595/1 diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js index a08243e..0e12724 100644 --- a/lib/config/WikiConfig.js +++ b/lib/config/WikiConfig.js @@ -822,7 +822,7 @@ this.useVideoInfo = Array.isArray(query.parameters) && query.parameters.some(function(o) { return o && o.name === 'prop' && o.type.indexOf('videoinfo') > -1; - }) && !env.conf.parsoid.useBatchAPI; // Disabled for batching until deployed + }); }.bind(this)); }; diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js index 51f1845..646e479 100644 --- a/lib/mw/ApiRequest.js +++ b/lib/mw/ApiRequest.js @@ -844,8 +844,7 @@ mangled = manglePreprocessorResponse(this.env, itemResponse); break; case 'imageinfo': - case 'videoinfo': - mangled = { batchResponse: itemResponse }; + mangled = {batchResponse: itemResponse}; break; default: error = new Error("BatchRequest._handleJSON: Invalid action"); diff --git a/lib/mw/Batcher.js b/lib/mw/Batcher.js index 8cee7fe..db3c53d 100644 --- a/lib/mw/Batcher.js +++ b/lib/mw/Batcher.js @@ -269,18 +269,17 @@ */ Batcher.prototype.imageinfo = Promise.method(function(filename, dims) { var env = this.env; - var action = env.conf.wiki.useVideoInfo ? 'videoinfo' : 'imageinfo'; - var hash = Util.makeHash([action, filename, dims.width || "", dims.height || "", env.page.name]); + var hash = Util.makeHash(["imageinfo", filename, dims.width || "", dims.height || "", env.page.name]); if (hash in this.resultCache) { return this.resultCache[hash]; } else if (!env.conf.parsoid.useBatchAPI) { - this.trace('Non-batched ' + action + ' request'); + this.trace("Non-batched imageinfo request"); return this.legacyRequest(api.ImageInfoRequest, [ env, filename, dims, hash, ], hash); } else { var params = { - action: action, + action: "imageinfo", filename: filename, hash: hash, page: env.page.name, @@ -337,7 +336,7 @@ var apiItemParams; for (i = 0; i < batchParams.length; i++) { params = batchParams[i]; - if (params.action === 'imageinfo' || params.action === 'videoinfo') { + if (params.action === 'imageinfo') { apiItemParams = { action: params.action, filename: params.filename, -- To view, visit https://gerrit.wikimedia.org/r/339595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I308b7ff963b63d06f6380e45ec596eac296d9aa5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra <abrea...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits