Skip to content

Commit

Permalink
Merge branch 'hardlink-enhance'
Browse files Browse the repository at this point in the history
* hardlink-enhance:
  feat: 1.jQueryFileTree升级为最终版本; 2.硬链接目录和文件支持tooltip显示完整路径,并支持跳转到对应的目录; 3.目录树对媒体目录和下载目录提供特殊标识; 4.目录树支持只显示同步目录、媒体目录、下载目录,并可在目录路径区进行切换

# Conflicts:
#	web/static/css/style.css
#	web/templates/rename/mediafile.html
  • Loading branch information
waylonwang committed Sep 2, 2023
2 parents cc399db + 4b30ad1 commit e232d78
Show file tree
Hide file tree
Showing 12 changed files with 286 additions and 303 deletions.
217 changes: 0 additions & 217 deletions config/config.yaml

This file was deleted.

21 changes: 20 additions & 1 deletion web/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -4076,6 +4076,25 @@ def __get_sub_path(data):
for f in os.listdir("C:/")]
else:
dirs = [os.path.join("/", f) for f in os.listdir("/")]
elif d == "[SYNC-FOLDERS]":
sync_dirs = []
for id, conf in Sync().get_sync_path_conf().items():
sync_dirs.append(conf["from"])
sync_dirs.append(conf["to"])
dirs = list(set(sync_dirs))
elif d == "[DOWNLOAD-FOLDERS]":
dirs = [path.rstrip('/') for path in Downloader().get_download_visit_dirs()]
elif d == "[MEDIA-FOLDERS]":
media_dirs = []
movie_path = Config().get_config('media').get('movie_path')
tv_path = Config().get_config('media').get('tv_path')
anime_path = Config().get_config('media').get('anime_path')
unknown_path = Config().get_config('media').get('unknown_path')
if movie_path is not None: media_dirs.extend([path.rstrip('/') for path in movie_path])
if tv_path is not None: media_dirs.extend([path.rstrip('/') for path in tv_path])
if anime_path is not None: media_dirs.extend([path.rstrip('/') for path in anime_path])
if unknown_path is not None: media_dirs.extend([path.rstrip('/') for path in unknown_path])
dirs = list(set(media_dirs))
else:
d = os.path.normpath(unquote(d))
if not os.path.isdir(d):
Expand Down Expand Up @@ -4133,7 +4152,7 @@ def __get_hardlinks(data):
def parse_hardlinks(hardlinks):
paths = []
for link in hardlinks:
paths.append(SystemUtils.shorten_path(link["file"], 'left', 2))
paths.append([SystemUtils.shorten_path(link["file"], 'left', 2), link["file"], link["filepath"]])
return paths

r = {}
Expand Down
Loading

0 comments on commit e232d78

Please sign in to comment.