diff --git a/.dockerignore b/.dockerignore
index 6257f05..aa7dbce 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -18,7 +18,7 @@ verify-downloads/
.tmp_*
.tmp-deploy-*
.tmp-deploy-data/
-.mmtl.pid
+.mebox.pid
*.db
*.db-journal
*.db-shm
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 66cde86..88de506 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- - name: Telegram MMTL 交流群
- url: https://t.me/MMTL
+ - name: Telegram MeBox 交流群
+ url: https://t.me/MeBox
about: 适合快速交流部署经验、使用问题和排查线索。
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 64e26bb..95535dc 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -12,7 +12,7 @@ assignees: ""
## 期望方案
-请描述你希望 MMTL 如何工作。
+请描述你希望 MeBox 如何工作。
## 使用场景
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
index 9ae6f14..5903f90 100644
--- a/.github/codeql/codeql-config.yml
+++ b/.github/codeql/codeql-config.yml
@@ -1,4 +1,4 @@
-name: MMTL CodeQL
+name: MeBox CodeQL
paths-ignore:
- internal/service/fileid_other.go
diff --git a/.github/workflows/Auto-docker-publish.yml b/.github/workflows/Auto-docker-publish.yml
index 5506b2a..08be768 100644
--- a/.github/workflows/Auto-docker-publish.yml
+++ b/.github/workflows/Auto-docker-publish.yml
@@ -83,8 +83,8 @@ jobs:
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
- echo "tag=MMTL-v${NEW_VERSION}" >> $GITHUB_OUTPUT
- echo "tag=mmtl-v${NEW_VERSION}" >> $GITHUB_OUTPUT
+ echo "tag=MeBox-v${NEW_VERSION}" >> $GITHUB_OUTPUT
+ echo "tag=mebox-v${NEW_VERSION}" >> $GITHUB_OUTPUT
# 3. 更新 VERSION 文件
- name: Update version file
@@ -129,7 +129,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
- images: ghcr.io/${{ github.repository_owner }}/mmtl
+ images: ghcr.io/${{ github.repository_owner }}/mebox
tags: |
type=raw,value=latest
type=raw,value=${{ steps.bump_version.outputs.tag }}
@@ -192,7 +192,7 @@ jobs:
set -eux
# tag 已由 version-and-publish 推送;若 release 已存在则忽略(--verify-tag 幂等)
gh release create "$RELEASE_TAG" \
- --title "MMTL ${{ needs.version-and-publish.outputs.new_version }}" \
+ --title "MeBox ${{ needs.version-and-publish.outputs.new_version }}" \
--notes "自动化发布 ${{ needs.version-and-publish.outputs.new_version }}" \
--verify-tag --latest || true
@@ -238,16 +238,16 @@ jobs:
run: |
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
go build -trimpath -ldflags="-s -w -X main.version=${{ needs.version-and-publish.outputs.tag }}" \
- -o "dist/mmtl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}" ./cmd/server
+ -o "dist/mebox-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}" ./cmd/server
- name: Package
run: |
- mkdir -p package/mmtl
- cp "dist/mmtl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}" package/mmtl/mmtl${{ matrix.ext }}
- cp README.md package/mmtl/ 2>/dev/null || true
+ mkdir -p package/mebox
+ cp "dist/mebox-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}" package/mebox/mebox${{ matrix.ext }}
+ cp README.md package/mebox/ 2>/dev/null || true
if [ "${{ matrix.goos }}" = "windows" ]; then
- (cd package && zip -r "../mmtl_${{ matrix.goos }}_${{ matrix.goarch }}.zip" mmtl)
+ (cd package && zip -r "../mebox_${{ matrix.goos }}_${{ matrix.goarch }}.zip" mebox)
else
- tar -czf "mmtl_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz" -C package mmtl
+ tar -czf "mebox_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz" -C package mebox
fi
- name: Upload to GitHub Release
env:
@@ -255,8 +255,8 @@ jobs:
RELEASE_TAG: ${{ needs.version-and-publish.outputs.tag }}
run: |
set -eux
- PKG="mmtl_${{ matrix.goos }}_${{ matrix.goarch }}.zip"
- TAR="mmtl_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz"
+ PKG="mebox_${{ matrix.goos }}_${{ matrix.goarch }}.zip"
+ TAR="mebox_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz"
# 并发上传到同一 release 各自文件,--clobber 幂等覆盖
if [ -f "$PKG" ]; then
for i in 1 2 3; do gh release upload "$RELEASE_TAG" "$PKG" --clobber && break || sleep 5; done
diff --git a/.github/workflows/beta-build.yml b/.github/workflows/beta-build.yml
index d6dee8a..e700abb 100644
--- a/.github/workflows/beta-build.yml
+++ b/.github/workflows/beta-build.yml
@@ -4,7 +4,7 @@
# 产出:
# 1. 前端 + 后端编译验证(go vet / go test / go build)
# 2. 多平台可执行二进制 artifact(linux/amd64、linux/arm64、windows/amd64)
-# 3. ghcr.io/{owner}/mmtl:beta 多架构 Docker 镜像(linux/amd64 + linux/arm64)
+# 3. ghcr.io/{owner}/mebox:beta 多架构 Docker 镜像(linux/amd64 + linux/arm64)
#
# 与 main 分支的发布流(Auto-docker-publish.yml)隔离:beta 不做版本递增、
# 不打 release tag,只构建带 -beta 标识的产物供测试。
@@ -73,21 +73,21 @@ jobs:
# 多平台可执行文件(嵌入刚构建的 web/dist)
- name: Build linux/amd64
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mmtl-beta-linux-amd64 ./cmd/server
+ run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mebox-beta-linux-amd64 ./cmd/server
- name: Build linux/arm64
- run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mmtl-beta-linux-arm64 ./cmd/server
+ run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mebox-beta-linux-arm64 ./cmd/server
- name: Build windows/amd64
- run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mmtl-beta-windows-amd64.exe ./cmd/server
+ run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w -X main.version=${{ steps.version.outputs.full_version }}" -o dist/mebox-beta-windows-amd64.exe ./cmd/server
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
- name: mmtl-beta-binaries
+ name: mebox-beta-binaries
path: dist/*
if-no-files-found: error
# ─────────────────────────────────────────────────────────────────────────────
- # 2) Beta Docker 镜像(ghcr.io/{owner}/mmtl:beta)
+ # 2) Beta Docker 镜像(ghcr.io/{owner}/mebox:beta)
# ─────────────────────────────────────────────────────────────────────────────
docker-beta:
name: Build & push beta Docker image
@@ -123,7 +123,7 @@ jobs:
push: true
provenance: false
sbom: false
- tags: ghcr.io/${{ github.repository_owner }}/mmtl:beta
+ tags: ghcr.io/${{ github.repository_owner }}/mebox:beta
labels: |
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=${{ github.repository }}
diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index 4e5d4fb..3f8d236 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
version:
- description: 'Image tag to publish, for example MMTL-v0.0.32'
+ description: 'Image tag to publish, for example MeBox-v0.0.32'
required: true
type: string
ref:
@@ -42,7 +42,7 @@ jobs:
uses: docker/metadata-action@v5
with:
# 自动使用当前仓库所有者
- images: ghcr.io/${{ github.repository_owner }}/mmtl
+ images: ghcr.io/${{ github.repository_owner }}/mebox
tags: |
type=raw,value=latest
type=raw,value=${{ env.RELEASE_VERSION }}
diff --git a/.gitignore b/.gitignore
index ffa5aea..3f7bb76 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,7 +32,7 @@ logs/
.tmp-deploy-cache/
.tmp-deploy-server.*
.tmp-live-server.*
-.mmtl.pid
+.mebox.pid
*.log
*.db
*.db-journal
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bd4b8f7..22fccd6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
# 贡献规范
-感谢你愿意帮助 MMTL 变得更稳定。这个项目主要面向 NAS、Docker 部署、媒体库整理、订阅下载和多端播放场景;提交 Issue 或 Pull Request 时,请尽量提供可复现、可验证的信息。
+感谢你愿意帮助 MeBox 变得更稳定。这个项目主要面向 NAS、Docker 部署、媒体库整理、订阅下载和多端播放场景;提交 Issue 或 Pull Request 时,请尽量提供可复现、可验证的信息。
## Issue 提交规范
@@ -16,7 +16,7 @@
- 期望行为:你认为正确结果应该是什么。
- 复现步骤:从哪个页面、点击什么、填写什么、触发什么任务。
- 部署方式:Docker 第一档 / 第二档 / 第三档、裸机运行、反代方式等。
-- 环境信息:NAS 型号或系统、Docker / Compose 版本、浏览器、MMTL 镜像版本。
+- 环境信息:NAS 型号或系统、Docker / Compose 版本、浏览器、MeBox 镜像版本。
- 相关配置:路径映射、下载器保存路径、媒体库路径、站点类型等。请隐藏 Cookie、API Key、密码和 Token。
- 日志和任务信息:优先提供应用日志、任务队列详情、浏览器控制台错误、网络请求错误。
@@ -28,14 +28,14 @@ Docker 部署常用命令:
```bash
docker compose ps
-docker compose logs --tail=300 mmtl
-docker compose exec mmtl sh -lc 'ls -la /data/logs || true'
+docker compose logs --tail=300 mebox
+docker compose exec mebox sh -lc 'ls -la /data/logs || true'
```
PostgreSQL 部署查询示例:
```bash
-docker compose exec postgres psql -U mmtl -d mmtl -c "select key,value,updated_at from settings order by updated_at desc limit 30;"
+docker compose exec postgres psql -U mebox -d mebox -c "select key,value,updated_at from settings order by updated_at desc limit 30;"
```
请勿公开粘贴以下敏感信息:
diff --git a/Dockerfile b/Dockerfile
index 0b20f37..5d484cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.6
# =============================================================================
-# Multi-architecture build for MMTL.
+# Multi-architecture build for MeBox.
#
# Stage 1 (frontend) : Node 20 -> static SPA bundle
# Stage 2 (backend) : Go 1.25 -> single static binary (CGO_ENABLED=0)
@@ -8,7 +8,7 @@
#
# Build:
# docker buildx build --platform linux/amd64,linux/arm64 \
-# --build-arg VERSION=MMTL-v0.1.16 -t mmtl:latest --push .
+# --build-arg VERSION=MeBox-v0.1.16 -t mebox:latest --push .
#
# Optional Intel VAAPI/QSV runtime packages:
# docker buildx build --build-arg WITH_VAAPI=true ...
@@ -39,7 +39,7 @@ COPY . .
COPY --from=frontend /app/web/dist ./web/dist
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
- go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o mmtl ./cmd/server
+ go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o mebox ./cmd/server
# ---- Stage 3: runtime ------------------------------------------------------
FROM alpine:3.23
@@ -64,22 +64,22 @@ RUN apk add --no-cache \
&& rm -rf /var/cache/apk/*
# Non-root user for the long-running process.
-RUN addgroup -S mmtl && adduser -S mmtl -G mmtl
+RUN addgroup -S mebox && adduser -S mebox -G mebox
WORKDIR /app
-COPY --from=backend /app/mmtl /usr/local/bin/mmtl
+COPY --from=backend /app/mebox /usr/local/bin/mebox
COPY --from=frontend /app/web/dist /app/web/dist
RUN mkdir -p /data /cache /media \
- && chown -R mmtl:mmtl /data /cache /media
+ && chown -R mebox:mebox /data /cache /media
# Default environment (overridable via docker-compose / `docker run -e`).
-ENV MMTL_APP_PORT=8080 \
- MMTL_APP_DATA_DIR=/data \
- MMTL_APP_WEB_DIR=/app/web/dist \
- MMTL_DATABASE_DB_PATH=/data/mmtl.db \
- MMTL_CACHE_CACHE_DIR=/cache \
- MMTL_LOGGING_LEVEL=info \
+ENV MEBOX_APP_PORT=8080 \
+ MEBOX_APP_DATA_DIR=/data \
+ MEBOX_APP_WEB_DIR=/app/web/dist \
+ MEBOX_DATABASE_DB_PATH=/data/mebox.db \
+ MEBOX_CACHE_CACHE_DIR=/cache \
+ MEBOX_LOGGING_LEVEL=info \
TZ=Asia/Shanghai
EXPOSE 8080
diff --git a/README.md b/README.md
index 961de6f..1e2f780 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# MMTL (My Movie and TV Library)
+# MeBox
-
+
面向 NAS 与家庭影音场景的私人媒体中心
@@ -31,9 +31,9 @@
## 项目简介
-**MMTL** 是一个自托管私人媒体管理系统,适合 NAS、小主机、家庭共享和多端播放场景。本项目由 [MediaStationGo](https://github.com/ShukeBta/MediaStationGo) fork 并持续二开维护,在保留「一套服务覆盖网页、手机、电视与第三方播放器」思路的同时,围绕网盘播放、任务队列、远程挂载和权限体系做了大量增强。
+**MeBox** 是一个自托管私人媒体管理系统,适合 NAS、小主机、家庭共享和多端播放场景。本项目由 [MediaStationGo](https://github.com/ShukeBta/MediaStationGo) fork 并持续二开维护,在保留「一套服务覆盖网页、手机、电视与第三方播放器」思路的同时,围绕网盘播放、任务队列、远程挂载和权限体系做了大量增强。
-你可以把 MMTL 理解为:
+你可以把 MeBox 理解为:
- 一个带现代 Web UI 的**媒体库后台**
- 一个兼容 Emby/Jellyfin 客户端的**协议网关**
@@ -46,7 +46,7 @@
| **媒体库** | 电影、电视剧、动漫、综艺、音乐与自定义库;多根目录、扫库、海报墙、继续观看 |
| **元数据刮削** | TMDb、Bangumi、Douban、TheTVDB、Fanart 等;支持 NFO、手动匹配、刮削队列 |
| **播放** | 网页播放器、HLS 转码、弹幕、字幕、播放配置档、观看历史与收藏 |
-| **Emby 协议** | Infuse、SenPlayer、Fileball 等客户端可直接添加本服务,使用 MMTL 账号登录 |
+| **Emby 协议** | Infuse、SenPlayer、Fileball 等客户端可直接添加本服务,使用 MeBox 账号登录 |
| **远程 Emby 挂载** | 将远程 Emby 媒体库挂载到本地界面统一浏览(无需单独开 Emby 客户端) |
| **网盘与 STRM** | OpenList、CloudDrive2、115、WebDAV 等;STRM 同步、上传/下载队列、直链/302 播放 |
| **下载与整理** | qBittorrent 接入、站点搜索与订阅、下载后自动整理、文件管理器(复制/移动/硬链/软链) |
@@ -66,13 +66,13 @@
推荐使用 Docker Compose。仓库提供四份**互相独立**的完整模板,无需 `.env` 即可起步。
```bash
-mkdir -p MMTL && cd MMTL
+mkdir -p MeBox && cd MeBox
# 最省心:单镜像 + 内置 SQLite
-curl -fsSL https://raw.githubusercontent.com/truewhile/MMTL/main/docker-compose.simple.yml -o docker-compose.yml
+curl -fsSL https://raw.githubusercontent.com/truewhile/MeBox/main/docker-compose.simple.yml -o docker-compose.yml
# 或多用户场景:PostgreSQL 第一档
-# curl -fsSL https://raw.githubusercontent.com/truewhile/MMTL/main/docker-compose.yml -o docker-compose.yml
+# curl -fsSL https://raw.githubusercontent.com/truewhile/MeBox/main/docker-compose.yml -o docker-compose.yml
docker compose up -d
```
@@ -88,7 +88,7 @@ http://服务器IP:18080
镜像地址:
```text
-ghcr.io/truewhile/mmtl:latest
+ghcr.io/truewhile/mebox:latest
```
---
@@ -99,16 +99,16 @@ ghcr.io/truewhile/mmtl:latest
| 档位 | 配置文件 | 组件 | 适合场景 |
| --- | --- | --- | --- |
-| 单镜像档 | `docker-compose.simple.yml` | MMTL + SQLite | 新手、单人、低配 NAS,只想一个容器跑起来 |
-| 第一档 | `docker-compose.yml` | MMTL + PostgreSQL | 大多数家庭 NAS,多用户更稳 |
+| 单镜像档 | `docker-compose.simple.yml` | MeBox + SQLite | 新手、单人、低配 NAS,只想一个容器跑起来 |
+| 第一档 | `docker-compose.yml` | MeBox + PostgreSQL | 大多数家庭 NAS,多用户更稳 |
| 第二档 | `docker-compose.standard.yml` | + Redis | 多用户、Emby 客户端频繁刷新、首页/列表访问多 |
| 第三档 | `docker-compose.search.yml` | + OpenSearch | 超大媒体库、复杂全文搜索(内存占用更高) |
### 单镜像档要点
-- 只启动 **一个** MMTL 容器,数据在 `./data/mmtl.db`
+- 只启动 **一个** MeBox 容器,数据在 `./data/mebox.db`
- 通常只需改端口与媒体目录挂载
-- **不要**设置 `MMTL_DATABASE_DSN`,否则会切到 PostgreSQL
+- **不要**设置 `MEBOX_DATABASE_DSN`,否则会切到 PostgreSQL
```yaml
ports:
@@ -124,11 +124,11 @@ volumes:
### PostgreSQL 档位要点
- 主库在 `./postgres`,配置与密钥在 `./data`
-- 若存在旧版 `./data/mmtl.db`,首次启动会自动迁移到 PostgreSQL
-- 迁移完成后可将 `MMTL_DATABASE_DB_PATH` 改为不存在路径,避免重复检查:
+- 若存在旧版 `./data/mebox.db`,首次启动会自动迁移到 PostgreSQL
+- 迁移完成后可将 `MEBOX_DATABASE_DB_PATH` 改为不存在路径,避免重复检查:
```yaml
-MMTL_DATABASE_DB_PATH: /data/no-sqlite-migration.db
+MEBOX_DATABASE_DB_PATH: /data/no-sqlite-migration.db
```
### 必须备份与可重建
@@ -144,11 +144,11 @@ MMTL_DATABASE_DB_PATH: /data/no-sqlite-migration.db
### 更新镜像
```bash
-docker compose pull mmtl
-docker compose up -d --no-deps mmtl
+docker compose pull mebox
+docker compose up -d --no-deps mebox
```
-日常更新只拉 `mmtl` 服务即可,不要随意 `docker compose pull` 升级 PostgreSQL/Redis/OpenSearch 基础镜像。
+日常更新只拉 `mebox` 服务即可,不要随意 `docker compose pull` 升级 PostgreSQL/Redis/OpenSearch 基础镜像。
---
@@ -158,7 +158,7 @@ Docker 部署最常见的问题是路径填错。记住:
- `volumes` **左侧**是宿主机真实路径,**右侧**是容器内路径
- 网页后台添加媒体库时,应填写**容器内**路径(如 `/media/电影`)
-- 若使用自动整理/下载入库,`MMTL_MEDIA_DIR` 与 `MMTL_DOWNLOAD_DIR` 需与挂载一致
+- 若使用自动整理/下载入库,`MEBOX_MEDIA_DIR` 与 `MEBOX_DOWNLOAD_DIR` 需与挂载一致
NAS 示例:
@@ -167,10 +167,10 @@ volumes:
- /vol1/1000/Media:/media
- /vol1/1000/Downloads:/downloads
environment:
- MMTL_MEDIA_DIR: /vol1/1000/Media
- MMTL_MEDIA_CONTAINER_DIR: /media
- MMTL_DOWNLOAD_DIR: /vol1/1000/Downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_MEDIA_DIR: /vol1/1000/Media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
+ MEBOX_DOWNLOAD_DIR: /vol1/1000/Downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
```
---
@@ -181,7 +181,7 @@ environment:
2. **配置元数据源** → 系统设置中添加 TMDb、Bangumi 等 API
3. **(可选)连接 qBittorrent** → 下载客户端设置,宿主机可用 `http://host.docker.internal:8085`
4. **(可选)配置网盘账号** → STRM 管理中添加 OpenList / 115 / WebDAV 等
-5. **第三方播放器** → 以 Emby 服务器添加 `http://服务器IP:18080`,使用 MMTL 账号登录
+5. **第三方播放器** → 以 Emby 服务器添加 `http://服务器IP:18080`,使用 MeBox 账号登录
---
@@ -191,13 +191,13 @@ environment:
先确认路径映射与数据库档位。网盘扫描还受接口限速与目录规模影响;大库可考虑第二档 Redis 或第三档 OpenSearch。
**qBittorrent 下载后无法整理?**
-确认下载目录已通过 `volumes` 挂进容器,且 `MMTL_DOWNLOAD_*` 环境变量对应正确。
+确认下载目录已通过 `volumes` 挂进容器,且 `MEBOX_DOWNLOAD_*` 环境变量对应正确。
**硬链接失败(cross-device link)?**
硬链接要求源与目标在同一文件系统/子卷;跨盘、跨 btrfs 子卷或网盘挂载时请改用复制或软链接。
**第三方播放器连不上?**
-确认地址为 `http://IP:18080`,使用 MMTL 用户账号;反代部署需正确配置外部 URL 与 HTTPS 头。
+确认地址为 `http://IP:18080`,使用 MeBox 用户账号;反代部署需正确配置外部 URL 与 HTTPS 头。
---
@@ -220,7 +220,7 @@ CI 会在 Release 中提供 Windows / Linux / macOS 的 amd64、arm64 单文件
## 鸣谢
-MMTL 在 [MediaStationGo](https://github.com/ShukeBta/MediaStationGo) 的基础上 fork 并持续演进。感谢上游项目在媒体库架构、Emby 协议兼容和自托管体验上的奠基工作。
+MeBox 在 [MediaStationGo](https://github.com/ShukeBta/MediaStationGo) 的基础上 fork 并持续演进。感谢上游项目在媒体库架构、Emby 协议兼容和自托管体验上的奠基工作。
项目中许多网盘同步、STRM 与媒体整理相关的设计与实现,也参考了 [qmediasync](https://github.com/qicfan/qmediasync)。感谢该项目的思路与实践经验。
@@ -238,11 +238,11 @@ MMTL 在 [MediaStationGo](https://github.com/ShukeBta/MediaStationGo) 的基础
## Star History
-
+
-
-
-
+
+
+
diff --git a/README_EN.md b/README_EN.md
index 1927f58..0afda28 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -1,7 +1,7 @@
-# MMTL (My Movie and TV Library)
+# MeBox
-
+
A self-hosted media center for NAS and home theater
@@ -30,9 +30,9 @@
## Overview
-**MMTL** is a self-hosted private media management system for NAS, mini PCs, family sharing, and multi-device playback. This repository is a maintained fork of [MediaStationGo](https://github.com/ShukeBta/MediaStationGo), extended with stronger cloud playback, task queues, remote mounts, and permission controls.
+**MeBox** is a self-hosted private media management system for NAS, mini PCs, family sharing, and multi-device playback. This repository is a maintained fork of [MediaStationGo](https://github.com/ShukeBta/MediaStationGo), extended with stronger cloud playback, task queues, remote mounts, and permission controls.
-In practice, MMTL gives you:
+In practice, MeBox gives you:
- A modern **web media library**
- An **Emby/Jellyfin-compatible protocol gateway** for third-party players
@@ -45,8 +45,8 @@ In practice, MMTL gives you:
| **Libraries** | Movies, TV, anime, variety, music, custom libraries; multi-root scanning; poster wall; continue watching |
| **Metadata** | TMDb, Bangumi, Douban, TheTVDB, Fanart, NFO import, manual matching, scrape queue |
| **Playback** | Web player, HLS transcoding, danmaku, subtitles, play profiles, history and favourites |
-| **Emby protocol** | Add MMTL in Infuse, SenPlayer, Fileball, etc. and sign in with MMTL accounts |
-| **Remote Emby mounts** | Browse remote Emby libraries inside MMTL without a separate Emby client |
+| **Emby protocol** | Add MeBox in Infuse, SenPlayer, Fileball, etc. and sign in with MeBox accounts |
+| **Remote Emby mounts** | Browse remote Emby libraries inside MeBox without a separate Emby client |
| **Cloud & STRM** | OpenList, CloudDrive2, 115, WebDAV; STRM sync; upload/download queues; direct or 302 playback |
| **Downloads & organize** | qBittorrent, site search/subscriptions, post-download organization, file manager |
| **Users & permissions** | Admin/regular users, expiry, NSFW toggle, play-profile PIN, granular permissions |
@@ -65,13 +65,13 @@ In practice, MMTL gives you:
Docker Compose is the recommended path. The repo ships four **standalone** templates; no `.env` is required.
```bash
-mkdir -p MMTL && cd MMTL
+mkdir -p MeBox && cd MeBox
# Simplest: one container with built-in SQLite
-curl -fsSL https://raw.githubusercontent.com/truewhile/MMTL/main/docker-compose.simple.yml -o docker-compose.yml
+curl -fsSL https://raw.githubusercontent.com/truewhile/MeBox/main/docker-compose.simple.yml -o docker-compose.yml
# Or PostgreSQL tier for multi-user setups
-# curl -fsSL https://raw.githubusercontent.com/truewhile/MMTL/main/docker-compose.yml -o docker-compose.yml
+# curl -fsSL https://raw.githubusercontent.com/truewhile/MeBox/main/docker-compose.yml -o docker-compose.yml
docker compose up -d
```
@@ -87,7 +87,7 @@ Default login: `admin` / `admin123` — change the password immediately.
Image:
```text
-ghcr.io/truewhile/mmtl:latest
+ghcr.io/truewhile/mebox:latest
```
---
@@ -98,22 +98,22 @@ Pick one compose file. Do **not** stack multiple `-f` files.
| Tier | File | Stack | Best for |
| --- | --- | --- | --- |
-| Single image | `docker-compose.simple.yml` | MMTL + SQLite | Beginners, single-user, low-resource NAS |
-| Tier 1 | `docker-compose.yml` | MMTL + PostgreSQL | Most home NAS deployments |
+| Single image | `docker-compose.simple.yml` | MeBox + SQLite | Beginners, single-user, low-resource NAS |
+| Tier 1 | `docker-compose.yml` | MeBox + PostgreSQL | Most home NAS deployments |
| Tier 2 | `docker-compose.standard.yml` | + Redis | Multi-user, frequent Emby client refreshes |
| Tier 3 | `docker-compose.search.yml` | + OpenSearch | Very large libraries, advanced full-text search |
### Single-image notes
-- Only one MMTL container; database lives in `./data/mmtl.db`
-- Do **not** set `MMTL_DATABASE_DSN` or it switches to PostgreSQL
+- Only one MeBox container; database lives in `./data/mebox.db`
+- Do **not** set `MEBOX_DATABASE_DSN` or it switches to PostgreSQL
- Back up `./data`; `./cache` can be rebuilt
### PostgreSQL notes
- Primary DB: `./postgres`; secrets and runtime files: `./data`
-- Existing `./data/mmtl.db` migrates automatically on first start
-- After migration, point `MMTL_DATABASE_DB_PATH` at a non-existent file to disable re-checks
+- Existing `./data/mebox.db` migrates automatically on first start
+- After migration, point `MEBOX_DATABASE_DB_PATH` at a non-existent file to disable re-checks
### Backup
@@ -126,8 +126,8 @@ Pick one compose file. Do **not** stack multiple `-f` files.
### Update
```bash
-docker compose pull mmtl
-docker compose up -d --no-deps mmtl
+docker compose pull mebox
+docker compose up -d --no-deps mebox
```
---
@@ -138,7 +138,7 @@ The most common Docker mistake is mixing host paths with container paths.
- Left side of `volumes` = real host/NAS path
- Right side = container path; use `/media/...` in the web UI
-- Keep `MMTL_MEDIA_DIR` / `MMTL_DOWNLOAD_DIR` aligned with mounts when organizing or ingesting downloads
+- Keep `MEBOX_MEDIA_DIR` / `MEBOX_DOWNLOAD_DIR` aligned with mounts when organizing or ingesting downloads
Example:
@@ -147,10 +147,10 @@ volumes:
- /vol1/1000/Media:/media
- /vol1/1000/Downloads:/downloads
environment:
- MMTL_MEDIA_DIR: /vol1/1000/Media
- MMTL_MEDIA_CONTAINER_DIR: /media
- MMTL_DOWNLOAD_DIR: /vol1/1000/Downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_MEDIA_DIR: /vol1/1000/Media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
+ MEBOX_DOWNLOAD_DIR: /vol1/1000/Downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
```
---
@@ -161,7 +161,7 @@ environment:
2. Add metadata providers (TMDb, Bangumi, etc.) in system settings
3. Optionally connect qBittorrent (`http://host.docker.internal:8085` when qB runs on the host)
4. Optionally configure cloud accounts under STRM management
-5. Add the server in Emby-compatible players at `http://SERVER_IP:18080` using MMTL credentials
+5. Add the server in Emby-compatible players at `http://SERVER_IP:18080` using MeBox credentials
---
@@ -177,7 +177,7 @@ Ensure the download directory is mounted into the container and env vars match.
Hardlinks require the same filesystem/subvolume; use copy or symlink across disks or cloud mounts.
**External player cannot connect**
-Use `http://IP:18080` and a MMTL user account; reverse proxies need correct external URL and HTTPS headers.
+Use `http://IP:18080` and a MeBox user account; reverse proxies need correct external URL and HTTPS headers.
---
@@ -200,7 +200,7 @@ Release builds ship single-file binaries for Windows, Linux, and macOS on amd64
## Acknowledgements
-MMTL is forked from and continues to evolve [MediaStationGo](https://github.com/ShukeBta/MediaStationGo). Thank you to the upstream project for the media-library architecture, Emby-protocol compatibility, and self-hosted foundation.
+MeBox is forked from and continues to evolve [MediaStationGo](https://github.com/ShukeBta/MediaStationGo). Thank you to the upstream project for the media-library architecture, Emby-protocol compatibility, and self-hosted foundation.
Many cloud sync, STRM, and media-organization ideas in this project were also informed by [qmediasync](https://github.com/qicfan/qmediasync). Thank you for the reference implementation and design patterns.
@@ -214,11 +214,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before ope
## Star History
-
+
-
-
-
+
+
+
diff --git a/SECURITY.md b/SECURITY.md
index 2f9ff37..7f6dedb 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,13 +1,13 @@
# 安全策略
-MMTL 是自托管媒体系统,常部署在 NAS、家庭网络、Docker、反向代理和第三方下载器环境中。安全问题通常会同时涉及应用代码、容器配置、路径映射、站点 Cookie / API Key、下载器凭据和外部访问入口。请按本策略报告和处理安全问题。
+MeBox 是自托管媒体系统,常部署在 NAS、家庭网络、Docker、反向代理和第三方下载器环境中。安全问题通常会同时涉及应用代码、容器配置、路径映射、站点 Cookie / API Key、下载器凭据和外部访问入口。请按本策略报告和处理安全问题。
## 支持范围
我们优先支持以下版本和部署方式的安全修复:
- 当前 `main` 分支。
-- 最新发布镜像:`ghcr.io/truewhile/mmtl:latest`。
+- 最新发布镜像:`ghcr.io/truewhile/mebox:latest`。
- README 中推荐的 Docker Compose 第一档、第二档、第三档部署方式。
历史版本、私有魔改镜像、未公开补丁分支和非标准部署仍可报告,但维护者可能要求先在最新 `main` 或最新镜像中复现。
@@ -16,7 +16,7 @@ MMTL 是自托管媒体系统,常部署在 NAS、家庭网络、Docker、反
请不要在公开 Issue、PR、讨论区或群聊中披露可利用细节。优先使用 GitHub Security Advisory 私密报告:
-
+
如果无法使用 GitHub 私密报告,可以先通过项目 README 中的社区入口联系维护者,说明“需要私下报告安全问题”,不要直接贴出利用细节、密钥或完整日志。
@@ -68,14 +68,14 @@ MMTL 是自托管媒体系统,常部署在 NAS、家庭网络、Docker、反
## 自托管安全基线
-部署 MMTL 时建议:
+部署 MeBox 时建议:
- 首次登录后立即修改默认 `admin / admin123`。
- 不要把 PostgreSQL、Redis、OpenSearch、qBittorrent WebUI 暴露到公网。
- 反向代理公网访问时启用 HTTPS,并限制管理后台访问来源。
- 使用强随机的 JWT / 加密密钥,妥善备份 `./data` 和数据库。
- 不要在 Issue、PR、截图或日志中公开站点 Cookie、API Key、Passkey、下载器密码。
-- Docker `volumes` 只挂载 MMTL 需要访问的目录,媒体库目录需要写入时再授予写权限。
+- Docker `volumes` 只挂载 MeBox 需要访问的目录,媒体库目录需要写入时再授予写权限。
- 定期更新镜像,并在升级前备份 `./postgres` 和 `./data`。
## 安全修复 PR
diff --git a/cmd/server/log_rotate.go b/cmd/server/log_rotate.go
index 371dd01..d970209 100644
--- a/cmd/server/log_rotate.go
+++ b/cmd/server/log_rotate.go
@@ -7,7 +7,7 @@ import (
"sync"
"time"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
const defaultLogMaxSizeMB = 20
diff --git a/cmd/server/logging.go b/cmd/server/logging.go
index 90f18b5..6d32fd3 100644
--- a/cmd/server/logging.go
+++ b/cmd/server/logging.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// newLogger 根据 cfg.Logging 构建 Zap。
diff --git a/cmd/server/logging_test.go b/cmd/server/logging_test.go
index c49331b..1929f4d 100644
--- a/cmd/server/logging_test.go
+++ b/cmd/server/logging_test.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestProductionLoggerWritesConfiguredInfoToAppLogAndSplitsWarnError(t *testing.T) {
diff --git a/cmd/server/main.go b/cmd/server/main.go
index b810eae..713f7a4 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -1,6 +1,6 @@
-// Package main is the MMTL HTTP server entry point.
+// Package main is the MeBox HTTP server entry point.
//
-// MMTL is a Go rewrite of the legacy Python implementation,
+// MeBox is a Go rewrite of the legacy Python implementation,
// adopting the same tech stack as cropflre/nowen-video:
//
// Backend: Go 1.25 + Gin + GORM + PostgreSQL/SQLite + Viper + Zap + JWT
@@ -21,10 +21,10 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
// version is overwritten at build time via -ldflags="-X main.version=...".
@@ -35,7 +35,7 @@ func effectiveVersion(buildVersion string) string {
if buildVersion != "" && buildVersion != "dev" {
return buildVersion
}
- if envVersion := strings.TrimSpace(os.Getenv("MMTL_VERSION")); envVersion != "" {
+ if envVersion := strings.TrimSpace(os.Getenv("MEBOX_VERSION")); envVersion != "" {
return envVersion
}
if buildVersion == "" {
@@ -59,7 +59,7 @@ func main() {
defer func() { _ = logger.Sync() }()
appVersion := effectiveVersion(version)
- logger.Info("starting MMTL",
+ logger.Info("starting MeBox",
zap.String("version", appVersion),
zap.Int("port", cfg.App.Port),
zap.String("data_dir", cfg.App.DataDir),
@@ -135,5 +135,5 @@ func main() {
logger.Error("graceful shutdown failed", zap.Error(err))
}
services.Close()
- logger.Info("MMTL stopped")
+ logger.Info("MeBox stopped")
}
diff --git a/cmd/server/main_test.go b/cmd/server/main_test.go
index 39620bf..368e149 100644
--- a/cmd/server/main_test.go
+++ b/cmd/server/main_test.go
@@ -12,23 +12,23 @@ import (
)
func TestEffectiveVersionPrefersBuildVersion(t *testing.T) {
- t.Setenv("MMTL_VERSION", "MMTL-v0.1.15")
+ t.Setenv("MEBOX_VERSION", "MeBox-v0.1.15")
- if got := effectiveVersion("MMTL-v0.1.16"); got != "MMTL-v0.1.16" {
- t.Fatalf("effectiveVersion = %q, want MMTL-v0.1.16", got)
+ if got := effectiveVersion("MeBox-v0.1.16"); got != "MeBox-v0.1.16" {
+ t.Fatalf("effectiveVersion = %q, want MeBox-v0.1.16", got)
}
}
func TestEffectiveVersionUsesEnvWhenBuildVersionIsDev(t *testing.T) {
- t.Setenv("MMTL_VERSION", " MMTL-v0.1.16 ")
+ t.Setenv("MEBOX_VERSION", " MeBox-v0.1.16 ")
- if got := effectiveVersion("dev"); got != "MMTL-v0.1.16" {
- t.Fatalf("effectiveVersion = %q, want MMTL-v0.1.16", got)
+ if got := effectiveVersion("dev"); got != "MeBox-v0.1.16" {
+ t.Fatalf("effectiveVersion = %q, want MeBox-v0.1.16", got)
}
}
func TestEffectiveVersionDefaultsToDev(t *testing.T) {
- t.Setenv("MMTL_VERSION", "")
+ t.Setenv("MEBOX_VERSION", "")
if got := effectiveVersion(""); got != "dev" {
t.Fatalf("effectiveVersion = %q, want dev", got)
@@ -85,7 +85,7 @@ func TestServeSPAServesAssetsImmutableAndBypassesAPIRoutes(t *testing.T) {
if err := os.WriteFile(filepath.Join(webDir, "assets", "app.js"), []byte("console.log('ok')"), 0o644); err != nil {
t.Fatal(err)
}
- if err := os.WriteFile(filepath.Join(webDir, "brand", "mmtl-logo.svg"), []byte(""), 0o644); err != nil {
+ if err := os.WriteFile(filepath.Join(webDir, "brand", "mebox-logo.svg"), []byte(""), 0o644); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(webDir, "artwork-cache-sw.js"), []byte("self.addEventListener('fetch', () => {})"), 0o644); err != nil {
@@ -105,7 +105,7 @@ func TestServeSPAServesAssetsImmutableAndBypassesAPIRoutes(t *testing.T) {
t.Fatalf("asset Cache-Control = %q, want immutable", got)
}
- brandReq := httptest.NewRequest(http.MethodGet, "/brand/mmtl-logo.svg", nil)
+ brandReq := httptest.NewRequest(http.MethodGet, "/brand/mebox-logo.svg", nil)
brandResp := httptest.NewRecorder()
router.ServeHTTP(brandResp, brandReq)
if brandResp.Code != http.StatusOK {
diff --git a/cmd/server/router.go b/cmd/server/router.go
index a073a8b..7c37bb5 100644
--- a/cmd/server/router.go
+++ b/cmd/server/router.go
@@ -11,12 +11,12 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/handler"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/handler"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
- "github.com/ShukeBta/MMTL/web"
+ "github.com/truewhile/MeBox/web"
)
func buildRouter(cfg *config.Config, logger *zap.Logger, svc *service.Container) *gin.Engine {
@@ -78,7 +78,7 @@ func serveSPA(r *gin.Engine, root fs.FS) {
setNoCacheHeaders(c)
data, err := fs.ReadFile(root, "index.html")
if err != nil {
- c.String(http.StatusNotFound, "MMTL web UI not found")
+ c.String(http.StatusNotFound, "MeBox web UI not found")
return
}
c.Data(http.StatusOK, "text/html; charset=utf-8", data)
diff --git a/cmd/server/server_manager.go b/cmd/server/server_manager.go
index a2726bc..02ff1da 100644
--- a/cmd/server/server_manager.go
+++ b/cmd/server/server_manager.go
@@ -13,8 +13,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
// tlsPair 记录当前正在服务的证书,用于判断是否需要重新绑定监听。
@@ -27,7 +27,7 @@ type tlsPair struct {
version string
}
-// serverManager 负责 MMTL 的 HTTP/HTTPS 监听。HTTPS 设置保存后调用 Reload,
+// serverManager 负责 MeBox 的 HTTP/HTTPS 监听。HTTPS 设置保存后调用 Reload,
// 在同一个端口上把明文 HTTP 与 TLS 监听热切换,无需重启进程:
//
// - 关闭旧监听释放端口(同一进程内 Windows 不允许重复绑定同一端口);
diff --git a/cmd/server/server_manager_test.go b/cmd/server/server_manager_test.go
index e52376d..24c0412 100644
--- a/cmd/server/server_manager_test.go
+++ b/cmd/server/server_manager_test.go
@@ -17,7 +17,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func makeTestPairPEM(t *testing.T) (certPEM, keyPEM string) {
diff --git a/cmd/server/startup.go b/cmd/server/startup.go
index d14ad09..02760a2 100644
--- a/cmd/server/startup.go
+++ b/cmd/server/startup.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func applyCPUThreadLimit(cfg *config.Config, logger *zap.Logger) {
diff --git a/docker-compose.search.yml b/docker-compose.search.yml
index 9d7dfef..0453233 100644
--- a/docker-compose.search.yml
+++ b/docker-compose.search.yml
@@ -1,7 +1,7 @@
-# MMTL 第三档完整 Docker Compose 部署文件
+# MeBox 第三档完整 Docker Compose 部署文件
#
# 组件:
-# MMTL + PostgreSQL + Redis + OpenSearch
+# MeBox + PostgreSQL + Redis + OpenSearch
#
# 使用方式二选一:
# 1. 保存为 docker-compose.yml 后执行:
@@ -19,8 +19,8 @@
# admin / admin123
services:
- mmtl:
- image: ghcr.io/truewhile/mmtl:latest
+ mebox:
+ image: ghcr.io/truewhile/mebox:latest
restart: unless-stopped
init: true
@@ -74,45 +74,45 @@ services:
PUID: "1000"
PGID: "1000"
- MMTL_APP_HOST: 0.0.0.0
- MMTL_APP_PORT: 8080
- MMTL_APP_WEB_DIR: /app/web/dist
- MMTL_APP_DATA_DIR: /data
- MMTL_LOGGING_LEVEL: info
- MMTL_LOGGING_FORMAT: console
- MMTL_LOGGING_OUTPUT_PATH: /data/logs
- MMTL_LOGGING_MAX_SIZE_MB: "50"
- MMTL_LOGGING_MAX_BACKUPS: "20"
- MMTL_LOGGING_MAX_AGE_DAYS: "30"
+ MEBOX_APP_HOST: 0.0.0.0
+ MEBOX_APP_PORT: 8080
+ MEBOX_APP_WEB_DIR: /app/web/dist
+ MEBOX_APP_DATA_DIR: /data
+ MEBOX_LOGGING_LEVEL: info
+ MEBOX_LOGGING_FORMAT: console
+ MEBOX_LOGGING_OUTPUT_PATH: /data/logs
+ MEBOX_LOGGING_MAX_SIZE_MB: "50"
+ MEBOX_LOGGING_MAX_BACKUPS: "20"
+ MEBOX_LOGGING_MAX_AGE_DAYS: "30"
- MMTL_DATABASE_TYPE: postgres
- MMTL_DATABASE_DSN: postgres://mmtl:mmtl@postgres:5432/mmtl?sslmode=disable
- MMTL_DATABASE_DB_PATH: /data/mmtl.db
+ MEBOX_DATABASE_TYPE: postgres
+ MEBOX_DATABASE_DSN: postgres://mebox:mebox@postgres:5432/mebox?sslmode=disable
+ MEBOX_DATABASE_DB_PATH: /data/mebox.db
- MMTL_CACHE_REDIS_URL: redis://redis:6379/0
- MMTL_CACHE_CACHE_DIR: /cache
+ MEBOX_CACHE_REDIS_URL: redis://redis:6379/0
+ MEBOX_CACHE_CACHE_DIR: /cache
# OpenSearch 只做搜索索引,主数据仍以 PostgreSQL 为准。
- MMTL_SEARCH_BACKEND: opensearch
- MMTL_SEARCH_OPENSEARCH_URL: http://opensearch:9200
- MMTL_SEARCH_INDEX: mmtl_media
+ MEBOX_SEARCH_BACKEND: opensearch
+ MEBOX_SEARCH_OPENSEARCH_URL: http://opensearch:9200
+ MEBOX_SEARCH_INDEX: mebox_media
- MMTL_UPDATE_IMAGE: ghcr.io/truewhile/mmtl:latest
+ MEBOX_UPDATE_IMAGE: ghcr.io/truewhile/mebox:latest
# 默认推荐在网页里使用容器路径 /media。
# 如果旧媒体库已经保存了宿主机路径 /vol1/1000/Media,
# 再把这里改成同一个宿主机真实路径用于旧路径换算。
- MMTL_MEDIA_DIR: /media
- MMTL_MEDIA_CONTAINER_DIR: /media
- MMTL_DOWNLOAD_DIR: /downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_MEDIA_DIR: /media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
+ MEBOX_DOWNLOAD_DIR: /downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
- MMTL_TRANSCODER_ENABLED: "true"
- MMTL_TRANSCODER_HARDWARE_ACCEL: "false"
- MMTL_TRANSCODER_REALTIME: "true"
- MMTL_TRANSCODER_THREADS: "2"
- MMTL_TRANSCODER_MAX_CONCURRENT: "1"
- MMTL_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
+ MEBOX_TRANSCODER_ENABLED: "true"
+ MEBOX_TRANSCODER_HARDWARE_ACCEL: "false"
+ MEBOX_TRANSCODER_REALTIME: "true"
+ MEBOX_TRANSCODER_THREADS: "2"
+ MEBOX_TRANSCODER_MAX_CONCURRENT: "1"
+ MEBOX_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
healthcheck:
test: ["CMD-SHELL", "busybox wget -qO- http://127.0.0.1:8080/api/health || exit 1"]
@@ -129,18 +129,18 @@ services:
postgres:
image: postgres:16-alpine
- # 首次部署允许拉取;日常更新请只 pull mmtl。
+ # 首次部署允许拉取;日常更新请只 pull mebox。
pull_policy: missing
restart: unless-stopped
environment:
- POSTGRES_DB: mmtl
- POSTGRES_USER: mmtl
- POSTGRES_PASSWORD: mmtl
+ POSTGRES_DB: mebox
+ POSTGRES_USER: mebox
+ POSTGRES_PASSWORD: mebox
TZ: Asia/Shanghai
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
- test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mmtl -d mmtl"]
+ test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mebox -d mebox"]
interval: 10s
timeout: 5s
retries: 10
diff --git a/docker-compose.simple.yml b/docker-compose.simple.yml
index 1acff12..77dd1df 100644
--- a/docker-compose.simple.yml
+++ b/docker-compose.simple.yml
@@ -1,4 +1,4 @@
-# MMTL 单镜像部署模板(SQLite)
+# MeBox 单镜像部署模板(SQLite)
#
# 适合:新手、单人使用、低配 NAS / 小主机。
# 特点:只有一个镜像,不需要 PostgreSQL / Redis / .env。
@@ -12,10 +12,10 @@
# 首次登录后请立刻修改密码。
services:
- mmtl:
- image: ghcr.io/truewhile/mmtl:latest
+ mebox:
+ image: ghcr.io/truewhile/mebox:latest
- container_name: mmtl
+ container_name: mebox
restart: unless-stopped
init: true
@@ -62,29 +62,29 @@ services:
PUID: "1000"
PGID: "1000"
- MMTL_APP_HOST: 0.0.0.0
- MMTL_APP_PORT: 8080
- MMTL_APP_WEB_DIR: /app/web/dist
- MMTL_APP_DATA_DIR: /data
+ MEBOX_APP_HOST: 0.0.0.0
+ MEBOX_APP_PORT: 8080
+ MEBOX_APP_WEB_DIR: /app/web/dist
+ MEBOX_APP_DATA_DIR: /data
- # 单镜像档固定使用 SQLite。主数据库文件:./data/mmtl.db。
- MMTL_DATABASE_TYPE: sqlite
- MMTL_DATABASE_DB_PATH: /data/mmtl.db
- MMTL_CACHE_CACHE_DIR: /cache
+ # 单镜像档固定使用 SQLite。主数据库文件:./data/mebox.db。
+ MEBOX_DATABASE_TYPE: sqlite
+ MEBOX_DATABASE_DB_PATH: /data/mebox.db
+ MEBOX_CACHE_CACHE_DIR: /cache
# 路径映射保持容器内统一,网页和下载器里优先使用 /media、/downloads。
- MMTL_MEDIA_DIR: /media
- MMTL_MEDIA_CONTAINER_DIR: /media
- MMTL_DOWNLOAD_DIR: /downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_MEDIA_DIR: /media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
+ MEBOX_DOWNLOAD_DIR: /downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
# 完整应用日志默认写入 ./data/logs/app.log;排查复杂问题时可临时改成 debug。
- MMTL_LOGGING_LEVEL: info
- MMTL_LOGGING_FORMAT: console
- MMTL_LOGGING_OUTPUT_PATH: /data/logs
- MMTL_LOGGING_MAX_SIZE_MB: "50"
- MMTL_LOGGING_MAX_BACKUPS: "20"
- MMTL_LOGGING_MAX_AGE_DAYS: "30"
+ MEBOX_LOGGING_LEVEL: info
+ MEBOX_LOGGING_FORMAT: console
+ MEBOX_LOGGING_OUTPUT_PATH: /data/logs
+ MEBOX_LOGGING_MAX_SIZE_MB: "50"
+ MEBOX_LOGGING_MAX_BACKUPS: "20"
+ MEBOX_LOGGING_MAX_AGE_DAYS: "30"
extra_hosts:
# 容器访问宿主机服务用,例如 qBittorrent: http://host.docker.internal:8085
diff --git a/docker-compose.standard.yml b/docker-compose.standard.yml
index bde95fe..0eba48f 100644
--- a/docker-compose.standard.yml
+++ b/docker-compose.standard.yml
@@ -1,7 +1,7 @@
-# MMTL 第二档完整 Docker Compose 部署文件
+# MeBox 第二档完整 Docker Compose 部署文件
#
# 组件:
-# MMTL + PostgreSQL + Redis
+# MeBox + PostgreSQL + Redis
#
# 使用方式二选一:
# 1. 保存为 docker-compose.yml 后执行:
@@ -16,8 +16,8 @@
# admin / admin123
services:
- mmtl:
- image: ghcr.io/truewhile/mmtl:latest
+ mebox:
+ image: ghcr.io/truewhile/mebox:latest
restart: unless-stopped
init: true
@@ -69,39 +69,39 @@ services:
PUID: "1000"
PGID: "1000"
- MMTL_APP_HOST: 0.0.0.0
- MMTL_APP_PORT: 8080
- MMTL_APP_WEB_DIR: /app/web/dist
- MMTL_APP_DATA_DIR: /data
- MMTL_LOGGING_LEVEL: info
- MMTL_LOGGING_FORMAT: console
- MMTL_LOGGING_OUTPUT_PATH: /data/logs
- MMTL_LOGGING_MAX_SIZE_MB: "50"
- MMTL_LOGGING_MAX_BACKUPS: "20"
- MMTL_LOGGING_MAX_AGE_DAYS: "30"
+ MEBOX_APP_HOST: 0.0.0.0
+ MEBOX_APP_PORT: 8080
+ MEBOX_APP_WEB_DIR: /app/web/dist
+ MEBOX_APP_DATA_DIR: /data
+ MEBOX_LOGGING_LEVEL: info
+ MEBOX_LOGGING_FORMAT: console
+ MEBOX_LOGGING_OUTPUT_PATH: /data/logs
+ MEBOX_LOGGING_MAX_SIZE_MB: "50"
+ MEBOX_LOGGING_MAX_BACKUPS: "20"
+ MEBOX_LOGGING_MAX_AGE_DAYS: "30"
- MMTL_DATABASE_TYPE: postgres
- MMTL_DATABASE_DSN: postgres://mmtl:mmtl@postgres:5432/mmtl?sslmode=disable
- MMTL_DATABASE_DB_PATH: /data/mmtl.db
+ MEBOX_DATABASE_TYPE: postgres
+ MEBOX_DATABASE_DSN: postgres://mebox:mebox@postgres:5432/mebox?sslmode=disable
+ MEBOX_DATABASE_DB_PATH: /data/mebox.db
# Redis 只做热缓存,源数据仍在 PostgreSQL;Redis 丢失可自动重建。
- MMTL_CACHE_REDIS_URL: redis://redis:6379/0
- MMTL_CACHE_CACHE_DIR: /cache
+ MEBOX_CACHE_REDIS_URL: redis://redis:6379/0
+ MEBOX_CACHE_CACHE_DIR: /cache
- MMTL_UPDATE_IMAGE: ghcr.io/truewhile/mmtl:latest
+ MEBOX_UPDATE_IMAGE: ghcr.io/truewhile/mebox:latest
# 路径换算配置。左边宿主机真实路径要和 volumes 左边保持一致。
- MMTL_MEDIA_DIR: /media
- MMTL_MEDIA_CONTAINER_DIR: /media
- MMTL_DOWNLOAD_DIR: /downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_MEDIA_DIR: /media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
+ MEBOX_DOWNLOAD_DIR: /downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
- MMTL_TRANSCODER_ENABLED: "true"
- MMTL_TRANSCODER_HARDWARE_ACCEL: "false"
- MMTL_TRANSCODER_REALTIME: "true"
- MMTL_TRANSCODER_THREADS: "2"
- MMTL_TRANSCODER_MAX_CONCURRENT: "1"
- MMTL_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
+ MEBOX_TRANSCODER_ENABLED: "true"
+ MEBOX_TRANSCODER_HARDWARE_ACCEL: "false"
+ MEBOX_TRANSCODER_REALTIME: "true"
+ MEBOX_TRANSCODER_THREADS: "2"
+ MEBOX_TRANSCODER_MAX_CONCURRENT: "1"
+ MEBOX_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
healthcheck:
test: ["CMD-SHELL", "busybox wget -qO- http://127.0.0.1:8080/api/health || exit 1"]
@@ -118,18 +118,18 @@ services:
postgres:
image: postgres:16-alpine
- # 首次部署允许拉取;日常更新请只 pull mmtl。
+ # 首次部署允许拉取;日常更新请只 pull mebox。
pull_policy: missing
restart: unless-stopped
environment:
- POSTGRES_DB: mmtl
- POSTGRES_USER: mmtl
- POSTGRES_PASSWORD: mmtl
+ POSTGRES_DB: mebox
+ POSTGRES_USER: mebox
+ POSTGRES_PASSWORD: mebox
TZ: Asia/Shanghai
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
- test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mmtl -d mmtl"]
+ test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mebox -d mebox"]
interval: 10s
timeout: 5s
retries: 10
diff --git a/docker-compose.yml b/docker-compose.yml
index 4f30440..b2d0c83 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,4 +1,4 @@
-# MMTL 最简单 Docker Compose 部署文件
+# MeBox 最简单 Docker Compose 部署文件
#
# 新手建议:
# 1. 不用 .env。
@@ -15,8 +15,8 @@
# admin / admin123
services:
- mmtl:
- image: ghcr.io/truewhile/mmtl:latest
+ mebox:
+ image: ghcr.io/truewhile/mebox:latest
restart: unless-stopped
init: true
@@ -83,52 +83,52 @@ services:
PGID: "1000"
# 程序基础配置,通常不用改。
- MMTL_APP_HOST: 0.0.0.0
- MMTL_APP_PORT: 8080
- MMTL_APP_WEB_DIR: /app/web/dist
- MMTL_APP_DATA_DIR: /data
+ MEBOX_APP_HOST: 0.0.0.0
+ MEBOX_APP_PORT: 8080
+ MEBOX_APP_WEB_DIR: /app/web/dist
+ MEBOX_APP_DATA_DIR: /data
# 详细应用日志会保存在 ./data/logs/app.log,warn/error 也会拆分保存。
# 排查复杂问题时可临时改成 debug。
- MMTL_LOGGING_LEVEL: info
- MMTL_LOGGING_FORMAT: console
- MMTL_LOGGING_OUTPUT_PATH: /data/logs
- MMTL_LOGGING_MAX_SIZE_MB: "50"
- MMTL_LOGGING_MAX_BACKUPS: "20"
- MMTL_LOGGING_MAX_AGE_DAYS: "30"
+ MEBOX_LOGGING_LEVEL: info
+ MEBOX_LOGGING_FORMAT: console
+ MEBOX_LOGGING_OUTPUT_PATH: /data/logs
+ MEBOX_LOGGING_MAX_SIZE_MB: "50"
+ MEBOX_LOGGING_MAX_BACKUPS: "20"
+ MEBOX_LOGGING_MAX_AGE_DAYS: "30"
# 轻量模式默认只使用 PostgreSQL,适合大多数 NAS。
- # 旧版 ./data/mmtl.db 存在时,首次启动会自动迁移到 PostgreSQL。
- MMTL_DATABASE_TYPE: postgres
- MMTL_DATABASE_DSN: postgres://mmtl:mmtl@postgres:5432/mmtl?sslmode=disable
+ # 旧版 ./data/mmtl.db 或 ./data/mebox.db 存在时,首次启动会自动迁移到 PostgreSQL。
+ MEBOX_DATABASE_TYPE: postgres
+ MEBOX_DATABASE_DSN: postgres://mebox:mebox@postgres:5432/mebox?sslmode=disable
# SQLite 旧库迁移源:
- # - 首次从旧版 ./data/mmtl.db 导入时保持此路径。
+ # - 首次从旧版 SQLite(mmtl.db / mebox.db)导入时保持此路径。
# - 确认迁移完成后,建议改成 /data/no-sqlite-migration.db 这类不存在的路径。
- MMTL_DATABASE_DB_PATH: /data/mmtl.db
- MMTL_CACHE_CACHE_DIR: /cache
+ MEBOX_DATABASE_DB_PATH: /data/mebox.db
+ MEBOX_CACHE_CACHE_DIR: /cache
# 管理面板热更新默认拉取此镜像,并用 Watchtower 一次性重建当前容器。
- MMTL_UPDATE_IMAGE: ghcr.io/truewhile/mmtl:latest
+ MEBOX_UPDATE_IMAGE: ghcr.io/truewhile/mebox:latest
# 路径换算配置。
# 默认推荐在网页里使用容器路径 /media。
# 如果旧媒体库已经保存了宿主机路径 /vol1/1000/Media,
# 再把这里改成同一个宿主机真实路径用于旧路径换算。
- MMTL_MEDIA_DIR: /media
- MMTL_MEDIA_CONTAINER_DIR: /media
+ MEBOX_MEDIA_DIR: /media
+ MEBOX_MEDIA_CONTAINER_DIR: /media
# 默认推荐下载器保存路径使用 /downloads。
# 如果下载器只能返回宿主机路径,再改成同一个宿主机真实路径。
- MMTL_DOWNLOAD_DIR: /downloads
- MMTL_DOWNLOAD_CONTAINER_DIR: /downloads
+ MEBOX_DOWNLOAD_DIR: /downloads
+ MEBOX_DOWNLOAD_CONTAINER_DIR: /downloads
# NAS 友好的低负载默认值。
- MMTL_TRANSCODER_ENABLED: "true"
- MMTL_TRANSCODER_HARDWARE_ACCEL: "false"
- MMTL_TRANSCODER_REALTIME: "true"
- MMTL_TRANSCODER_THREADS: "2"
- MMTL_TRANSCODER_MAX_CONCURRENT: "1"
- MMTL_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
+ MEBOX_TRANSCODER_ENABLED: "true"
+ MEBOX_TRANSCODER_HARDWARE_ACCEL: "false"
+ MEBOX_TRANSCODER_REALTIME: "true"
+ MEBOX_TRANSCODER_THREADS: "2"
+ MEBOX_TRANSCODER_MAX_CONCURRENT: "1"
+ MEBOX_TRANSCODER_IDLE_TIMEOUT_SECONDS: "120"
healthcheck:
test: ["CMD-SHELL", "busybox wget -qO- http://127.0.0.1:8080/api/health || exit 1"]
@@ -146,20 +146,20 @@ services:
postgres:
image: postgres:16-alpine
- # 首次部署允许拉取;日常更新请只 pull mmtl。
+ # 首次部署允许拉取;日常更新请只 pull mebox。
# 如需升级 PostgreSQL,请先备份 ./postgres 后再手动调整镜像版本并拉取。
pull_policy: missing
restart: unless-stopped
environment:
- POSTGRES_DB: mmtl
- POSTGRES_USER: mmtl
- POSTGRES_PASSWORD: mmtl
+ POSTGRES_DB: mebox
+ POSTGRES_USER: mebox
+ POSTGRES_PASSWORD: mebox
TZ: Asia/Shanghai
volumes:
# PostgreSQL 主数据目录。升级/重建容器时必须保留。
- ./postgres:/var/lib/postgresql/data
healthcheck:
- test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mmtl -d mmtl"]
+ test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U mebox -d mebox"]
interval: 10s
timeout: 5s
retries: 10
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 05ef2c8..be81352 100644
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -1,8 +1,8 @@
#!/bin/sh
set -eu
-run_uid="${PUID:-$(id -u mmtl 2>/dev/null || echo 1000)}"
-run_gid="${PGID:-$(id -g mmtl 2>/dev/null || echo 1000)}"
+run_uid="${PUID:-$(id -u mebox 2>/dev/null || echo 1000)}"
+run_gid="${PGID:-$(id -g mebox 2>/dev/null || echo 1000)}"
case "$run_uid" in
''|*[!0-9]*)
@@ -19,10 +19,10 @@ case "$run_gid" in
esac
if [ "$run_uid" = "0" ]; then
- exec mmtl
+ exec mebox
fi
chown -R "$run_uid:$run_gid" /data /cache 2>/dev/null || true
chown "$run_uid:$run_gid" /media 2>/dev/null || true
-exec su-exec "$run_uid:$run_gid" mmtl
+exec su-exec "$run_uid:$run_gid" mebox
diff --git a/go.mod b/go.mod
index a678106..cb2b967 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/ShukeBta/MMTL
+module github.com/truewhile/MeBox
go 1.25.0
@@ -14,10 +14,12 @@ require (
github.com/shirou/gopsutil/v3 v3.24.5
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
+ github.com/ulikunitz/xz v0.5.12
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.21.0
golang.org/x/sys v0.20.0
golang.org/x/time v0.15.0
+ gopkg.in/yaml.v3 v3.0.1
gorm.io/driver/postgres v1.5.7
gorm.io/gorm v1.30.0
)
@@ -68,7 +70,6 @@ require (
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
- github.com/ulikunitz/xz v0.5.12 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/arch v0.3.0 // indirect
@@ -77,7 +78,6 @@ require (
golang.org/x/text v0.20.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
- gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.22.5 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
diff --git a/internal/config/config.go b/internal/config/config.go
index c1a58fd..263c876 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -4,7 +4,7 @@
// 1. 内置默认值
// 2. 工作目录中的 config.yaml(嵌套格式)
// 3. config/*.yaml 分片文件(按模块)
-// 4. 以 MMTL_ 为前缀的环境变量
+// 4. 以 MEBOX_ 为前缀的环境变量
package config
import (
@@ -17,7 +17,7 @@ import (
)
// EnvPrefix 是所有环境变量驱动的覆盖使用的前缀。
-const EnvPrefix = "MMTL"
+const EnvPrefix = "MeBox"
// Load 从默认值 / 文件 / 环境读取配置。
//
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 5db2549..7121661 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -40,13 +40,13 @@ func TestLoadDefaults(t *testing.T) {
if cfg.Database.MaxOpenConns != defaultDatabaseMaxOpenConns {
t.Fatalf("expected default MaxOpenConns %d, got %d", defaultDatabaseMaxOpenConns, cfg.Database.MaxOpenConns)
}
- if cfg.Cache.RedisPrefix != "mmtl" {
+ if cfg.Cache.RedisPrefix != "mebox" {
t.Fatalf("expected default redis prefix, got %q", cfg.Cache.RedisPrefix)
}
if cfg.Cache.MediaTTLSeconds != 15 {
t.Fatalf("expected default media cache ttl 15, got %d", cfg.Cache.MediaTTLSeconds)
}
- if cfg.Search.Index != "mmtl_media" {
+ if cfg.Search.Index != "mebox_media" {
t.Fatalf("expected default search index, got %q", cfg.Search.Index)
}
if cfg.Database.MaxIdleConns != defaultDatabaseMaxIdleConns {
@@ -74,7 +74,7 @@ func TestLoadDefaults(t *testing.T) {
}
}
-// TestEnvOverride checks that MMTL_* env vars override the defaults.
+// TestEnvOverride checks that MEBOX_* env vars override the defaults.
func TestEnvOverride(t *testing.T) {
dir := t.TempDir()
wd, _ := os.Getwd()
@@ -83,16 +83,16 @@ func TestEnvOverride(t *testing.T) {
t.Fatalf("chdir: %v", err)
}
- t.Setenv("MMTL_APP_PORT", "9090")
- t.Setenv("MMTL_DATABASE_TYPE", "postgres")
- t.Setenv("MMTL_DATABASE_DSN", "postgres://mmtl:secret@postgres:5432/mmtl?sslmode=disable")
- t.Setenv("MMTL_CACHE_REDIS_URL", "redis://redis:6379/0")
- t.Setenv("MMTL_CACHE_MEDIA_TTL_SECONDS", "30")
- t.Setenv("MMTL_SEARCH_BACKEND", "opensearch")
- t.Setenv("MMTL_SEARCH_OPENSEARCH_URL", "http://opensearch:9200")
- t.Setenv("MMTL_LICENSE_SERVER_URL", "https://license.example.com")
- t.Setenv("MMTL_LICENSE_HMAC_SECRET", "override-secret")
- t.Setenv("MMTL_LICENSE_PUBLIC_KEY", "override-public-key")
+ t.Setenv("MEBOX_APP_PORT", "9090")
+ t.Setenv("MEBOX_DATABASE_TYPE", "postgres")
+ t.Setenv("MEBOX_DATABASE_DSN", "postgres://mebox:secret@postgres:5432/mebox?sslmode=disable")
+ t.Setenv("MEBOX_CACHE_REDIS_URL", "redis://redis:6379/0")
+ t.Setenv("MEBOX_CACHE_MEDIA_TTL_SECONDS", "30")
+ t.Setenv("MEBOX_SEARCH_BACKEND", "opensearch")
+ t.Setenv("MEBOX_SEARCH_OPENSEARCH_URL", "http://opensearch:9200")
+ t.Setenv("MEBOX_LICENSE_SERVER_URL", "https://license.example.com")
+ t.Setenv("MEBOX_LICENSE_HMAC_SECRET", "override-secret")
+ t.Setenv("MEBOX_LICENSE_PUBLIC_KEY", "override-public-key")
cfg, err := Load()
if err != nil {
t.Fatalf("Load() error: %v", err)
diff --git a/internal/config/defaults.go b/internal/config/defaults.go
index 5d8edb0..b296f06 100644
--- a/internal/config/defaults.go
+++ b/internal/config/defaults.go
@@ -25,7 +25,7 @@ func setDefaults(v *viper.Viper) {
v.SetDefault("app.server_url", "")
v.SetDefault("database.type", "auto")
- v.SetDefault("database.db_path", "./data/mmtl.db")
+ v.SetDefault("database.db_path", "./data/mebox.db")
v.SetDefault("database.dsn", "")
v.SetDefault("database.wal_mode", true)
v.SetDefault("database.busy_timeout", 5000)
@@ -46,12 +46,12 @@ func setDefaults(v *viper.Viper) {
v.SetDefault("cache.images_max_size_mb", 500)
v.SetDefault("cache.cleanup_interval_min", 60)
v.SetDefault("cache.redis_url", "")
- v.SetDefault("cache.redis_prefix", "mmtl")
+ v.SetDefault("cache.redis_prefix", "mebox")
v.SetDefault("cache.media_ttl_seconds", 15)
v.SetDefault("search.backend", "")
v.SetDefault("search.opensearch_url", "")
- v.SetDefault("search.index", "mmtl_media")
+ v.SetDefault("search.index", "mebox_media")
v.SetDefault("search.username", "")
v.SetDefault("search.password", "")
@@ -64,7 +64,7 @@ func setDefaults(v *viper.Viper) {
v.SetDefault("flaresolverr.enabled", false)
v.SetDefault("flaresolverr.url", "http://localhost:8191")
- v.SetDefault("flaresolverr.session", "mmtl")
+ v.SetDefault("flaresolverr.session", "mebox")
v.SetDefault("flaresolverr.timeout", 60)
v.SetDefault("downloads.smart_classify", true)
diff --git a/internal/config/normalize.go b/internal/config/normalize.go
index b91e899..4d7d1b1 100644
--- a/internal/config/normalize.go
+++ b/internal/config/normalize.go
@@ -15,7 +15,7 @@ func (c *Config) normalize() error {
c.App.DataDir = "./data"
}
if c.Database.DBPath == "" {
- c.Database.DBPath = filepath.Join(c.App.DataDir, "mmtl.db")
+ c.Database.DBPath = filepath.Join(c.App.DataDir, "mebox.db")
}
if c.Database.Type == "" {
c.Database.Type = "auto"
@@ -48,14 +48,14 @@ func (c *Config) normalize() error {
c.Cache.ImagesMaxSizeMB = 0
}
if c.Cache.RedisPrefix == "" {
- c.Cache.RedisPrefix = "mmtl"
+ c.Cache.RedisPrefix = "mebox"
}
if c.Cache.MediaTTLSeconds < 1 {
c.Cache.MediaTTLSeconds = 15
}
c.Search.Backend = strings.ToLower(strings.TrimSpace(c.Search.Backend))
if c.Search.Index == "" {
- c.Search.Index = "mmtl_media"
+ c.Search.Index = "mebox_media"
}
if c.Secrets.JWTSecret == "" {
// 持久化自动生成的密钥以在操作员忘记配置时保持会话稳定。
diff --git a/internal/config/save_test.go b/internal/config/save_test.go
index 261d7e2..65de1a2 100644
--- a/internal/config/save_test.go
+++ b/internal/config/save_test.go
@@ -14,7 +14,7 @@ func TestSaveDatabaseConfig(t *testing.T) {
t.Fatalf("chdir: %v", err)
}
- dsn := "postgres://admin:pass@127.0.0.1:5432/mmtl?sslmode=disable"
+ dsn := "postgres://admin:pass@127.0.0.1:5432/mebox?sslmode=disable"
if err := SaveDatabaseConfig("postgres", dsn); err != nil {
t.Fatalf("SaveDatabaseConfig error: %v", err)
}
diff --git a/internal/config/types.go b/internal/config/types.go
index 2bfe35e..42a0409 100644
--- a/internal/config/types.go
+++ b/internal/config/types.go
@@ -152,7 +152,7 @@ type AIConfig struct {
MaxConcurrent int `mapstructure:"max_concurrent"`
}
-// LicenseConfig configures the optional MMTL license server bridge.
+// LicenseConfig configures the optional MeBox license server bridge.
type LicenseConfig struct {
ServerURL string `mapstructure:"server_url"`
HMACSecret string `mapstructure:"hmac_secret"`
diff --git a/internal/database/database.go b/internal/database/database.go
index 96aff92..39103ec 100644
--- a/internal/database/database.go
+++ b/internal/database/database.go
@@ -13,7 +13,7 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// Open initialises the configured GORM database. database.type=auto chooses
diff --git a/internal/database/database_admin.go b/internal/database/database_admin.go
index 6b97032..dd02d65 100644
--- a/internal/database/database_admin.go
+++ b/internal/database/database_admin.go
@@ -12,8 +12,8 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
// DatabaseStatus describes the currently active database engine and runtime metrics.
diff --git a/internal/database/database_admin_test.go b/internal/database/database_admin_test.go
index bb1acb2..6c784ca 100644
--- a/internal/database/database_admin_test.go
+++ b/internal/database/database_admin_test.go
@@ -6,8 +6,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestMaskDSN(t *testing.T) {
@@ -16,16 +16,16 @@ func TestMaskDSN(t *testing.T) {
want string
}{
{
- in: "postgres://admin:secret123@localhost:5432/mmtl?sslmode=disable",
- want: "postgres://admin:******@localhost:5432/mmtl?sslmode=disable",
+ in: "postgres://admin:secret123@localhost:5432/mebox?sslmode=disable",
+ want: "postgres://admin:******@localhost:5432/mebox?sslmode=disable",
},
{
- in: "host=localhost port=5432 user=admin password=secret dbname=mmtl sslmode=disable",
- want: "host=localhost port=5432 user=admin password=****** dbname=mmtl sslmode=disable",
+ in: "host=localhost port=5432 user=admin password=secret dbname=mebox sslmode=disable",
+ want: "host=localhost port=5432 user=admin password=****** dbname=mebox sslmode=disable",
},
{
- in: "sqlite://data/mmtl.db",
- want: "sqlite://data/mmtl.db",
+ in: "sqlite://data/mebox.db",
+ want: "sqlite://data/mebox.db",
},
{
in: "",
@@ -53,7 +53,7 @@ func TestInspectDatabaseStatus(t *testing.T) {
cfg := &config.Config{}
cfg.Database.Type = "sqlite"
- cfg.Database.DBPath = "./data/mmtl.db"
+ cfg.Database.DBPath = "./data/mebox.db"
st := InspectDatabaseStatus(db, cfg)
if st == nil {
@@ -62,7 +62,7 @@ func TestInspectDatabaseStatus(t *testing.T) {
if st.Type != "sqlite" {
t.Fatalf("expected sqlite, got %s", st.Type)
}
- if st.DBPath != "./data/mmtl.db" {
+ if st.DBPath != "./data/mebox.db" {
t.Fatalf("expected db_path, got %s", st.DBPath)
}
if st.TableCounts["users"] != 1 {
diff --git a/internal/database/database_test.go b/internal/database/database_test.go
index db3cc44..f81ccf4 100644
--- a/internal/database/database_test.go
+++ b/internal/database/database_test.go
@@ -8,8 +8,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOpenRequiresConfig(t *testing.T) {
@@ -28,7 +28,7 @@ func TestOpenRequiresConfig(t *testing.T) {
func TestOpenSQLiteWithNilLoggerConfiguresPool(t *testing.T) {
cfg := &config.Config{}
cfg.Database.Type = "sqlite"
- cfg.Database.DBPath = filepath.Join(t.TempDir(), "mmtl.db")
+ cfg.Database.DBPath = filepath.Join(t.TempDir(), "mebox.db")
cfg.Database.WALMode = true
cfg.Database.BusyTimeout = 5000
cfg.Database.CacheSize = -2000
@@ -278,7 +278,7 @@ func TestSQLiteMigrationCompleteMarker(t *testing.T) {
func TestSQLiteMigrationFallsBackToDataDirDefaultPath(t *testing.T) {
dir := t.TempDir()
- sqlitePath := filepath.Join(dir, "mmtl.db")
+ sqlitePath := filepath.Join(dir, "mebox.db")
src, err := gorm.Open(sqlite.Open(sqlitePath), &gorm.Config{})
if err != nil {
t.Fatal(err)
@@ -362,7 +362,7 @@ func TestSQLiteMigrationFallsBackToDataDirDefaultPath(t *testing.T) {
func TestOpenSQLiteMigrationSourceUsesFallbackSourcePath(t *testing.T) {
dir := t.TempDir()
- sqlitePath := filepath.Join(dir, "mmtl.db")
+ sqlitePath := filepath.Join(dir, "mebox.db")
src, err := gorm.Open(sqlite.Open(sqlitePath), &gorm.Config{})
if err != nil {
t.Fatal(err)
diff --git a/internal/database/schema_library_roots.go b/internal/database/schema_library_roots.go
index 2dd2b10..76a9bd1 100644
--- a/internal/database/schema_library_roots.go
+++ b/internal/database/schema_library_roots.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func ensureLibraryRootsCompatibility(db *gorm.DB) error {
diff --git a/internal/database/schema_migration.go b/internal/database/schema_migration.go
index 5c11595..424b5e6 100644
--- a/internal/database/schema_migration.go
+++ b/internal/database/schema_migration.go
@@ -3,7 +3,7 @@ package database
import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// AutoMigrate creates tables for every model registered in the model package.
diff --git a/internal/database/schema_migration_emby_mount_test.go b/internal/database/schema_migration_emby_mount_test.go
index 84b6e12..0e2d6c7 100644
--- a/internal/database/schema_migration_emby_mount_test.go
+++ b/internal/database/schema_migration_emby_mount_test.go
@@ -7,7 +7,7 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEnsureEmbyMountsCompatibility(t *testing.T) {
diff --git a/internal/database/sqlite_migration.go b/internal/database/sqlite_migration.go
index f5a274e..cba494a 100644
--- a/internal/database/sqlite_migration.go
+++ b/internal/database/sqlite_migration.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// MigrateSQLiteToCurrentIfNeeded copies an existing SQLite database into
diff --git a/internal/database/sqlite_migration_bootstrap.go b/internal/database/sqlite_migration_bootstrap.go
index 604a3bd..6b5e68f 100644
--- a/internal/database/sqlite_migration_bootstrap.go
+++ b/internal/database/sqlite_migration_bootstrap.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/clause"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func resetBootstrapTargetBeforeSQLiteMigrationIfSafe(src, target *gorm.DB, log *zap.Logger) error {
diff --git a/internal/database/sqlite_migration_copy.go b/internal/database/sqlite_migration_copy.go
index 4053c7c..748af90 100644
--- a/internal/database/sqlite_migration_copy.go
+++ b/internal/database/sqlite_migration_copy.go
@@ -10,7 +10,7 @@ import (
"gorm.io/gorm/clause"
"gorm.io/gorm/schema"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func copyModelTables(src, target *gorm.DB, batchSize int) (map[string]int64, int64, error) {
diff --git a/internal/database/sqlite_migration_source.go b/internal/database/sqlite_migration_source.go
index 8bb1171..a950cd3 100644
--- a/internal/database/sqlite_migration_source.go
+++ b/internal/database/sqlite_migration_source.go
@@ -12,7 +12,7 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func openSQLiteMigrationSource(cfg *config.Config, sqlitePath string) (*gorm.DB, error) {
@@ -36,23 +36,30 @@ func sqliteMigrationSourcePath(cfg *config.Config, log *zap.Logger) (string, err
}
}
- fallback := filepath.Join(strings.TrimSpace(cfg.App.DataDir), "mmtl.db")
- if fallback == "" || sameCleanPath(configured, fallback) {
- return "", nil
+ // Prefer the new default filename, then fall back to legacy MMTL SQLite files.
+ candidates := []string{
+ filepath.Join(strings.TrimSpace(cfg.App.DataDir), "mebox.db"),
+ filepath.Join(strings.TrimSpace(cfg.App.DataDir), "mmtl.db"),
}
- exists, err := regularFileExists(fallback)
- if err != nil {
- return "", fmt.Errorf("stat default sqlite migration source: %w", err)
+ for _, fallback := range candidates {
+ if fallback == "" || sameCleanPath(configured, fallback) {
+ continue
+ }
+ exists, err := regularFileExists(fallback)
+ if err != nil {
+ return "", fmt.Errorf("stat default sqlite migration source: %w", err)
+ }
+ if !exists {
+ continue
+ }
+ if log != nil && configured != "" {
+ log.Warn("configured sqlite migration source not found; using data-dir default",
+ zap.String("configured", configured),
+ zap.String("fallback", fallback))
+ }
+ return fallback, nil
}
- if !exists {
- return "", nil
- }
- if log != nil && configured != "" {
- log.Warn("configured sqlite migration source not found; using data-dir default",
- zap.String("configured", configured),
- zap.String("fallback", fallback))
- }
- return fallback, nil
+ return "", nil
}
func regularFileExists(path string) (bool, error) {
diff --git a/internal/database/sqlite_runtime.go b/internal/database/sqlite_runtime.go
index a90d1b1..df0c21f 100644
--- a/internal/database/sqlite_runtime.go
+++ b/internal/database/sqlite_runtime.go
@@ -8,14 +8,14 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func installSQLiteWriteGate(db *gorm.DB) {
if db == nil {
return
}
- const lockedKey = "mmtl:sqlite_write_locked"
+ const lockedKey = "mebox:sqlite_write_locked"
gate := newSQLiteWriteGate()
lock := func(tx *gorm.DB) {
ctx := context.Background()
@@ -39,14 +39,14 @@ func installSQLiteWriteGate(db *gorm.DB) {
}
lock(tx)
}
- _ = db.Callback().Create().Before("gorm:create").Register("mmtl:sqlite_write_lock", lock)
- _ = db.Callback().Create().After("gorm:create").Register("mmtl:sqlite_write_unlock", unlock)
- _ = db.Callback().Update().Before("gorm:update").Register("mmtl:sqlite_write_lock", lock)
- _ = db.Callback().Update().After("gorm:update").Register("mmtl:sqlite_write_unlock", unlock)
- _ = db.Callback().Delete().Before("gorm:delete").Register("mmtl:sqlite_write_lock", lock)
- _ = db.Callback().Delete().After("gorm:delete").Register("mmtl:sqlite_write_unlock", unlock)
- _ = db.Callback().Raw().Before("gorm:raw").Register("mmtl:sqlite_write_lock", rawLock)
- _ = db.Callback().Raw().After("gorm:raw").Register("mmtl:sqlite_write_unlock", unlock)
+ _ = db.Callback().Create().Before("gorm:create").Register("mebox:sqlite_write_lock", lock)
+ _ = db.Callback().Create().After("gorm:create").Register("mebox:sqlite_write_unlock", unlock)
+ _ = db.Callback().Update().Before("gorm:update").Register("mebox:sqlite_write_lock", lock)
+ _ = db.Callback().Update().After("gorm:update").Register("mebox:sqlite_write_unlock", unlock)
+ _ = db.Callback().Delete().Before("gorm:delete").Register("mebox:sqlite_write_lock", lock)
+ _ = db.Callback().Delete().After("gorm:delete").Register("mebox:sqlite_write_unlock", unlock)
+ _ = db.Callback().Raw().Before("gorm:raw").Register("mebox:sqlite_write_lock", rawLock)
+ _ = db.Callback().Raw().After("gorm:raw").Register("mebox:sqlite_write_unlock", unlock)
}
func isReadOnlySQL(sql string) bool {
diff --git a/internal/handler/active_user.go b/internal/handler/active_user.go
index 61fdd93..d8638e6 100644
--- a/internal/handler/active_user.go
+++ b/internal/handler/active_user.go
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
const embyCtxUserName = "emby_user_name"
diff --git a/internal/handler/admin.go b/internal/handler/admin.go
index e61837a..c9802a5 100644
--- a/internal/handler/admin.go
+++ b/internal/handler/admin.go
@@ -10,8 +10,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func listUsersHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/admin_database.go b/internal/handler/admin_database.go
index 6b1fbdc..1f77253 100644
--- a/internal/handler/admin_database.go
+++ b/internal/handler/admin_database.go
@@ -8,7 +8,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
type DatabaseConnectionPayload struct {
@@ -38,7 +38,7 @@ func (p *DatabaseConnectionPayload) BuildDSN() string {
user := strings.TrimSpace(p.User)
dbname := strings.TrimSpace(p.DBName)
if dbname == "" {
- dbname = "mmtl"
+ dbname = "mebox"
}
sslmode := strings.TrimSpace(p.SSLMode)
if sslmode == "" {
diff --git a/internal/handler/admin_database_test.go b/internal/handler/admin_database_test.go
index b948a85..53e4d55 100644
--- a/internal/handler/admin_database_test.go
+++ b/internal/handler/admin_database_test.go
@@ -9,8 +9,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestBuildDSN(t *testing.T) {
@@ -30,10 +30,10 @@ func TestBuildDSN(t *testing.T) {
Port: 5432,
User: "postgres",
Password: "secretpassword",
- DBName: "mmtl_prod",
+ DBName: "mebox_prod",
SSLMode: "disable",
},
- want: "postgres://postgres:secretpassword@127.0.0.1:5432/mmtl_prod?sslmode=disable",
+ want: "postgres://postgres:secretpassword@127.0.0.1:5432/mebox_prod?sslmode=disable",
},
}
@@ -49,7 +49,7 @@ func TestGetDatabaseStatusHandler(t *testing.T) {
gin.SetMode(gin.TestMode)
cfg := &config.Config{}
cfg.Database.Type = "sqlite"
- cfg.Database.DBPath = "./data/mmtl.db"
+ cfg.Database.DBPath = "./data/mebox.db"
svc := &service.Container{
Database: service.NewDatabaseAdminService(cfg, nil, nil, nil),
@@ -89,7 +89,7 @@ func TestSaveDatabaseConfigHandler(t *testing.T) {
r := gin.New()
r.POST("/api/admin/database/save-config", saveDatabaseConfigHandler(svc))
- body := bytes.NewBufferString(`{"type":"postgres","host":"localhost","port":5432,"user":"admin","password":"pwd","dbname":"mmtl"}`)
+ body := bytes.NewBufferString(`{"type":"postgres","host":"localhost","port":5432,"user":"admin","password":"pwd","dbname":"mebox"}`)
req := httptest.NewRequest(http.MethodPost, "/api/admin/database/save-config", body)
req.Header.Set("Content-Type", "application/json")
rec := httptest.NewRecorder()
diff --git a/internal/handler/admin_settings.go b/internal/handler/admin_settings.go
index 5d22dda..7498ebc 100644
--- a/internal/handler/admin_settings.go
+++ b/internal/handler/admin_settings.go
@@ -10,8 +10,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
type settingReq struct {
diff --git a/internal/handler/admin_test.go b/internal/handler/admin_test.go
index ecdeb4d..3ecddc6 100644
--- a/internal/handler/admin_test.go
+++ b/internal/handler/admin_test.go
@@ -11,9 +11,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestDeleteUserRefusesRecentRealtimeSession(t *testing.T) {
diff --git a/internal/handler/api_config.go b/internal/handler/api_config.go
index f80746f..a5f4a19 100644
--- a/internal/handler/api_config.go
+++ b/internal/handler/api_config.go
@@ -9,7 +9,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func listAPIConfigsHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/api_config_handler.go b/internal/handler/api_config_handler.go
index f59888b..8c7a5b6 100644
--- a/internal/handler/api_config_handler.go
+++ b/internal/handler/api_config_handler.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// ApiConfigHandler API 配置 HTTP 处理。
diff --git a/internal/handler/auth.go b/internal/handler/auth.go
index 5db3c49..1afabcf 100644
--- a/internal/handler/auth.go
+++ b/internal/handler/auth.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
type loginReq struct {
diff --git a/internal/handler/auth_cookie.go b/internal/handler/auth_cookie.go
index a4ae747..fa9a39f 100644
--- a/internal/handler/auth_cookie.go
+++ b/internal/handler/auth_cookie.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func setAccessTokenCookie(c *gin.Context, token string, maxAgeSeconds int) {
diff --git a/internal/handler/auth_cookie_test.go b/internal/handler/auth_cookie_test.go
index 7494217..040cb59 100644
--- a/internal/handler/auth_cookie_test.go
+++ b/internal/handler/auth_cookie_test.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
+ "github.com/truewhile/MeBox/internal/middleware"
)
func TestSetAccessTokenCookie(t *testing.T) {
diff --git a/internal/handler/auth_extra.go b/internal/handler/auth_extra.go
index 542f803..07e7303 100644
--- a/internal/handler/auth_extra.go
+++ b/internal/handler/auth_extra.go
@@ -10,8 +10,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
// refreshHandler returns a fresh token signed for the current user.
diff --git a/internal/handler/backup.go b/internal/handler/backup.go
index 7c6f03e..37d9957 100644
--- a/internal/handler/backup.go
+++ b/internal/handler/backup.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func createBackupHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/danmaku.go b/internal/handler/danmaku.go
index afd136c..c048bad 100644
--- a/internal/handler/danmaku.go
+++ b/internal/handler/danmaku.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// getDanmakuHandler returns danmaku for a media. ?kw= optionally overrides the
diff --git a/internal/handler/dlna.go b/internal/handler/dlna.go
index 964d841..08b2e3e 100644
--- a/internal/handler/dlna.go
+++ b/internal/handler/dlna.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func dlnaListHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/dlna_extra.go b/internal/handler/dlna_extra.go
index 1e561fc..9b48889 100644
--- a/internal/handler/dlna_extra.go
+++ b/internal/handler/dlna_extra.go
@@ -11,7 +11,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// dlnaControlPath maps the action name to the AVTransport SOAP body.
diff --git a/internal/handler/emby_auth.go b/internal/handler/emby_auth.go
index feeb5d8..5704f6a 100644
--- a/internal/handler/emby_auth.go
+++ b/internal/handler/emby_auth.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
// embyError 返回 Emby 风格的错误(顶层 Code/Message)。
diff --git a/internal/handler/emby_auth_test.go b/internal/handler/emby_auth_test.go
index 1940e98..f606207 100644
--- a/internal/handler/emby_auth_test.go
+++ b/internal/handler/emby_auth_test.go
@@ -14,10 +14,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestParseEmbyAuthByNameReqAcceptsLowercaseJSON(t *testing.T) {
diff --git a/internal/handler/emby_authed_loop_test.go b/internal/handler/emby_authed_loop_test.go
index 6d199e2..5b44b6f 100644
--- a/internal/handler/emby_authed_loop_test.go
+++ b/internal/handler/emby_authed_loop_test.go
@@ -13,10 +13,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
// TestEmbyLoginThenAuthedRequest simulates the exact flow an Emby-compatible
diff --git a/internal/handler/emby_discovery_routes_test.go b/internal/handler/emby_discovery_routes_test.go
index 6dcecb8..0c9df36 100644
--- a/internal/handler/emby_discovery_routes_test.go
+++ b/internal/handler/emby_discovery_routes_test.go
@@ -12,10 +12,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyWithRequestAddressUsesHost(t *testing.T) {
@@ -24,7 +24,7 @@ func TestEmbyWithRequestAddressUsesHost(t *testing.T) {
c, _ := gin.CreateTestContext(w)
c.Request = httptest.NewRequest(http.MethodGet, "http://192.168.1.4:18080/System/Info/Public", nil)
- payload := embyWithRequestAddress(c, map[string]any{"Id": "mmtl-001"})
+ payload := embyWithRequestAddress(c, map[string]any{"Id": "mebox-001"})
if payload["LocalAddress"] != "http://192.168.1.4:18080" {
t.Fatalf("unexpected LocalAddress: %#v", payload["LocalAddress"])
@@ -42,7 +42,7 @@ func TestEmbyWithRequestAddressHonorsForwardedHeaders(t *testing.T) {
c.Request.Header.Set("X-Forwarded-Proto", "https")
c.Request.Header.Set("X-Forwarded-Host", "media.example.test")
- payload := embyWithRequestAddress(c, map[string]any{"Id": "mmtl-001"})
+ payload := embyWithRequestAddress(c, map[string]any{"Id": "mebox-001"})
if payload["LocalAddress"] != "https://media.example.test" {
t.Fatalf("unexpected LocalAddress: %#v", payload["LocalAddress"])
diff --git a/internal/handler/emby_images.go b/internal/handler/emby_images.go
index 11538c3..c279e9b 100644
--- a/internal/handler/emby_images.go
+++ b/internal/handler/emby_images.go
@@ -9,7 +9,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
var embyPlaceholderPNG = []byte{
diff --git a/internal/handler/emby_items_handlers.go b/internal/handler/emby_items_handlers.go
index 6c178a9..55d2bda 100644
--- a/internal/handler/emby_items_handlers.go
+++ b/internal/handler/emby_items_handlers.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func parseEmbyItemsParams(c *gin.Context) service.ItemsParams {
diff --git a/internal/handler/emby_items_test.go b/internal/handler/emby_items_test.go
index f673c8b..89747da 100644
--- a/internal/handler/emby_items_test.go
+++ b/internal/handler/emby_items_test.go
@@ -14,10 +14,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyItemImageServesWithoutAPIAuth(t *testing.T) {
diff --git a/internal/handler/emby_misc_routes_test.go b/internal/handler/emby_misc_routes_test.go
index 5a08b59..d8a4101 100644
--- a/internal/handler/emby_misc_routes_test.go
+++ b/internal/handler/emby_misc_routes_test.go
@@ -13,9 +13,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyVirtualFoldersRouteReturnsJSON(t *testing.T) {
diff --git a/internal/handler/emby_mounted_resume_test.go b/internal/handler/emby_mounted_resume_test.go
index 2194e51..2643c93 100644
--- a/internal/handler/emby_mounted_resume_test.go
+++ b/internal/handler/emby_mounted_resume_test.go
@@ -13,11 +13,11 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestMountedEmbyPlayingProgressAndResumePipeline(t *testing.T) {
diff --git a/internal/handler/emby_mounts.go b/internal/handler/emby_mounts.go
index 8b2f0f3..7bb40b2 100644
--- a/internal/handler/emby_mounts.go
+++ b/internal/handler/emby_mounts.go
@@ -8,8 +8,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// embyMountView 挂载的对外 JSON(附带账号信息)。
diff --git a/internal/handler/emby_mounts_reorder_test.go b/internal/handler/emby_mounts_reorder_test.go
index 7e0a113..0e5e24b 100644
--- a/internal/handler/emby_mounts_reorder_test.go
+++ b/internal/handler/emby_mounts_reorder_test.go
@@ -12,10 +12,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestReorderEmbyMountsHandler(t *testing.T) {
diff --git a/internal/handler/emby_playback.go b/internal/handler/emby_playback.go
index e720980..af26ab2 100644
--- a/internal/handler/emby_playback.go
+++ b/internal/handler/emby_playback.go
@@ -8,7 +8,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func embyPlaybackInfoHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/emby_playback_info_routes_test.go b/internal/handler/emby_playback_info_routes_test.go
index 31ab9e1..894c3d3 100644
--- a/internal/handler/emby_playback_info_routes_test.go
+++ b/internal/handler/emby_playback_info_routes_test.go
@@ -13,10 +13,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyLowercasePlaybackInfoRouteReturnsJSON(t *testing.T) {
diff --git a/internal/handler/emby_playback_routes_test.go b/internal/handler/emby_playback_routes_test.go
index 30afae7..80db660 100644
--- a/internal/handler/emby_playback_routes_test.go
+++ b/internal/handler/emby_playback_routes_test.go
@@ -12,10 +12,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyLowercaseVideoStreamRouteServesMedia(t *testing.T) {
diff --git a/internal/handler/emby_playstate_handlers.go b/internal/handler/emby_playstate_handlers.go
index a0d283c..eeed839 100644
--- a/internal/handler/emby_playstate_handlers.go
+++ b/internal/handler/emby_playstate_handlers.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
type embyPlayingReq struct {
diff --git a/internal/handler/emby_routes.go b/internal/handler/emby_routes.go
index b6091c5..f231828 100644
--- a/internal/handler/emby_routes.go
+++ b/internal/handler/emby_routes.go
@@ -5,8 +5,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
// registerEmbyRoutes 在 r 上挂双前缀("" + "/emby")的 Emby 兼容路由。
diff --git a/internal/handler/emby_routes_lowercase.go b/internal/handler/emby_routes_lowercase.go
index 60beee8..2b5370a 100644
--- a/internal/handler/emby_routes_lowercase.go
+++ b/internal/handler/emby_routes_lowercase.go
@@ -3,7 +3,7 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerLowercaseEmbyAuthRoutes(auth *gin.RouterGroup, svc *service.Container) {
diff --git a/internal/handler/emby_session_routes_test.go b/internal/handler/emby_session_routes_test.go
index 7a5ebe9..812b36e 100644
--- a/internal/handler/emby_session_routes_test.go
+++ b/internal/handler/emby_session_routes_test.go
@@ -14,10 +14,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbyMarkPlayedRefreshesPlaybackDevice(t *testing.T) {
diff --git a/internal/handler/emby_sessions.go b/internal/handler/emby_sessions.go
index befa6fb..b89358d 100644
--- a/internal/handler/emby_sessions.go
+++ b/internal/handler/emby_sessions.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func embySessionsHandler(svc *service.Container) gin.HandlerFunc {
@@ -29,7 +29,7 @@ func embySessionsHandler(svc *service.Container) gin.HandlerFunc {
}
row := gin.H{
"Id": sess.ID,
- "ServerId": "mmtl-001",
+ "ServerId": "mebox-001",
"Client": sess.Client,
"DeviceId": sess.DeviceID,
"DeviceName": sess.DeviceName,
diff --git a/internal/handler/emby_sessions_test.go b/internal/handler/emby_sessions_test.go
index 3353cb9..0b240ca 100644
--- a/internal/handler/emby_sessions_test.go
+++ b/internal/handler/emby_sessions_test.go
@@ -10,7 +10,7 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestEmbySessionsReturnsRealtimeSession(t *testing.T) {
diff --git a/internal/handler/emby_static.go b/internal/handler/emby_static.go
index 2312520..7597f04 100644
--- a/internal/handler/emby_static.go
+++ b/internal/handler/emby_static.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func embyNoContentHandler(_ *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/emby_subtitle_routes_test.go b/internal/handler/emby_subtitle_routes_test.go
index 82bf05d..6c0f203 100644
--- a/internal/handler/emby_subtitle_routes_test.go
+++ b/internal/handler/emby_subtitle_routes_test.go
@@ -14,10 +14,10 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
// TestEmbySubtitleOfficialRouteServesRawASS verifies that the official Emby
diff --git a/internal/handler/emby_system.go b/internal/handler/emby_system.go
index 092fe56..50bbfe3 100644
--- a/internal/handler/emby_system.go
+++ b/internal/handler/emby_system.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func embySystemInfoHandler(svc *service.Container) gin.HandlerFunc {
@@ -84,9 +84,9 @@ func embyPublicSystemInfoPayload(c *gin.Context, svc *service.Container) map[str
return embyWithRequestAddress(c, svc.Emby.SystemInfoPublic())
}
return embyWithRequestAddress(c, map[string]any{
- "Id": "mmtl-001",
- "ServerId": "mmtl-001",
- "ServerName": "MMTL",
+ "Id": "mebox-001",
+ "ServerId": "mebox-001",
+ "ServerName": "MeBox",
"Version": "4.8.10.0",
"ServerVersion": "4.8.10.0",
"ProductName": "Emby Server",
diff --git a/internal/handler/emby_test_helpers_test.go b/internal/handler/emby_test_helpers_test.go
index fd76b3e..6890308 100644
--- a/internal/handler/emby_test_helpers_test.go
+++ b/internal/handler/emby_test_helpers_test.go
@@ -6,7 +6,7 @@ import (
"github.com/golang-jwt/jwt/v5"
- "github.com/ShukeBta/MMTL/internal/middleware"
+ "github.com/truewhile/MeBox/internal/middleware"
)
func signedTestToken(t *testing.T, secret string) string {
@@ -23,7 +23,7 @@ func signedTestTokenWithPurpose(t *testing.T, secret, purpose string) string {
Purpose: purpose,
RegisteredClaims: jwt.RegisteredClaims{
ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour)),
- Issuer: "mmtl-test",
+ Issuer: "mebox-test",
Subject: "user-1",
},
}
diff --git a/internal/handler/emby_users.go b/internal/handler/emby_users.go
index b0e779d..e810202 100644
--- a/internal/handler/emby_users.go
+++ b/internal/handler/emby_users.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// ─── Users / Auth ────────────────────────────────────────────────────────────
@@ -67,7 +67,7 @@ func embyAuthByNameHandler(svc *service.Container) gin.HandlerFunc {
embyRememberCompatSession(c, accessToken)
c.JSON(http.StatusOK, gin.H{
"AccessToken": accessToken,
- "ServerId": "mmtl-001",
+ "ServerId": "mebox-001",
"User": userPayload,
"SessionInfo": gin.H{
"Id": resp.User.ID,
@@ -150,12 +150,12 @@ func embyGetUserByIDHandler(svc *service.Container) gin.HandlerFunc {
func embyFallbackUser(id string) gin.H {
if strings.TrimSpace(id) == "" {
- id = "mmtl-user"
+ id = "mebox-user"
}
return gin.H{
"Id": id,
- "Name": "MMTL",
- "ServerId": "mmtl-001",
+ "Name": "MeBox",
+ "ServerId": "mebox-001",
"HasPassword": true,
"HasConfiguredPassword": true,
"HasConfiguredEasyPassword": false,
diff --git a/internal/handler/emby_views_handlers.go b/internal/handler/emby_views_handlers.go
index dab3dd8..093963b 100644
--- a/internal/handler/emby_views_handlers.go
+++ b/internal/handler/emby_views_handlers.go
@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func embyViewsHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/filemanager.go b/internal/handler/filemanager.go
index 96e9cb2..075ef8f 100644
--- a/internal/handler/filemanager.go
+++ b/internal/handler/filemanager.go
@@ -10,7 +10,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
type fileFolderReq struct {
diff --git a/internal/handler/handler.go b/internal/handler/handler.go
index 509c8c0..f8e3fc0 100644
--- a/internal/handler/handler.go
+++ b/internal/handler/handler.go
@@ -8,8 +8,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
// Register attaches every API route to the engine.
@@ -46,7 +46,7 @@ func healthCheck(c *gin.Context) {
}
func versionInfo(c *gin.Context) {
- c.JSON(200, gin.H{"name": "MMTL", "version": "0.1.0"})
+ c.JSON(200, gin.H{"name": "MeBox", "version": "0.1.0"})
}
// ─── 权限 Handler 包装 ────────────────────────────────────────────────────────
diff --git a/internal/handler/manual_scrape.go b/internal/handler/manual_scrape.go
index d053e61..31a0f85 100644
--- a/internal/handler/manual_scrape.go
+++ b/internal/handler/manual_scrape.go
@@ -8,7 +8,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
type manualScrapeApplyReq struct {
diff --git a/internal/handler/media.go b/internal/handler/media.go
index 9086d51..ef13e2f 100644
--- a/internal/handler/media.go
+++ b/internal/handler/media.go
@@ -11,9 +11,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
type createLibraryReq struct {
@@ -509,7 +509,7 @@ func streamHandler(svc *service.Container) gin.HandlerFunc {
return func(c *gin.Context) {
ctx := c.Request.Context()
id := c.Param("id")
- // 远程 Emby 条目:按挂载代理配置分流——代理走 MMTL 反代,否则 302 直连。
+ // 远程 Emby 条目:按挂载代理配置分流——代理走 MeBox 反代,否则 302 直连。
if svc.EmbyRemote != nil && service.IsEmbyRemoteID(id) {
if !enforceScopedPlaybackToken(c, id) {
return
diff --git a/internal/handler/media_extra.go b/internal/handler/media_extra.go
index 9f99bfc..6ba0d02 100644
--- a/internal/handler/media_extra.go
+++ b/internal/handler/media_extra.go
@@ -8,8 +8,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func recentMediaHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/media_favorite.go b/internal/handler/media_favorite.go
index dd133af..70e3448 100644
--- a/internal/handler/media_favorite.go
+++ b/internal/handler/media_favorite.go
@@ -12,9 +12,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// addMediaFavoriteHandler ensures the (user, media) row exists. If it
diff --git a/internal/handler/media_roots.go b/internal/handler/media_roots.go
index 608bdc2..fc0faf8 100644
--- a/internal/handler/media_roots.go
+++ b/internal/handler/media_roots.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func listLibraryRootsHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/media_scan.go b/internal/handler/media_scan.go
index 035f7eb..8c36d6f 100644
--- a/internal/handler/media_scan.go
+++ b/internal/handler/media_scan.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func scanLibraryHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/media_test.go b/internal/handler/media_test.go
index 3fc3f1b..410d941 100644
--- a/internal/handler/media_test.go
+++ b/internal/handler/media_test.go
@@ -18,11 +18,11 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestQueueLibraryRootScanImportsNewLibraryMedia(t *testing.T) {
diff --git a/internal/handler/metadata_enrich.go b/internal/handler/metadata_enrich.go
index 956c26b..f727966 100644
--- a/internal/handler/metadata_enrich.go
+++ b/internal/handler/metadata_enrich.go
@@ -8,7 +8,7 @@ import (
"sync"
"time"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
var metadataNoiseRE = regexp.MustCompile(`(?i)(自动订阅|订阅|全集|合集|complete|batch|season\s*\d+|s\d{1,2}|s\d{1,2}e\d{1,3}|第\s*\d+\s*季|第\s*\d+\s*[集话話期]|2160p|1080p|720p|4k|uhd|bluray|blu-ray|web-?dl|hdtv|remux|x26[45]|h\.?26[45]|hevc|avc|hdr10?\+?|dovi|dv|atmos|aac|ddp?5\.1|truehd|flac)`)
diff --git a/internal/handler/nfo.go b/internal/handler/nfo.go
index be2e0c4..83db407 100644
--- a/internal/handler/nfo.go
+++ b/internal/handler/nfo.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func exportNFOHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/organizer.go b/internal/handler/organizer.go
index 270d971..9d5b058 100644
--- a/internal/handler/organizer.go
+++ b/internal/handler/organizer.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// organizeReq carries optional per-request overrides. 留空则沿用系统设置。
diff --git a/internal/handler/permission_handler.go b/internal/handler/permission_handler.go
index 6ad0e4a..ca518ad 100644
--- a/internal/handler/permission_handler.go
+++ b/internal/handler/permission_handler.go
@@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// PermissionHandler 权限相关 HTTP 处理。
diff --git a/internal/handler/permissions.go b/internal/handler/permissions.go
index a140a03..daa568a 100644
--- a/internal/handler/permissions.go
+++ b/internal/handler/permissions.go
@@ -11,9 +11,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func requirePermission(svc *service.Container, key string) gin.HandlerFunc {
diff --git a/internal/handler/play_profile.go b/internal/handler/play_profile.go
index dee5fed..4f7f23e 100644
--- a/internal/handler/play_profile.go
+++ b/internal/handler/play_profile.go
@@ -11,8 +11,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
type verifyPlayProfilePINReq struct {
diff --git a/internal/handler/playback.go b/internal/handler/playback.go
index 13c8001..e40ad1d 100644
--- a/internal/handler/playback.go
+++ b/internal/handler/playback.go
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
// ─── History ────────────────────────────────────────────────────────────────
diff --git a/internal/handler/playback_extra.go b/internal/handler/playback_extra.go
index 4f0a488..94ae453 100644
--- a/internal/handler/playback_extra.go
+++ b/internal/handler/playback_extra.go
@@ -14,9 +14,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func findMediaForPlaybackEndpoint(c *gin.Context, svc *service.Container, id string) (*model.Media, error) {
@@ -186,7 +186,7 @@ func externalPlaybackURL(c *gin.Context, svc *service.Container, path string) st
if strings.HasPrefix(path, "http://") || strings.HasPrefix(path, "https://") {
return path
}
- headerOrigin := sanitizedPublicOrigin(c.GetHeader("X-MMTL-Public-Origin"))
+ headerOrigin := sanitizedPublicOrigin(c.GetHeader("X-MeBox-Public-Origin"))
if headerOrigin != "" && !isLocalPublicOrigin(headerOrigin) {
return joinOriginPath(headerOrigin, path)
}
diff --git a/internal/handler/playback_extra_test.go b/internal/handler/playback_extra_test.go
index cabe5d2..449ba0f 100644
--- a/internal/handler/playback_extra_test.go
+++ b/internal/handler/playback_extra_test.go
@@ -15,11 +15,11 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestExternalURLUsesMediaScopedPlaybackToken(t *testing.T) {
@@ -109,7 +109,7 @@ func TestExternalURLPrefersBrowserPublicOriginOverForwardedSource(t *testing.T)
req.Header.Set("Authorization", "Bearer "+loginToken)
req.Header.Set("X-Forwarded-Proto", "https")
req.Header.Set("X-Forwarded-Host", "media.v6.agonyz.dpdns.org")
- req.Header.Set("X-MMTL-Public-Origin", "https://media.agonyz.dpdns.org")
+ req.Header.Set("X-MeBox-Public-Origin", "https://media.agonyz.dpdns.org")
w := httptest.NewRecorder()
router.ServeHTTP(w, req)
@@ -140,7 +140,7 @@ func TestExternalPlayersSanitizeBrowserPublicOrigin(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "http://origin.internal/api/playback/media-1/external-players", nil)
req.Header.Set("Authorization", "Bearer "+loginToken)
- req.Header.Set("X-MMTL-Public-Origin", "https://user:pass@media.agonyz.dpdns.org/sneaky/path?x=1#frag")
+ req.Header.Set("X-MeBox-Public-Origin", "https://user:pass@media.agonyz.dpdns.org/sneaky/path?x=1#frag")
w := httptest.NewRecorder()
router.ServeHTTP(w, req)
@@ -184,7 +184,7 @@ func TestExternalURLFallsBackToConfiguredPublicServerURL(t *testing.T) {
req.Header.Set("Authorization", "Bearer "+loginToken)
req.Header.Set("X-Forwarded-Proto", "https")
req.Header.Set("X-Forwarded-Host", "source.example.test")
- req.Header.Set("X-MMTL-Public-Origin", "javascript:alert(1)")
+ req.Header.Set("X-MeBox-Public-Origin", "javascript:alert(1)")
w := httptest.NewRecorder()
router.ServeHTTP(w, req)
@@ -211,7 +211,7 @@ func TestExternalURLPrefersConfiguredPublicServerURLOverLocalBrowserOrigin(t *te
req := httptest.NewRequest(http.MethodGet, "http://127.0.0.1:8080/api/playback/media-1/external-url", nil)
req.Header.Set("Authorization", "Bearer "+loginToken)
- req.Header.Set("X-MMTL-Public-Origin", "http://127.0.0.1:8080")
+ req.Header.Set("X-MeBox-Public-Origin", "http://127.0.0.1:8080")
w := httptest.NewRecorder()
router.ServeHTTP(w, req)
diff --git a/internal/handler/playback_scope.go b/internal/handler/playback_scope.go
index 2343da8..0a40c13 100644
--- a/internal/handler/playback_scope.go
+++ b/internal/handler/playback_scope.go
@@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func enforceScopedPlaybackToken(c *gin.Context, mediaID string) bool {
diff --git a/internal/handler/playlist_extra.go b/internal/handler/playlist_extra.go
index 7091aa3..525d73a 100644
--- a/internal/handler/playlist_extra.go
+++ b/internal/handler/playlist_extra.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
type reorderReq struct {
diff --git a/internal/handler/profile.go b/internal/handler/profile.go
index 1c4458d..309e0f8 100644
--- a/internal/handler/profile.go
+++ b/internal/handler/profile.go
@@ -9,8 +9,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func updateProfileHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/profile_test.go b/internal/handler/profile_test.go
index 2ba5d3e..8264281 100644
--- a/internal/handler/profile_test.go
+++ b/internal/handler/profile_test.go
@@ -6,9 +6,9 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestProfileHideAdultRequiresPasswordOnlyWhenChanged(t *testing.T) {
diff --git a/internal/handler/public_ui.go b/internal/handler/public_ui.go
index 81333a0..1d53eb6 100644
--- a/internal/handler/public_ui.go
+++ b/internal/handler/public_ui.go
@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
const hideCommunityLinksSettingKey = "ui.hide_community_links_for_users"
diff --git a/internal/handler/public_ui_test.go b/internal/handler/public_ui_test.go
index cc75814..a2c1802 100644
--- a/internal/handler/public_ui_test.go
+++ b/internal/handler/public_ui_test.go
@@ -11,9 +11,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestPublicUIConfigExposesCommunityLinkVisibility(t *testing.T) {
diff --git a/internal/handler/recognition_words.go b/internal/handler/recognition_words.go
index a1cc7cb..34752ba 100644
--- a/internal/handler/recognition_words.go
+++ b/internal/handler/recognition_words.go
@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func recognitionWordsService(svc *service.Container) *service.RecognitionWordsService {
diff --git a/internal/handler/recycle.go b/internal/handler/recycle.go
index 003cb9e..63eeb9a 100644
--- a/internal/handler/recycle.go
+++ b/internal/handler/recycle.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func deleteMediaHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/refresh_handler.go b/internal/handler/refresh_handler.go
index c0645d8..f366d9a 100644
--- a/internal/handler/refresh_handler.go
+++ b/internal/handler/refresh_handler.go
@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// RefreshHandler 令牌刷新 HTTP 处理。
diff --git a/internal/handler/routes_admin.go b/internal/handler/routes_admin.go
index 2f349a8..67809cf 100644
--- a/internal/handler/routes_admin.go
+++ b/internal/handler/routes_admin.go
@@ -4,9 +4,9 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAdminRoutes(api *gin.RouterGroup, cfg *config.Config, svc *service.Container) {
diff --git a/internal/handler/routes_admin_test.go b/internal/handler/routes_admin_test.go
index c38b934..bab3a43 100644
--- a/internal/handler/routes_admin_test.go
+++ b/internal/handler/routes_admin_test.go
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestAdminRouteSurfacesAreRegistered(t *testing.T) {
diff --git a/internal/handler/routes_api_config.go b/internal/handler/routes_api_config.go
index 818d365..a64433e 100644
--- a/internal/handler/routes_api_config.go
+++ b/internal/handler/routes_api_config.go
@@ -4,9 +4,9 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAPIConfigRoutes(api *gin.RouterGroup, cfg *config.Config, svc *service.Container) {
diff --git a/internal/handler/routes_authenticated.go b/internal/handler/routes_authenticated.go
index 9b5290e..a9de929 100644
--- a/internal/handler/routes_authenticated.go
+++ b/internal/handler/routes_authenticated.go
@@ -4,9 +4,9 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAuthenticatedRoutes(api *gin.RouterGroup, cfg *config.Config, svc *service.Container) {
diff --git a/internal/handler/routes_authenticated_core.go b/internal/handler/routes_authenticated_core.go
index 666add4..88d4433 100644
--- a/internal/handler/routes_authenticated_core.go
+++ b/internal/handler/routes_authenticated_core.go
@@ -3,8 +3,8 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAuthedUserAndLicenseRoutes(authed *gin.RouterGroup, svc *service.Container) {
diff --git a/internal/handler/routes_authenticated_extras.go b/internal/handler/routes_authenticated_extras.go
index 6768025..80e3c52 100644
--- a/internal/handler/routes_authenticated_extras.go
+++ b/internal/handler/routes_authenticated_extras.go
@@ -3,7 +3,7 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAuthedUISurfaceRoutes(authed *gin.RouterGroup, svc *service.Container) {
diff --git a/internal/handler/routes_authenticated_features.go b/internal/handler/routes_authenticated_features.go
index 06c1ad0..8e18efb 100644
--- a/internal/handler/routes_authenticated_features.go
+++ b/internal/handler/routes_authenticated_features.go
@@ -3,8 +3,8 @@ package handler
import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerAuthedFileRoutes(authed *gin.RouterGroup, svc *service.Container) {
diff --git a/internal/handler/routes_authenticated_test.go b/internal/handler/routes_authenticated_test.go
index 8acc5c1..e138d9f 100644
--- a/internal/handler/routes_authenticated_test.go
+++ b/internal/handler/routes_authenticated_test.go
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestAuthenticatedRouteSurfacesAreRegistered(t *testing.T) {
diff --git a/internal/handler/routes_public.go b/internal/handler/routes_public.go
index 0992361..c9a8359 100644
--- a/internal/handler/routes_public.go
+++ b/internal/handler/routes_public.go
@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/service"
)
func registerPublicAuthRoutes(api *gin.RouterGroup, svc *service.Container, log *zap.Logger) {
diff --git a/internal/handler/scrape_reclassify.go b/internal/handler/scrape_reclassify.go
index 7678ce8..ff49389 100644
--- a/internal/handler/scrape_reclassify.go
+++ b/internal/handler/scrape_reclassify.go
@@ -3,7 +3,7 @@ package handler
import (
"context"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// 刮削元数据时不再自动跨库纠偏或自动创建新媒体库,保持在当前媒体库内仅更新元数据
diff --git a/internal/handler/scraper_queue.go b/internal/handler/scraper_queue.go
index 5b6a21e..7f870db 100644
--- a/internal/handler/scraper_queue.go
+++ b/internal/handler/scraper_queue.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func listScrapeQueueHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/search_extra.go b/internal/handler/search_extra.go
index 8b42f40..439adb0 100644
--- a/internal/handler/search_extra.go
+++ b/internal/handler/search_extra.go
@@ -10,7 +10,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// searchUnifiedHandler is the basic /api/search endpoint.
diff --git a/internal/handler/series.go b/internal/handler/series.go
index f0e39b7..04984c9 100644
--- a/internal/handler/series.go
+++ b/internal/handler/series.go
@@ -13,8 +13,8 @@ import (
"github.com/gin-gonic/gin"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// seasonGroup is the JSON returned to the React UI per season.
diff --git a/internal/handler/stats_user.go b/internal/handler/stats_user.go
index ee0b156..ded5cd8 100644
--- a/internal/handler/stats_user.go
+++ b/internal/handler/stats_user.go
@@ -8,9 +8,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// statsUserHandler returns a watch-time summary for one user.
diff --git a/internal/handler/storage.go b/internal/handler/storage.go
index 5dfc638..170ae5e 100644
--- a/internal/handler/storage.go
+++ b/internal/handler/storage.go
@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func storageBreakdownHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/storage_test.go b/internal/handler/storage_test.go
index c136e59..b315b5a 100644
--- a/internal/handler/storage_test.go
+++ b/internal/handler/storage_test.go
@@ -6,8 +6,8 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/service"
)
func TestStorageRouteIsRegistered(t *testing.T) {
diff --git a/internal/handler/streaming.go b/internal/handler/streaming.go
index 1b7cfc0..9137906 100644
--- a/internal/handler/streaming.go
+++ b/internal/handler/streaming.go
@@ -8,7 +8,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func hlsPlaylistHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/strm.go b/internal/handler/strm.go
index c195cb6..e92a03b 100644
--- a/internal/handler/strm.go
+++ b/internal/handler/strm.go
@@ -12,8 +12,8 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// ─── 网盘账号 ──────────────────────────────────────────────────────────────────
@@ -31,7 +31,7 @@ type strmAccountView struct {
ProviderLabel string `json:"provider_label"`
// ConfigPreview 非敏感配置字段,供编辑表单回显。
ConfigPreview service.StrmAccountConfigPreview `json:"config_preview,omitempty"`
- // ProxyPlay 仅远程 Emby 挂载账号返回:播放流量是否经过 MMTL 代理(编辑回显用)。
+ // ProxyPlay 仅远程 Emby 挂载账号返回:播放流量是否经过 MeBox 代理(编辑回显用)。
ProxyPlay *bool `json:"proxy_play,omitempty"`
// EmbyLines 仅远程 Emby 挂载账号返回:多线路配置(不含凭据)。
EmbyLines []service.EmbyRemoteLine `json:"emby_lines,omitempty"`
diff --git a/internal/handler/strm_routes_test.go b/internal/handler/strm_routes_test.go
index 5b4af18..b9c4c9f 100644
--- a/internal/handler/strm_routes_test.go
+++ b/internal/handler/strm_routes_test.go
@@ -11,10 +11,10 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service"
)
// TestStrmAdminRoutes 冒烟测试 STRM 管理端点注册与 401 拦截。
diff --git a/internal/handler/subtitles.go b/internal/handler/subtitles.go
index bae6d11..1e78a4a 100644
--- a/internal/handler/subtitles.go
+++ b/internal/handler/subtitles.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func listSubtitlesHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/system_extra.go b/internal/handler/system_extra.go
index 0e93cbd..5540e63 100644
--- a/internal/handler/system_extra.go
+++ b/internal/handler/system_extra.go
@@ -10,9 +10,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// listSystemConfigHandler is the non-admin alias for /admin/settings.
diff --git a/internal/handler/system_meta.go b/internal/handler/system_meta.go
index daf3fbf..81e64f6 100644
--- a/internal/handler/system_meta.go
+++ b/internal/handler/system_meta.go
@@ -15,7 +15,7 @@ import (
"github.com/shirou/gopsutil/v3/disk"
"github.com/shirou/gopsutil/v3/mem"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// startedAt is captured at first call so /system/status can report uptime
@@ -31,7 +31,7 @@ func systemInfoHandler(svc *service.Container) gin.HandlerFunc {
}
}
c.JSON(http.StatusOK, gin.H{
- "name": "MMTL",
+ "name": "MeBox",
"version": "0.1.0",
"go": runtime.Version(),
"os": runtime.GOOS,
diff --git a/internal/handler/system_update.go b/internal/handler/system_update.go
index b49300a..6c43ebe 100644
--- a/internal/handler/system_update.go
+++ b/internal/handler/system_update.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
func systemUpdateStatusHandler(svc *service.Container) gin.HandlerFunc {
diff --git a/internal/handler/task_helpers.go b/internal/handler/task_helpers.go
index 88b4f27..c793d4f 100644
--- a/internal/handler/task_helpers.go
+++ b/internal/handler/task_helpers.go
@@ -1,6 +1,6 @@
package handler
-import "github.com/ShukeBta/MMTL/internal/service"
+import "github.com/truewhile/MeBox/internal/service"
func finishHTTPTask(task *service.TaskHandle, err error, stage, message string, metrics map[string]int64, details []string) {
if task == nil {
diff --git a/internal/handler/tools_ffmpeg.go b/internal/handler/tools_ffmpeg.go
index 7912c01..bfdc1f1 100644
--- a/internal/handler/tools_ffmpeg.go
+++ b/internal/handler/tools_ffmpeg.go
@@ -6,7 +6,7 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
// ffToolsStatusHandler 返回 ffmpeg/ffprobe 当前安装状态
diff --git a/internal/handler/visibility.go b/internal/handler/visibility.go
index 85513c8..21c3616 100644
--- a/internal/handler/visibility.go
+++ b/internal/handler/visibility.go
@@ -11,9 +11,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
func mediaVisibilityForRequest(c *gin.Context, svc *service.Container) service.MediaVisibility {
diff --git a/internal/handler/watch_history.go b/internal/handler/watch_history.go
index c1e979b..44ecdfa 100644
--- a/internal/handler/watch_history.go
+++ b/internal/handler/watch_history.go
@@ -17,9 +17,9 @@ import (
"github.com/gin-gonic/gin"
- "github.com/ShukeBta/MMTL/internal/middleware"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/middleware"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service"
)
// historyListHandler returns the caller's history rows joined with the
diff --git a/internal/handler/ws.go b/internal/handler/ws.go
index 187f0eb..fb1e358 100644
--- a/internal/handler/ws.go
+++ b/internal/handler/ws.go
@@ -15,7 +15,7 @@ import (
"github.com/google/uuid"
"github.com/gorilla/websocket"
- "github.com/ShukeBta/MMTL/internal/service"
+ "github.com/truewhile/MeBox/internal/service"
)
var wsUpgrader = websocket.Upgrader{
diff --git a/internal/model/emby_mount.go b/internal/model/emby_mount.go
index d957698..47dbcc2 100644
--- a/internal/model/emby_mount.go
+++ b/internal/model/emby_mount.go
@@ -2,7 +2,7 @@
//
// 远程 Emby 账号(StrmAccount.Provider = emby_remote)只是一个服务器连接;
// 「挂载」才决定把该服务器的哪个媒体库(View)暴露到本项目的媒体库中。
-// 这样同一个 Emby 服务器可以按库选择挂载,且每个挂载独立控制是否由 MMTL
+// 这样同一个 Emby 服务器可以按库选择挂载,且每个挂载独立控制是否由 MeBox
// 代理播放流量。
package model
@@ -15,6 +15,6 @@ type EmbyMount struct {
CollectionType string `gorm:"size:32" json:"collection_type"` // movies / tvshows / music ...
Name string `gorm:"size:255" json:"name,omitempty"` // 覆盖显示名(可选,默认「账号 · 库名」)
SortOrder int `gorm:"default:0;index" json:"sort_order"` // 手动排序用,越小越靠前
- ProxyPlay bool `gorm:"default:false" json:"proxy_play"` // 该挂载播放流量是否经 MMTL 反向代理
+ ProxyPlay bool `gorm:"default:false" json:"proxy_play"` // 该挂载播放流量是否经 MeBox 反向代理
Enabled bool `gorm:"default:true" json:"enabled"` // 是否在媒体库中展示
}
diff --git a/internal/model/model.go b/internal/model/model.go
index 4b3cf9f..dfc1c76 100644
--- a/internal/model/model.go
+++ b/internal/model/model.go
@@ -1,5 +1,5 @@
// Package model 定义 GORM 数据模型和自动迁移使用的注册表。
-// 每个子系统在 MMTL 中拥有一个表切片;AllModels 返回联合以供 db.AutoMigrate 使用。
+// 每个子系统在 MeBox 中拥有一个表切片;AllModels 返回联合以供 db.AutoMigrate 使用。
package model
import (
diff --git a/internal/repository/access_log_repository.go b/internal/repository/access_log_repository.go
index 1485842..6b21e63 100644
--- a/internal/repository/access_log_repository.go
+++ b/internal/repository/access_log_repository.go
@@ -5,7 +5,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// AccessLogRepository persists model.AccessLog records.
diff --git a/internal/repository/api_config_repository.go b/internal/repository/api_config_repository.go
index 1a1f624..3e4993e 100644
--- a/internal/repository/api_config_repository.go
+++ b/internal/repository/api_config_repository.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// ApiConfigRepository persists model.ApiConfig records.
diff --git a/internal/repository/bot_repo.go b/internal/repository/bot_repo.go
index e2b98b6..9f866ae 100644
--- a/internal/repository/bot_repo.go
+++ b/internal/repository/bot_repo.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// ─── RegistrationCode ─────────────────────────────────────────────────────────
diff --git a/internal/repository/emby_mount_repository.go b/internal/repository/emby_mount_repository.go
index f80af31..8b9af27 100644
--- a/internal/repository/emby_mount_repository.go
+++ b/internal/repository/emby_mount_repository.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// EmbyMountRepository 持久化远程 Emby 媒体库挂载。
diff --git a/internal/repository/emby_mount_test.go b/internal/repository/emby_mount_test.go
index 6d57c55..97aba84 100644
--- a/internal/repository/emby_mount_test.go
+++ b/internal/repository/emby_mount_test.go
@@ -6,8 +6,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEmbyMountSortOrderAndReorder(t *testing.T) {
diff --git a/internal/repository/favorite_repository.go b/internal/repository/favorite_repository.go
index 44ca84d..48e1b65 100644
--- a/internal/repository/favorite_repository.go
+++ b/internal/repository/favorite_repository.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// FavoriteRepository persists model.Favorite records.
diff --git a/internal/repository/history_repository.go b/internal/repository/history_repository.go
index b8ee9e1..d7c7314 100644
--- a/internal/repository/history_repository.go
+++ b/internal/repository/history_repository.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// HistoryRepository persists model.PlaybackHistory entries. The application
diff --git a/internal/repository/library_repository.go b/internal/repository/library_repository.go
index 44a2311..68a9f5f 100644
--- a/internal/repository/library_repository.go
+++ b/internal/repository/library_repository.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// LibraryRepository persists model.Library records.
diff --git a/internal/repository/media_repository.go b/internal/repository/media_repository.go
index d816e44..256b063 100644
--- a/internal/repository/media_repository.go
+++ b/internal/repository/media_repository.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// MediaRepository persists model.Media records.
@@ -132,7 +132,7 @@ func (r *MediaRepository) listByLibrariesFiltered(ctx context.Context, libraryID
type rankedMediaRow struct {
model.Media
- MmtlRN int `gorm:"column:mmtl_rn"`
+ MmtlRN int `gorm:"column:mebox_rn"`
}
// ListRecentByLibraries returns up to perLibrary recent items for each library
@@ -164,11 +164,11 @@ func (r *MediaRepository) ListRecentByLibraries(ctx context.Context, libraryIDs
SELECT *, ROW_NUMBER() OVER (
PARTITION BY library_id
ORDER BY release_date DESC, year DESC, updated_at DESC, created_at DESC, id DESC
- ) AS mmtl_rn
+ ) AS mebox_rn
FROM media
WHERE %s
) ranked
- WHERE mmtl_rn <= ?
+ WHERE mebox_rn <= ?
`, where)
var rows []rankedMediaRow
diff --git a/internal/repository/media_repository_preview_test.go b/internal/repository/media_repository_preview_test.go
index 1120aaa..ce6a1c8 100644
--- a/internal/repository/media_repository_preview_test.go
+++ b/internal/repository/media_repository_preview_test.go
@@ -8,8 +8,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestListRecentByLibraries(t *testing.T) {
diff --git a/internal/repository/media_repository_upsert.go b/internal/repository/media_repository_upsert.go
index 49f1df1..21d70bf 100644
--- a/internal/repository/media_repository_upsert.go
+++ b/internal/repository/media_repository_upsert.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// Upsert inserts or updates a media row keyed by Path (unique index).
diff --git a/internal/repository/media_search_repository.go b/internal/repository/media_search_repository.go
index d781cf6..85ac738 100644
--- a/internal/repository/media_search_repository.go
+++ b/internal/repository/media_search_repository.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// Search runs a LIKE search against the title field. Empty query returns the
diff --git a/internal/repository/opensearch.go b/internal/repository/opensearch.go
index 4c81ee7..9b8ecdc 100644
--- a/internal/repository/opensearch.go
+++ b/internal/repository/opensearch.go
@@ -11,8 +11,8 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
type OpenSearchMediaBackend struct {
@@ -29,7 +29,7 @@ func NewOpenSearchMediaBackend(cfg config.SearchConfig) *OpenSearchMediaBackend
}
index := strings.TrimSpace(cfg.Index)
if index == "" {
- index = "mmtl_media"
+ index = "mebox_media"
}
return &OpenSearchMediaBackend{
baseURL: strings.TrimRight(strings.TrimSpace(cfg.OpenSearchURL), "/"),
diff --git a/internal/repository/opensearch_test.go b/internal/repository/opensearch_test.go
index bb2d4cc..c3bd806 100644
--- a/internal/repository/opensearch_test.go
+++ b/internal/repository/opensearch_test.go
@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestOpenSearchMediaBackendSearchesIDs(t *testing.T) {
diff --git a/internal/repository/permission_repository.go b/internal/repository/permission_repository.go
index fc126af..805ddfd 100644
--- a/internal/repository/permission_repository.go
+++ b/internal/repository/permission_repository.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// PermissionRepository persists model.UserPermission records.
diff --git a/internal/repository/play_profile_repo.go b/internal/repository/play_profile_repo.go
index 0cf9b86..91b883b 100644
--- a/internal/repository/play_profile_repo.go
+++ b/internal/repository/play_profile_repo.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// PlayProfileRepository persists model.PlayProfile records.
diff --git a/internal/repository/playlist_repository.go b/internal/repository/playlist_repository.go
index 14d854c..2f7a9ad 100644
--- a/internal/repository/playlist_repository.go
+++ b/internal/repository/playlist_repository.go
@@ -5,7 +5,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// PlaylistRepository persists model.Playlist + PlaylistItem.
diff --git a/internal/repository/refresh_token_repository.go b/internal/repository/refresh_token_repository.go
index 33136de..d0c7d89 100644
--- a/internal/repository/refresh_token_repository.go
+++ b/internal/repository/refresh_token_repository.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// RefreshTokenRepository persists model.RefreshToken records.
diff --git a/internal/repository/repository_test.go b/internal/repository/repository_test.go
index 66f843c..b9ddb84 100644
--- a/internal/repository/repository_test.go
+++ b/internal/repository/repository_test.go
@@ -9,8 +9,8 @@ import (
"github.com/glebarez/sqlite"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestMediaUpsertSkipsUnchangedExistingRow(t *testing.T) {
diff --git a/internal/repository/scrape_task_repository.go b/internal/repository/scrape_task_repository.go
index bf6a793..6b50714 100644
--- a/internal/repository/scrape_task_repository.go
+++ b/internal/repository/scrape_task_repository.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
var scrapeClaimMu sync.Mutex
diff --git a/internal/repository/series_repository.go b/internal/repository/series_repository.go
index c7ad824..5fecafb 100644
--- a/internal/repository/series_repository.go
+++ b/internal/repository/series_repository.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// SeriesRepository persists model.Series records.
diff --git a/internal/repository/setting_repository.go b/internal/repository/setting_repository.go
index c3a7368..528bb48 100644
--- a/internal/repository/setting_repository.go
+++ b/internal/repository/setting_repository.go
@@ -6,7 +6,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// SettingRepository persists key/value preferences.
diff --git a/internal/repository/storage_config_repo.go b/internal/repository/storage_config_repo.go
index 81e7e2b..363d593 100644
--- a/internal/repository/storage_config_repo.go
+++ b/internal/repository/storage_config_repo.go
@@ -8,7 +8,7 @@ import (
"github.com/google/uuid"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// StorageConfigRepository persists model.StorageConfig records.
diff --git a/internal/repository/strm_repository.go b/internal/repository/strm_repository.go
index 5b7f381..fe3de4e 100644
--- a/internal/repository/strm_repository.go
+++ b/internal/repository/strm_repository.go
@@ -8,7 +8,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
var strmClaimMu sync.Mutex
diff --git a/internal/repository/user_repository.go b/internal/repository/user_repository.go
index ae6cf52..50d3487 100644
--- a/internal/repository/user_repository.go
+++ b/internal/repository/user_repository.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// UserRepository persists model.User records.
diff --git a/internal/service/adult_scraper.go b/internal/service/adult_scraper.go
index 92862cf..134921a 100644
--- a/internal/service/adult_scraper.go
+++ b/internal/service/adult_scraper.go
@@ -13,7 +13,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
var (
diff --git a/internal/service/adult_scraper_routing_test.go b/internal/service/adult_scraper_routing_test.go
index 5612404..1d71b6d 100644
--- a/internal/service/adult_scraper_routing_test.go
+++ b/internal/service/adult_scraper_routing_test.go
@@ -11,8 +11,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestAdultProviderRouting(t *testing.T) {
diff --git a/internal/service/adult_scraper_test.go b/internal/service/adult_scraper_test.go
index 6e35212..430e4f7 100644
--- a/internal/service/adult_scraper_test.go
+++ b/internal/service/adult_scraper_test.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestNormalizeAdultCode(t *testing.T) {
diff --git a/internal/service/api_config.go b/internal/service/api_config.go
index 622a40e..6e12c36 100644
--- a/internal/service/api_config.go
+++ b/internal/service/api_config.go
@@ -5,7 +5,7 @@
// read so values stored on disk are useless without the JWT secret.
//
// On first read it seeds the table with the providers supported by
-// MMTL today (TMDb / Bangumi / TheTVDB / Fanart / OpenAI / Douban).
+// MeBox today (TMDb / Bangumi / TheTVDB / Fanart / OpenAI / Douban).
package service
import (
@@ -17,8 +17,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// APIConfigService coordinates third-party API key storage.
diff --git a/internal/service/api_config_connection.go b/internal/service/api_config_connection.go
index 940068a..c983bc0 100644
--- a/internal/service/api_config_connection.go
+++ b/internal/service/api_config_connection.go
@@ -10,7 +10,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// TestConnection 测试 API 连接。
diff --git a/internal/service/api_config_helpers.go b/internal/service/api_config_helpers.go
index f63dc98..be0c36e 100644
--- a/internal/service/api_config_helpers.go
+++ b/internal/service/api_config_helpers.go
@@ -5,7 +5,7 @@ import (
"net/url"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// GetEffectiveConfig 获取生效的 API 配置(数据库配置优先于配置文件)。
diff --git a/internal/service/api_config_svc.go b/internal/service/api_config_svc.go
index c76f1c1..893217a 100644
--- a/internal/service/api_config_svc.go
+++ b/internal/service/api_config_svc.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ApiConfigService 负责第三方 API 配置的 CRUD 和加密管理。
diff --git a/internal/service/audit.go b/internal/service/audit.go
index 10bed8f..8fc30b4 100644
--- a/internal/service/audit.go
+++ b/internal/service/audit.go
@@ -12,8 +12,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// AuditService is the only sanctioned writer for the access_logs table.
diff --git a/internal/service/auth.go b/internal/service/auth.go
index 4704ce0..27c29db 100644
--- a/internal/service/auth.go
+++ b/internal/service/auth.go
@@ -12,9 +12,9 @@ import (
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// AuthService handles registration, login, and JWT issuance.
diff --git a/internal/service/auth_tokens.go b/internal/service/auth_tokens.go
index 8833cfa..cb7cef9 100644
--- a/internal/service/auth_tokens.go
+++ b/internal/service/auth_tokens.go
@@ -9,7 +9,7 @@ import (
"github.com/golang-jwt/jwt/v5"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// IssueToken signs a JWT for the given user (60min validity, includes tier).
@@ -21,7 +21,7 @@ func (s *AuthService) IssueToken(u *model.User) (string, error) {
RegisteredClaims: jwt.RegisteredClaims{
IssuedAt: jwt.NewNumericDate(time.Now()),
ExpiresAt: jwt.NewNumericDate(time.Now().Add(60 * time.Minute)),
- Issuer: "mmtl",
+ Issuer: "mebox",
Subject: u.ID,
},
}
@@ -68,7 +68,7 @@ func (s *AuthService) IssueExternalPlaybackToken(u *model.User, mediaID string,
RegisteredClaims: jwt.RegisteredClaims{
IssuedAt: jwt.NewNumericDate(time.Now()),
ExpiresAt: jwt.NewNumericDate(time.Now().Add(ExternalPlaybackTokenDurationForMedia(durationSec))),
- Issuer: "mmtl",
+ Issuer: "mebox",
Subject: u.ID,
},
}
@@ -95,7 +95,7 @@ func (s *AuthService) IssueEmbyToken(u *model.User) (string, error) {
RegisteredClaims: jwt.RegisteredClaims{
IssuedAt: jwt.NewNumericDate(time.Now()),
ExpiresAt: jwt.NewNumericDate(time.Now().Add(EmbyTokenDuration)),
- Issuer: "mmtl",
+ Issuer: "mebox",
Subject: u.ID,
},
}
diff --git a/internal/service/auth_user_limits_test.go b/internal/service/auth_user_limits_test.go
index 247f854..5478c07 100644
--- a/internal/service/auth_user_limits_test.go
+++ b/internal/service/auth_user_limits_test.go
@@ -12,10 +12,10 @@ import (
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newAuthTestServices(t *testing.T) (*repository.Container, *AuthService, *ProfileService, *PermissionService) {
diff --git a/internal/service/backup.go b/internal/service/backup.go
index b3ee59e..6e1d071 100644
--- a/internal/service/backup.go
+++ b/internal/service/backup.go
@@ -19,7 +19,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// BackupService manages database backups.
@@ -72,7 +72,7 @@ func (b *BackupService) Create(ctx context.Context) (*BackupInfo, error) {
return nil, err
}
ts := time.Now().Format("20060102_150405")
- dst := filepath.Join(dir, fmt.Sprintf("mmtl_%s.db", ts))
+ dst := filepath.Join(dir, fmt.Sprintf("mebox_%s.db", ts))
// VACUUM INTO creates a clean, non-WAL copy atomically.
if err := b.db.WithContext(ctx).Exec("VACUUM INTO ?", dst).Error; err != nil {
diff --git a/internal/service/bangumi.go b/internal/service/bangumi.go
index 7326ebc..082b668 100644
--- a/internal/service/bangumi.go
+++ b/internal/service/bangumi.go
@@ -23,7 +23,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// BangumiProvider talks to https://api.bgm.tv.
@@ -181,7 +181,7 @@ func (b *BangumiProvider) getJSON(ctx context.Context, u string, out any) error
if err != nil {
return err
}
- req.Header.Set("User-Agent", "MMTL/0.1 (https://github.com/ShukeBta/MMTL)")
+ req.Header.Set("User-Agent", "MeBox/0.1 (https://github.com/truewhile/MeBox)")
if t := strings.TrimSpace(b.cfg.Secrets.BangumiToken); t != "" {
req.Header.Set("Authorization", "Bearer "+t)
}
diff --git a/internal/service/bot_settings.go b/internal/service/bot_settings.go
index fa81393..eec56e1 100644
--- a/internal/service/bot_settings.go
+++ b/internal/service/bot_settings.go
@@ -7,8 +7,8 @@ import (
"strconv"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// Bot / 设备管控相关的设置键。全部存储在 settings 表,由管理员通过
diff --git a/internal/service/cloud/cloud_115_test.go b/internal/service/cloud/cloud_115_test.go
index 19f0a11..d05b22f 100644
--- a/internal/service/cloud/cloud_115_test.go
+++ b/internal/service/cloud/cloud_115_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"testing"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// 115 开放平台(openapi)驱动测试:mock proapi 的列目录/直链接口。
diff --git a/internal/service/cloud/clouddrive2.go b/internal/service/cloud/clouddrive2.go
index a77d112..f92d73c 100644
--- a/internal/service/cloud/clouddrive2.go
+++ b/internal/service/cloud/clouddrive2.go
@@ -13,7 +13,7 @@ import (
// cloudDrive2Provider bridges CloudDrive2 through its WebDAV endpoint.
//
// CloudDrive2 integrates many cloud disks (115 / 123 / Aliyun and more).
-// Treating it as a WebDAV-backed cloud provider lets MMTL
+// Treating it as a WebDAV-backed cloud provider lets MeBox
// browse, mount and upload to those disks without carrying every provider's
// private chunk-upload protocol in this project.
type cloudDrive2Provider struct {
diff --git a/internal/service/cloud/emby.go b/internal/service/cloud/emby.go
index fb9cbc6..c4308a3 100644
--- a/internal/service/cloud/emby.go
+++ b/internal/service/cloud/emby.go
@@ -21,7 +21,7 @@ import (
// embyProvider implements Provider against a remote Emby server using an
// api_key (token) for authentication. DirectLink.Resolve returns the remote
-// stream URL; whether MMTL reverse-proxies the bytes is decided by the
+// stream URL; whether MeBox reverse-proxies the bytes is decided by the
// emby.proxy_play account config (defaults to off).
type embyProvider struct {
base string // e.g. http://host:8096(自动补 /emby 前缀)
@@ -159,7 +159,7 @@ func (p *embyProvider) ensureToken(ctx context.Context) (string, error) {
return "", err
}
req.Header.Set("Content-Type", "application/json")
- req.Header.Set("X-Emby-Authorization", `MediaBrowser Client="MMTL", Device="MMTL-Federated", DeviceId="mmtl-federated", Version="1.0"`)
+ req.Header.Set("X-Emby-Authorization", `MediaBrowser Client="MeBox", Device="MeBox-Federated", DeviceId="mebox-federated", Version="1.0"`)
resp, err := p.client.Do(req)
if err != nil {
return "", err
@@ -234,7 +234,7 @@ func (p *embyProvider) List(ctx context.Context, dirID string) ([]FileEntry, err
}
// Resolve 返回远程 Emby 直链。Proxy=true 时由调用方(StrmService.ProxyDirect)
-// 反向代理流量;false 时 302 到直链。默认不代理(播放字节不经过 MMTL)。
+// 反向代理流量;false 时 302 到直链。默认不代理(播放字节不经过 MeBox)。
func (p *embyProvider) Resolve(ctx context.Context, fileRef string) (*DirectLink, error) {
token, err := p.ensureToken(ctx)
if err != nil {
diff --git a/internal/service/cloud/pan115_openapi.go b/internal/service/cloud/pan115_openapi.go
index 6731550..e81d169 100644
--- a/internal/service/cloud/pan115_openapi.go
+++ b/internal/service/cloud/pan115_openapi.go
@@ -22,7 +22,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// OpenAPI115Provider 暴露 115 开放平台驱动接口。
@@ -112,7 +112,7 @@ func (p *openAPI115Provider) OpenClient() *cloud115.OpenClient { return p.c }
// io.Reader 无法携带文件名,因此走独立的 named 上传接口。将内容落为临时文件后
// 重命名为目标文件名,再交给 115 上传(/open/upload/init 的 file_name 取真实文件名)。
func (p *openAPI115Provider) PutFileNamed(ctx context.Context, parentCID, fileName string, r io.Reader) error {
- tmp, err := os.CreateTemp("", "mmtl-upload-*")
+ tmp, err := os.CreateTemp("", "mebox-upload-*")
if err != nil {
return fmt.Errorf("115: 创建临时文件失败:%w", err)
}
diff --git a/internal/service/cloud115/const.go b/internal/service/cloud115/const.go
index c42231f..d82df66 100644
--- a/internal/service/cloud115/const.go
+++ b/internal/service/cloud115/const.go
@@ -39,7 +39,7 @@ const (
)
// DefaultUA 请求 UA(标准 API 客户端格式,避免伪装浏览器触发 115 WAF 拦截与 405 错误)。
-const DefaultUA = "MMTL-115-GoClient/1.0"
+const DefaultUA = "MeBox-115-GoClient/1.0"
// OpenAPIError 保留 115 开放平台返回的原始错误信息。
type OpenAPIError struct {
diff --git a/internal/service/cloud_library_display_stubs.go b/internal/service/cloud_library_display_stubs.go
index 455d7b9..223daf1 100644
--- a/internal/service/cloud_library_display_stubs.go
+++ b/internal/service/cloud_library_display_stubs.go
@@ -6,8 +6,8 @@ import (
"path"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// CloudMountInfo 是云盘挂载库的规范标识(因网盘后端已移除,仅保留类型以兼容
diff --git a/internal/service/danmaku_credentials.go b/internal/service/danmaku_credentials.go
index f7adbe5..9ade4b5 100644
--- a/internal/service/danmaku_credentials.go
+++ b/internal/service/danmaku_credentials.go
@@ -29,12 +29,12 @@ import (
// dandanplayObfuscationKey 是解开内置凭据的 XOR 混淆密钥。它与密文
// 同处一个二进制,仅作提取门槛,不作安全边界。
-const dandanplayObfuscationKey = "MMTL-Danmaku#2026!v2"
+const dandanplayObfuscationKey = "MeBox-Danmaku#2026!v2"
// 内置回退凭据(XOR 混淆后的 hex 编码)。
const (
- danmakuEmbeddedAppIDHex = "352c24755f7c115d0a52"
- danmakuEmbeddedAppKeyHex = "74390d751832375917150d4717586578586620652a05043d5e320f0d0b120d38"
+ danmakuEmbeddedAppIDHex = "350432560a153452095e"
+ danmakuEmbeddedAppKeyHex = "74111b564d5b1256141907594149677a5c717721550535331c0e4327071d0b2c"
)
// danmakuEmbeddedCredentials 解出内置回退凭据。
diff --git a/internal/service/danmaku_match_test.go b/internal/service/danmaku_match_test.go
index 4356da6..095fc4a 100644
--- a/internal/service/danmaku_match_test.go
+++ b/internal/service/danmaku_match_test.go
@@ -16,8 +16,8 @@ import (
"github.com/stretchr/testify/require"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud"
)
// overrideDanmakuOfficialBase points the "official" endpoint (match + fallback)
@@ -34,7 +34,7 @@ func overrideDanmakuOfficialBase(t *testing.T, base string) {
// since the file is smaller than the 16MB prefix).
func writeDanmakuTestVideo(t *testing.T, name string) (path, wantHash string) {
t.Helper()
- content := bytes.Repeat([]byte("MMTL-danmaku-hash-test-0123456789"), 500)
+ content := bytes.Repeat([]byte("MeBox-danmaku-hash-test-0123456789"), 500)
path = filepath.Join(t.TempDir(), name)
require.NoError(t, os.WriteFile(path, content, 0o644))
sum := md5.Sum(content)
diff --git a/internal/service/danmaku_service.go b/internal/service/danmaku_service.go
index 790316c..9a1d928 100644
--- a/internal/service/danmaku_service.go
+++ b/internal/service/danmaku_service.go
@@ -20,8 +20,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// Danmaku setting keys, managed through the admin settings UI (PUT
@@ -439,7 +439,7 @@ func (s *DanmakuService) fetchBody(ctx context.Context, sourceURL string, follow
if err != nil {
return "", err
}
- req.Header.Set("User-Agent", "MMTL/danmaku (+https://github.com/ShukeBta/MMTL)")
+ req.Header.Set("User-Agent", "MeBox/danmaku (+https://github.com/truewhile/MeBox)")
req.Header.Set("Accept", "application/json, application/xml, */*")
if appID, appKey, ok := s.danmakuCredentials(ctx, sourceURL); ok {
// 签名认证:base64(sha256(AppId+Timestamp+Path+Secret)),密钥不出服务器。
@@ -522,7 +522,7 @@ func (s *DanmakuService) hashCachePut(stamp, hash string) {
}
// danmakuMatchFileName derives the /api/v2/match fileName: base name without
-// the final extension. .strm items are covered too — MMTL strm files drop the
+// the final extension. .strm items are covered too — MeBox strm files drop the
// video extension ("xxx.strm") while pre-existing ones may keep it
// ("xxx.mkv.strm") — so a second strip removes a real video extension only
// (filepath.Ext would misread names like "xxx.第01话" as having an extension).
@@ -636,7 +636,7 @@ func (s *DanmakuService) hashLocalFile(path string) (string, bool) {
}
// hashStrmTarget computes the video hash behind a .strm indirection:
-// MMTL-internal /api/strm/play URLs are resolved through strmResolve (local
+// MeBox-internal /api/strm/play URLs are resolved through strmResolve (local
// path read directly, cloud links range-fetched); plain http(s) links are
// fetched directly. Only the 16MB prefix is ever downloaded.
func (s *DanmakuService) hashStrmTarget(ctx context.Context, raw string) (string, bool) {
@@ -707,7 +707,7 @@ func (s *DanmakuService) openRangeBody(ctx context.Context, target string, heade
if err != nil {
return nil, err
}
- req.Header.Set("User-Agent", "MMTL/danmaku (+https://github.com/ShukeBta/MMTL)")
+ req.Header.Set("User-Agent", "MeBox/danmaku (+https://github.com/truewhile/MeBox)")
req.Header.Set("Range", fmt.Sprintf("bytes=0-%d", danmakuHashPrefixBytes-1))
for k, v := range headers {
req.Header.Set(k, v)
diff --git a/internal/service/danmaku_service_test.go b/internal/service/danmaku_service_test.go
index 608b674..c77f49f 100644
--- a/internal/service/danmaku_service_test.go
+++ b/internal/service/danmaku_service_test.go
@@ -13,8 +13,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newDanmakuTestService(t *testing.T) *DanmakuService {
diff --git a/internal/service/database_admin.go b/internal/service/database_admin.go
index dc0719c..eebb99b 100644
--- a/internal/service/database_admin.go
+++ b/internal/service/database_admin.go
@@ -8,9 +8,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/database"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/database"
+ "github.com/truewhile/MeBox/internal/repository"
)
// DatabaseAdminService manages database configuration, connectivity testing, and migration.
diff --git a/internal/service/db_errors.go b/internal/service/db_errors.go
index 9e146f6..a81c1f0 100644
--- a/internal/service/db_errors.go
+++ b/internal/service/db_errors.go
@@ -1,6 +1,6 @@
package service
-import "github.com/ShukeBta/MMTL/internal/repository"
+import "github.com/truewhile/MeBox/internal/repository"
func IsTransientDatabaseLock(err error) bool {
return repository.IsSQLiteBusyError(err)
diff --git a/internal/service/device_cleanup.go b/internal/service/device_cleanup.go
index 97d090f..d4558aa 100644
--- a/internal/service/device_cleanup.go
+++ b/internal/service/device_cleanup.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// SweepInactiveUsers is kept for compatibility with the existing scheduler; it
diff --git a/internal/service/device_listing.go b/internal/service/device_listing.go
index 0d4442a..7697605 100644
--- a/internal/service/device_listing.go
+++ b/internal/service/device_listing.go
@@ -7,7 +7,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// KickDevice marks a device as kicked so the next request from it is rejected
diff --git a/internal/service/device_service.go b/internal/service/device_service.go
index 5cca7bd..ab2427a 100644
--- a/internal/service/device_service.go
+++ b/internal/service/device_service.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// DeviceService implements device/session tracking and the two decoupled
diff --git a/internal/service/dlna.go b/internal/service/dlna.go
index b17b708..81c3c5f 100644
--- a/internal/service/dlna.go
+++ b/internal/service/dlna.go
@@ -6,7 +6,7 @@
// service to start playback of an HTTP URL.
//
// We do NOT mediate the renderer ↔ client traffic; the renderer pulls
-// the bytes directly from MMTL's /api/stream endpoint, so
+// the bytes directly from MeBox's /api/stream endpoint, so
// the cast call only ever transports a URL string.
package service
diff --git a/internal/service/douban.go b/internal/service/douban.go
index fa1cf86..d3800a4 100644
--- a/internal/service/douban.go
+++ b/internal/service/douban.go
@@ -27,7 +27,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// DoubanProvider talks to the unofficial Douban movie API.
diff --git a/internal/service/emby_artwork.go b/internal/service/emby_artwork.go
index 57e1318..d943f59 100644
--- a/internal/service/emby_artwork.go
+++ b/internal/service/emby_artwork.go
@@ -5,8 +5,8 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ImageURL returns artwork for a media/series/season item id.
diff --git a/internal/service/emby_artwork_test.go b/internal/service/emby_artwork_test.go
index 7144cb8..18280eb 100644
--- a/internal/service/emby_artwork_test.go
+++ b/internal/service/emby_artwork_test.go
@@ -3,7 +3,7 @@ package service
import (
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestImageURLFallsBackToLibraryCoverURL(t *testing.T) {
diff --git a/internal/service/emby_compat.go b/internal/service/emby_compat.go
index 6e0b929..c557a69 100644
--- a/internal/service/emby_compat.go
+++ b/internal/service/emby_compat.go
@@ -3,7 +3,7 @@
// EmbyService produces JSON envelopes shaped like the most-consumed
// Emby-API endpoints so existing players (Infuse / Yamby / Hills /
// Senplayer / Kodi NextPVR extension / iOS native clients) can talk to
-// MMTL without a custom plugin.
+// MeBox without a custom plugin.
//
// The shim is read-mostly: items, images, playback are fully covered;
// 播放进度上报 / 收藏切换 是写路径但走我们自己的 PlaybackHistory /
@@ -17,14 +17,14 @@ import (
"sync"
"time"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
// 用一个固定的 ServerId 字符串。Emby 客户端会缓存这个 id,第一次见到
// 该 id 后会把所有派生数据(cookie/收藏/历史)和它绑定。
-const embyServerID = "mmtl-001"
+const embyServerID = "mebox-001"
// embyCompatVersion deliberately reports an Emby 4.x server. Official Emby
// clients reject Jellyfin-style 10.x identities as unsupported/too old during
diff --git a/internal/service/emby_compat_test.go b/internal/service/emby_compat_test.go
index 04ff9b4..500d505 100644
--- a/internal/service/emby_compat_test.go
+++ b/internal/service/emby_compat_test.go
@@ -6,9 +6,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newTestEmbyService(t *testing.T) *EmbyService {
diff --git a/internal/service/emby_counts.go b/internal/service/emby_counts.go
index e64c5b0..764bc66 100644
--- a/internal/service/emby_counts.go
+++ b/internal/service/emby_counts.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
"gorm.io/gorm"
)
diff --git a/internal/service/emby_items_detail.go b/internal/service/emby_items_detail.go
index f358baa..53df106 100644
--- a/internal/service/emby_items_detail.go
+++ b/internal/service/emby_items_detail.go
@@ -6,7 +6,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// Item 单条目详情。
diff --git a/internal/service/emby_items_list.go b/internal/service/emby_items_list.go
index 686d10c..fc60aef 100644
--- a/internal/service/emby_items_list.go
+++ b/internal/service/emby_items_list.go
@@ -6,7 +6,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (e *EmbyService) mediaItems(ctx context.Context, p ItemsParams) (map[string]any, error) {
diff --git a/internal/service/emby_media_sources.go b/internal/service/emby_media_sources.go
index 2f4cdca..741a08c 100644
--- a/internal/service/emby_media_sources.go
+++ b/internal/service/emby_media_sources.go
@@ -7,7 +7,7 @@ import (
"sort"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (e *EmbyService) mediaSourcesForItem(ctx context.Context, m *model.Media, asEmbedded, directOnly bool) []map[string]any {
diff --git a/internal/service/emby_movie_items.go b/internal/service/emby_movie_items.go
index 625a274..5337945 100644
--- a/internal/service/emby_movie_items.go
+++ b/internal/service/emby_movie_items.go
@@ -8,7 +8,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// movieLibraryHasEpisodicContent 报告电影类型库里是否混入了「剧集结构」内容
diff --git a/internal/service/emby_movie_library_test.go b/internal/service/emby_movie_library_test.go
index 9419d6f..ee1e401 100644
--- a/internal/service/emby_movie_library_test.go
+++ b/internal/service/emby_movie_library_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEmbyMovieLibrarySeasonNumbersStayMovies(t *testing.T) {
diff --git a/internal/service/emby_playback.go b/internal/service/emby_playback.go
index 25f393f..6e42bdc 100644
--- a/internal/service/emby_playback.go
+++ b/internal/service/emby_playback.go
@@ -11,12 +11,12 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// PlaybackInfo returns a PlaybackInfoResponse usable by Emby clients.
// 远程 Emby 条目直接转发远程 PlaybackInfo,并按账号 proxy_play 配置决定
-// 播放地址指向远程(直连)还是 MMTL 本地代理端点。
+// 播放地址指向远程(直连)还是 MeBox 本地代理端点。
func (e *EmbyService) PlaybackInfo(ctx context.Context, mediaID, userID string) (map[string]any, error) {
if e.remote != nil && IsEmbyRemoteID(mediaID) {
mountID, remoteID, _ := DecodeEmbyRemoteID(mediaID)
diff --git a/internal/service/emby_playback_test.go b/internal/service/emby_playback_test.go
index 3072d2c..03ebf2f 100644
--- a/internal/service/emby_playback_test.go
+++ b/internal/service/emby_playback_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEmbyRootItemsExposeLibraries(t *testing.T) {
diff --git a/internal/service/emby_remote.go b/internal/service/emby_remote.go
index 1100917..c868c6f 100644
--- a/internal/service/emby_remote.go
+++ b/internal/service/emby_remote.go
@@ -1,13 +1,13 @@
// EmbyRemoteService 是「远程 Emby 联邦聚合」核心:把挂载的远程 Emby 服务器
-// 作为外部媒体源,通过 MMTL 的 Emby 兼容 API 透出。
+// 作为外部媒体源,通过 MeBox 的 Emby 兼容 API 透出。
//
// 设计要点:
// - 远程媒体的元数据完全不落库:每次请求实时向远程 Emby 拉取;
// - 条目 ID 用 embyremote~{accountID}~{remoteID} 伪装(见 emby_remote_ids.go),
// 客户端拿伪装 ID 回来时按账号路由回远程;
// - 播放分流由账号级 proxy_play 配置决定:
-// 不代理(默认)= MediaSource 下发热门远程绝对 URL,播放字节完全不经过 MMTL;
-// 代理 = 下发 MMTL 本地 /Videos/{encoded} 端点,由 ProxyVideoStream 反向拉流。
+// 不代理(默认)= MediaSource 下发热门远程绝对 URL,播放字节完全不经过 MeBox;
+// 代理 = 下发 MeBox 本地 /Videos/{encoded} 端点,由 ProxyVideoStream 反向拉流。
//
// 配置复用 STRM 账号体系(StrmAccount.Provider = emby_remote),CRUD/加密/连通
// 测试全部走既有 /admin/strm/accounts 接口,不需要新增数据表。
@@ -30,9 +30,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// embyRemoteHTTPTimeout 远程 Emby 常规 API 请求超时(流式代理不在此列)。
@@ -63,7 +63,7 @@ type EmbyRemoteConfig struct {
Password string
Token string // api_key(手动填写或自动认证获得)
RemoteUserID string // 远程用户 Id(自动认证后回填)
- ProxyPlay bool // true=播放流量经 MMTL 反向代理;false=客户端直连远程
+ ProxyPlay bool // true=播放流量经 MeBox 反向代理;false=客户端直连远程
}
// EmbyRemoteService 提供对远程 Emby 服务器的读写封装。
@@ -401,7 +401,7 @@ func (r *EmbyRemoteService) ensureTokenOnLine(ctx context.Context, acct *model.S
return err
}
req.Header.Set("Content-Type", "application/json")
- req.Header.Set("X-Emby-Authorization", `MediaBrowser Client="MMTL", Device="MMTL-Federated", DeviceId="mmtl-federated", Version="1.0"`)
+ req.Header.Set("X-Emby-Authorization", `MediaBrowser Client="MeBox", Device="MeBox-Federated", DeviceId="mebox-federated", Version="1.0"`)
resp, err := r.http.Do(req)
if err != nil {
return fmt.Errorf("连接远程 Emby 失败: %w", err)
@@ -699,7 +699,7 @@ func (r *EmbyRemoteService) RemoteLatest(ctx context.Context, mount *model.EmbyM
}
// RemotePlaybackInfo 拉取远程 PlaybackInfo,并按挂载的 proxy_play 配置重写
-// 播放 URL:不代理=指向远程绝对地址(播放字节不过 MMTL);代理=指向 MMTL
+// 播放 URL:不代理=指向远程绝对地址(播放字节不过 MeBox);代理=指向 MeBox
// 本地 /Videos/{encodedID} 端点(由 ProxyVideoStream 反代)。
func (r *EmbyRemoteService) RemotePlaybackInfo(ctx context.Context, mount *model.EmbyMount, acct *model.StrmAccount, remoteID, userID string) (map[string]any, error) {
cfg, err := r.configOf(acct)
@@ -719,7 +719,7 @@ func (r *EmbyRemoteService) RemotePlaybackInfo(ctx context.Context, mount *model
// rewritePlayURLs 按挂载代理模式重写载荷内 MediaSources 的播放地址。
// 远程 Emby 的 PlaybackInfo 通常不返回 DirectStreamUrl(客户端靠它拼
-// /Videos/{Id}/stream),因此这里总是强制构造播放地址,完全由 MMTL 掌控
+// /Videos/{Id}/stream),因此这里总是强制构造播放地址,完全由 MeBox 掌控
// 直连(远程绝对 URL)或代理(本地 /Videos/{encoded})的最终去向。
func (r *EmbyRemoteService) rewritePlayURLs(value any, mount *model.EmbyMount, cfg *EmbyRemoteConfig, remoteID string) {
encoded := EncodeEmbyRemoteID(mount.ID, remoteID)
@@ -979,7 +979,7 @@ func (r *EmbyRemoteService) proxySubtitleOnLine(ctx context.Context, w http.Resp
// ─── 播放状态透传 ──────────────────────────────────────────────────────────────
-// ProxySetPlayed 把「已看/未看」状态透传到远程 Emby(MMTL 本地不落库)。
+// ProxySetPlayed 把「已看/未看」状态透传到远程 Emby(MeBox 本地不落库)。
func (r *EmbyRemoteService) ProxySetPlayed(ctx context.Context, acct *model.StrmAccount, remoteID string, played bool) error {
cfg, err := r.configOf(acct)
if err != nil {
diff --git a/internal/service/emby_remote_ids.go b/internal/service/emby_remote_ids.go
index 221f306..e12ef67 100644
--- a/internal/service/emby_remote_ids.go
+++ b/internal/service/emby_remote_ids.go
@@ -1,6 +1,6 @@
// 远程 Emby 聚合的 ID 伪装。
//
-// MMTL 作为 Emby 联邦网关把多个远程 Emby 服务器的媒体库透明聚合到自身的
+// MeBox 作为 Emby 联邦网关把多个远程 Emby 服务器的媒体库透明聚合到自身的
// Emby API 之下,远程条目完全不落库。为了把本地 ID 与多个远程服务器的 ID
// 隔离开,远程条目在返回给客户端之前统一被改写为:
//
@@ -42,7 +42,7 @@ func DecodeEmbyRemoteID(id string) (accountID, remoteID string, ok bool) {
}
// embyRemoteStringIDs 是条目 JSON 中需要伪装(编码)成远程 ID 的字符串字段。
-// 图片 / 详情 / 播放请求都会以这些字段的值作为 ID 回指 MMTL。
+// 图片 / 详情 / 播放请求都会以这些字段的值作为 ID 回指 MeBox。
var embyRemoteStringIDs = []string{
"Id",
"ParentId",
diff --git a/internal/service/emby_remote_lines.go b/internal/service/emby_remote_lines.go
index 223a4de..e46e13b 100644
--- a/internal/service/emby_remote_lines.go
+++ b/internal/service/emby_remote_lines.go
@@ -9,7 +9,7 @@ import (
"strconv"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// EmbyRemoteLine 表示同一 Emby 服务器的一条接入线路(内网/外网/CDN 等)。
diff --git a/internal/service/emby_remote_playurl_test.go b/internal/service/emby_remote_playurl_test.go
index bded5a5..681659e 100644
--- a/internal/service/emby_remote_playurl_test.go
+++ b/internal/service/emby_remote_playurl_test.go
@@ -3,7 +3,7 @@ package service
import (
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// rewriteSubtitleDeliveryURLs 只应改动字幕轨道的 DeliveryUrl,其余媒体流不动。
diff --git a/internal/service/emby_remote_web.go b/internal/service/emby_remote_web.go
index b2bd33b..f1da252 100644
--- a/internal/service/emby_remote_web.go
+++ b/internal/service/emby_remote_web.go
@@ -17,7 +17,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// RemoteLibraryView 是一个网页端可见的远程媒体库(对应一个挂载的远程 View)。
diff --git a/internal/service/emby_remote_web_test.go b/internal/service/emby_remote_web_test.go
index 7b7c450..51579ec 100644
--- a/internal/service/emby_remote_web_test.go
+++ b/internal/service/emby_remote_web_test.go
@@ -5,7 +5,7 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestMapRemoteItemToMediaSortingFields(t *testing.T) {
diff --git a/internal/service/emby_series.go b/internal/service/emby_series.go
index e680126..6b67428 100644
--- a/internal/service/emby_series.go
+++ b/internal/service/emby_series.go
@@ -6,7 +6,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type embySeriesGroup struct {
diff --git a/internal/service/emby_series_hierarchy_test.go b/internal/service/emby_series_hierarchy_test.go
index 4ff9a68..5775210 100644
--- a/internal/service/emby_series_hierarchy_test.go
+++ b/internal/service/emby_series_hierarchy_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEmbyItemsExposeSeriesSeasonEpisodeHierarchy(t *testing.T) {
diff --git a/internal/service/emby_series_ids.go b/internal/service/emby_series_ids.go
index 4c59e95..3c9a8c6 100644
--- a/internal/service/emby_series_ids.go
+++ b/internal/service/emby_series_ids.go
@@ -11,7 +11,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (e *EmbyService) seriesIDForMedia(m *model.Media) string {
diff --git a/internal/service/emby_subtitle_test.go b/internal/service/emby_subtitle_test.go
index b5b23e1..d8b4175 100644
--- a/internal/service/emby_subtitle_test.go
+++ b/internal/service/emby_subtitle_test.go
@@ -9,8 +9,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
// writeTempVideoWithSubtitle creates a temp directory with a fake video and a
diff --git a/internal/service/emby_system.go b/internal/service/emby_system.go
index a3f92b4..7f72328 100644
--- a/internal/service/emby_system.go
+++ b/internal/service/emby_system.go
@@ -5,7 +5,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// SystemInfo returns the full Emby identity payload.
@@ -13,7 +13,7 @@ func (e *EmbyService) SystemInfo() map[string]any {
return map[string]any{
"Id": embyServerID,
"ServerId": embyServerID,
- "ServerName": "MMTL",
+ "ServerName": "MeBox",
"Version": embyCompatVersion,
"ServerVersion": embyCompatVersion,
"ProductName": "Emby Server",
@@ -42,7 +42,7 @@ func (e *EmbyService) SystemInfoPublic() map[string]any {
return map[string]any{
"Id": embyServerID,
"ServerId": embyServerID,
- "ServerName": "MMTL",
+ "ServerName": "MeBox",
"Version": embyCompatVersion,
"ServerVersion": embyCompatVersion,
"ProductName": "Emby Server",
@@ -85,7 +85,7 @@ func (e *EmbyService) userPayload(u *model.User) map[string]any {
"Id": u.ID,
"Name": u.Username,
"ServerId": embyServerID,
- "ServerName": "MMTL",
+ "ServerName": "MeBox",
"HasPassword": true,
"HasConfiguredPassword": true,
"HasConfiguredEasyPassword": false,
diff --git a/internal/service/emby_user_data.go b/internal/service/emby_user_data.go
index c70af8c..395f3d1 100644
--- a/internal/service/emby_user_data.go
+++ b/internal/service/emby_user_data.go
@@ -9,7 +9,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// SetFavorite 把 mediaID 标为 userID 的收藏。远程 Emby 条目直接透传到对应
@@ -121,9 +121,9 @@ func (e *EmbyService) RecordProgress(ctx context.Context, userID, mediaID string
return err
}
-// mergeRemoteUserData applies the current MMTL user's locally recorded playback
+// mergeRemoteUserData applies the current MeBox user's locally recorded playback
// state to remote Emby payloads. Remote metadata remains authoritative unless the
-// user has played the item through MMTL.
+// user has played the item through MeBox.
func (e *EmbyService) mergeRemoteUserData(ctx context.Context, userID string, payload any) error {
if strings.TrimSpace(userID) == "" || payload == nil {
return nil
diff --git a/internal/service/emby_user_data_test.go b/internal/service/emby_user_data_test.go
index f97a217..372026b 100644
--- a/internal/service/emby_user_data_test.go
+++ b/internal/service/emby_user_data_test.go
@@ -3,7 +3,7 @@ package service
import (
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestMergedRemoteUserData(t *testing.T) {
diff --git a/internal/service/emby_versions_test.go b/internal/service/emby_versions_test.go
index 9c6aec2..52c2a61 100644
--- a/internal/service/emby_versions_test.go
+++ b/internal/service/emby_versions_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEmbyLatestItemsCollapsesMovieVersions(t *testing.T) {
diff --git a/internal/service/emby_visibility.go b/internal/service/emby_visibility.go
index 1769cd2..30c93b2 100644
--- a/internal/service/emby_visibility.go
+++ b/internal/service/emby_visibility.go
@@ -7,7 +7,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (e *EmbyService) applyUserMediaVisibility(ctx context.Context, q *gorm.DB, userID string) *gorm.DB {
diff --git a/internal/service/episode_metadata_cleanup.go b/internal/service/episode_metadata_cleanup.go
index e5d82b5..bec7a0b 100644
--- a/internal/service/episode_metadata_cleanup.go
+++ b/internal/service/episode_metadata_cleanup.go
@@ -11,7 +11,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// pollutedEpisodeCleanupSettingKey marks that the one-time normalization has run.
diff --git a/internal/service/episode_metadata_cleanup_test.go b/internal/service/episode_metadata_cleanup_test.go
index 8320b1b..6a41d3b 100644
--- a/internal/service/episode_metadata_cleanup_test.go
+++ b/internal/service/episode_metadata_cleanup_test.go
@@ -6,8 +6,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newCleanupTestContainer(t *testing.T) (*Container, *gorm.DB) {
diff --git a/internal/service/fanart.go b/internal/service/fanart.go
index 02fd77e..c5cc3e2 100644
--- a/internal/service/fanart.go
+++ b/internal/service/fanart.go
@@ -21,7 +21,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// FanartProvider talks to https://webservice.fanart.tv.
@@ -133,7 +133,7 @@ func (f *FanartProvider) getJSON(ctx context.Context, u string, out any) error {
if err != nil {
return err
}
- req.Header.Set("User-Agent", "MMTL/0.1")
+ req.Header.Set("User-Agent", "MeBox/0.1")
resp, err := f.client.Do(req)
if err != nil {
return err
diff --git a/internal/service/ffmpeg_auto_install.go b/internal/service/ffmpeg_auto_install.go
index 1d0ca6c..bd14f77 100644
--- a/internal/service/ffmpeg_auto_install.go
+++ b/internal/service/ffmpeg_auto_install.go
@@ -16,7 +16,7 @@ import (
"github.com/ulikunitz/xz"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// ffmpegDownloadTarget 描述某个平台对应的官方构建下载源。
@@ -121,7 +121,7 @@ func installFFmpegTools(ctx context.Context, log *zap.Logger, cfg *config.Config
return "", "", fmt.Errorf("创建安装目录失败: %w", err)
}
- tempDir, err := os.MkdirTemp("", "mmtl-ffmpeg-*")
+ tempDir, err := os.MkdirTemp("", "mebox-ffmpeg-*")
if err != nil {
return "", "", fmt.Errorf("创建临时目录失败: %w", err)
}
@@ -202,7 +202,7 @@ func downloadFFmpegFile(ctx context.Context, log *zap.Logger, url, dest string)
if err != nil {
return err
}
- req.Header.Set("User-Agent", "MMTL/ffmpeg-installer ("+runtime.GOOS+"/"+runtime.GOARCH+")")
+ req.Header.Set("User-Agent", "MeBox/ffmpeg-installer ("+runtime.GOOS+"/"+runtime.GOARCH+")")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
diff --git a/internal/service/ffmpeg_tools.go b/internal/service/ffmpeg_tools.go
index d8e7106..056bde0 100644
--- a/internal/service/ffmpeg_tools.go
+++ b/internal/service/ffmpeg_tools.go
@@ -20,8 +20,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// FFmpegToolsService 管理 ffmpeg/ffprobe 的自动下载安装状态(单飞:同一时间
diff --git a/internal/service/ffmpeg_tools_test.go b/internal/service/ffmpeg_tools_test.go
index df56cc3..77db7e3 100644
--- a/internal/service/ffmpeg_tools_test.go
+++ b/internal/service/ffmpeg_tools_test.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestFFmpegTargetForPlatform(t *testing.T) {
diff --git a/internal/service/ffprobe.go b/internal/service/ffprobe.go
index f293754..b332064 100644
--- a/internal/service/ffprobe.go
+++ b/internal/service/ffprobe.go
@@ -18,7 +18,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// FFprobeService wraps the external ffprobe binary.
diff --git a/internal/service/ffprobe_test.go b/internal/service/ffprobe_test.go
index d689af8..3bffd65 100644
--- a/internal/service/ffprobe_test.go
+++ b/internal/service/ffprobe_test.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestFFprobeServiceDefaultsToSingleConcurrentProbe(t *testing.T) {
diff --git a/internal/service/filemanager.go b/internal/service/filemanager.go
index f5e2059..dd2e17e 100644
--- a/internal/service/filemanager.go
+++ b/internal/service/filemanager.go
@@ -16,8 +16,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// FileManagerService browses and mutates the server-side filesystem.
diff --git a/internal/service/filemanager_roots.go b/internal/service/filemanager_roots.go
index 3a4118a..8573892 100644
--- a/internal/service/filemanager_roots.go
+++ b/internal/service/filemanager_roots.go
@@ -67,8 +67,8 @@ func (s *FileManagerService) allowedRoots() (map[string]string, error) {
add("movies", s.cfg.Media.MoviesDir)
add("tv", s.cfg.Media.TVDir)
add("anime", s.cfg.Media.AnimeDir)
- add("downloads", envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads"))
- add("media", envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media"))
+ add("downloads", envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads"))
+ add("media", envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media"))
if s.repo != nil && s.repo.Setting != nil {
addSetting := func(label, key string) {
if value, err := s.repo.Setting.Get(context.Background(), key); err == nil {
diff --git a/internal/service/filemanager_test.go b/internal/service/filemanager_test.go
index b2af25e..0963532 100644
--- a/internal/service/filemanager_test.go
+++ b/internal/service/filemanager_test.go
@@ -8,9 +8,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newFileManagerTestServiceWithRepo(t *testing.T, root string) (*FileManagerService, *repository.Container) {
diff --git a/internal/service/image_proxy.go b/internal/service/image_proxy.go
index 8885c21..67dd99d 100644
--- a/internal/service/image_proxy.go
+++ b/internal/service/image_proxy.go
@@ -2,7 +2,7 @@
//
// Some deployments cannot reach image.tmdb.org directly (GFW, internal-only
// networks). ImageProxy fronts a remote image URL so the browser only ever
-// talks to the MMTL origin. The proxy:
+// talks to the MeBox origin. The proxy:
//
// - validates the URL scheme is http/https,
// - streams bytes through with a small disk cache under cache/images,
@@ -20,7 +20,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// ImageProxy fetches and caches remote images on behalf of the browser.
diff --git a/internal/service/image_proxy_remote_test.go b/internal/service/image_proxy_remote_test.go
index 80939d4..dd0a8e7 100644
--- a/internal/service/image_proxy_remote_test.go
+++ b/internal/service/image_proxy_remote_test.go
@@ -14,7 +14,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestImageProxyDoesNotNegativeCacheFailedRemoteImageFetch(t *testing.T) {
diff --git a/internal/service/image_proxy_test.go b/internal/service/image_proxy_test.go
index 0568f49..cb723d7 100644
--- a/internal/service/image_proxy_test.go
+++ b/internal/service/image_proxy_test.go
@@ -10,7 +10,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
var testJPEG = []byte{
diff --git a/internal/service/local_availability.go b/internal/service/local_availability.go
index e446c07..fc31e89 100644
--- a/internal/service/local_availability.go
+++ b/internal/service/local_availability.go
@@ -6,8 +6,8 @@ import (
"regexp"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
var availabilityNoiseRE = regexp.MustCompile(`(?i)(自动订阅|订阅|全集|合集|complete|batch|s\d{1,2}e\d{1,3}|season\s*\d+|s\d{1,2}|第\s*\d+\s*季|第\s*\d+\s*[集话話期]|\(\d{4}\)|\b\d{4}\b|2160p|1080p|720p|4k|uhd|bluray|blu-ray|web-?dl|hdtv|remux|x26[45]|h\.?26[45]|hevc|avc|hdr10?\+?|dovi|dv|atmos|aac|ddp?5\.1|truehd|flac)`)
diff --git a/internal/service/local_metadata_apply.go b/internal/service/local_metadata_apply.go
index 1a640fe..bd17d30 100644
--- a/internal/service/local_metadata_apply.go
+++ b/internal/service/local_metadata_apply.go
@@ -1,6 +1,6 @@
package service
-import "github.com/ShukeBta/MMTL/internal/model"
+import "github.com/truewhile/MeBox/internal/model"
func applyLocalMetadata(m *model.Media, local *LocalMetadata) {
applyLocalIdentityMetadata(m, local)
diff --git a/internal/service/local_metadata_apply_test.go b/internal/service/local_metadata_apply_test.go
index 7228e71..ff63059 100644
--- a/internal/service/local_metadata_apply_test.go
+++ b/internal/service/local_metadata_apply_test.go
@@ -3,7 +3,7 @@ package service
import (
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestApplyLocalMetadataPreservesPathHintAsPending(t *testing.T) {
diff --git a/internal/service/manual_scrape.go b/internal/service/manual_scrape.go
index 0c5ddb9..59fc5f3 100644
--- a/internal/service/manual_scrape.go
+++ b/internal/service/manual_scrape.go
@@ -5,7 +5,7 @@ import (
"errors"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type ManualScrapeRequest struct {
diff --git a/internal/service/manual_scrape_providers.go b/internal/service/manual_scrape_providers.go
index e15294c..3b30133 100644
--- a/internal/service/manual_scrape_providers.go
+++ b/internal/service/manual_scrape_providers.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type manualTMDbCandidate struct {
diff --git a/internal/service/manual_scrape_search.go b/internal/service/manual_scrape_search.go
index 794f90e..9f50f68 100644
--- a/internal/service/manual_scrape_search.go
+++ b/internal/service/manual_scrape_search.go
@@ -5,7 +5,7 @@ import (
"errors"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScraperService) ManualSearch(ctx context.Context, media *model.Media, query, provider, mediaType string) ([]ExternalMediaResult, error) {
diff --git a/internal/service/manual_scrape_test.go b/internal/service/manual_scrape_test.go
index d5cb309..355b8ac 100644
--- a/internal/service/manual_scrape_test.go
+++ b/internal/service/manual_scrape_test.go
@@ -13,9 +13,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestManualRequestMatchFallsBackToCandidatePayload(t *testing.T) {
diff --git a/internal/service/media.go b/internal/service/media.go
index 6e834cc..da9baea 100644
--- a/internal/service/media.go
+++ b/internal/service/media.go
@@ -4,9 +4,9 @@ package service
import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// MediaService offers high-level CRUD over libraries and media items.
diff --git a/internal/service/media_cache.go b/internal/service/media_cache.go
index 437b6fb..b42fe7b 100644
--- a/internal/service/media_cache.go
+++ b/internal/service/media_cache.go
@@ -8,8 +8,8 @@ import (
"sort"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
type mediaListCacheValue struct {
diff --git a/internal/service/media_classifier.go b/internal/service/media_classifier.go
index 6d5769b..e9909bb 100644
--- a/internal/service/media_classifier.go
+++ b/internal/service/media_classifier.go
@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
var (
diff --git a/internal/service/media_display_library.go b/internal/service/media_display_library.go
index f85d7f9..2b1c668 100644
--- a/internal/service/media_display_library.go
+++ b/internal/service/media_display_library.go
@@ -4,8 +4,8 @@ import (
"context"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func (s *MediaService) attachLibraryMetadata(ctx context.Context, items []model.Media) {
diff --git a/internal/service/media_library.go b/internal/service/media_library.go
index 5bc691a..edead2d 100644
--- a/internal/service/media_library.go
+++ b/internal/service/media_library.go
@@ -4,8 +4,8 @@ import (
"context"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"gorm.io/gorm"
)
diff --git a/internal/service/media_library_roots.go b/internal/service/media_library_roots.go
index 33b6d90..9f42912 100644
--- a/internal/service/media_library_roots.go
+++ b/internal/service/media_library_roots.go
@@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type LibraryRootInput struct {
diff --git a/internal/service/media_library_roots_test.go b/internal/service/media_library_roots_test.go
index d643354..20c8e8e 100644
--- a/internal/service/media_library_roots_test.go
+++ b/internal/service/media_library_roots_test.go
@@ -6,9 +6,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestCreateLibraryWithRootsAppendsToExistingLogicalLibrary(t *testing.T) {
diff --git a/internal/service/media_library_test.go b/internal/service/media_library_test.go
index b7e48e9..ac7c9c0 100644
--- a/internal/service/media_library_test.go
+++ b/internal/service/media_library_test.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestListLibrariesWithPreview(t *testing.T) {
diff --git a/internal/service/media_listing.go b/internal/service/media_listing.go
index 59776cf..5b0ad78 100644
--- a/internal/service/media_listing.go
+++ b/internal/service/media_listing.go
@@ -6,8 +6,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ListMedia paginates media items inside a library.
diff --git a/internal/service/media_metadata.go b/internal/service/media_metadata.go
index 0e8b33c..3a95a51 100644
--- a/internal/service/media_metadata.go
+++ b/internal/service/media_metadata.go
@@ -5,7 +5,7 @@ import (
"errors"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type MediaMetadataUpdate struct {
diff --git a/internal/service/media_metadata_test.go b/internal/service/media_metadata_test.go
index 97665e4..859401d 100644
--- a/internal/service/media_metadata_test.go
+++ b/internal/service/media_metadata_test.go
@@ -5,9 +5,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestUpdateMediaMetadataMarksManualMatch(t *testing.T) {
diff --git a/internal/service/media_paths.go b/internal/service/media_paths.go
index 44939a8..6fbf49d 100644
--- a/internal/service/media_paths.go
+++ b/internal/service/media_paths.go
@@ -69,8 +69,8 @@ func embeddedContainerMarkerCandidates(input string) []string {
part string
container string
}{
- {part: "/media", container: envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")},
- {part: "/downloads", container: envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads")},
+ {part: "/media", container: envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")},
+ {part: "/downloads", container: envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads")},
} {
part := strings.TrimRight(marker.part, "/")
container := strings.TrimRight(filepath.ToSlash(marker.container), "/")
@@ -83,17 +83,17 @@ func embeddedContainerMarkerCandidates(input string) []string {
// describeUnresolvedLibraryPath 把「路径解析失败」变成可操作的诊断信息:列出尝试过的
// 候选路径与当前的宿主机→容器映射状态。旧库存的是宿主机路径,在新版/容器内常因为缺少
-// MMTL_MEDIA_DIR 映射而扫不出媒体——这条诊断帮助用户直接定位到底哪一步断了。
+// MEBOX_MEDIA_DIR 映射而扫不出媒体——这条诊断帮助用户直接定位到底哪一步断了。
// 仅用于日志与扫描错误提示,不改变解析逻辑本身。
func describeUnresolvedLibraryPath(rawPath string) string {
rawPath = strings.TrimSpace(rawPath)
candidates := mappedPathCandidates(rawPath)
- mediaHost := strings.TrimSpace(os.Getenv("MMTL_MEDIA_DIR"))
- mediaContainer := envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")
+ mediaHost := strings.TrimSpace(os.Getenv("MEBOX_MEDIA_DIR"))
+ mediaContainer := envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")
var b strings.Builder
fmt.Fprintf(&b, "媒体库路径无法解析为可访问目录:%s(已尝试候选:%s)", rawPath, strings.Join(candidates, " | "))
if mediaHost == "" {
- b.WriteString(";未配置 MMTL_MEDIA_DIR / MMTL_MEDIA_CONTAINER_DIR。若为 Docker 部署且此库为旧宿主机路径,请设置这两个变量把宿主机路径映射到容器内路径,并确认对应 volume 已挂载。")
+ b.WriteString(";未配置 MEBOX_MEDIA_DIR / MEBOX_MEDIA_CONTAINER_DIR。若为 Docker 部署且此库为旧宿主机路径,请设置这两个变量把宿主机路径映射到容器内路径,并确认对应 volume 已挂载。")
} else {
fmt.Fprintf(&b, ";当前映射 %s → %s。请确认该库路径位于此宿主机目录下,或补充对应的 volume 与路径映射。", mediaHost, mediaContainer)
}
@@ -204,8 +204,8 @@ func dockerVolumePathCandidates(path string) []string {
env string
container string
}{
- {env: "MMTL_MEDIA_DIR", container: envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")},
- {env: "MMTL_DOWNLOAD_DIR", container: envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads")},
+ {env: "MEBOX_MEDIA_DIR", container: envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")},
+ {env: "MEBOX_DOWNLOAD_DIR", container: envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads")},
} {
container := cleanPathForVolumeMapping(mapping.container)
if container == "." || container == "" || strings.HasPrefix(container, ".") {
@@ -247,8 +247,8 @@ func dockerVolumePathCandidates(path string) []string {
part string
container string
}{
- {part: "/media", container: envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")},
- {part: "/downloads", container: envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads")},
+ {part: "/media", container: envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")},
+ {part: "/downloads", container: envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads")},
} {
part := strings.TrimRight(marker.part, "/")
container := strings.TrimRight(filepath.ToSlash(marker.container), "/")
diff --git a/internal/service/media_recycle.go b/internal/service/media_recycle.go
index d90404d..ec39eb3 100644
--- a/internal/service/media_recycle.go
+++ b/internal/service/media_recycle.go
@@ -5,7 +5,7 @@ import (
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
const maxRecycleBinRecords = 200
diff --git a/internal/service/media_recycle_test.go b/internal/service/media_recycle_test.go
index 86deecb..201f0e7 100644
--- a/internal/service/media_recycle_test.go
+++ b/internal/service/media_recycle_test.go
@@ -9,9 +9,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestListRecycleBinPrunesOldRowsOverLimit(t *testing.T) {
diff --git a/internal/service/media_release_sort.go b/internal/service/media_release_sort.go
index 8078420..689fe94 100644
--- a/internal/service/media_release_sort.go
+++ b/internal/service/media_release_sort.go
@@ -4,7 +4,7 @@ import (
"fmt"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func mediaReleaseSortTime(media model.Media) time.Time {
diff --git a/internal/service/media_search.go b/internal/service/media_search.go
index d41b5c3..b6787f6 100644
--- a/internal/service/media_search.go
+++ b/internal/service/media_search.go
@@ -3,8 +3,8 @@ package service
import (
"context"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// SearchMedia performs a simple LIKE search across titles.
diff --git a/internal/service/media_series.go b/internal/service/media_series.go
index 7499772..423e5a3 100644
--- a/internal/service/media_series.go
+++ b/internal/service/media_series.go
@@ -9,7 +9,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type seriesCardsCacheValue struct {
diff --git a/internal/service/media_series_key.go b/internal/service/media_series_key.go
index 0aa7731..b9bb584 100644
--- a/internal/service/media_series_key.go
+++ b/internal/service/media_series_key.go
@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
var episodicPathRE = regexp.MustCompile(`(?i)[\\/](?:电视剧|剧集|连续剧|短剧|国产剧|国剧|大陆剧|华语剧|国产电视剧|大陆电视剧|华语电视剧|欧美剧|欧美电视剧|美剧|英剧|日韩剧|日韩电视剧|日剧|韩剧|港剧|台剧|港台剧|泰剧|综艺|纪录片|儿童|动漫|番剧|国漫|日番|韩漫|美漫|欧美动漫|欧美动画|其他动漫|tv|series|shows?|season[\s._-]*\d|s\d{1,2}(?:[\s._-]|[\\/])|special[\s._-]*episodes?|specials?|sp|ovas?|oads?|extras?|bonus(?:es)?|omake|特别篇|特別篇|番外篇?|特典|外传|外傳|总集篇|總集篇)[\\/]`)
diff --git a/internal/service/media_series_resolver.go b/internal/service/media_series_resolver.go
index a4ce7c0..7037855 100644
--- a/internal/service/media_series_resolver.go
+++ b/internal/service/media_series_resolver.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type mediaSeriesKeyResolver struct {
diff --git a/internal/service/media_series_test.go b/internal/service/media_series_test.go
index 67c1ffb..4a8e54f 100644
--- a/internal/service/media_series_test.go
+++ b/internal/service/media_series_test.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestListRecentSeriesCardsCountsAllEpisodesInSeries(t *testing.T) {
diff --git a/internal/service/media_test.go b/internal/service/media_test.go
index feccd94..e504591 100644
--- a/internal/service/media_test.go
+++ b/internal/service/media_test.go
@@ -14,8 +14,8 @@ func TestResolveAccessibleLibraryPathMapsConfiguredHostMediaDir(t *testing.T) {
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_DIR", hostRoot)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_DIR", hostRoot)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
got, err := resolveAccessibleLibraryPath(filepath.Join(hostRoot, "电视剧", "国产剧"))
if err != nil {
@@ -33,8 +33,8 @@ func TestResolveAccessibleLibraryPathMapsWindowsDriveBeforeLinuxAbs(t *testing.T
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_DIR", `Q:\media`)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_DIR", `Q:\media`)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
for _, input := range []string{
`Q:\media\电视剧\国产剧`,
@@ -61,8 +61,8 @@ func TestResolveAccessibleLibraryPathRecoversDockerPollutedWindowsDrive(t *testi
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_DIR", `F:\media`)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_DIR", `F:\media`)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
got, err := resolveAccessibleLibraryPath(`/app/F:\media\电视剧\国产剧`)
if err != nil {
@@ -95,7 +95,7 @@ func TestResolveAccessibleLibraryPathMapsRelativeDockerMediaMarker(t *testing.T)
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
got, err := resolveAccessibleLibraryPath(filepath.Join("media", "电视剧", "国产剧"))
if err != nil {
@@ -116,7 +116,7 @@ func TestResolveAccessibleLibraryPathMapsEmbeddedHostMediaMarker(t *testing.T) {
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
got, err := resolveAccessibleLibraryPath("/vol1/1000/Docker/moviepilot-v2/media/电视剧/国产剧")
if err != nil {
@@ -134,7 +134,7 @@ func TestResolveAccessibleMappedPathMapsEmbeddedHostDownloadMarker(t *testing.T)
if err := os.MkdirAll(containerItem, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_DOWNLOAD_CONTAINER_DIR", containerDownloads)
+ t.Setenv("MEBOX_DOWNLOAD_CONTAINER_DIR", containerDownloads)
got, _, err := resolveAccessibleMappedPath("/vol1/1000/Docker/qbittorrent/downloads/国产剧")
if err != nil {
@@ -180,7 +180,7 @@ func TestMappedPathCandidatesMapWindowsDriveDownloadMarker(t *testing.T) {
root := t.TempDir()
containerDownloads := filepath.Join(root, "container", "downloads")
containerLibrary := filepath.Join(containerDownloads, "国产剧")
- t.Setenv("MMTL_DOWNLOAD_CONTAINER_DIR", containerDownloads)
+ t.Setenv("MEBOX_DOWNLOAD_CONTAINER_DIR", containerDownloads)
want := filepath.Clean(containerLibrary)
for _, got := range mappedPathCandidates(`F:\downloads\国产剧`) {
@@ -197,8 +197,8 @@ func TestResolveMappedDestinationPathPrefersConfiguredContainerMapping(t *testin
if err := os.MkdirAll(containerMedia, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_DIR", `Q:\media`)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerMedia)
+ t.Setenv("MEBOX_MEDIA_DIR", `Q:\media`)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerMedia)
for _, input := range []string{`Q:\media`, `Q:/media`, `/app/Q:\media`} {
t.Run(input, func(t *testing.T) {
@@ -221,7 +221,7 @@ func TestResolveMappedDestinationPathPrefersContainerForRelativeMediaMarker(t *t
t.Fatal(err)
}
t.Chdir(workDir)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerMedia)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerMedia)
got := resolveMappedDestinationPath(filepath.Join("media", "电视剧", "国产剧"))
want := filepath.Join(containerMedia, "电视剧", "国产剧")
@@ -237,8 +237,8 @@ func TestResolveAccessibleMappedPathMapsWindowsDownloadVariants(t *testing.T) {
if err := os.MkdirAll(containerSource, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_DOWNLOAD_DIR", `Q:\downloads`)
- t.Setenv("MMTL_DOWNLOAD_CONTAINER_DIR", containerDownloads)
+ t.Setenv("MEBOX_DOWNLOAD_DIR", `Q:\downloads`)
+ t.Setenv("MEBOX_DOWNLOAD_CONTAINER_DIR", containerDownloads)
for _, input := range []string{`Q:\downloads\国产剧`, `Q:/downloads/国产剧`, `/app/Q:\downloads\国产剧`} {
t.Run(input, func(t *testing.T) {
diff --git a/internal/service/media_versions.go b/internal/service/media_versions.go
index 10c5420..e2bbc9e 100644
--- a/internal/service/media_versions.go
+++ b/internal/service/media_versions.go
@@ -5,7 +5,7 @@ import (
"sort"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type MediaItem struct {
diff --git a/internal/service/media_versions_test.go b/internal/service/media_versions_test.go
index 2515d26..d5bc044 100644
--- a/internal/service/media_versions_test.go
+++ b/internal/service/media_versions_test.go
@@ -6,9 +6,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestGroupMediaVersionsMergesEpisodeByExternalIDAcrossLibraries(t *testing.T) {
diff --git a/internal/service/media_visibility_test.go b/internal/service/media_visibility_test.go
index 1264ada..58a315b 100644
--- a/internal/service/media_visibility_test.go
+++ b/internal/service/media_visibility_test.go
@@ -5,9 +5,9 @@ import (
"slices"
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
diff --git a/internal/service/metatube.go b/internal/service/metatube.go
index 002c88b..59a2de0 100644
--- a/internal/service/metatube.go
+++ b/internal/service/metatube.go
@@ -273,7 +273,7 @@ func (p *MetaTubeProvider) applyAuthHeader(req *http.Request, token string) {
req.Header.Set("X-Token", token)
}
req.Header.Set("Accept", "application/json")
- req.Header.Set("User-Agent", "MMTL/1.0 (MetaTube Client)")
+ req.Header.Set("User-Agent", "MeBox/1.0 (MetaTube Client)")
}
func (p *MetaTubeProvider) convertSearchResultToMatch(query string, res *MetaTubeSearchResult) *Match {
diff --git a/internal/service/nfo.go b/internal/service/nfo.go
index a78b75a..10905c5 100644
--- a/internal/service/nfo.go
+++ b/internal/service/nfo.go
@@ -22,8 +22,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// NFOService is the entry point used by the admin "导出 NFO" action.
diff --git a/internal/service/nfo_test.go b/internal/service/nfo_test.go
index db70eeb..3db603a 100644
--- a/internal/service/nfo_test.go
+++ b/internal/service/nfo_test.go
@@ -6,13 +6,13 @@ import (
"strings"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestWriteMediaNFOUsesMappedDestinationPath(t *testing.T) {
root := t.TempDir()
- t.Setenv("MMTL_MEDIA_DIR", root)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", "/media")
+ t.Setenv("MEBOX_MEDIA_DIR", root)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", "/media")
mediaPath := filepath.Join(root, "电影", "测试电影.mkv")
if err := os.MkdirAll(filepath.Dir(mediaPath), 0o755); err != nil {
t.Fatal(err)
diff --git a/internal/service/organize_naming_test.go b/internal/service/organize_naming_test.go
index f511edc..3ab8359 100644
--- a/internal/service/organize_naming_test.go
+++ b/internal/service/organize_naming_test.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
// TestOrganizeNaming locks in the rename pipeline used by OrganizeDirectory:
diff --git a/internal/service/organize_pipeline.go b/internal/service/organize_pipeline.go
index b22f2f2..69428b1 100644
--- a/internal/service/organize_pipeline.go
+++ b/internal/service/organize_pipeline.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
type OrganizeScope string
diff --git a/internal/service/organize_pipeline_audit.go b/internal/service/organize_pipeline_audit.go
index 9be6a8e..2acd2f5 100644
--- a/internal/service/organize_pipeline_audit.go
+++ b/internal/service/organize_pipeline_audit.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func organizeFatalResultError(res *OrganizeResult) error {
diff --git a/internal/service/organize_pipeline_sync.go b/internal/service/organize_pipeline_sync.go
index 47c22ce..fabee1b 100644
--- a/internal/service/organize_pipeline_sync.go
+++ b/internal/service/organize_pipeline_sync.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (p *OrganizePipelineService) syncScrapedOrganizedNames(ctx context.Context, opts OrganizeOptions, res *OrganizeResult, path string) {
diff --git a/internal/service/organize_pipeline_test.go b/internal/service/organize_pipeline_test.go
index b712f46..5d456f7 100644
--- a/internal/service/organize_pipeline_test.go
+++ b/internal/service/organize_pipeline_test.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeScanRootUsesActualOrganizedTarget(t *testing.T) {
diff --git a/internal/service/organizer.go b/internal/service/organizer.go
index a8d7c68..359e136 100644
--- a/internal/service/organizer.go
+++ b/internal/service/organizer.go
@@ -20,9 +20,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// OrganizerService moves/renames files into library structures.
diff --git a/internal/service/organizer_classification_test.go b/internal/service/organizer_classification_test.go
index 67d8509..dcffab4 100644
--- a/internal/service/organizer_classification_test.go
+++ b/internal/service/organizer_classification_test.go
@@ -11,8 +11,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryClassifiesScraperMatchBeforeRename(t *testing.T) {
diff --git a/internal/service/organizer_classify.go b/internal/service/organizer_classify.go
index 0a87852..904d1cf 100644
--- a/internal/service/organizer_classify.go
+++ b/internal/service/organizer_classify.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// isSmartClassifyEnabled checks database settings first, then config.yaml.
diff --git a/internal/service/organizer_directory_classification_test.go b/internal/service/organizer_directory_classification_test.go
index 7f209e1..49a7657 100644
--- a/internal/service/organizer_directory_classification_test.go
+++ b/internal/service/organizer_directory_classification_test.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryUsesDownloadCategoryLayout(t *testing.T) {
diff --git a/internal/service/organizer_directory_dedup_test.go b/internal/service/organizer_directory_dedup_test.go
index 4f1dcaa..39f6210 100644
--- a/internal/service/organizer_directory_dedup_test.go
+++ b/internal/service/organizer_directory_dedup_test.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
// TestOrganizeDirectoryDedup verifies that media already present in the
diff --git a/internal/service/organizer_directory_libraries.go b/internal/service/organizer_directory_libraries.go
index a3582f3..97bf54a 100644
--- a/internal/service/organizer_directory_libraries.go
+++ b/internal/service/organizer_directory_libraries.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) organizeLibraryRootForLayout(ctx context.Context, destRoot, mediaType, category string) (string, bool) {
diff --git a/internal/service/organizer_directory_metadata.go b/internal/service/organizer_directory_metadata.go
index 36c7575..5a33187 100644
--- a/internal/service/organizer_directory_metadata.go
+++ b/internal/service/organizer_directory_metadata.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) lookupOrganizeMetadata(ctx context.Context, src, sourceRoot, mediaType, title string, year, season, episode int, cache map[string]*Match) *Match {
diff --git a/internal/service/organizer_directory_metadata_persist.go b/internal/service/organizer_directory_metadata_persist.go
index 80f8dff..a46e259 100644
--- a/internal/service/organizer_directory_metadata_persist.go
+++ b/internal/service/organizer_directory_metadata_persist.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) persistOrganizedSourceMetadata(ctx context.Context, plan organizeSourceFilePlan) {
diff --git a/internal/service/organizer_directory_source.go b/internal/service/organizer_directory_source.go
index 5ec59be..8a53950 100644
--- a/internal/service/organizer_directory_source.go
+++ b/internal/service/organizer_directory_source.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type organizeDirectoryLayout struct {
diff --git a/internal/service/organizer_directory_source_test.go b/internal/service/organizer_directory_source_test.go
index d8ea801..c436ee8 100644
--- a/internal/service/organizer_directory_source_test.go
+++ b/internal/service/organizer_directory_source_test.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestOrganizeDirectoryUsesConfiguredSourceWhenRequestSourceEmpty(t *testing.T) {
@@ -42,10 +42,10 @@ func TestOrganizeDirectoryMapsConfiguredHostPathsToContainerPaths(t *testing.T)
containerSource := filepath.Join(containerDownloads, "国产剧")
writeOrgFile(t, filepath.Join(containerSource, "Some Show S01E01 2024 1080p.mkv"), "show-e01")
- t.Setenv("MMTL_DOWNLOAD_DIR", hostDownloads)
- t.Setenv("MMTL_DOWNLOAD_CONTAINER_DIR", containerDownloads)
- t.Setenv("MMTL_MEDIA_DIR", hostMedia)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerMedia)
+ t.Setenv("MEBOX_DOWNLOAD_DIR", hostDownloads)
+ t.Setenv("MEBOX_DOWNLOAD_CONTAINER_DIR", containerDownloads)
+ t.Setenv("MEBOX_MEDIA_DIR", hostMedia)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerMedia)
repos := newOrganizerTestRepo(t)
for key, value := range map[string]string{
@@ -106,8 +106,8 @@ func TestOrganizeSourceCandidatesOnlyReturnAccessibleDirectories(t *testing.T) {
if err := os.MkdirAll(downloadDir, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_DOWNLOAD_CONTAINER_DIR", downloadDir)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", filepath.Join(root, "missing-media"))
+ t.Setenv("MEBOX_DOWNLOAD_CONTAINER_DIR", downloadDir)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", filepath.Join(root, "missing-media"))
repos := newOrganizerTestRepo(t)
if err := repos.Setting.Set(t.Context(), "organize.source_dir", configuredDir); err != nil {
@@ -128,7 +128,7 @@ func TestOrganizeSourceCandidatesOnlyReturnAccessibleDirectories(t *testing.T) {
if err := os.MkdirAll(mediaDir, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", mediaDir)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", mediaDir)
candidates = org.OrganizeSourceCandidates(t.Context())
if len(candidates) != 3 {
t.Fatalf("candidates = %#v, want configured source, download and media dirs", candidates)
diff --git a/internal/service/organizer_directory_sources.go b/internal/service/organizer_directory_sources.go
index e8de025..cbbd596 100644
--- a/internal/service/organizer_directory_sources.go
+++ b/internal/service/organizer_directory_sources.go
@@ -41,8 +41,8 @@ func (o *OrganizerService) OrganizeSourceCandidates(ctx context.Context) []Organ
}
add("默认整理源", o.settingValue(ctx, "organize.source_dir"), "source")
add("下载器保存目录", o.settingValue(ctx, "qbittorrent.savepath"), "download")
- add("下载目录", envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads"), "download")
- add("媒体目录", envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media"), "media")
+ add("下载目录", envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads"), "download")
+ add("媒体目录", envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media"), "media")
return out
}
@@ -69,7 +69,7 @@ func (o *OrganizerService) defaultSourceRoot(ctx context.Context, override strin
if v := o.settingValue(ctx, "qbittorrent.savepath"); v != "" {
return v
}
- return envOrDefault("MMTL_DOWNLOAD_CONTAINER_DIR", "/downloads")
+ return envOrDefault("MEBOX_DOWNLOAD_CONTAINER_DIR", "/downloads")
}
// defaultDestRoot resolves the destination root for a directory organize:
@@ -83,7 +83,7 @@ func (o *OrganizerService) defaultDestRoot(ctx context.Context, override string)
return strings.TrimSpace(v)
}
}
- return envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")
+ return envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")
}
func ensureOrganizeDestinationWritable(dest string) error {
@@ -97,7 +97,7 @@ func ensureOrganizeDestinationWritable(dest string) error {
if err := os.MkdirAll(dest, 0o755); err != nil { // #nosec G301 -- organized media directories must remain readable by NAS/player users.
return fmt.Errorf("destination path is not a writable directory: %s: %w", dest, err)
}
- probe, err := os.CreateTemp(dest, ".mmtl-write-test-*") // #nosec G304 -- dest is operator-configured organize root.
+ probe, err := os.CreateTemp(dest, ".mebox-write-test-*") // #nosec G304 -- dest is operator-configured organize root.
if err != nil {
return fmt.Errorf("destination path is not writable: %s: %w", dest, err)
}
diff --git a/internal/service/organizer_directory_test.go b/internal/service/organizer_directory_test.go
index e74923d..d809b6b 100644
--- a/internal/service/organizer_directory_test.go
+++ b/internal/service/organizer_directory_test.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func writeOrgFile(t *testing.T, path, content string) {
diff --git a/internal/service/organizer_directory_versions.go b/internal/service/organizer_directory_versions.go
index a444ce5..e85d25d 100644
--- a/internal/service/organizer_directory_versions.go
+++ b/internal/service/organizer_directory_versions.go
@@ -10,7 +10,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// existingVersionPaths returns existing destination files that represent the
diff --git a/internal/service/organizer_library_classification.go b/internal/service/organizer_library_classification.go
index 4a22d3c..227dccb 100644
--- a/internal/service/organizer_library_classification.go
+++ b/internal/service/organizer_library_classification.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func organizeLibraryModelType(mediaType string) string {
diff --git a/internal/service/organizer_localized_title_test.go b/internal/service/organizer_localized_title_test.go
index 0c1e27f..fbcb2e4 100644
--- a/internal/service/organizer_localized_title_test.go
+++ b/internal/service/organizer_localized_title_test.go
@@ -13,9 +13,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestOrganizeDirectoryUsesTMDbChineseAlternativeTitle(t *testing.T) {
diff --git a/internal/service/organizer_media.go b/internal/service/organizer_media.go
index 03ed401..00ad854 100644
--- a/internal/service/organizer_media.go
+++ b/internal/service/organizer_media.go
@@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type organizeMediaRequest struct {
diff --git a/internal/service/organizer_media_metadata.go b/internal/service/organizer_media_metadata.go
index c2b22d5..aa0b9f4 100644
--- a/internal/service/organizer_media_metadata.go
+++ b/internal/service/organizer_media_metadata.go
@@ -6,7 +6,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) refreshOrganizeMediaMetadata(ctx context.Context, media *model.Media, lib *model.Library, requestedType string) {
diff --git a/internal/service/organizer_metadata_match.go b/internal/service/organizer_metadata_match.go
index 63bb1d6..da853e0 100644
--- a/internal/service/organizer_metadata_match.go
+++ b/internal/service/organizer_metadata_match.go
@@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func organizeMetadataMatchTrusted(query string, sourceYear int, match *Match) bool {
diff --git a/internal/service/organizer_reclassify_anime_test.go b/internal/service/organizer_reclassify_anime_test.go
index 2aa117e..5701618 100644
--- a/internal/service/organizer_reclassify_anime_test.go
+++ b/internal/service/organizer_reclassify_anime_test.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryReclassifiesScannedAnimeUsingDBMetadata(t *testing.T) {
diff --git a/internal/service/organizer_reclassify_duplicates_test.go b/internal/service/organizer_reclassify_duplicates_test.go
index 4174228..849b765 100644
--- a/internal/service/organizer_reclassify_duplicates_test.go
+++ b/internal/service/organizer_reclassify_duplicates_test.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryCleansWrongCategoryDuplicateWhenTargetExists(t *testing.T) {
diff --git a/internal/service/organizer_reclassify_media_rows.go b/internal/service/organizer_reclassify_media_rows.go
index b4f546c..b4c34b3 100644
--- a/internal/service/organizer_reclassify_media_rows.go
+++ b/internal/service/organizer_reclassify_media_rows.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) updateReclassifiedMediaRow(ctx context.Context, oldPath, newPath string, req organizeExistingReclassifyRequest) error {
diff --git a/internal/service/organizer_reclassify_metadata.go b/internal/service/organizer_reclassify_metadata.go
index d6e62a0..dd155e7 100644
--- a/internal/service/organizer_reclassify_metadata.go
+++ b/internal/service/organizer_reclassify_metadata.go
@@ -6,7 +6,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (o *OrganizerService) lookupReclassifyMetadata(ctx context.Context, media model.Media, lib model.Library, mediaType string) *Match {
diff --git a/internal/service/organizer_reclassify_metadata_test.go b/internal/service/organizer_reclassify_metadata_test.go
index ca6b734..3f72d0a 100644
--- a/internal/service/organizer_reclassify_metadata_test.go
+++ b/internal/service/organizer_reclassify_metadata_test.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryCleansReleaseNoiseBeforeMetadataClassify(t *testing.T) {
diff --git a/internal/service/organizer_reclassify_scanned.go b/internal/service/organizer_reclassify_scanned.go
index 5a98443..dd7ef5c 100644
--- a/internal/service/organizer_reclassify_scanned.go
+++ b/internal/service/organizer_reclassify_scanned.go
@@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// MediaCategoryReclassifyOptions controls the metadata-based category audit.
diff --git a/internal/service/organizer_reclassify_test.go b/internal/service/organizer_reclassify_test.go
index b06db08..510683c 100644
--- a/internal/service/organizer_reclassify_test.go
+++ b/internal/service/organizer_reclassify_test.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryReclassifiesExistingWrongCategoryMedia(t *testing.T) {
diff --git a/internal/service/organizer_scan.go b/internal/service/organizer_scan.go
index 243f5a2..750bd9c 100644
--- a/internal/service/organizer_scan.go
+++ b/internal/service/organizer_scan.go
@@ -5,8 +5,8 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// OrganizeScanSummary reports a library scan triggered after directory
diff --git a/internal/service/organizer_scrape_providers_test.go b/internal/service/organizer_scrape_providers_test.go
index 78b0a60..e20d785 100644
--- a/internal/service/organizer_scrape_providers_test.go
+++ b/internal/service/organizer_scrape_providers_test.go
@@ -11,8 +11,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryUsesAdultMetadataBeforeRename(t *testing.T) {
diff --git a/internal/service/organizer_scrape_safety_test.go b/internal/service/organizer_scrape_safety_test.go
index 9f478e9..dc91cbf 100644
--- a/internal/service/organizer_scrape_safety_test.go
+++ b/internal/service/organizer_scrape_safety_test.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryRejectsWrongYearScraperRename(t *testing.T) {
diff --git a/internal/service/organizer_scrape_test.go b/internal/service/organizer_scrape_test.go
index 25aaa36..c3838b1 100644
--- a/internal/service/organizer_scrape_test.go
+++ b/internal/service/organizer_scrape_test.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestOrganizeDirectoryScanAndScrapeAfter(t *testing.T) {
diff --git a/internal/service/organizer_settings.go b/internal/service/organizer_settings.go
index 0e5991a..e576494 100644
--- a/internal/service/organizer_settings.go
+++ b/internal/service/organizer_settings.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// resolveBaseRoot picks the organize destination root (目的地目录): a
diff --git a/internal/service/organizer_source_test.go b/internal/service/organizer_source_test.go
index 5c0af59..672b905 100644
--- a/internal/service/organizer_source_test.go
+++ b/internal/service/organizer_source_test.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
// TestOrganizeLibraryScopesToSourceDir verifies organize reads from the
diff --git a/internal/service/organizer_test.go b/internal/service/organizer_test.go
index 7885ba5..f35d30d 100644
--- a/internal/service/organizer_test.go
+++ b/internal/service/organizer_test.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestOrganizeMediaReDetectsSeasonFromPath(t *testing.T) {
diff --git a/internal/service/organizer_transfer_test.go b/internal/service/organizer_transfer_test.go
index 05ed0e0..859b284 100644
--- a/internal/service/organizer_transfer_test.go
+++ b/internal/service/organizer_transfer_test.go
@@ -8,9 +8,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newOrganizerTestRepo(t *testing.T) *repository.Container {
diff --git a/internal/service/permission.go b/internal/service/permission.go
index b58e855..b03cc29 100644
--- a/internal/service/permission.go
+++ b/internal/service/permission.go
@@ -11,8 +11,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// PermissionService manages user permissions.
diff --git a/internal/service/play_profile.go b/internal/service/play_profile.go
index 848c1e0..d182809 100644
--- a/internal/service/play_profile.go
+++ b/internal/service/play_profile.go
@@ -18,8 +18,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// PlayProfileService manages PlayProfile rows.
diff --git a/internal/service/play_profile_model.go b/internal/service/play_profile_model.go
index d9301df..77f8908 100644
--- a/internal/service/play_profile_model.go
+++ b/internal/service/play_profile_model.go
@@ -7,7 +7,7 @@ import (
"fmt"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// PlayProfileInput is the create/update payload accepted by the API.
diff --git a/internal/service/play_profile_test.go b/internal/service/play_profile_test.go
index 7147486..20225a8 100644
--- a/internal/service/play_profile_test.go
+++ b/internal/service/play_profile_test.go
@@ -4,8 +4,8 @@ import (
"errors"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
diff --git a/internal/service/playback.go b/internal/service/playback.go
index 5fc6921..db31a04 100644
--- a/internal/service/playback.go
+++ b/internal/service/playback.go
@@ -15,8 +15,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// PlaybackService bundles history / favourite / playlist business logic.
diff --git a/internal/service/playback_test.go b/internal/service/playback_test.go
index 3126217..925c56c 100644
--- a/internal/service/playback_test.go
+++ b/internal/service/playback_test.go
@@ -5,8 +5,8 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
diff --git a/internal/service/profile.go b/internal/service/profile.go
index 08e950d..99e8312 100644
--- a/internal/service/profile.go
+++ b/internal/service/profile.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ProfileService handles non-credential user mutations.
diff --git a/internal/service/public_url.go b/internal/service/public_url.go
index d59cfbc..9352c18 100644
--- a/internal/service/public_url.go
+++ b/internal/service/public_url.go
@@ -5,11 +5,11 @@ import (
"net/url"
"strings"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
-// PublicServerURL returns the operator-configured public MMTL base
+// PublicServerURL returns the operator-configured public MeBox base
// URL. It is intentionally read from Setting first so Docker users only need to
// fill one domain in the admin settings page after deployment.
func PublicServerURL(ctx context.Context, repo *repository.Container, cfg *config.Config) string {
diff --git a/internal/service/recognition_words.go b/internal/service/recognition_words.go
index 69406c2..194a283 100644
--- a/internal/service/recognition_words.go
+++ b/internal/service/recognition_words.go
@@ -11,8 +11,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
const (
diff --git a/internal/service/runtime_cache.go b/internal/service/runtime_cache.go
index 6297d24..270531c 100644
--- a/internal/service/runtime_cache.go
+++ b/internal/service/runtime_cache.go
@@ -10,7 +10,7 @@ import (
"github.com/redis/go-redis/v9"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
type RuntimeCacheService struct {
@@ -35,7 +35,7 @@ func NewRuntimeCacheService(cfg *config.Config, log *zap.Logger) *RuntimeCacheSe
}
c.prefix = strings.Trim(strings.TrimSpace(cfg.Cache.RedisPrefix), ":")
if c.prefix == "" {
- c.prefix = "mmtl"
+ c.prefix = "mebox"
}
rawURL := strings.TrimSpace(cfg.Cache.RedisURL)
if rawURL == "" {
diff --git a/internal/service/runtime_settings.go b/internal/service/runtime_settings.go
index b41220a..95e0a1c 100644
--- a/internal/service/runtime_settings.go
+++ b/internal/service/runtime_settings.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
func ApplyRuntimeSettings(ctx context.Context, cfg *config.Config, repos *repository.Container, log *zap.Logger) {
diff --git a/internal/service/runtime_settings_test.go b/internal/service/runtime_settings_test.go
index 171d097..ba8f364 100644
--- a/internal/service/runtime_settings_test.go
+++ b/internal/service/runtime_settings_test.go
@@ -3,7 +3,7 @@ package service
import (
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestApplyRuntimeSettingTranscodeSwitches(t *testing.T) {
diff --git a/internal/service/scanner.go b/internal/service/scanner.go
index 5004e45..95c62ba 100644
--- a/internal/service/scanner.go
+++ b/internal/service/scanner.go
@@ -17,8 +17,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// videoExtensions lists the file extensions treated as media. Matches the
diff --git a/internal/service/scanner_existing_media.go b/internal/service/scanner_existing_media.go
index 6411c7d..969a8e8 100644
--- a/internal/service/scanner_existing_media.go
+++ b/internal/service/scanner_existing_media.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScannerService) existingLocalMediaSnapshot(ctx context.Context, libraryID string) (map[string]existingLocalMedia, error) {
diff --git a/internal/service/scanner_existing_media_test.go b/internal/service/scanner_existing_media_test.go
index 6a75ef2..aea5a5d 100644
--- a/internal/service/scanner_existing_media_test.go
+++ b/internal/service/scanner_existing_media_test.go
@@ -4,9 +4,9 @@ import (
"path/filepath"
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
diff --git a/internal/service/scanner_incremental_test.go b/internal/service/scanner_incremental_test.go
index f5655dd..1f25c49 100644
--- a/internal/service/scanner_incremental_test.go
+++ b/internal/service/scanner_incremental_test.go
@@ -10,9 +10,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newScannerTestEnv(t *testing.T) (*ScannerService, *repository.Container) {
@@ -425,8 +425,8 @@ func TestScanLibraryMapsPersistedHostLibraryPath(t *testing.T) {
if err := os.WriteFile(file, []byte("episode"), 0o644); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_DIR", `Q:\media`)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_DIR", `Q:\media`)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
lib := model.Library{Name: "国产剧", Path: `Q:\media\电视剧\国产剧`, Type: "tv", Enabled: true}
if err := repos.Library.Create(t.Context(), &lib); err != nil {
diff --git a/internal/service/scanner_library_roots_test.go b/internal/service/scanner_library_roots_test.go
index 9ea569b..311e5d1 100644
--- a/internal/service/scanner_library_roots_test.go
+++ b/internal/service/scanner_library_roots_test.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestScanLibraryScansMultipleRootsAndPrunesPerRoot(t *testing.T) {
diff --git a/internal/service/scanner_local_ingest.go b/internal/service/scanner_local_ingest.go
index 8b523d4..6a05966 100644
--- a/internal/service/scanner_local_ingest.go
+++ b/internal/service/scanner_local_ingest.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// ingestFile upserts a single media file. seenInodes dedups hardlinks within a
diff --git a/internal/service/scanner_local_metadata_test.go b/internal/service/scanner_local_metadata_test.go
index 3569e3f..ee0eef3 100644
--- a/internal/service/scanner_local_metadata_test.go
+++ b/internal/service/scanner_local_metadata_test.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestScanLibraryUsesLocalMetadata(t *testing.T) {
diff --git a/internal/service/scanner_local_probe_queue.go b/internal/service/scanner_local_probe_queue.go
index 2bac0a4..c4e2018 100644
--- a/internal/service/scanner_local_probe_queue.go
+++ b/internal/service/scanner_local_probe_queue.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScannerService) localMediaProbeWorker() {
diff --git a/internal/service/scanner_local_write_batch.go b/internal/service/scanner_local_write_batch.go
index e85a53c..ffd4f8e 100644
--- a/internal/service/scanner_local_write_batch.go
+++ b/internal/service/scanner_local_write_batch.go
@@ -6,7 +6,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type localMediaWriteBatch struct {
diff --git a/internal/service/scanner_metadata_refresh.go b/internal/service/scanner_metadata_refresh.go
index 693e807..31751ab 100644
--- a/internal/service/scanner_metadata_refresh.go
+++ b/internal/service/scanner_metadata_refresh.go
@@ -3,7 +3,7 @@ package service
import (
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type scanDerivedMetadata struct {
diff --git a/internal/service/scanner_prune.go b/internal/service/scanner_prune.go
index d5328ba..12a48af 100644
--- a/internal/service/scanner_prune.go
+++ b/internal/service/scanner_prune.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// RemovePath 物理删除磁盘上已不存在的媒体记录。
diff --git a/internal/service/scanner_roots.go b/internal/service/scanner_roots.go
index 3e5f5a9..1e4572c 100644
--- a/internal/service/scanner_roots.go
+++ b/internal/service/scanner_roots.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScannerService) localLibraryScanRoots(ctx context.Context, lib *model.Library) ([]model.LibraryRoot, error) {
diff --git a/internal/service/scanner_scan.go b/internal/service/scanner_scan.go
index 2b22b54..7f06697 100644
--- a/internal/service/scanner_scan.go
+++ b/internal/service/scanner_scan.go
@@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// ScanLibrary walks the library root and persists discovered media files.
@@ -100,8 +100,8 @@ func (s *ScannerService) scanLibrary(ctx context.Context, libraryID string, auto
zap.String("root_id", root.ID),
zap.String("path", root.Path),
zap.Strings("candidates", mappedPathCandidates(root.Path)),
- zap.String("media_dir_env", os.Getenv("MMTL_MEDIA_DIR")),
- zap.String("media_container_env", envOrDefault("MMTL_MEDIA_CONTAINER_DIR", "/media")),
+ zap.String("media_dir_env", os.Getenv("MEBOX_MEDIA_DIR")),
+ zap.String("media_container_env", envOrDefault("MEBOX_MEDIA_CONTAINER_DIR", "/media")),
zap.String("diagnostic", diag),
zap.Error(err))
if scanErr == nil {
diff --git a/internal/service/scheduler.go b/internal/service/scheduler.go
index 8faa168..c140232 100644
--- a/internal/service/scheduler.go
+++ b/internal/service/scheduler.go
@@ -25,7 +25,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
// SchedulerService runs the periodic jobs.
diff --git a/internal/service/scheduler_local_jobs.go b/internal/service/scheduler_local_jobs.go
index d86288a..cbd4319 100644
--- a/internal/service/scheduler_local_jobs.go
+++ b/internal/service/scheduler_local_jobs.go
@@ -10,7 +10,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// jobScanLibraries re-walks every enabled library.
diff --git a/internal/service/scheduler_organize_test.go b/internal/service/scheduler_organize_test.go
index fc5947d..1d743ac 100644
--- a/internal/service/scheduler_organize_test.go
+++ b/internal/service/scheduler_organize_test.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestSchedulerOrganizeSourceDisabledByDefault(t *testing.T) {
diff --git a/internal/service/scheduler_scan_test.go b/internal/service/scheduler_scan_test.go
index 98c7e09..2e0fbf1 100644
--- a/internal/service/scheduler_scan_test.go
+++ b/internal/service/scheduler_scan_test.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestSchedulerPeriodicLocalScanRunsAtMostOncePerDay(t *testing.T) {
diff --git a/internal/service/scraper.go b/internal/service/scraper.go
index 17cbe30..dc1922f 100644
--- a/internal/service/scraper.go
+++ b/internal/service/scraper.go
@@ -11,7 +11,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// EnrichOne runs the provider chain for a single media row.
diff --git a/internal/service/scraper_alias_match_test.go b/internal/service/scraper_alias_match_test.go
index d65006b..2845eb4 100644
--- a/internal/service/scraper_alias_match_test.go
+++ b/internal/service/scraper_alias_match_test.go
@@ -8,8 +8,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestEnrichOneUsesAlternateLanguageTitleAndKeepsLocalizedMetadata(t *testing.T) {
diff --git a/internal/service/scraper_artwork_test.go b/internal/service/scraper_artwork_test.go
index 7b0603e..001b987 100644
--- a/internal/service/scraper_artwork_test.go
+++ b/internal/service/scraper_artwork_test.go
@@ -13,8 +13,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestScrapeDelayUsesSettings(t *testing.T) {
diff --git a/internal/service/scraper_episode_details_test.go b/internal/service/scraper_episode_details_test.go
index c1885a7..da88e43 100644
--- a/internal/service/scraper_episode_details_test.go
+++ b/internal/service/scraper_episode_details_test.go
@@ -13,9 +13,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestEnrichLibraryDefersEpisodeDetailsUntilMainMetadataFinishes(t *testing.T) {
diff --git a/internal/service/scraper_library.go b/internal/service/scraper_library.go
index c444bec..f9d6277 100644
--- a/internal/service/scraper_library.go
+++ b/internal/service/scraper_library.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// lookup runs the provider chain after local NFO has been considered:
diff --git a/internal/service/scraper_library_test.go b/internal/service/scraper_library_test.go
index a48ac83..10c0990 100644
--- a/internal/service/scraper_library_test.go
+++ b/internal/service/scraper_library_test.go
@@ -4,7 +4,7 @@ import (
"path/filepath"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestManualEnrichLibraryRetriesNoMatchAndCountsRealMatches(t *testing.T) {
diff --git a/internal/service/scraper_local_metadata.go b/internal/service/scraper_local_metadata.go
index 800cadb..e9ab0b9 100644
--- a/internal/service/scraper_local_metadata.go
+++ b/internal/service/scraper_local_metadata.go
@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func mediaYearHint(m *model.Media) int {
diff --git a/internal/service/scraper_local_metadata_test.go b/internal/service/scraper_local_metadata_test.go
index 22cccbc..f8bf15e 100644
--- a/internal/service/scraper_local_metadata_test.go
+++ b/internal/service/scraper_local_metadata_test.go
@@ -12,9 +12,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestEnrichOneRejectsWrongYearMatchFromSeriesFolder(t *testing.T) {
diff --git a/internal/service/scraper_lookup.go b/internal/service/scraper_lookup.go
index 9ee7f51..d74b875 100644
--- a/internal/service/scraper_lookup.go
+++ b/internal/service/scraper_lookup.go
@@ -6,7 +6,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScraperService) matchFromMediaExternalIDs(ctx context.Context, m *model.Media, lib *model.Library) *Match {
diff --git a/internal/service/scraper_lookup_test.go b/internal/service/scraper_lookup_test.go
index bc31b86..dd71577 100644
--- a/internal/service/scraper_lookup_test.go
+++ b/internal/service/scraper_lookup_test.go
@@ -5,7 +5,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestMediaExternalIDMatchTrustsExactEpisodeID(t *testing.T) {
diff --git a/internal/service/scraper_query.go b/internal/service/scraper_query.go
index 136df9b..cb07ad0 100644
--- a/internal/service/scraper_query.go
+++ b/internal/service/scraper_query.go
@@ -6,8 +6,8 @@ import (
"regexp"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
var (
diff --git a/internal/service/scraper_query_candidates_test.go b/internal/service/scraper_query_candidates_test.go
index 3bfd070..26dfd63 100644
--- a/internal/service/scraper_query_candidates_test.go
+++ b/internal/service/scraper_query_candidates_test.go
@@ -4,7 +4,7 @@ import (
"strings"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestScrapeQueryCandidatesPreferSeriesFolderAndCJKTitle(t *testing.T) {
diff --git a/internal/service/scraper_query_movie_test.go b/internal/service/scraper_query_movie_test.go
index f0fe5c3..d004667 100644
--- a/internal/service/scraper_query_movie_test.go
+++ b/internal/service/scraper_query_movie_test.go
@@ -11,9 +11,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestScrapeQueryCandidatesUseMovieFolderForGenericFilename(t *testing.T) {
diff --git a/internal/service/scraper_query_test.go b/internal/service/scraper_query_test.go
index 4ba98d2..1c59a4e 100644
--- a/internal/service/scraper_query_test.go
+++ b/internal/service/scraper_query_test.go
@@ -12,9 +12,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestCleanQuery(t *testing.T) {
diff --git a/internal/service/scraper_queue.go b/internal/service/scraper_queue.go
index 75a5604..143c826 100644
--- a/internal/service/scraper_queue.go
+++ b/internal/service/scraper_queue.go
@@ -10,7 +10,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
type ScrapeQueueCounts struct {
diff --git a/internal/service/scraper_service.go b/internal/service/scraper_service.go
index ccb0ed9..bfb99ae 100644
--- a/internal/service/scraper_service.go
+++ b/internal/service/scraper_service.go
@@ -5,9 +5,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ScraperService coordinates metadata enrichment across providers.
diff --git a/internal/service/scraper_test.go b/internal/service/scraper_test.go
index 1dfa893..6c312b0 100644
--- a/internal/service/scraper_test.go
+++ b/internal/service/scraper_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
"gorm.io/gorm"
)
diff --git a/internal/service/scraper_test_helpers_test.go b/internal/service/scraper_test_helpers_test.go
index c5e9932..2810dde 100644
--- a/internal/service/scraper_test_helpers_test.go
+++ b/internal/service/scraper_test_helpers_test.go
@@ -11,9 +11,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func firstIndexFunc(values []string, match func(string) bool) int {
diff --git a/internal/service/scraper_tmdb_details.go b/internal/service/scraper_tmdb_details.go
index 21c55aa..af27ed2 100644
--- a/internal/service/scraper_tmdb_details.go
+++ b/internal/service/scraper_tmdb_details.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *ScraperService) fetchAndSaveTMDbExtendedMetadata(ctx context.Context, mediaID string, tmdbID int, mediaType string) {
diff --git a/internal/service/scraper_write_metadata_files.go b/internal/service/scraper_write_metadata_files.go
index 8dbf510..2a4b923 100644
--- a/internal/service/scraper_write_metadata_files.go
+++ b/internal/service/scraper_write_metadata_files.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// writeMediaArtworkFilesAfterScrape downloads the scraped poster/backdrop into
diff --git a/internal/service/scraper_write_metadata_files_test.go b/internal/service/scraper_write_metadata_files_test.go
index e9e5416..98fa2b8 100644
--- a/internal/service/scraper_write_metadata_files_test.go
+++ b/internal/service/scraper_write_metadata_files_test.go
@@ -7,7 +7,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
// TestWriteArtworkDataToPathWritesJellyfinSidecar verifies that in-memory
diff --git a/internal/service/security_safety_test.go b/internal/service/security_safety_test.go
index c859af3..e5d31bf 100644
--- a/internal/service/security_safety_test.go
+++ b/internal/service/security_safety_test.go
@@ -4,7 +4,7 @@ import (
"path/filepath"
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestBackupFilePathRejectsTraversal(t *testing.T) {
@@ -15,7 +15,7 @@ func TestBackupFilePathRejectsTraversal(t *testing.T) {
t.Fatalf("backupFilePath(%q) allowed traversal or non-backup file", name)
}
}
- path, err := svc.backupFilePath("mmtl_20260611_010203.db")
+ path, err := svc.backupFilePath("mebox_20260611_010203.db")
if err != nil {
t.Fatalf("backupFilePath(valid) = %v", err)
}
diff --git a/internal/service/service.go b/internal/service/service.go
index ae81a04..af8329d 100644
--- a/internal/service/service.go
+++ b/internal/service/service.go
@@ -1,4 +1,4 @@
-// Package service 包含 MMTL 的业务逻辑。
+// Package service 包含 MeBox 的业务逻辑。
// Handler 反序列化 HTTP 请求,调用 Service 方法,然后序列化响应。
// Services 拥有所有横切策略(认证、扫描、转码等)且不直接处理 HTTP 类型。
package service
@@ -9,8 +9,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// Container 持有在启动时初始化的每个服务。Handler 接收指向它的指针并选择相关字段。
diff --git a/internal/service/service_builder.go b/internal/service/service_builder.go
index 69411c6..a86fcbb 100644
--- a/internal/service/service_builder.go
+++ b/internal/service/service_builder.go
@@ -7,9 +7,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
type serviceContainerBuilder struct {
diff --git a/internal/service/service_builder_library_roots_test.go b/internal/service/service_builder_library_roots_test.go
index 3c10a96..2b52daf 100644
--- a/internal/service/service_builder_library_roots_test.go
+++ b/internal/service/service_builder_library_roots_test.go
@@ -4,8 +4,8 @@ import (
"path/filepath"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestServiceBuilderLibraryRootsIncludesAllEnabledRoots(t *testing.T) {
diff --git a/internal/service/service_library_normalize.go b/internal/service/service_library_normalize.go
index fbda877..738ea51 100644
--- a/internal/service/service_library_normalize.go
+++ b/internal/service/service_library_normalize.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (c *Container) NormalizeLocalLibraryPaths(ctx context.Context) error {
diff --git a/internal/service/service_library_normalize_test.go b/internal/service/service_library_normalize_test.go
index df9133f..c4818f5 100644
--- a/internal/service/service_library_normalize_test.go
+++ b/internal/service/service_library_normalize_test.go
@@ -5,8 +5,8 @@ import (
"path/filepath"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestNormalizeLocalLibraryPathsRewritesRelativeDockerMediaRoot(t *testing.T) {
@@ -16,7 +16,7 @@ func TestNormalizeLocalLibraryPathsRewritesRelativeDockerMediaRoot(t *testing.T)
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatal(err)
}
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerRoot)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerRoot)
db := newServiceTestDB(t, &model.Library{}, &model.LibraryRoot{}, &model.Media{})
repos := repository.New(db)
diff --git a/internal/service/service_search_warmup.go b/internal/service/service_search_warmup.go
index df1c3de..7c68663 100644
--- a/internal/service/service_search_warmup.go
+++ b/internal/service/service_search_warmup.go
@@ -8,7 +8,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
func (c *Container) warmMediaSearchIndex(ctx context.Context) {
diff --git a/internal/service/session_tracker_activity.go b/internal/service/session_tracker_activity.go
index 3088ba2..28a9c0d 100644
--- a/internal/service/session_tracker_activity.go
+++ b/internal/service/session_tracker_activity.go
@@ -5,7 +5,7 @@ import (
"strings"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func (s *SessionTrackerService) ApplyToUsers(ctx context.Context, users []model.User) {
diff --git a/internal/service/session_tracker_test.go b/internal/service/session_tracker_test.go
index a3b5409..2f82b6f 100644
--- a/internal/service/session_tracker_test.go
+++ b/internal/service/session_tracker_test.go
@@ -6,8 +6,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestSessionTrackerAppliesRealtimeActivityToUsers(t *testing.T) {
diff --git a/internal/service/storage.go b/internal/service/storage.go
index 858c798..189d38b 100644
--- a/internal/service/storage.go
+++ b/internal/service/storage.go
@@ -10,7 +10,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
// StorageService is the read-only aggregator.
diff --git a/internal/service/stream_cloud_settings.go b/internal/service/stream_cloud_settings.go
index 72cb27b..bde34d2 100644
--- a/internal/service/stream_cloud_settings.go
+++ b/internal/service/stream_cloud_settings.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/repository"
)
func CloudPlaybackSettings(ctx context.Context, repo *repository.Container) CloudPlaybackOptions {
diff --git a/internal/service/stream_file.go b/internal/service/stream_file.go
index 2576fdc..e720054 100644
--- a/internal/service/stream_file.go
+++ b/internal/service/stream_file.go
@@ -7,8 +7,8 @@ import (
"os"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// ServeFile streams the file backing the given media ID using
diff --git a/internal/service/stream_service.go b/internal/service/stream_service.go
index 3908d35..e44d6ea 100644
--- a/internal/service/stream_service.go
+++ b/internal/service/stream_service.go
@@ -6,8 +6,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
const (
diff --git a/internal/service/stream_test.go b/internal/service/stream_test.go
index d623a82..ae3c4d3 100644
--- a/internal/service/stream_test.go
+++ b/internal/service/stream_test.go
@@ -10,9 +10,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestWithAuthTokenPropagatesToInternalRedirect(t *testing.T) {
diff --git a/internal/service/strm_115_oauth.go b/internal/service/strm_115_oauth.go
index d590fc9..435f9a3 100644
--- a/internal/service/strm_115_oauth.go
+++ b/internal/service/strm_115_oauth.go
@@ -19,8 +19,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// strm115RelayKeySetting 是中继授权共享 AES 密钥的设置键。
diff --git a/internal/service/strm_115_oauth_test.go b/internal/service/strm_115_oauth_test.go
index 40a1f86..041f770 100644
--- a/internal/service/strm_115_oauth_test.go
+++ b/internal/service/strm_115_oauth_test.go
@@ -8,8 +8,8 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// Test115OAuthQRFlow 用 mock 的 115 开放平台接口走完设备码扫码授权:
diff --git a/internal/service/strm_account_test.go b/internal/service/strm_account_test.go
index 1e7640d..25da9de 100644
--- a/internal/service/strm_account_test.go
+++ b/internal/service/strm_account_test.go
@@ -5,7 +5,7 @@ import (
"encoding/json"
"testing"
- "github.com/ShukeBta/MMTL/internal/model"
+ "github.com/truewhile/MeBox/internal/model"
)
func TestStrmAccountConfigPreviewOf(t *testing.T) {
diff --git a/internal/service/strm_play.go b/internal/service/strm_play.go
index 445ffa7..61f3803 100644
--- a/internal/service/strm_play.go
+++ b/internal/service/strm_play.go
@@ -14,8 +14,8 @@ import (
"path/filepath"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud"
)
// ErrStrmPlayNotFound 表示 strm 播放目标不存在(handler 返回 404)。
diff --git a/internal/service/strm_queue.go b/internal/service/strm_queue.go
index 182d471..b656e62 100644
--- a/internal/service/strm_queue.go
+++ b/internal/service/strm_queue.go
@@ -18,9 +18,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
const (
diff --git a/internal/service/strm_queue_test.go b/internal/service/strm_queue_test.go
index a0474a2..9e17620 100644
--- a/internal/service/strm_queue_test.go
+++ b/internal/service/strm_queue_test.go
@@ -6,8 +6,8 @@ import (
"testing"
"time"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
"go.uber.org/zap"
)
diff --git a/internal/service/strm_service.go b/internal/service/strm_service.go
index 8095c58..d04e43c 100644
--- a/internal/service/strm_service.go
+++ b/internal/service/strm_service.go
@@ -23,10 +23,10 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service/cloud"
)
// strm 全局设置键(存于 Setting 表,strm.* 前缀)。
@@ -756,7 +756,7 @@ var StrmProviderLabels = map[string]string{
model.StrmProviderEmbyRemote: "Emby 远程挂载",
}
-const defaultStrmUA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36 MMTL-Strm/1.0"
+const defaultStrmUA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36 MeBox-Strm/1.0"
// ensureLocalDir 创建本地输出目录。
func ensureLocalDir(dir string) error {
diff --git a/internal/service/strm_sync.go b/internal/service/strm_sync.go
index e3af7ef..85fd59b 100644
--- a/internal/service/strm_sync.go
+++ b/internal/service/strm_sync.go
@@ -18,9 +18,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// strmSyncState 是一次同步执行的上下文。
diff --git a/internal/service/strm_sync_test.go b/internal/service/strm_sync_test.go
index 01cd509..0d62a1d 100644
--- a/internal/service/strm_sync_test.go
+++ b/internal/service/strm_sync_test.go
@@ -18,11 +18,11 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
- "github.com/ShukeBta/MMTL/internal/service/cloud"
- "github.com/ShukeBta/MMTL/internal/service/cloud115"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
+ "github.com/truewhile/MeBox/internal/service/cloud"
+ "github.com/truewhile/MeBox/internal/service/cloud115"
)
// testStrmService 构建带内存库的 StrmService。
diff --git a/internal/service/subtitle.go b/internal/service/subtitle.go
index 2463a46..32b10ae 100644
--- a/internal/service/subtitle.go
+++ b/internal/service/subtitle.go
@@ -26,8 +26,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// SubtitleService is the discovery + conversion entry point.
diff --git a/internal/service/subtitle_test.go b/internal/service/subtitle_test.go
index 1643cae..bfb5236 100644
--- a/internal/service/subtitle_test.go
+++ b/internal/service/subtitle_test.go
@@ -10,9 +10,9 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestSubtitleDiscoverNoTracksReturnsEmptySlice(t *testing.T) {
diff --git a/internal/service/system_update.go b/internal/service/system_update.go
index 1ddd7a4..36ceedd 100644
--- a/internal/service/system_update.go
+++ b/internal/service/system_update.go
@@ -10,8 +10,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
const (
@@ -20,7 +20,7 @@ const (
SystemUpdateCommandSettingKey = "system.update.command"
SystemUpdateComposeDirSettingKey = "system.update.compose_dir"
- DefaultSystemUpdateImage = "ghcr.io/truewhile/mmtl:latest"
+ DefaultSystemUpdateImage = "ghcr.io/truewhile/mebox:latest"
DefaultSystemUpdateWatchtowerImage = "containrrr/watchtower:latest"
)
@@ -198,11 +198,11 @@ func (s *SystemUpdateService) startUpdateTask(status SystemUpdateStatus) *TaskHa
}
func (s *SystemUpdateService) baseStatus(ctx context.Context) SystemUpdateStatus {
- image := s.setting(ctx, SystemUpdateImageSettingKey, os.Getenv("MMTL_UPDATE_IMAGE"))
+ image := s.setting(ctx, SystemUpdateImageSettingKey, os.Getenv("MEBOX_UPDATE_IMAGE"))
if image == "" {
image = DefaultSystemUpdateImage
}
- watchtowerImage := s.setting(ctx, SystemUpdateWatchtowerImageSettingKey, os.Getenv("MMTL_UPDATE_WATCHTOWER_IMAGE"))
+ watchtowerImage := s.setting(ctx, SystemUpdateWatchtowerImageSettingKey, os.Getenv("MEBOX_UPDATE_WATCHTOWER_IMAGE"))
if watchtowerImage == "" {
watchtowerImage = DefaultSystemUpdateWatchtowerImage
}
diff --git a/internal/service/system_update_command.go b/internal/service/system_update_command.go
index a27bafd..fe626c3 100644
--- a/internal/service/system_update_command.go
+++ b/internal/service/system_update_command.go
@@ -19,7 +19,7 @@ func (s *SystemUpdateService) updateCommand(ctx context.Context, status SystemUp
}
func (s *SystemUpdateService) rawUpdateCommand(ctx context.Context) string {
- return s.setting(ctx, SystemUpdateCommandSettingKey, os.Getenv("MMTL_UPDATE_COMMAND"))
+ return s.setting(ctx, SystemUpdateCommandSettingKey, os.Getenv("MEBOX_UPDATE_COMMAND"))
}
func defaultSystemUpdateCommand() string {
@@ -33,7 +33,7 @@ func renderSystemUpdateCommand(template string, status SystemUpdateStatus) strin
"{{compose_dir}}": shellQuote(status.ComposeDir),
"{{compose_file}}": shellQuote(status.ComposeFile),
"{{compose_command}}": firstNonEmpty(status.ComposeCommand, "docker compose"),
- "{{container}}": shellQuote(firstNonEmpty(status.ContainerName, status.ContainerID, "mmtl")),
+ "{{container}}": shellQuote(firstNonEmpty(status.ContainerName, status.ContainerID, "mebox")),
"{{container_id}}": shellQuote(status.ContainerID),
"{{container_name}}": shellQuote(status.ContainerName),
}
diff --git a/internal/service/system_update_compose.go b/internal/service/system_update_compose.go
index 2172ba9..927e66f 100644
--- a/internal/service/system_update_compose.go
+++ b/internal/service/system_update_compose.go
@@ -32,7 +32,7 @@ func (s *SystemUpdateService) resolveComposeTarget(ctx context.Context) (systemU
}
func (s *SystemUpdateService) composeTargetFromConfiguredDir(ctx context.Context) systemUpdateComposeTarget {
- configured := s.setting(ctx, SystemUpdateComposeDirSettingKey, firstNonEmpty(os.Getenv("MMTL_UPDATE_COMPOSE_DIR"), os.Getenv("MMTL_UPDATE_WORKDIR")))
+ configured := s.setting(ctx, SystemUpdateComposeDirSettingKey, firstNonEmpty(os.Getenv("MEBOX_UPDATE_COMPOSE_DIR"), os.Getenv("MEBOX_UPDATE_WORKDIR")))
return composeTargetInDir(configured)
}
@@ -143,7 +143,7 @@ func composeFileMatches(file string) bool {
return false
}
content := strings.ToLower(string(raw))
- return strings.Contains(content, "mmtl") || strings.Contains(content, strings.ToLower(DefaultSystemUpdateImage))
+ return strings.Contains(content, "mebox") || strings.Contains(content, strings.ToLower(DefaultSystemUpdateImage))
}
func preferredComposeCommand() string {
diff --git a/internal/service/system_update_docker.go b/internal/service/system_update_docker.go
index 1fe9180..04ea86c 100644
--- a/internal/service/system_update_docker.go
+++ b/internal/service/system_update_docker.go
@@ -70,7 +70,7 @@ func (s *SystemUpdateService) check(ctx context.Context) SystemUpdateStatus {
status.ContainerID = containerID
if containerID == "" {
if status.CanApply {
- status.Message = "已识别 Docker Compose 安装目录;无法识别当前容器 ID,将使用默认容器名 mmtl 重启"
+ status.Message = "已识别 Docker Compose 安装目录;无法识别当前容器 ID,将使用默认容器名 mebox 重启"
}
return status
}
diff --git a/internal/service/system_update_test.go b/internal/service/system_update_test.go
index eacfaaf..0f0aef1 100644
--- a/internal/service/system_update_test.go
+++ b/internal/service/system_update_test.go
@@ -10,10 +10,10 @@ import (
func TestRenderSystemUpdateCommand(t *testing.T) {
status := SystemUpdateStatus{
- Image: "ghcr.io/truewhile/mmtl:latest",
+ Image: "ghcr.io/truewhile/mebox:latest",
WatchtowerImage: "containrrr/watchtower:latest",
ContainerID: "abc123def456",
- ContainerName: "mmtl",
+ ContainerName: "mebox",
}
got := renderSystemUpdateCommand(
@@ -27,8 +27,8 @@ func TestRenderSystemUpdateCommand(t *testing.T) {
}
for _, want := range []string{
"containrrr/watchtower:latest",
- "mmtl",
- "ghcr.io/truewhile/mmtl:latest",
+ "mebox",
+ "ghcr.io/truewhile/mebox:latest",
"abc123def456",
} {
if !strings.Contains(got, want) {
@@ -39,17 +39,17 @@ func TestRenderSystemUpdateCommand(t *testing.T) {
func TestDefaultSystemUpdateCommandUsesCompose(t *testing.T) {
status := SystemUpdateStatus{
- ComposeDir: "/opt/mmtl",
+ ComposeDir: "/opt/mebox",
ComposeCommand: "docker compose",
- ContainerName: "mmtl",
+ ContainerName: "mebox",
}
got := renderSystemUpdateCommand(defaultSystemUpdateCommand(), status)
for _, want := range []string{
- "cd " + shellQuote("/opt/mmtl"),
+ "cd " + shellQuote("/opt/mebox"),
"docker compose pull",
"docker compose up -d",
"docker image prune -f",
- "docker restart " + shellQuote("mmtl"),
+ "docker restart " + shellQuote("mebox"),
} {
if !strings.Contains(got, want) {
t.Fatalf("default command %q does not contain %q", got, want)
@@ -60,12 +60,12 @@ func TestDefaultSystemUpdateCommandUsesCompose(t *testing.T) {
}
}
-func TestComposeTargetInDirMatchesMMTLCompose(t *testing.T) {
+func TestComposeTargetInDirMatchesMeBoxCompose(t *testing.T) {
dir := t.TempDir()
if err := os.WriteFile(filepath.Join(dir, "docker-compose.yml"), []byte(`
services:
- mmtl:
- image: ghcr.io/truewhile/mmtl:latest
+ mebox:
+ image: ghcr.io/truewhile/mebox:latest
`), 0o600); err != nil {
t.Fatal(err)
}
@@ -90,8 +90,8 @@ services:
}
func TestParseContainerInspectLine(t *testing.T) {
- name, imageID := parseContainerInspectLine("/mmtl|sha256:abc")
- if name != "mmtl" || imageID != "sha256:abc" {
+ name, imageID := parseContainerInspectLine("/mebox|sha256:abc")
+ if name != "mebox" || imageID != "sha256:abc" {
t.Fatalf("parse inspect line = %q %q", name, imageID)
}
@@ -155,11 +155,11 @@ func TestSystemUpdateOutputDetailsKeepsTail(t *testing.T) {
}
func TestSystemUpdateStatusIncludesCurrentVersion(t *testing.T) {
- svc := NewSystemUpdateService(nil, nil, nil, nil, "MMTL-v0.0.99")
+ svc := NewSystemUpdateService(nil, nil, nil, nil, "MeBox-v0.0.99")
status := svc.Status(context.Background())
- if status.CurrentVersion != "MMTL-v0.0.99" {
- t.Fatalf("current_version = %q, want MMTL-v0.0.99", status.CurrentVersion)
+ if status.CurrentVersion != "MeBox-v0.0.99" {
+ t.Fatalf("current_version = %q, want MeBox-v0.0.99", status.CurrentVersion)
}
}
diff --git a/internal/service/thetvdb.go b/internal/service/thetvdb.go
index c3a74cd..9eaa9e4 100644
--- a/internal/service/thetvdb.go
+++ b/internal/service/thetvdb.go
@@ -24,7 +24,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// TheTVDBProvider talks to https://api4.thetvdb.com/v4.
diff --git a/internal/service/tmdb.go b/internal/service/tmdb.go
index e75368c..1ad6d4b 100644
--- a/internal/service/tmdb.go
+++ b/internal/service/tmdb.go
@@ -24,7 +24,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
// TMDbProvider talks to https://api.themoviedb.org/3.
diff --git a/internal/service/tmdb_chinese_title_test.go b/internal/service/tmdb_chinese_title_test.go
index 8ac91a0..1f1c79e 100644
--- a/internal/service/tmdb_chinese_title_test.go
+++ b/internal/service/tmdb_chinese_title_test.go
@@ -9,7 +9,7 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestApplyTMDbChineseTitlePrefersMainlandAlternative(t *testing.T) {
diff --git a/internal/service/token_svc.go b/internal/service/token_svc.go
index 9b3ceb1..72c8969 100644
--- a/internal/service/token_svc.go
+++ b/internal/service/token_svc.go
@@ -12,9 +12,9 @@ import (
"github.com/golang-jwt/jwt/v5"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
const (
@@ -150,7 +150,7 @@ func (s *TokenService) issueAccessToken(userID, role, tier string) (string, erro
RegisteredClaims: jwt.RegisteredClaims{
IssuedAt: jwt.NewNumericDate(time.Now()),
ExpiresAt: jwt.NewNumericDate(time.Now().Add(AccessTokenDuration)),
- Issuer: "mmtl",
+ Issuer: "mebox",
Subject: userID,
},
}
diff --git a/internal/service/token_svc_pending.go b/internal/service/token_svc_pending.go
index 2ca62aa..c2eaf09 100644
--- a/internal/service/token_svc_pending.go
+++ b/internal/service/token_svc_pending.go
@@ -7,8 +7,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
const loginRefreshTokenStoreTimeout = 750 * time.Millisecond
diff --git a/internal/service/token_svc_pending_test.go b/internal/service/token_svc_pending_test.go
index 6668f4e..6060c4a 100644
--- a/internal/service/token_svc_pending_test.go
+++ b/internal/service/token_svc_pending_test.go
@@ -6,9 +6,9 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func newTokenTestRepo(t *testing.T) *repository.Container {
diff --git a/internal/service/transcoder.go b/internal/service/transcoder.go
index b9bfc2d..cfac991 100644
--- a/internal/service/transcoder.go
+++ b/internal/service/transcoder.go
@@ -32,8 +32,8 @@ import (
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/config"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/config"
+ "github.com/truewhile/MeBox/internal/repository"
)
// TranscoderService orchestrates background ffmpeg transcodes.
diff --git a/internal/service/transcoder_ffmpeg_args.go b/internal/service/transcoder_ffmpeg_args.go
index 1ffb629..318b3d7 100644
--- a/internal/service/transcoder_ffmpeg_args.go
+++ b/internal/service/transcoder_ffmpeg_args.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strconv"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
type ffmpegArgSettings struct {
diff --git a/internal/service/transcoder_test.go b/internal/service/transcoder_test.go
index f201df4..fea28d9 100644
--- a/internal/service/transcoder_test.go
+++ b/internal/service/transcoder_test.go
@@ -4,7 +4,7 @@ import (
"strings"
"testing"
- "github.com/ShukeBta/MMTL/internal/config"
+ "github.com/truewhile/MeBox/internal/config"
)
func TestBuildFFmpegArgs(t *testing.T) {
diff --git a/internal/service/visibility.go b/internal/service/visibility.go
index 508fe74..29689f3 100644
--- a/internal/service/visibility.go
+++ b/internal/service/visibility.go
@@ -5,8 +5,8 @@ import (
"encoding/json"
"strings"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
const AdultLibraryIDsSettingKey = "adult.library_ids"
diff --git a/internal/service/watcher.go b/internal/service/watcher.go
index b49bc38..e72b14b 100644
--- a/internal/service/watcher.go
+++ b/internal/service/watcher.go
@@ -22,8 +22,8 @@ import (
"github.com/fsnotify/fsnotify"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
// pendingEvent records the most recent change to a path and the library it
diff --git a/internal/service/watcher_test.go b/internal/service/watcher_test.go
index abc7cbb..1ed55b3 100644
--- a/internal/service/watcher_test.go
+++ b/internal/service/watcher_test.go
@@ -8,8 +8,8 @@ import (
"github.com/fsnotify/fsnotify"
"go.uber.org/zap"
- "github.com/ShukeBta/MMTL/internal/model"
- "github.com/ShukeBta/MMTL/internal/repository"
+ "github.com/truewhile/MeBox/internal/model"
+ "github.com/truewhile/MeBox/internal/repository"
)
func TestWatcherRefreshMapsHostLibraryPathToContainerPath(t *testing.T) {
@@ -20,8 +20,8 @@ func TestWatcherRefreshMapsHostLibraryPathToContainerPath(t *testing.T) {
if err := os.MkdirAll(containerLibrary, 0o755); err != nil {
t.Fatalf("mkdir container library: %v", err)
}
- t.Setenv("MMTL_MEDIA_DIR", hostMedia)
- t.Setenv("MMTL_MEDIA_CONTAINER_DIR", containerMedia)
+ t.Setenv("MEBOX_MEDIA_DIR", hostMedia)
+ t.Setenv("MEBOX_MEDIA_CONTAINER_DIR", containerMedia)
db := newServiceTestDB(t, &model.Library{})
repos := repository.New(db)
diff --git a/web/index.html b/web/index.html
index 948f2b0..55c74d7 100644
--- a/web/index.html
+++ b/web/index.html
@@ -4,7 +4,7 @@
-
+
@@ -14,7 +14,7 @@
href="https://fonts.googleapis.com/css2?family=Cabinet+Grotesk:wght@400;500;600;700;800&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
rel="stylesheet"
/>
- MMTL
+ MeBox
diff --git a/web/package-lock.json b/web/package-lock.json
index c0d8dc8..578c230 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "mmtl-web",
+ "name": "mebox-web",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "mmtl-web",
+ "name": "mebox-web",
"version": "0.1.0",
"dependencies": {
"axios": "^1.7.2",
diff --git a/web/package.json b/web/package.json
index 1a128de..8804d70 100644
--- a/web/package.json
+++ b/web/package.json
@@ -1,5 +1,5 @@
{
- "name": "mmtl-web",
+ "name": "mebox-web",
"private": true,
"version": "0.1.0",
"type": "module",
diff --git a/web/public/artwork-cache-sw.js b/web/public/artwork-cache-sw.js
index fef4a5c..85333a8 100644
--- a/web/public/artwork-cache-sw.js
+++ b/web/public/artwork-cache-sw.js
@@ -1,4 +1,4 @@
-const ARTWORK_CACHE_PREFIX = 'mmtl-artwork-'
+const ARTWORK_CACHE_PREFIX = 'mebox-artwork-'
const ARTWORK_CACHE = `${ARTWORK_CACHE_PREFIX}v2`
const MIN_CACHEABLE_ARTWORK_BYTES = 128
const STRIP_QUERY_KEYS = ['token', 'profile_id', 'profile_pin_token']
diff --git a/web/public/brand/logo-192.png b/web/public/brand/logo-192.png
index 674b950..99411a9 100644
Binary files a/web/public/brand/logo-192.png and b/web/public/brand/logo-192.png differ
diff --git a/web/public/brand/logo-512.png b/web/public/brand/logo-512.png
index 7daa368..ac89c6f 100644
Binary files a/web/public/brand/logo-512.png and b/web/public/brand/logo-512.png differ
diff --git a/web/public/brand/logo-64.png b/web/public/brand/logo-64.png
index bc847c4..e174fb6 100644
Binary files a/web/public/brand/logo-64.png and b/web/public/brand/logo-64.png differ
diff --git a/web/public/brand/logo-full.png b/web/public/brand/logo-full.png
new file mode 100644
index 0000000..c182fb7
Binary files /dev/null and b/web/public/brand/logo-full.png differ
diff --git a/web/public/brand/logo.png b/web/public/brand/logo.png
index a19a8b2..ac89c6f 100644
Binary files a/web/public/brand/logo.png and b/web/public/brand/logo.png differ
diff --git a/web/public/brand/logo.svg b/web/public/brand/logo.svg
index cee18e6..90dce63 100644
--- a/web/public/brand/logo.svg
+++ b/web/public/brand/logo.svg
@@ -1,3 +1 @@
-
+
\ No newline at end of file
diff --git a/web/public/brand/mediastationgo-logo.svg b/web/public/brand/mediastationgo-logo.svg
index cee18e6..ee184a6 100644
--- a/web/public/brand/mediastationgo-logo.svg
+++ b/web/public/brand/mediastationgo-logo.svg
@@ -1,3 +1,3 @@
-