From 2f9833f9b4f2b75486e4dae768ee8091fe491e80 Mon Sep 17 00:00:00 2001 From: fafoy Date: Wed, 25 Apr 2018 09:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=96=E7=9A=84=E6=AA=94=E5=90=8D=E4=BD=AE?= =?UTF-8?q?=E4=BB=A5=E6=97=A9=E4=BB=9D=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "line\345\233\236\346\207\211/models.py" | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git "a/line\345\233\236\346\207\211/models.py" "b/line\345\233\236\346\207\211/models.py" index f4e29af..9c4ddb5 100644 --- "a/line\345\233\236\346\207\211/models.py" +++ "b/line\345\233\236\346\207\211/models.py" @@ -1,9 +1,8 @@ -from os.path import join +from os.path import join, splitext from django.conf import settings from django.core.files.base import ContentFile from django.db import models - from siunn1ua2ah4.settings import DOMAIN @@ -52,7 +51,7 @@ def 加影片(cls, 腔口設定, 全部圖, 聲陣列, 文字陣列): 圖陣列.append(圖.檔案路徑()) 結果影片 = cls.objects.create() 結果影片.檔案.save('result.mp4', ContentFile(b'')) - 結果影片.縮圖.save(結果影片.檔案.name + '.jpg', ContentFile(b'')) + 結果影片.縮圖.save(splitext(結果影片.檔案.name)[0] + '.jpg', ContentFile(b'')) 做影片.使用者提供的資料( 腔口設定, 圖陣列, 聲陣列, 文字陣列,