This commit is contained in:
2023-10-17 18:56:37 +03:00
parent d9736b29a4
commit 4b9e9cb4f6
13 changed files with 4 additions and 432 deletions
+1 -21
View File
@@ -1,31 +1,11 @@
import {getContext} from "svelte";
export function imgurl(record, width = "", height = "", mode = "") {
// let argumentString = "-o";
// if (mode) {
// argumentString += "-mode_fit";
// }
// if (width) {
// argumentString += "-w_" + width;
// }
// if (height) {
// argumentString += "-h_" + height;
// }
// let pathAr = record._file.path.split(".");
// let ext = pathAr.pop();
// let filename = record._file.path.replace("." + ext, "");
// let cache = "cache/"
// if (!mode && !width && !height) {
// argumentString = "";
// cache = "";
// }
export function imgurl(record) {
const channel = getContext("channel")
return channel.filesUrl + `/thumbs/${record._file.path}`;
}
export function fileurl(record) {
const channel = getContext("channel")
return channel.filesUrl + `/${record._file.path}`;
}