491 Commits

Author SHA1 Message Date
BoYanZh
b3be9ef428
feat(search): use FULLTEXT index (close #2716 pr #2726) 2022-12-16 16:51:36 +08:00
BoYanZh
5a6b600ace
feat: show gorm log on debug/dev mode (#2720) 2022-12-15 17:48:52 +08:00
BoYanZh
6f4b1ba4b3
feat: log to stdout & file (#2709) 2022-12-14 13:19:08 +08:00
BoYanZh
cdc45630ae
fix: whereInParent when parent = "/" (#2706) 2022-12-14 10:37:09 +08:00
BoYanZh
7947ff1ae4
feat: limit max connection count (#2701) 2022-12-14 10:33:58 +08:00
foxxorcat
33bae52fa1
refactor: optimize driver initialization need to manually deserialize and assign values, and remove redundant driver registration parameters (#2691)
* refactor: optimize driver initialization need to manually deserialize and assign values, and remove redundant driver registration parameters

* fix typo

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-13 18:03:30 +08:00
BoYanZh
179d285564
feat: optimize database search (#2687)
* feat: remove index on `SearchNode.Name`

As we do not use s% on name column, index there does not work

* fix: init index after init data

Or on the first run, it will log 'init index error: readObjectStart: expect { or n, but found , error found in #0 byte of ...||..., bigger context ...||...'

* fix: match parent more precisely

It will match `/a/bc` if we search in `/a/b` originally.
But it is not backward compatible by adding a suffix `/`
to all the data in parent field
2022-12-12 20:20:01 +08:00
Noah Hsu
5043815d48 fix(search): don't delete virtual folder while update indexes (close #2677) 2022-12-11 14:59:58 +08:00
BoYanZh
1640f06e13
feat(search): multiple keywords split by space (#2669) 2022-12-10 19:28:34 +08:00
BoYanZh
62ea93837c
feat: alist v3 index permission (#2653)
* feat: alist v3 index permission

* fix allowIndexed check

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-10 19:03:09 +08:00
BoYanZh
6f1aeb47fd
feat: index enhancement (close #2632 pr #2636)
* feat: index paths as setting

* feat: clear index (#2632)

* feat: check indexMQ more frequently
2022-12-09 10:02:13 +08:00
BoYanZh
6e23c8b4c0
feat: partial update index (close #2593 close #2621 pr #2624) 2022-12-07 10:41:52 +08:00
BoYanZh
72aa63adce
fix: skip virtual driver on building index (close #2604 pr #2617) 2022-12-06 20:43:32 +08:00
BoYanZh
7aa4dfb240
feat: use natural sort in SortFiles (#2612) 2022-12-06 17:28:18 +08:00
Noah Hsu
f1a9b68022 fix(index): update indexes in database 2022-12-05 20:23:37 +08:00
Noah Hsu
dda1da4576 fix(index): nil pointer call 2022-12-05 20:22:35 +08:00
Noah Hsu
97f1efbb72 feat!: disable --force-bin-dir if --data is abs
related issues: #2580 #2542

after this commit, the `--force-bin-dir` would take no effect if `--data` is absolute path
2022-12-05 18:32:48 +08:00
Noah Hsu
bf8b6f4c2c feat: customize ignore paths of indexes 2022-12-05 16:45:11 +08:00
Noah Hsu
bd33c200dc feat: optimize index build 2022-12-05 16:07:36 +08:00
BoYanZh
8c0dfe2f3d
feat: Search enhancement (#2562)
* feat: ignore AList storage on indexing

* fix: remove unused err in `walkFn`

* chore(ci): fix auto_lang trigger and run it

* feat: batch index

* feat: quit index & init index

* feat: set DocType for bleve data

* fix: build index cleanup check origin err
2022-12-05 13:28:39 +08:00
Noah Hsu
4e1be9bee6 fix: async init aria2 to optimize start duration 2022-12-04 00:00:40 +08:00
BoYanZh
09f480318c
fix: unify settings string (#2555) 2022-12-02 17:42:42 +08:00
Noah Hsu
ff0bcfef8a feat: optional sign all files 2022-11-30 22:10:07 +08:00
Noah Hsu
4980b71ba3 fix: add hide check to canAccess (close #2532) 2022-11-30 22:01:33 +08:00
Noah Hsu
b5bf5f4325 fix: check if the req path is relative path (close #2531) 2022-11-30 21:38:00 +08:00
Noah Hsu
83644dab85 fix: mapping filename in GetName
some missed filename mapping
2022-11-30 20:46:54 +08:00
Noah Hsu
e98561ceb1 fix: filename char mapping while build index 2022-11-28 21:08:11 +08:00
Noah Hsu
76f37373e0 fix: settings map read and write concurrently 2022-11-28 16:54:03 +08:00
Simon
61a06992c3
fix(aria2): directory missing (close #1856 pr #2504) 2022-11-28 14:05:28 +08:00
Noah Hsu
ddcba93eea
feat: multiple search indexes (#2514)
* refactor: abstract search interface

* wip: ~

* fix cycle import

* objs update hook

* wip: ~

* Delete search/none

* auto update index while cache changed

* db searcher

TODO: bleve init issue

cannot open index, metadata missing

* fix size type

why float64??

* fix typo

* fix nil pointer using

* api adapt ui

* bleve: fix clear & change struct
2022-11-28 13:45:25 +08:00
BoYanZh
2383e851e2
fix: reset index before build new one (#2471) 2022-11-24 14:47:49 +08:00
BoYanZh
330a767fd7
feat: build index & search with bleve (close #1740 pr #2386)
* feat: build index & search with bleve (#1740)

* delete unused struct

Co-authored-by: Noah Hsu <i@nn.ci>
2022-11-24 11:46:47 +08:00
Noah Hsu
c09800790b feat: custom filename char mapping
fixes #2447 #2446 #2440 #2409 #2006 #1979 #1507 #324 #691 #518 #430
2022-11-22 15:54:18 +08:00
Noah Hsu
4dcaa24758 fix: cache is modified while sorting (close #2340) 2022-11-15 14:38:23 +08:00
Noah Hsu
3b6d8987db chore: add id to resp of create storage 2022-11-13 20:17:10 +08:00
小傅Fox
46701a176d
feat(aria2): mark aria2 seeding as complete (#2223)
Currently if using aria2 to download a torrent file, it does not
consider seeding + active as completed, so the torrent download task
only completes as aria2 stops seeding.

This commit uses seeder property of TaskInfo, and mark tasks with active
status and true seeder as complete.
2022-11-06 16:20:09 +08:00
Noah Hsu
1c212f6c30 feat!: force to use the bin dir as the data dir (close #2108)
- move default log path to `data/log/log.log`
- replace `--conf` with `--data`
2022-11-01 19:16:23 +08:00
Noah Hsu
0019959eec fix: delete cache if files is empty 2022-10-25 16:42:06 +08:00
Noah Hsu
a2c808c8ce fix: incorrect root path of initial storage for dev mode 2022-10-23 16:26:14 +08:00
缘生
4fef500795
feat(user): set default password of init user from env (#2058)
add init user default password

Signed-off-by: ysicing <i@ysicing.me>

Signed-off-by: ysicing <i@ysicing.me>
2022-10-19 20:06:06 +08:00
Noah Hsu
b8cf02ca68 fix(aria2): retry 5 times for get status (close #1857) 2022-10-18 15:27:19 +08:00
Noah Hsu
baebc2fbe9 fix: can't delete disabled storage (close #1942) 2022-10-09 22:20:48 +08:00
Noah Hsu
8c69260972 fix(webdav): set mime by ext if it's empty 2022-10-09 19:29:55 +08:00
Noah Hsu
451e418b18 perf: return cache before check obj to reduce recursion 2022-09-28 21:19:36 +08:00
Noah Hsu
9d9c79179b feat: custom token expires in 2022-09-27 14:05:00 +08:00
Noah Hsu
2fc0ccbfe0 fix: don't init aria2 in new goroutine (close #1752) 2022-09-26 15:11:08 +08:00
Noah Hsu
f86ad1dce4 fix: create temp dir perm with 777 (close #1813) 2022-09-26 14:48:59 +08:00
Noah Hsu
f0181d92cd fix: keep type of setting item is correct 2022-09-25 21:20:32 +08:00
Noah Hsu
7c32af4649 refactor!: move api_url and base_path to config file 2022-09-25 17:57:54 +08:00
Noah Hsu
03dbb3a403 chore: fix typo of env name 2022-09-25 17:41:04 +08:00