mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-09 06:59:12 +01:00
Allow passing id as 6th argument
This commit is contained in:
parent
5bdf9d372b
commit
d67d10af9f
5
ctpv.c
5
ctpv.c
@ -106,12 +106,13 @@ static int preview(int argc, char *argv[])
|
||||
return ERR;
|
||||
}
|
||||
|
||||
char *f, *w, *h, *x, *y;
|
||||
char *f, *w, *h, *x, *y, *id;
|
||||
GET_PARG(f, 0);
|
||||
GET_PARG(w, 1);
|
||||
GET_PARG(h, 2);
|
||||
GET_PARG(x, 3);
|
||||
GET_PARG(y, 4);
|
||||
GET_PARG(id, 5);
|
||||
|
||||
ERRCHK_RET_OK(check_file(f));
|
||||
|
||||
@ -124,7 +125,7 @@ static int preview(int argc, char *argv[])
|
||||
|
||||
PreviewArgs args = {
|
||||
.ctpv = ctpv.ctpv_path,
|
||||
.f = f, .w = w, .h = h, .x = x, .y = y
|
||||
.f = f, .w = w, .h = h, .x = x, .y = y, .id = id
|
||||
};
|
||||
|
||||
return run_preview(get_ext(f), mimetype, &args);
|
||||
|
@ -163,6 +163,7 @@ int run_preview(const char *ext, const char *mimetype, PreviewArgs *pa)
|
||||
SET_PENV("h", pa->h);
|
||||
SET_PENV("x", pa->x);
|
||||
SET_PENV("y", pa->y);
|
||||
SET_PENV("id", pa->id);
|
||||
|
||||
SET_PENV("m", mimetype);
|
||||
SET_PENV("e", ext);
|
||||
|
Loading…
Reference in New Issue
Block a user