MooWantFree / alist

添加了下载记录log的alist
https://alist.nn.ci
GNU Affero General Public License v3.0
1 stars 0 forks source link

English | 中文 | 日本語 | Contributing | CODE_OF_CONDUCT

Introduction

For detailed information about alist, please refer to the alist official repository.

This fork is a modified version of the official alist, adding download statistics functionality.

Principle

A new table is added to the original alist database. Each download adds an entry to the database, and the statistics can be retrieved via an API.

The API is:

/api/admin/counter/get

Request body:

{
  "current_page": 1,
  "page_size": 1,
  "sort_key": "download_time",
  "reverse": false,
  "file_name": "fileName",
  "ip_address": "1.1.1.1",
  "status_code": 200
}
Parameter Type Required Description
current_page int y Current page number
page_size int y Page size
sort_key string y Column name for sorting
reverse bool y Descending or ascending order
file_name string n File name without path
ip_address string n download request IP
status_code int n http status code

Usage

image

Add a new entry named "Counter" in the Manage interface. Click it to view the download statistics.

Completion Plan