文件下载计数功能
Please make sure of the following things
- [X] I have read the documentation.
- [X] I'm sure there are no duplicate issues or discussions.
- [X] I'm sure this feature is not implemented.
- [X] I'm sure it's a reasonable and popular requirement.
Description of the feature / 需求描述
新功能需求
- 为alist添加一个下载计数的功能
- 后台挂载的存储中添加一个以下载次数为排序的选项
- 前端面板为每个文件展示累计的下载次数
- 前端面板可以展示热门下载的资源
Suggested solution / 实现思路
大概思路
- 使用chatgpt整理了一下思路以及有一些参考代码,查看我的对话分享:https://chat.openai.com/share/f3b84c4c-dd1c-43fa-ab0d-bbedc4dadd4d
- 通过修改后端数据库字段实现保存下载计数
- 修改下载接口逻辑计数下载次数
- 通过缓存写入下载计数应对高频访问
- 同一个访问IP在1小时内的重复下载记作一次
- 计数方式使用唯一标识符追踪
- 后端新增控制单元,是否展示热门下载资源
- 修改前端面板展示下载计数和热门资源
Additional context / 附件
博客的文章都会有访问计数,以此展示给访客热门的文章,文件分享网站的下载计数以此展示给访客热门资源
Thanks for opening your first issue here! Be sure to follow the issue template!
See
- 56% #5304
我认为这个意义不大。。。我倒是自己实现了一个类似的功能 不过这个需求,我感觉,应该是会被无视的 至少我感觉加到alist里,不合理
我认为这个意义不大。。。我倒是自己实现了一个类似的功能 不过这个需求,我感觉,应该是会被无视的 至少我感觉加到alist里,不合理
嗯,一直沒搜到原有的需求,提交以後才發現https://github.com/alist-org/alist/issues/5304已有
我的做法是日志入库,入库之后可以上查询可以做到类似的功能,也能实现下载类型的统计之类的,得益于数据库的强大,还能查询出某时段内某类型的下载量
我现在还在研究怎么让修改它的日志输出格式,直接导出我想要的东西来减少序列化的负载
支持,希望实现!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello @, this issue was closed due to inactive more than 52 days. You can reopen or recreate it if you think it should continue. Thank you for your contributions again.