|
@@ -1788,15 +1788,22 @@ class CloudStorageView(View):
|
|
|
return response.json(444)
|
|
|
device_info_qs = Device_Info.objects.filter(userID_id=user_id, UID=uid, isShare=False).values(
|
|
|
'vodPrimaryUserID',
|
|
|
- 'vodPrimaryMaster')
|
|
|
+ 'vodPrimaryMaster',
|
|
|
+ 'Type')
|
|
|
if not device_info_qs.exists():
|
|
|
return response.json(12)
|
|
|
if device_info_qs[0]['vodPrimaryUserID'] != user_id:
|
|
|
return response.json(10034)
|
|
|
now_time = int(time.time())
|
|
|
- uid_bucket_qs = UID_Bucket.objects.filter(uid=uid, endTime__gte=now_time, channel=channel).values(
|
|
|
- 'bucket_id').order_by(
|
|
|
- 'addTime')
|
|
|
+ device_type = device_info_qs[0]['Type']
|
|
|
+ if device_type in [34, 37]: # 枪球设备开通云存不区分通道
|
|
|
+ uid_bucket_qs = UID_Bucket.objects.filter(uid=uid, endTime__gte=now_time).values(
|
|
|
+ 'bucket_id').order_by(
|
|
|
+ 'addTime')
|
|
|
+ else:
|
|
|
+ uid_bucket_qs = UID_Bucket.objects.filter(uid=uid, endTime__gte=now_time, channel=channel).values(
|
|
|
+ 'bucket_id').order_by(
|
|
|
+ 'addTime')
|
|
|
if not uid_bucket_qs.exists():
|
|
|
return response.json(10030)
|
|
|
|
|
@@ -1804,8 +1811,10 @@ class CloudStorageView(View):
|
|
|
# 'date').filter(uid=uid, endTime__gte=now_time, channel=channel).annotate(count=Count('time')).order_by(
|
|
|
# '-date')[:31]
|
|
|
split_vod_hls_obj = SplitVodHlsObject()
|
|
|
- vod_hls_qs = split_vod_hls_obj.get_vod_hls_date(uid=uid, end_time__gte=now_time, channel=channel)
|
|
|
-
|
|
|
+ if device_type in [34, 37]: # 枪球设备开通云存不区分通道
|
|
|
+ vod_hls_qs = split_vod_hls_obj.get_vod_hls_date(uid=uid, end_time__gte=now_time)
|
|
|
+ else:
|
|
|
+ vod_hls_qs = split_vod_hls_obj.get_vod_hls_date(uid=uid, end_time__gte=now_time, channel=channel)
|
|
|
had_vod_list = []
|
|
|
for vod in vod_hls_qs:
|
|
|
had_vod_list.append({
|