Commit c3a428c5 authored by Julian Rother's avatar Julian Rother

thumbnail: changed parameters, added support for srcurl and more flexible thumbnail naming

parent 487cf954
Pipeline #212 passed with stage
in 7 minutes and 14 seconds
......@@ -38,10 +38,13 @@ int main(int argc, char *argv[])
/* Prepare arguments */
jobid = atoi(argv[1]);
ping_job(jobid, "running", 0);
src = buildpath(getenv(WORKER_RELEASED), jstr(jlookup(argv[4], "path"), 0));
if (jlookup(argv[4], "srcurl"))
src = jstr(jlookup(argv[4], "srcurl"), 0);
else
src = buildpath(getenv(WORKER_RELEASED), jstr(jlookup(argv[4], "src"), 0));
tmp = mprintf("%s/.tmp-%i", getenv(WORKER_TMP), jobid);
dest = mprintf("%s/thumbnail/l_%s.jpg", getenv(WORKER_RELEASED),
jstr(jlookup(argv[4], "lectureid"), "0"));
dest = mprintf("%s/thumbnail/%s", getenv(WORKER_RELEASED),
jstr(jlookup(argv[4], "filename"), "0"));
/* Open src */
demux = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment