Coding style

This commit is contained in:
Zoe Roux 2023-08-02 00:56:52 +09:00
parent 9591350c3e
commit e075306363

View File

@ -157,7 +157,9 @@ pub async fn identify(path: String) -> Result<MediaInfo, std::io::Error> {
} }
let extension = extension_table.get(codec.as_str()).map(|x| x.to_string()); let extension = extension_table.get(codec.as_str()).map(|x| x.to_string());
Subtitle { Subtitle {
link: extension.as_ref().map(|ext| format!("/video/{sha}/subtitle/{index}.{ext}")), link: extension
.as_ref()
.map(|ext| format!("/video/{sha}/subtitle/{index}.{ext}")),
index, index,
title: x["Title"].as_str().map(|x| x.to_string()), title: x["Title"].as_str().map(|x| x.to_string()),
language: x["Language"].as_str().map(|x| x.to_string()), language: x["Language"].as_str().map(|x| x.to_string()),