|
@@ -3,6 +3,7 @@
|
|
|
import time
|
|
|
|
|
|
import oss2
|
|
|
+from django.db.models import Q
|
|
|
from django.views import View
|
|
|
|
|
|
from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET
|
|
@@ -187,6 +188,14 @@ class VoicePromptView(View):
|
|
|
if not system_qs.exists() and lang != 'en':
|
|
|
system_qs = VoicePromptModel.objects.filter(classification=0, language='en', status=1,
|
|
|
algorithm_type=algorithm_type)
|
|
|
+ if lang == 'cn' and algorithm_type == 10:
|
|
|
+ device_type = Device_Info.objects.filter(UID=uid).values('Type').first()['Type']
|
|
|
+ system_new_qs = system_qs.filter(Q(device_types__contains=[device_type]))
|
|
|
+ if system_new_qs.exists():
|
|
|
+ system_qs = system_new_qs
|
|
|
+ else:
|
|
|
+ system_qs = system_qs.filter(Q(device_types=[]))
|
|
|
+
|
|
|
channel_qs = UidChannelSetModel.objects.filter(uid__uid=uid, channel=channel,
|
|
|
algorithm_type=algorithm_type)
|
|
|
|