Răsfoiți Sursa

不同云存套餐体验 、兑换码、7天 、30天 之间切换会造成之前的云存录像被清除的问题解决

lang 3 ani în urmă
părinte
comite
86f6016cd3
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      Controller/CloudStorage.py

+ 5 - 2
Controller/CloudStorage.py

@@ -406,8 +406,11 @@ class CloudStorageView(View):
         bv_qs = UID_Bucket.objects.filter(uid=uid, endTime__gte=now_time ,channel=channel).values('bucket_id').order_by('addTime')
         if not bv_qs.exists():
             return response.json(10030)
+        # vh_qs = VodHlsModel.objects.filter \
+        #     (uid=uid, channel=channel, endTime__gte=now_time,time__range=(startTime, endTime), bucket_id=bv_qs[0]['bucket_id']). \
+        #     values("id", "time", "sec", "bucket__bucket", "fg", "bucket__endpoint", "bucket__region", "bucket__mold")
         vh_qs = VodHlsModel.objects.filter \
-            (uid=uid, channel=channel, endTime__gte=now_time,time__range=(startTime, endTime), bucket_id=bv_qs[0]['bucket_id']). \
+            (uid=uid, channel=channel, endTime__gte=now_time, time__range=(startTime, endTime)). \
             values("id", "time", "sec", "bucket__bucket", "fg", "bucket__endpoint", "bucket__region", "bucket__mold")
         vod_play_list = []
         if not vh_qs.exists():
@@ -1814,7 +1817,7 @@ def updateUnusedUidBucket(request):
                                                           has_unused=has_unused)
                 Unused_Uid_Meal.objects.filter(id=unused['id']).delete()
                 StsCrdModel.objects.filter(uid=expired_uid_bucket['uid']).delete()  # 删除sts记录
-                VodHlsModel.objects.filter(uid=expired_uid_bucket['uid']).delete()  # 删除播放列表,后期数据量多时应该考虑延后删除
+                # VodHlsModel.objects.filter(uid=expired_uid_bucket['uid']).delete()  # 删除播放列表,后期数据量多时应该考虑延后删除
         except Exception:
             continue
     # UID_Bucket.objects.filter(id__in=list(id_list)).update(use_status=2)  # 更新过期云存关联套餐状态