Browse Source

修复视频列表扫描的时候,如果开启 Emby ,原有代码固定刷新 100W 数据,但是在 EmbyAPI Check 的时候因为限制是 5W 所以强制被重置 MaxNumber 到 50. 现在统一为 100W 的最大值

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
116d1b2d4d

+ 3 - 3
internal/pkg/video_scan_and_refresh_helper/video_scan_and_refresh_helper.go

@@ -209,9 +209,9 @@ func (v *VideoScanAndRefreshHelper) ScanNormalMovieAndSeries() (*ScanVideoResult
 func (v *VideoScanAndRefreshHelper) ScanEmbyMovieAndSeries(scanVideoResult *ScanVideoResult) error {
 
 	defer func() {
-		v.log.Infoln("ScanNormalMovieAndSeries End")
+		v.log.Infoln("ScanEmbyMovieAndSeries End")
 	}()
-	v.log.Infoln("ScanNormalMovieAndSeries Start...")
+	v.log.Infoln("ScanEmbyMovieAndSeries Start...")
 
 	if v.settings.EmbySettings.Enable == false {
 		v.embyHelper = nil
@@ -223,7 +223,7 @@ func (v *VideoScanAndRefreshHelper) ScanEmbyMovieAndSeries(scanVideoResult *Scan
 			v.log.Infoln("Forced Scan And DownSub, tmpSetting.EmbySettings.MaxRequestVideoNumber = 1000000")
 			// 如果是强制,那么就临时修改 Setting 的 Emby MaxRequestVideoNumber 参数为 1000000
 			tmpSetting := clone.Clone(v.settings).(*settings.Settings)
-			tmpSetting.EmbySettings.MaxRequestVideoNumber = 1000000
+			tmpSetting.EmbySettings.MaxRequestVideoNumber = common.EmbyApiGetItemsLimitMax
 			v.embyHelper = embyHelper.NewEmbyHelper(v.log, tmpSetting)
 		} else {
 			v.log.Infoln("Not Forced Scan And DownSub")

+ 1 - 1
internal/types/common/constvalue.go

@@ -10,7 +10,7 @@ const OneSeriesProcessTimeOut = 30 * 60             // 一部连续剧,最多
 const ScanPlayedSubTimeOut = 60 * 60                // 扫描已经播放的字幕进行缓存的时间
 const DownloadSubsPerSite = 1                       // 默认,每个网站下载一个字幕,允许额外传参调整
 const EmbyApiGetItemsLimitMin = 50
-const EmbyApiGetItemsLimitMax = 50000
+const EmbyApiGetItemsLimitMax = 1000000
 
 const (
 	SubSiteZiMuKu  = "zimuku"