From f53331815cc2a81f1f5488c80ee1d5e5c0831020 Mon Sep 17 00:00:00 2001 From: Hannes Date: Fri, 21 Jan 2022 21:43:59 +0100 Subject: [PATCH 1/5] refactor: Add composer installers as dependency --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8fadc87..923cf89 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,8 @@ "description": "Adds a parser function embedding video from popular sources.", "license": "MIT", "require": { - "php": ">=7.0.0" + "php": ">=7.0.0", + "composer/installers": ">=1.0.1" }, "require-dev": { "mediawiki/mediawiki-codesniffer": "36.0.0", @@ -25,5 +26,8 @@ "phpcbf" ], "phan": "phan -d . --long-progress-bar" + }, + "extra": { + "installer-name": "EmbedVideo" } } From 637cf1b4aa8ae6e386947009395eaa432014b42c Mon Sep 17 00:00:00 2001 From: Hannes Date: Tue, 25 Jan 2022 16:42:44 +0100 Subject: [PATCH 2/5] bug: Fix accessing title on FSFiles --- composer.json | 5 +++++ includes/Media/FFProbe/FFProbe.php | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 923cf89..3a0c8d6 100644 --- a/composer.json +++ b/composer.json @@ -29,5 +29,10 @@ }, "extra": { "installer-name": "EmbedVideo" + }, + "config": { + "allow-plugins": { + "composer/installers": true + } } } diff --git a/includes/Media/FFProbe/FFProbe.php b/includes/Media/FFProbe/FFProbe.php index 89acfff..eb695cd 100644 --- a/includes/Media/FFProbe/FFProbe.php +++ b/includes/Media/FFProbe/FFProbe.php @@ -61,12 +61,16 @@ public function getMetaData( string $select = 'v:0' ): array { // FSFiles are usually only present for uploads(?), only "real" files are relevant $this->file instanceof File ? ExpirationAwareness::TTL_INDEFINITE : ExpirationAwareness::TTL_MINUTE, function ( $old, &$ttl ) { + if ( $this->file instanceof FSFile ) { + $title = 'Newly uploaded file'; + } else { + $title = $this->file->getTitle(); + $title = $title !== null ? $title->getBaseText() : 'Untitled file'; + } + wfDebugLog( 'EmbedVideo', - sprintf( - 'Writing FFProbe Cache for %s', - $this->file->getTitle()->getBaseText(), - ) + sprintf( 'Writing FFProbe Cache for %s', $title ) ); $result = $this->invokeFFProbe(); From 18161fa26ea6e0bcbbccaf2b3690693ed4163edf Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 7 Mar 2022 13:08:57 +0100 Subject: [PATCH 3/5] Localisation updates from https://translatewiki.net. --- i18n/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i18n/uk.json b/i18n/uk.json index 128ed06..3ef36af 100644 --- a/i18n/uk.json +++ b/i18n/uk.json @@ -1,7 +1,8 @@ { "@metadata": { "authors": [ - "DDPAT" + "DDPAT", + "Ice bulldog" ] }, "embedvideo-description": "Ця роздвоєна версія додає функцію парсеру для вбудовування відео з популярних джерел.", From 795e45605aca414bd6b6c6e08656aeb9f63ba060 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 17 Mar 2022 13:09:40 +0100 Subject: [PATCH 4/5] Localisation updates from https://translatewiki.net. --- i18n/zh-hant.json | 1 + 1 file changed, 1 insertion(+) diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json index 3875c1f..51b1370 100644 --- a/i18n/zh-hant.json +++ b/i18n/zh-hant.json @@ -6,6 +6,7 @@ }, "embedvideo-description": "此分叉版本添加可用於內嵌來自熱門來源的影片之解析功能。", "embedvideo-consent-text": "點擊載入內容", + "embedvideo-play": "播放影片", "embedvideo-error-missingparams": "EmbedVideo 缺少一個必要的參數。", "embedvideo-error-service": "EmbedVideo 無法識別影片服務「$1」。", "embedvideo-error-id": "EmbedVideo 接收到用於服務「$1」的錯誤 ID「$2」。", From ff6d544e663dd3193dcd090fb503268982552777 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Thu, 12 May 2022 13:57:28 -0400 Subject: [PATCH 5/5] dist: Release v3.0.8 --- extension.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.json b/extension.json index e353201..989a2c7 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "EmbedVideo", - "version": "3.0.7", + "version": "3.0.8", "author": [ "Jim R. Wilson", "Andrew Whitworth",