Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
mytvsuper结束日期及简繁转换
  • Loading branch information
supzhang authored Apr 12, 2023
1 parent 93d87ab commit e765915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def save_to_dbs(self, ret):
querylist = []
n = 0
# 对只有开始日期,没有终止日期的来源,增加上一个的终止日期(不同来源处理不同方式),全部不在各自方法中更改
if ret['source'] in ['tvmao', 'tvsou', 'smg', 'cabletv', 'icable', 'mod', 'tvb', 'zhongshu','hks']:
if ret['source'] in ['tvmao', 'tvsou', 'smg', 'cabletv', 'icable', 'mod', 'tvb', 'zhongshu','hks','mytvsuper']:
epglen = len(ret['epgs'])
for x in range(epglen):
if x < epglen - 1:
Expand All @@ -188,7 +188,7 @@ def save_to_dbs(self, ret):
for epg in ret['epgs']:
try:
n+=1
if ret['source'] in ['mod', 'cabletv', 'tbc', 'g4tv', 'icable', 'nowtv', 'tvb','viu']: # 对繁体的转简体中文
if ret['source'] in ['mod', 'cabletv', 'tbc', 'g4tv', 'icable', 'nowtv', 'tvb','viu','mytvsuper']: # 对繁体的转简体中文
epg['title'] = cht_to_chs(epg['title'])
descr = cht_to_chs(epg['desc']) if 'desc' in epg else ''
else:
Expand Down Expand Up @@ -314,4 +314,4 @@ def save_to_db(self,channels):
'success':success,
'msg':msg
}
return ret
return ret

0 comments on commit e765915

Please sign in to comment.