We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a46f0e commit 3ce3dc4Copy full SHA for 3ce3dc4
1 file changed
internal/media/scraper/tmdb.go
@@ -6,6 +6,7 @@ import (
6
"io"
7
"net/http"
8
"net/url"
9
+ stdpath "path"
10
"regexp"
11
"sort"
12
"strings"
@@ -1377,8 +1378,15 @@ func (s *TMDBScraper) ScrapeVideo(item *model.MediaItem) error {
1377
1378
if title == "" {
1379
title = first.Name
1380
}
- if item.ScrapedName == "" {
1381
- item.ScrapedName = title
+ // ScrapedName 处理:
1382
+ // - 扫描阶段会把「去扩展名的文件名」作为默认占位写入 ScrapedName,
1383
+ // 这种占位值应该被刮削得到的真实标题覆盖;
1384
+ // - 用户手动编辑过的 ScrapedName 不会等于该占位值,保留不覆盖。
1385
+ if title != "" {
1386
+ defaultName := strings.TrimSuffix(item.FileName, stdpath.Ext(item.FileName))
1387
+ if item.ScrapedName == "" || item.ScrapedName == defaultName {
1388
+ item.ScrapedName = title
1389
+ }
1390
1391
if item.Plot == "" {
1392
item.Plot = detail.Overview
0 commit comments