Compare commits

...

2 commits

Author SHA1 Message Date
j
61dd667a71 source is used in padma, use other key 2023-08-17 12:14:28 +02:00
j
ce27979259 use direct import 2023-08-17 12:14:02 +02:00
2 changed files with 3 additions and 3 deletions

View file

@ -640,8 +640,8 @@ class Item(models.Model):
if self.poster_height:
i['posterRatio'] = self.poster_width / self.poster_height
if keys and 'source' in keys:
i['source'] = self.streams().exclude(file__data='').exists()
if keys and 'hasSource' in keys:
i['hasSource'] = self.streams().exclude(file__data='').exists()
streams = self.streams()
i['durations'] = [s.duration for s in streams]

View file

@ -2,6 +2,7 @@
from datetime import timedelta, datetime
from urllib.parse import quote
import xml.etree.ElementTree as ET
import gzip
import os
import random
@ -12,7 +13,6 @@ from celery.schedules import crontab
from django.conf import settings
from django.db import connection, transaction
from django.db.models import Q
from ox.utils import ET
from app.utils import limit_rate
from taskqueue.models import Task