Commit Graph

152 Commits (027edcbe536230c4607f1d73ccff85c666ed146c)

Author SHA1 Message Date
kdxcxs c28168c970
feat: support qbittorrent (close #3087 in #3333)
* feat(qbittorrent): authorization and logging in support

* feat(qbittorrent/client): support `AddFromLink`

* refactor(qbittorrent/client): check authorization when getting a new client

* feat(qbittorrent/client): support `GetInfo`

* test(qbittorrent/client): update test cases

* feat(qbittorrent): init qbittorrent client on bootstrap

* feat(qbittorrent): support setting webui url via gin

* feat(qbittorrent/client): support deleting

* feat(qbittorrent/client): parse `TorrentStatus` enum when unmarshalling json in `GetInfo()`

* feat(qbittorrent/client): support getting files by id

* feat(qbittorrent): support adding qbittorrent tasks via gin

* refactor(qbittorrent/client): return a `Client` interface in `New()` instead of `*client`

* refactor: task handle

* chore: fix typo

* chore: change path

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-02-14 15:20:45 +08:00
BoYanZh 7bc46de8aa
feat: settings for tls insecure skip verify (close #3306 in #3307) 2023-02-08 22:01:26 +08:00
Noah Hsu a4f4fb2d73 chore(deps): upgrade github.com/caarlos0/env 2023-02-07 19:55:55 +08:00
Noah Hsu a181b56ea7 feat: optional forward direct link params (close #3123) 2023-02-07 16:39:14 +08:00
Andy Hsu 44cb8aaafe feat: only log to std on debug/dev mode 2023-02-05 09:17:37 +08:00
Andy Hsu 3d0065bdcf feat!: allow disable user (close #3241)
From this commit, the guest user will be disabled by default
2023-02-04 11:44:17 +08:00
Noah Hsu 98872a8fdb fix: cancel `EXCLUSIVE` mode on sqlite3
because it will result in failure to get admin's info
2023-01-19 16:49:43 +08:00
Noah Hsu d61242d85d feat: add `wma` to default audio types (close #3088) 2023-01-18 10:50:28 +08:00
Noah Hsu 26fe0a7684 feat: customize index max depth
Because some driver's issue may cause infinite loop
2023-01-17 17:33:18 +08:00
Aoang 9c7e451c03
perf: optimize sqlite3 (#3074)
- use journal mode to WAL
- set locking mode to EXCLUSIVE
- set auto vacuum

ref:
 - https://www.sqlite.org/pragma.html#pragma_journal_mode
 - https://www.sqlite.org/pragma.html#pragma_locking_mode
 - https://www.sqlite.org/pragma.html#pragma_auto_vacuum
2023-01-17 17:06:11 +08:00
BoYanZh 7902b646ff
feat: add database non full text index (close #2916) 2023-01-07 01:40:49 +08:00
BoYanZh 1c453ae147
feat: add a switch to enable auto update index (close #2930) 2023-01-07 00:59:30 +08:00
Noah Hsu f777a2fab4 fix: version doesn't update 2022-12-30 01:24:37 +08:00
itsHenry 83fe17c6ec
feat: support github login (#2639)
* Support Github Login

* improve according to codefactor

* fix due to last updates

* optimization

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-27 22:11:22 +08:00
Noah Hsu e118f4a3b9 feat: update index by `req.Paths` 2022-12-24 20:23:04 +08:00
Noah Hsu b0255040c6 chore: fix typo 2022-12-20 20:07:19 +08:00
Noah Hsu f1e842e12a feat: customize settings layout (close #2765) 2022-12-20 20:04:37 +08:00
EzraRT 146619134d
feat: customize proxy ignore headers (close #2763 pr #2766)
* clean referer when use proxy

* feat: customize proxy ignore headers

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-20 16:08:32 +08:00
BoYanZh e2bcca2fbd
feat: static files for embed viewers (#2739) 2022-12-19 13:34:06 +08:00
foxxorcat 6024e8d832
refactor: split the db package hook and cache to the op package (#2747)
* refactor:separate the setting method from the db package to the op package and add the cache

* refactor:separate the meta method from the db package to the op package

* fix:setting not load database data

* refactor:separate the user method from the db package to the op package

* refactor:remove user JoinPath error

* fix:op package user cache

* refactor:fs package list method

* fix:tile virtual paths (close #2743)

* Revert "refactor:remove user JoinPath error"

This reverts commit 4e20daaf9e.

* clean path directly may lead to unknown behavior

* fix: The path of the meta passed in must be prefix of reqPath

* chore: rename all virtualPath to mountPath

* fix: `getStoragesByPath` and `GetStorageVirtualFilesByPath`

is_sub_path:

/a/b isn't subpath of /a/bc

* fix: don't save setting if hook error

Co-authored-by: Noah Hsu <i@nn.ci>
2022-12-18 19:51:20 +08:00
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 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
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
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
Noah Hsu ff0bcfef8a feat: optional sign all files 2022-11-30 22:10:07 +08:00
Noah Hsu 76f37373e0 fix: settings map read and write concurrently 2022-11-28 16:54:03 +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 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 3b6d8987db chore: add id to resp of create storage 2022-11-13 20:17:10 +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 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 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 a570e4c7a0 fix: some settings don't take effect at startup 2022-09-23 20:37:49 +08:00
Noah Hsu 539c47bd3b chore: change log if aria2 not ready 2022-09-23 20:04:47 +08:00
Noah Hsu b71ecc8e89 chore: add a default polyfill to head 2022-09-22 11:29:39 +08:00
Noah Hsu d329df70f3 fix: failed create record if use mysql (close #1690) 2022-09-16 22:21:43 +08:00
Noah Hsu 86a625cb40 fix: set `CHARSET` to `utf8mb4` if use mysql 2022-09-15 17:14:03 +08:00
Noah Hsu 78e34f0d9f fix: log error if err != nil (close #1651) 2022-09-12 17:01:06 +08:00
Noah Hsu 107462e42e chore: change default pdf viewer address 2022-09-11 18:27:28 +08:00
Noah Hsu 220cd4d6b8 fix: must update version if upgrade 2022-09-10 13:47:38 +08:00
Noah Hsu 4af9124162 fix: error if use abs temp path (close #1624) 2022-09-09 18:50:54 +08:00
Noah Hsu 7d3c3df207 ci: fix web release url 2022-09-09 13:34:22 +08:00
Noah Hsu 7a12f1bddd chore: add `audio_cover` setting 2022-09-07 19:18:19 +08:00
Noah Hsu 71d30b6819 chore: rename `index` to `order` of storage 2022-09-07 15:55:15 +08:00
Noah Hsu a24dfddc2a feat: add 189cloud driver 2022-09-06 14:39:21 +08:00
Noah Hsu 7da9e33c4d fix: hide access_token in error message of `baidu_netdisk` 2022-09-03 19:48:11 +08:00
Noah Hsu 284274b37e feat: add 123pan driver 2022-09-01 22:13:37 +08:00
Noah Hsu 7290f9b301 chore: remove `global_readme` setting 2022-09-01 14:17:58 +08:00
Noah Hsu 7ac1d14eeb style: shorten name `operations` to `op` 2022-08-31 21:01:15 +08:00
Noah Hsu 102384e170 feat: add pikpak driver 2022-08-31 17:32:57 +08:00
Noah Hsu f551dc76d0 feat: add onedrive driver 2022-08-30 21:52:06 +08:00
Noah Hsu c95a7c2a04 chore: add `home_container` setting 2022-08-30 19:34:11 +08:00
Noah Hsu a6b9dbfbe4 fix: use `utils.Log` in some places 2022-08-30 16:13:01 +08:00
Noah Hsu 046bbb3a48 feat: use `lumberjack` for log rotate 2022-08-30 15:22:54 +08:00
Noah Hsu 74007a1d45 chore: add pagination settings 2022-08-27 23:07:48 +08:00
Noah Hsu fbcf082ca7 feat: auto generate settings lang 2022-08-27 18:35:05 +08:00
Noah Hsu d9ee174dd3 feat!: unity iframe preview 2022-08-23 16:50:54 +08:00
Noah Hsu 38db3508a5 chore: add external_previews setting 2022-08-18 11:34:02 +08:00
Noah Hsu 8cd05275f0 chore: change message type 2022-08-14 03:05:30 +08:00
Noah Hsu 05d8c27918 chore: rename `icon_color` to `main_color` 2022-08-13 15:11:46 +08:00
Noah Hsu 0fdfd1f2c2 feat: load storages while starting 2022-08-11 21:32:33 +08:00
Noah Hsu 358212749b chore: add home_icon setting 2022-08-09 18:06:04 +08:00
Noah Hsu d8b56042c3 chore: ignore opt_secret while marshal 2022-08-08 16:29:56 +08:00
Noah Hsu 6f48a0a82a chore: add custom office viewer 2022-08-08 13:03:34 +08:00
Noah Hsu 2b04cf4ac3 feat: custom hide error message by regexp (close #1468) 2022-08-08 12:53:53 +08:00
Noah Hsu 61fa6f38a8 feat: add type to fs read api 2022-08-08 00:51:05 +08:00
Noah Hsu 5b40254e3b chore: fix drivers not import 2022-08-07 13:23:15 +08:00
Noah Hsu 0df3473337 feat: use cobra and add some command 2022-08-07 13:09:59 +08:00
Noah Hsu b51e664543 chore: go fmt 2022-08-03 14:26:59 +08:00
Noah Hsu eface83716 chore: set initial guest permission 0 2022-07-27 21:53:21 +08:00
Noah Hsu 4f3129ec28 feat: change current user's profile 2022-07-23 20:42:12 +08:00
Noah Hsu 2bff656f00 chore: rename `VirtualPath` to `MountPath` 2022-07-12 14:11:37 +08:00
Noah Hsu fbc858b43c chore: optimize get settings 2022-07-12 14:03:03 +08:00
Noah Hsu 4ac312fd07 chore: add version to aria handle 2022-07-12 14:02:29 +08:00
Noah Hsu 6ebb36b2eb chore: deprecated settings test data 2022-07-11 22:36:30 +08:00
Noah Hsu fc1204c914 chore: rename account to storage 2022-07-10 14:45:39 +08:00
Noah Hsu 9ba7cf0835 chore: add base path setting 2022-07-02 16:43:07 +08:00
Noah Hsu e3891246b9 feat: post messenger 2022-07-01 16:53:01 +08:00
Noah Hsu 58d153e5ff fix: task list method 2022-06-29 18:56:31 +08:00
Noah Hsu d24e51bc86 chore: user permissions 2022-06-29 18:03:12 +08:00
Noah Hsu 3c7a2f78cf chore: init db and aria2 2022-06-29 17:37:40 +08:00
Noah Hsu 8abee6504f feat: set aria2 client and add url to aria2 api 2022-06-29 17:31:37 +08:00
Noah Hsu 40548926e6 feat: fs link api 2022-06-29 16:08:55 +08:00
Noah Hsu 67bc66fedf feat: file down handle 2022-06-28 18:00:11 +08:00
Noah Hsu d89ec89d51 feat: sign of file 2022-06-28 15:12:40 +08:00
Noah Hsu 5dbf5db4ff feat: token and reset 2022-06-28 14:18:10 +08:00
Noah Hsu 7903ed1f52 chore: change fs get and list resp 2022-06-27 21:34:13 +08:00
Noah Hsu 74973bc5b5 fix: local relative path 2022-06-27 20:37:05 +08:00
Noah Hsu 7c0b86a9cd feat: obj list api 2022-06-27 19:51:23 +08:00