Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch v3.0.8 #24

Merged
merged 6 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -25,5 +26,13 @@
"phpcbf"
],
"phan": "phan -d . --long-progress-bar"
},
"extra": {
"installer-name": "EmbedVideo"
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EmbedVideo",
"version": "3.0.7",
"version": "3.0.8",
"author": [
"Jim R. Wilson",
"Andrew Whitworth",
Expand Down
3 changes: 2 additions & 1 deletion i18n/uk.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"@metadata": {
"authors": [
"DDPAT"
"DDPAT",
"Ice bulldog"
]
},
"embedvideo-description": "Ця роздвоєна версія додає функцію парсеру для вбудовування відео з популярних джерел.",
Expand Down
1 change: 1 addition & 0 deletions i18n/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -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」。",
Expand Down
12 changes: 8 additions & 4 deletions includes/Media/FFProbe/FFProbe.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down