zhangyong hace 1 año
padre
commit
a5098809f4
Se han modificado 1 ficheros con 52 adiciones y 52 borrados
  1. 52 52
      common/material.py

+ 52 - 52
common/material.py

@@ -172,59 +172,59 @@ class Material():
             title_list = list['title']
             return audio_id, srt, title_list
         else:
-            if channel_type == "douyin":
-                if count == 0 or count == 1:
-                    audio_type = Feishu.get_values_batch("prod", "succinct", "6VXm7q")
-                    for row in audio_type[1:]:
-                        audio_id = row[0]
-                        text = row[1]
-                        title = row[2]
-                        number = {"audio_id": audio_id, "text": text}
-                        list.append(number)
-                        title_list.append(title)
-                    audio_id = list[count]['audio_id']
-                    srt = list[count]['text']
+            # if channel_type == "douyin":
+            #     if count == 0 or count == 1:
+            #         audio_type = Feishu.get_values_batch("prod", "succinct", "6VXm7q")
+            #         for row in audio_type[1:]:
+            #             audio_id = row[0]
+            #             text = row[1]
+            #             title = row[2]
+            #             number = {"audio_id": audio_id, "text": text}
+            #             list.append(number)
+            #             title_list.append(title)
+            #         audio_id = list[count]['audio_id']
+            #         srt = list[count]['text']
+            #         return audio_id, srt, title_list
+            #     else:
+            #         audio_type = [{"audio": "音画美文--美文类", "type": "6VXm7q"}, {"audio": "音画美文--通用类", "type": "aSNFl8"}]
+            #         audio_type = random.choice(audio_type)
+            #         type = audio_type['type']
+            #         audio_type = Feishu.get_values_batch("prod", "succinct", type)
+            #         for row in audio_type[1:]:
+            #             audio_id = row[0]
+            #             text = row[1]
+            #             title = row[2]
+            #             number = {"audio_id": audio_id, "text": text}
+            #             if audio_id:
+            #                 list.append(number)
+            #             title_list.append(title)
+            #         while True:
+            #             list1 = random.choice(list)
+            #             audio_id = list1['audio_id']
+            #             srt = list1['text']
+            #             id_list = cls.get_id(audio_id)
+            #             if len(id_list) <= 2:
+            #                 return audio_id, srt, title_list
+            # else:
+            audio_type = [{"audio": "音画美文--美文类", "type": "6VXm7q"}, {"audio": "音画美文--通用类", "type": "aSNFl8"}]
+            audio_type = random.choice(audio_type)
+            type = audio_type['type']
+            audio_type = Feishu.get_values_batch("prod", "succinct", type)
+            for row in audio_type[1:]:
+                audio_id = row[0]
+                text = row[1]
+                title = row[2]
+                number = {"audio_id": audio_id, "text": text}
+                if audio_id:
+                    list.append(number)
+                title_list.append(title)
+            while True:
+                list1 = random.choice(list)
+                audio_id = list1['audio_id']
+                srt = list1['text']
+                id_list = cls.get_id(audio_id)
+                if len(id_list) <= 2:
                     return audio_id, srt, title_list
-                else:
-                    audio_type = [{"audio": "音画美文--美文类", "type": "6VXm7q"}, {"audio": "音画美文--通用类", "type": "aSNFl8"}]
-                    audio_type = random.choice(audio_type)
-                    type = audio_type['type']
-                    audio_type = Feishu.get_values_batch("prod", "succinct", type)
-                    for row in audio_type[1:]:
-                        audio_id = row[0]
-                        text = row[1]
-                        title = row[2]
-                        number = {"audio_id": audio_id, "text": text}
-                        if audio_id:
-                            list.append(number)
-                        title_list.append(title)
-                    while True:
-                        list1 = random.choice(list)
-                        audio_id = list1['audio_id']
-                        srt = list1['text']
-                        id_list = cls.get_id(audio_id)
-                        if len(id_list) <= 2:
-                            return audio_id, srt, title_list
-            else:
-                audio_type = [{"audio": "音画美文--美文类", "type": "6VXm7q"}, {"audio": "音画美文--通用类", "type": "aSNFl8"}]
-                audio_type = random.choice(audio_type)
-                type = audio_type['type']
-                audio_type = Feishu.get_values_batch("prod", "succinct", type)
-                for row in audio_type[1:]:
-                    audio_id = row[0]
-                    text = row[1]
-                    title = row[2]
-                    number = {"audio_id": audio_id, "text": text}
-                    if audio_id:
-                        list.append(number)
-                    title_list.append(title)
-                while True:
-                    list1 = random.choice(list)
-                    audio_id = list1['audio_id']
-                    srt = list1['text']
-                    id_list = cls.get_id(audio_id)
-                    if len(id_list) <= 2:
-                        return audio_id, srt, title_list