|
a/src/mediaserver/cdplugins/uprcl/uprclfolders.py |
|
b/src/mediaserver/cdplugins/uprcl/uprclfolders.py |
|
... |
|
... |
24 |
# Entry 0 in dirvec is special: it holds the 'topdirs' from the recoll
|
24 |
# Entry 0 in dirvec is special: it holds the 'topdirs' from the recoll
|
25 |
# configuration. The entries are paths instead of simple names, and
|
25 |
# configuration. The entries are paths instead of simple names, and
|
26 |
# the doc index (j) is 0. The dir index points normally to a dirvec
|
26 |
# the doc index (j) is 0. The dir index points normally to a dirvec
|
27 |
# entry.
|
27 |
# entry.
|
28 |
|
28 |
|
29 |
# Create new directory entry: insert in father and append dirvec slot (with ".." entry)
|
29 |
# Create new directory entry: insert in father and append dirvec slot
|
|
|
30 |
# (with ".." entry)
|
30 |
def _createdir(dirvec, fathidx, docidx, nm):
|
31 |
def _createdir(dirvec, fathidx, docidx, nm):
|
31 |
dirvec.append({})
|
32 |
dirvec.append({})
|
32 |
dirvec[fathidx][nm] = (len(dirvec) - 1, docidx)
|
33 |
dirvec[fathidx][nm] = (len(dirvec) - 1, docidx)
|
33 |
dirvec[-1][".."] = (fathidx, -1)
|
34 |
dirvec[-1][".."] = (fathidx, -1)
|
34 |
return len(dirvec) - 1
|
35 |
return len(dirvec) - 1
|