diff --git a/README.md b/README.md index 5b08479..928d5cb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ - **图片 / 视频 / 音频**:扫描当前目录(递归),自动识别图片、视频与音频文件 - **标准分辨率归类**:720P、1080P、2K、2.5K、影院 2K、DCI 4K、8K 及带鱼屏(UltraWide 2K/3K/4K)等标准规格单独建目录 -- **非标分辨率归类**:按像素区间自动归入 1K ~ 9K / 普通 / 原图(原画质)目录 +- **非标分辨率归类**:按像素区间(每 1024px 一档)自动归入 1K ~ 19K / 普通 / 原图(原画质)目录 - **方向区分**:横屏、竖屏、等比(正方形)分开整理,GIF 单独处理 - **音频归类**:音频文件单独归入「音频」目录 - **异常兜底**:读取失败、不支持的格式自动归入「读取异常」「已忽略」目录 @@ -65,10 +65,10 @@ kenaito-media-picker.exe {uid}-图片_横屏_4KP ← 3840×2160 {uid}-图片_横屏_4KHP ← 4096×2160(DCI 4K) {uid}-图片_横屏_8KP ← 7680×4320 -{uid}-图片_横屏_1K ~ 9K ← 非标规格按像素区间 -{uid}-图片_横屏_普通 ← 像素不足 1000 -{uid}-图片_横屏_原图 ← 像素 ≥ 10000 -{uid}-图片_竖屏_... ← 竖屏按同样规则(普通 / 1K~9K / 原图) +{uid}-图片_横屏_1K ~ 19K ← 非标规格按像素区间(每 1024px 一档) +{uid}-图片_横屏_普通 ← 像素不足 1024 +{uid}-图片_横屏_原图 ← 像素 ≥ 20480 +{uid}-图片_竖屏_... ← 竖屏按同样规则(普通 / 1K~19K / 原图) {uid}-图片_等比_... ← 等比(正方形)按同样规则 {uid}-图片_GIF ← 所有 GIF 图片 {uid}-图片_PSD ← 所有 PSD 文件 @@ -81,9 +81,9 @@ kenaito-media-picker.exe ```text {uid}-视频_横屏_720P / 1080P / 2DKP / 2D5KP / 4KP / 4KHP / 8KP {uid}-视频_横屏_UltraWide2KP / UltraWide3KP / UltraWide4KP -{uid}-视频_横屏_1k ~ 9k / 普通 / 原画质 -{uid}-视频_竖屏_1k ~ 9k / 普通 / 原画质 -{uid}-视频_等比_1k ~ 9k / 普通 / 原画质 +{uid}-视频_横屏_1k ~ 19k / 普通 / 原画质 +{uid}-视频_竖屏_1k ~ 19k / 普通 / 原画质 +{uid}-视频_等比_1k ~ 19k / 普通 / 原画质 {uid}-视频_横屏_GIF / 视频_竖屏_GIF / 视频_等比_GIF 音频 ← 所有音频文件(ffmpeg 可识别的格式) 视频_读取异常 ← mime 为视频但 ffprobe 读取失败 diff --git a/core/handle_image.go b/core/handle_image.go index 85d15f1..a2a95fe 100644 --- a/core/handle_image.go +++ b/core/handle_image.go @@ -154,27 +154,47 @@ func handleGifImage(path string) { // 处理垂直图片 func handleVerticalImage(currentImagePath string, height int) { // 非标规格 - if height < 1000 { + if height < 1024 { vars.ImageVerticalNormalList = append(vars.ImageVerticalNormalList, currentImagePath) - } else if height < 2000 { + } else if height < 2048 { vars.ImageVertical1KList = append(vars.ImageVertical1KList, currentImagePath) - } else if height < 3000 { + } else if height < 3072 { vars.ImageVertical2KList = append(vars.ImageVertical2KList, currentImagePath) - } else if height < 4000 { + } else if height < 4096 { vars.ImageVertical3KList = append(vars.ImageVertical3KList, currentImagePath) - } else if height < 5000 { + } else if height < 5120 { vars.ImageVertical4KList = append(vars.ImageVertical4KList, currentImagePath) - } else if height < 6000 { + } else if height < 6144 { vars.ImageVertical5KList = append(vars.ImageVertical5KList, currentImagePath) - } else if height < 7000 { + } else if height < 7168 { vars.ImageVertical6KList = append(vars.ImageVertical6KList, currentImagePath) - } else if height < 8000 { + } else if height < 8192 { vars.ImageVertical7KList = append(vars.ImageVertical7KList, currentImagePath) - } else if height < 9000 { + } else if height < 9216 { vars.ImageVertical8KList = append(vars.ImageVertical8KList, currentImagePath) - } else if height < 10000 { + } else if height < 10240 { vars.ImageVertical9KList = append(vars.ImageVertical9KList, currentImagePath) - } else if height >= 10000 { // 提示请忽略 + } else if height < 11264 { + vars.ImageVertical10KList = append(vars.ImageVertical10KList, currentImagePath) + } else if height < 12288 { + vars.ImageVertical11KList = append(vars.ImageVertical11KList, currentImagePath) + } else if height < 13312 { + vars.ImageVertical12KList = append(vars.ImageVertical12KList, currentImagePath) + } else if height < 14336 { + vars.ImageVertical13KList = append(vars.ImageVertical13KList, currentImagePath) + } else if height < 15360 { + vars.ImageVertical14KList = append(vars.ImageVertical14KList, currentImagePath) + } else if height < 16384 { + vars.ImageVertical15KList = append(vars.ImageVertical15KList, currentImagePath) + } else if height < 17408 { + vars.ImageVertical16KList = append(vars.ImageVertical16KList, currentImagePath) + } else if height < 18432 { + vars.ImageVertical17KList = append(vars.ImageVertical17KList, currentImagePath) + } else if height < 19456 { + vars.ImageVertical18KList = append(vars.ImageVertical18KList, currentImagePath) + } else if height < 20480 { + vars.ImageVertical19KList = append(vars.ImageVertical19KList, currentImagePath) + } else if height >= 20480 { // 提示请忽略 vars.ImageVerticalHKList = append(vars.ImageVerticalHKList, currentImagePath) } } @@ -237,27 +257,47 @@ func handleHorizontalImage(currentImagePath string, width int, height int) { return } // 非标规格 - if width < 1000 { + if width < 1024 { vars.ImageHorizontalNormalList = append(vars.ImageHorizontalNormalList, currentImagePath) - } else if width < 2000 { + } else if width < 2048 { vars.ImageHorizontal1KList = append(vars.ImageHorizontal1KList, currentImagePath) - } else if width < 3000 { + } else if width < 3072 { vars.ImageHorizontal2KList = append(vars.ImageHorizontal2KList, currentImagePath) - } else if width < 4000 { + } else if width < 4096 { vars.ImageHorizontal3KList = append(vars.ImageHorizontal3KList, currentImagePath) - } else if width < 5000 { + } else if width < 5120 { vars.ImageHorizontal4KList = append(vars.ImageHorizontal4KList, currentImagePath) - } else if width < 6000 { + } else if width < 6144 { vars.ImageHorizontal5KList = append(vars.ImageHorizontal5KList, currentImagePath) - } else if width < 7000 { + } else if width < 7168 { vars.ImageHorizontal6KList = append(vars.ImageHorizontal6KList, currentImagePath) - } else if width < 8000 { + } else if width < 8192 { vars.ImageHorizontal7KList = append(vars.ImageHorizontal7KList, currentImagePath) - } else if width < 9000 { + } else if width < 9216 { vars.ImageHorizontal8KList = append(vars.ImageHorizontal8KList, currentImagePath) - } else if width < 10000 { + } else if width < 10240 { vars.ImageHorizontal9KList = append(vars.ImageHorizontal9KList, currentImagePath) - } else if width >= 10000 { // 提示请忽略 + } else if width < 11264 { + vars.ImageHorizontal10KList = append(vars.ImageHorizontal10KList, currentImagePath) + } else if width < 12288 { + vars.ImageHorizontal11KList = append(vars.ImageHorizontal11KList, currentImagePath) + } else if width < 13312 { + vars.ImageHorizontal12KList = append(vars.ImageHorizontal12KList, currentImagePath) + } else if width < 14336 { + vars.ImageHorizontal13KList = append(vars.ImageHorizontal13KList, currentImagePath) + } else if width < 15360 { + vars.ImageHorizontal14KList = append(vars.ImageHorizontal14KList, currentImagePath) + } else if width < 16384 { + vars.ImageHorizontal15KList = append(vars.ImageHorizontal15KList, currentImagePath) + } else if width < 17408 { + vars.ImageHorizontal16KList = append(vars.ImageHorizontal16KList, currentImagePath) + } else if width < 18432 { + vars.ImageHorizontal17KList = append(vars.ImageHorizontal17KList, currentImagePath) + } else if width < 19456 { + vars.ImageHorizontal18KList = append(vars.ImageHorizontal18KList, currentImagePath) + } else if width < 20480 { + vars.ImageHorizontal19KList = append(vars.ImageHorizontal19KList, currentImagePath) + } else if width >= 20480 { // 提示请忽略 vars.ImageHorizontalHKList = append(vars.ImageHorizontalHKList, currentImagePath) } } @@ -265,27 +305,47 @@ func handleHorizontalImage(currentImagePath string, width int, height int) { // 处理等比图片 func handleSquareImage(currentImagePath string, width int) { // 非标规格 - if width < 1000 { + if width < 1024 { vars.ImageSquareNormalList = append(vars.ImageSquareNormalList, currentImagePath) - } else if width < 2000 { + } else if width < 2048 { vars.ImageSquare1KList = append(vars.ImageSquare1KList, currentImagePath) - } else if width < 3000 { + } else if width < 3072 { vars.ImageSquare2KList = append(vars.ImageSquare2KList, currentImagePath) - } else if width < 4000 { + } else if width < 4096 { vars.ImageSquare3KList = append(vars.ImageSquare3KList, currentImagePath) - } else if width < 5000 { + } else if width < 5120 { vars.ImageSquare4KList = append(vars.ImageSquare4KList, currentImagePath) - } else if width < 6000 { + } else if width < 6144 { vars.ImageSquare5KList = append(vars.ImageSquare5KList, currentImagePath) - } else if width < 7000 { + } else if width < 7168 { vars.ImageSquare6KList = append(vars.ImageSquare6KList, currentImagePath) - } else if width < 8000 { + } else if width < 8192 { vars.ImageSquare7KList = append(vars.ImageSquare7KList, currentImagePath) - } else if width < 9000 { + } else if width < 9216 { vars.ImageSquare8KList = append(vars.ImageSquare8KList, currentImagePath) - } else if width < 10000 { + } else if width < 10240 { vars.ImageSquare9KList = append(vars.ImageSquare9KList, currentImagePath) - } else if width >= 10000 { + } else if width < 11264 { + vars.ImageSquare10KList = append(vars.ImageSquare10KList, currentImagePath) + } else if width < 12288 { + vars.ImageSquare11KList = append(vars.ImageSquare11KList, currentImagePath) + } else if width < 13312 { + vars.ImageSquare12KList = append(vars.ImageSquare12KList, currentImagePath) + } else if width < 14336 { + vars.ImageSquare13KList = append(vars.ImageSquare13KList, currentImagePath) + } else if width < 15360 { + vars.ImageSquare14KList = append(vars.ImageSquare14KList, currentImagePath) + } else if width < 16384 { + vars.ImageSquare15KList = append(vars.ImageSquare15KList, currentImagePath) + } else if width < 17408 { + vars.ImageSquare16KList = append(vars.ImageSquare16KList, currentImagePath) + } else if width < 18432 { + vars.ImageSquare17KList = append(vars.ImageSquare17KList, currentImagePath) + } else if width < 19456 { + vars.ImageSquare18KList = append(vars.ImageSquare18KList, currentImagePath) + } else if width < 20480 { + vars.ImageSquare19KList = append(vars.ImageSquare19KList, currentImagePath) + } else if width >= 20480 { vars.ImageSquareHKList = append(vars.ImageSquareHKList, currentImagePath) } } @@ -400,6 +460,56 @@ func moveHorizontalImage(pickerDir string) { util.CreateDir(imageDirPath) util.DoMoveFileToDir(vars.ImageHorizontal9KList, imageDirPath) } + if len(vars.ImageHorizontal10KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_10K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal10KList, imageDirPath) + } + if len(vars.ImageHorizontal11KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_11K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal11KList, imageDirPath) + } + if len(vars.ImageHorizontal12KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_12K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal12KList, imageDirPath) + } + if len(vars.ImageHorizontal13KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_13K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal13KList, imageDirPath) + } + if len(vars.ImageHorizontal14KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_14K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal14KList, imageDirPath) + } + if len(vars.ImageHorizontal15KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_15K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal15KList, imageDirPath) + } + if len(vars.ImageHorizontal16KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_16K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal16KList, imageDirPath) + } + if len(vars.ImageHorizontal17KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_17K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal17KList, imageDirPath) + } + if len(vars.ImageHorizontal18KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_18K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal18KList, imageDirPath) + } + if len(vars.ImageHorizontal19KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_横屏_19K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageHorizontal19KList, imageDirPath) + } if len(vars.ImageHorizontalHKList) > 0 { imageDirPath := pickerDir + pathSeparator + "图片_横屏_原图" util.CreateDir(imageDirPath) @@ -461,6 +571,56 @@ func moveVerticalImage(pickerDir string) { util.CreateDir(imageDirPath) util.DoMoveFileToDir(vars.ImageVertical9KList, imageDirPath) } + if len(vars.ImageVertical10KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_10K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical10KList, imageDirPath) + } + if len(vars.ImageVertical11KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_11K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical11KList, imageDirPath) + } + if len(vars.ImageVertical12KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_12K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical12KList, imageDirPath) + } + if len(vars.ImageVertical13KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_13K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical13KList, imageDirPath) + } + if len(vars.ImageVertical14KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_14K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical14KList, imageDirPath) + } + if len(vars.ImageVertical15KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_15K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical15KList, imageDirPath) + } + if len(vars.ImageVertical16KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_16K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical16KList, imageDirPath) + } + if len(vars.ImageVertical17KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_17K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical17KList, imageDirPath) + } + if len(vars.ImageVertical18KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_18K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical18KList, imageDirPath) + } + if len(vars.ImageVertical19KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_竖屏_19K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageVertical19KList, imageDirPath) + } if len(vars.ImageVerticalHKList) > 0 { imageDirPath := pickerDir + pathSeparator + "图片_竖屏_原图" util.CreateDir(imageDirPath) @@ -522,6 +682,56 @@ func moveSquareImage(pickerDir string) { util.CreateDir(imageDirPath) util.DoMoveFileToDir(vars.ImageSquare9KList, imageDirPath) } + if len(vars.ImageSquare10KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_10K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare10KList, imageDirPath) + } + if len(vars.ImageSquare11KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_11K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare11KList, imageDirPath) + } + if len(vars.ImageSquare12KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_12K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare12KList, imageDirPath) + } + if len(vars.ImageSquare13KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_13K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare13KList, imageDirPath) + } + if len(vars.ImageSquare14KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_14K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare14KList, imageDirPath) + } + if len(vars.ImageSquare15KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_15K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare15KList, imageDirPath) + } + if len(vars.ImageSquare16KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_16K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare16KList, imageDirPath) + } + if len(vars.ImageSquare17KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_17K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare17KList, imageDirPath) + } + if len(vars.ImageSquare18KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_18K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare18KList, imageDirPath) + } + if len(vars.ImageSquare19KList) > 0 { + imageDirPath := pickerDir + pathSeparator + "图片_等比_19K" + util.CreateDir(imageDirPath) + util.DoMoveFileToDir(vars.ImageSquare19KList, imageDirPath) + } if len(vars.ImageSquareHKList) > 0 { imageDirPath := pickerDir + pathSeparator + "图片_等比_原图" util.CreateDir(imageDirPath) diff --git a/core/handle_video.go b/core/handle_video.go index a1d0733..59594f5 100644 --- a/core/handle_video.go +++ b/core/handle_video.go @@ -146,6 +146,56 @@ func moveVerticalVideo(pickerDir string) { util.CreateDir(videoDirPath) util.DoMoveFileToDir(vars.VideoVertical9KList, videoDirPath) } + if len(vars.VideoVertical10KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_10k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical10KList, videoDirPath) + } + if len(vars.VideoVertical11KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_11k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical11KList, videoDirPath) + } + if len(vars.VideoVertical12KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_12k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical12KList, videoDirPath) + } + if len(vars.VideoVertical13KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_13k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical13KList, videoDirPath) + } + if len(vars.VideoVertical14KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_14k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical14KList, videoDirPath) + } + if len(vars.VideoVertical15KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_15k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical15KList, videoDirPath) + } + if len(vars.VideoVertical16KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_16k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical16KList, videoDirPath) + } + if len(vars.VideoVertical17KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_17k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical17KList, videoDirPath) + } + if len(vars.VideoVertical18KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_18k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical18KList, videoDirPath) + } + if len(vars.VideoVertical19KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_竖屏_19k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoVertical19KList, videoDirPath) + } if len(vars.VideoVerticalHKList) > 0 { videoDirPath := pickerDir + pathSeparator + "视频_竖屏_原画质" util.CreateDir(videoDirPath) @@ -201,6 +251,56 @@ func moveHorizontalVideo(pickerDir string) { util.CreateDir(videoDirPath) util.DoMoveFileToDir(vars.VideoHorizontal9KList, videoDirPath) } + if len(vars.VideoHorizontal10KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_10k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal10KList, videoDirPath) + } + if len(vars.VideoHorizontal11KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_11k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal11KList, videoDirPath) + } + if len(vars.VideoHorizontal12KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_12k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal12KList, videoDirPath) + } + if len(vars.VideoHorizontal13KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_13k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal13KList, videoDirPath) + } + if len(vars.VideoHorizontal14KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_14k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal14KList, videoDirPath) + } + if len(vars.VideoHorizontal15KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_15k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal15KList, videoDirPath) + } + if len(vars.VideoHorizontal16KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_16k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal16KList, videoDirPath) + } + if len(vars.VideoHorizontal17KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_17k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal17KList, videoDirPath) + } + if len(vars.VideoHorizontal18KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_18k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal18KList, videoDirPath) + } + if len(vars.VideoHorizontal19KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_横屏_19k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoHorizontal19KList, videoDirPath) + } if len(vars.VideoHorizontalHKList) > 0 { videoDirPath := pickerDir + pathSeparator + "视频_横屏_原画质" util.CreateDir(videoDirPath) @@ -311,6 +411,56 @@ func moveSquareVideo(pickerDir string) { util.CreateDir(videoDirPath) util.DoMoveFileToDir(vars.VideoSquare9KList, videoDirPath) } + if len(vars.VideoSquare10KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_10k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare10KList, videoDirPath) + } + if len(vars.VideoSquare11KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_11k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare11KList, videoDirPath) + } + if len(vars.VideoSquare12KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_12k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare12KList, videoDirPath) + } + if len(vars.VideoSquare13KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_13k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare13KList, videoDirPath) + } + if len(vars.VideoSquare14KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_14k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare14KList, videoDirPath) + } + if len(vars.VideoSquare15KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_15k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare15KList, videoDirPath) + } + if len(vars.VideoSquare16KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_16k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare16KList, videoDirPath) + } + if len(vars.VideoSquare17KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_17k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare17KList, videoDirPath) + } + if len(vars.VideoSquare18KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_18k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare18KList, videoDirPath) + } + if len(vars.VideoSquare19KList) > 0 { + videoDirPath := pickerDir + pathSeparator + "视频_等比_19k" + util.CreateDir(videoDirPath) + util.DoMoveFileToDir(vars.VideoSquare19KList, videoDirPath) + } if len(vars.VideoSquareHKList) > 0 { videoDirPath := pickerDir + pathSeparator + "视频_等比_原画质" util.CreateDir(videoDirPath) @@ -364,27 +514,47 @@ func handleVerticalVideo(currentVideoPath string, height int, suffix string) { vars.VideoVerticalGifList = append(vars.VideoVerticalGifList, currentVideoPath) return } - if height < 1000 { + if height < 1024 { vars.VideoVerticalNormalList = append(vars.VideoVerticalNormalList, currentVideoPath) - } else if height < 2000 { + } else if height < 2048 { vars.VideoVertical1KList = append(vars.VideoVertical1KList, currentVideoPath) - } else if height < 3000 { + } else if height < 3072 { vars.VideoVertical2KList = append(vars.VideoVertical2KList, currentVideoPath) - } else if height < 4000 { + } else if height < 4096 { vars.VideoVertical3KList = append(vars.VideoVertical3KList, currentVideoPath) - } else if height < 5000 { + } else if height < 5120 { vars.VideoVertical4KList = append(vars.VideoVertical4KList, currentVideoPath) - } else if height < 6000 { + } else if height < 6144 { vars.VideoVertical5KList = append(vars.VideoVertical5KList, currentVideoPath) - } else if height < 7000 { + } else if height < 7168 { vars.VideoVertical6KList = append(vars.VideoVertical6KList, currentVideoPath) - } else if height < 8000 { + } else if height < 8192 { vars.VideoVertical7KList = append(vars.VideoVertical7KList, currentVideoPath) - } else if height < 9000 { + } else if height < 9216 { vars.VideoVertical8KList = append(vars.VideoVertical8KList, currentVideoPath) - } else if height < 10000 { + } else if height < 10240 { vars.VideoVertical9KList = append(vars.VideoVertical9KList, currentVideoPath) - } else if height >= 10000 { + } else if height < 11264 { + vars.VideoVertical10KList = append(vars.VideoVertical10KList, currentVideoPath) + } else if height < 12288 { + vars.VideoVertical11KList = append(vars.VideoVertical11KList, currentVideoPath) + } else if height < 13312 { + vars.VideoVertical12KList = append(vars.VideoVertical12KList, currentVideoPath) + } else if height < 14336 { + vars.VideoVertical13KList = append(vars.VideoVertical13KList, currentVideoPath) + } else if height < 15360 { + vars.VideoVertical14KList = append(vars.VideoVertical14KList, currentVideoPath) + } else if height < 16384 { + vars.VideoVertical15KList = append(vars.VideoVertical15KList, currentVideoPath) + } else if height < 17408 { + vars.VideoVertical16KList = append(vars.VideoVertical16KList, currentVideoPath) + } else if height < 18432 { + vars.VideoVertical17KList = append(vars.VideoVertical17KList, currentVideoPath) + } else if height < 19456 { + vars.VideoVertical18KList = append(vars.VideoVertical18KList, currentVideoPath) + } else if height < 20480 { + vars.VideoVertical19KList = append(vars.VideoVertical19KList, currentVideoPath) + } else if height >= 20480 { vars.VideoVerticalHKList = append(vars.VideoVerticalHKList, currentVideoPath) } } @@ -451,27 +621,47 @@ func handleHorizontalVideo(currentVideoPath string, width int, height int, suffi return } // 非标规格 - if width < 1000 { + if width < 1024 { vars.VideoHorizontalNormalList = append(vars.VideoHorizontalNormalList, currentVideoPath) - } else if width < 2000 { + } else if width < 2048 { vars.VideoHorizontal1KList = append(vars.VideoHorizontal1KList, currentVideoPath) - } else if width < 3000 { + } else if width < 3072 { vars.VideoHorizontal2KList = append(vars.VideoHorizontal2KList, currentVideoPath) - } else if width < 4000 { + } else if width < 4096 { vars.VideoHorizontal3KList = append(vars.VideoHorizontal3KList, currentVideoPath) - } else if width < 5000 { + } else if width < 5120 { vars.VideoHorizontal4KList = append(vars.VideoHorizontal4KList, currentVideoPath) - } else if width < 6000 { + } else if width < 6144 { vars.VideoHorizontal5KList = append(vars.VideoHorizontal5KList, currentVideoPath) - } else if width < 7000 { + } else if width < 7168 { vars.VideoHorizontal6KList = append(vars.VideoHorizontal6KList, currentVideoPath) - } else if width < 8000 { + } else if width < 8192 { vars.VideoHorizontal7KList = append(vars.VideoHorizontal7KList, currentVideoPath) - } else if width < 9000 { + } else if width < 9216 { vars.VideoHorizontal8KList = append(vars.VideoHorizontal8KList, currentVideoPath) - } else if width < 10000 { + } else if width < 10240 { vars.VideoHorizontal9KList = append(vars.VideoHorizontal9KList, currentVideoPath) - } else if width >= 10000 { // 提示请忽略 + } else if width < 11264 { + vars.VideoHorizontal10KList = append(vars.VideoHorizontal10KList, currentVideoPath) + } else if width < 12288 { + vars.VideoHorizontal11KList = append(vars.VideoHorizontal11KList, currentVideoPath) + } else if width < 13312 { + vars.VideoHorizontal12KList = append(vars.VideoHorizontal12KList, currentVideoPath) + } else if width < 14336 { + vars.VideoHorizontal13KList = append(vars.VideoHorizontal13KList, currentVideoPath) + } else if width < 15360 { + vars.VideoHorizontal14KList = append(vars.VideoHorizontal14KList, currentVideoPath) + } else if width < 16384 { + vars.VideoHorizontal15KList = append(vars.VideoHorizontal15KList, currentVideoPath) + } else if width < 17408 { + vars.VideoHorizontal16KList = append(vars.VideoHorizontal16KList, currentVideoPath) + } else if width < 18432 { + vars.VideoHorizontal17KList = append(vars.VideoHorizontal17KList, currentVideoPath) + } else if width < 19456 { + vars.VideoHorizontal18KList = append(vars.VideoHorizontal18KList, currentVideoPath) + } else if width < 20480 { + vars.VideoHorizontal19KList = append(vars.VideoHorizontal19KList, currentVideoPath) + } else if width >= 20480 { // 提示请忽略 vars.VideoHorizontalHKList = append(vars.VideoHorizontalHKList, currentVideoPath) } } @@ -482,27 +672,47 @@ func handleSquareVideo(currentVideoPath string, width int, height int, suffix st vars.VideoSquareGifList = append(vars.VideoSquareGifList, currentVideoPath) return } - if width < 1000 { + if width < 1024 { vars.VideoSquareNormalList = append(vars.VideoSquareNormalList, currentVideoPath) - } else if width < 2000 { + } else if width < 2048 { vars.VideoSquare1KList = append(vars.VideoSquare1KList, currentVideoPath) - } else if width < 3000 { + } else if width < 3072 { vars.VideoSquare2KList = append(vars.VideoSquare2KList, currentVideoPath) - } else if width < 4000 { + } else if width < 4096 { vars.VideoSquare3KList = append(vars.VideoSquare3KList, currentVideoPath) - } else if width < 5000 { + } else if width < 5120 { vars.VideoSquare4KList = append(vars.VideoSquare4KList, currentVideoPath) - } else if width < 6000 { + } else if width < 6144 { vars.VideoSquare5KList = append(vars.VideoSquare5KList, currentVideoPath) - } else if width < 7000 { + } else if width < 7168 { vars.VideoSquare6KList = append(vars.VideoSquare6KList, currentVideoPath) - } else if width < 8000 { + } else if width < 8192 { vars.VideoSquare7KList = append(vars.VideoSquare7KList, currentVideoPath) - } else if width < 9000 { + } else if width < 9216 { vars.VideoSquare8KList = append(vars.VideoSquare8KList, currentVideoPath) - } else if width < 10000 { + } else if width < 10240 { vars.VideoSquare9KList = append(vars.VideoSquare9KList, currentVideoPath) - } else if width >= 10000 { + } else if width < 11264 { + vars.VideoSquare10KList = append(vars.VideoSquare10KList, currentVideoPath) + } else if width < 12288 { + vars.VideoSquare11KList = append(vars.VideoSquare11KList, currentVideoPath) + } else if width < 13312 { + vars.VideoSquare12KList = append(vars.VideoSquare12KList, currentVideoPath) + } else if width < 14336 { + vars.VideoSquare13KList = append(vars.VideoSquare13KList, currentVideoPath) + } else if width < 15360 { + vars.VideoSquare14KList = append(vars.VideoSquare14KList, currentVideoPath) + } else if width < 16384 { + vars.VideoSquare15KList = append(vars.VideoSquare15KList, currentVideoPath) + } else if width < 17408 { + vars.VideoSquare16KList = append(vars.VideoSquare16KList, currentVideoPath) + } else if width < 18432 { + vars.VideoSquare17KList = append(vars.VideoSquare17KList, currentVideoPath) + } else if width < 19456 { + vars.VideoSquare18KList = append(vars.VideoSquare18KList, currentVideoPath) + } else if width < 20480 { + vars.VideoSquare19KList = append(vars.VideoSquare19KList, currentVideoPath) + } else if width >= 20480 { vars.VideoSquareHKList = append(vars.VideoSquareHKList, currentVideoPath) } } diff --git a/vars/image.go b/vars/image.go index 831f0ca..2b360f7 100644 --- a/vars/image.go +++ b/vars/image.go @@ -15,6 +15,16 @@ var ImageHorizontal6KList []string var ImageHorizontal7KList []string var ImageHorizontal8KList []string var ImageHorizontal9KList []string +var ImageHorizontal10KList []string +var ImageHorizontal11KList []string +var ImageHorizontal12KList []string +var ImageHorizontal13KList []string +var ImageHorizontal14KList []string +var ImageHorizontal15KList []string +var ImageHorizontal16KList []string +var ImageHorizontal17KList []string +var ImageHorizontal18KList []string +var ImageHorizontal19KList []string var ImageHorizontalHKList []string var ImageHorizontalStandard720PList []string var ImageHorizontalStandard1D5KList []string @@ -37,6 +47,16 @@ var ImageVertical6KList []string var ImageVertical7KList []string var ImageVertical8KList []string var ImageVertical9KList []string +var ImageVertical10KList []string +var ImageVertical11KList []string +var ImageVertical12KList []string +var ImageVertical13KList []string +var ImageVertical14KList []string +var ImageVertical15KList []string +var ImageVertical16KList []string +var ImageVertical17KList []string +var ImageVertical18KList []string +var ImageVertical19KList []string var ImageVerticalHKList []string var ImageSquareNormalList []string var ImageSquare1KList []string @@ -48,4 +68,14 @@ var ImageSquare6KList []string var ImageSquare7KList []string var ImageSquare8KList []string var ImageSquare9KList []string +var ImageSquare10KList []string +var ImageSquare11KList []string +var ImageSquare12KList []string +var ImageSquare13KList []string +var ImageSquare14KList []string +var ImageSquare15KList []string +var ImageSquare16KList []string +var ImageSquare17KList []string +var ImageSquare18KList []string +var ImageSquare19KList []string var ImageSquareHKList []string diff --git a/vars/video.go b/vars/video.go index 415307b..3e5436c 100644 --- a/vars/video.go +++ b/vars/video.go @@ -14,6 +14,16 @@ var VideoHorizontal6KList []string var VideoHorizontal7KList []string var VideoHorizontal8KList []string var VideoHorizontal9KList []string +var VideoHorizontal10KList []string +var VideoHorizontal11KList []string +var VideoHorizontal12KList []string +var VideoHorizontal13KList []string +var VideoHorizontal14KList []string +var VideoHorizontal15KList []string +var VideoHorizontal16KList []string +var VideoHorizontal17KList []string +var VideoHorizontal18KList []string +var VideoHorizontal19KList []string var VideoHorizontalHKList []string var VideoHorizontalStandard720PList []string var VideoHorizontalStandard1D5PList []string @@ -37,6 +47,16 @@ var VideoVertical6KList []string var VideoVertical7KList []string var VideoVertical8KList []string var VideoVertical9KList []string +var VideoVertical10KList []string +var VideoVertical11KList []string +var VideoVertical12KList []string +var VideoVertical13KList []string +var VideoVertical14KList []string +var VideoVertical15KList []string +var VideoVertical16KList []string +var VideoVertical17KList []string +var VideoVertical18KList []string +var VideoVertical19KList []string var VideoVerticalHKList []string var VideoSquareNormalList []string var VideoSquareGifList []string @@ -49,4 +69,14 @@ var VideoSquare6KList []string var VideoSquare7KList []string var VideoSquare8KList []string var VideoSquare9KList []string +var VideoSquare10KList []string +var VideoSquare11KList []string +var VideoSquare12KList []string +var VideoSquare13KList []string +var VideoSquare14KList []string +var VideoSquare15KList []string +var VideoSquare16KList []string +var VideoSquare17KList []string +var VideoSquare18KList []string +var VideoSquare19KList []string var VideoSquareHKList []string