This commit is contained in:
2023-10-02 23:10:49 +03:00
commit c6cb488379
255 changed files with 18731 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
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 = "";
// }
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}`;
}