Skip to content

Commit e7e1e0b

Browse files
committed
Fixed duration
1 parent ac3217e commit e7e1e0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

epg_scraper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def convert_to_xmltv(epg_data, channel_name, icon_url=None, lang="de"):
3333
for program in programs:
3434
start_time = datetime.strptime(date + " " + program['ora'], "%Y-%m-%d %H:%M").replace(tzinfo=ZoneInfo("Europe/Rome"))
3535
duration_minutes = int(program['durata'])
36-
stop_time = start_time + timedelta(minutes=duration_minutes)
36+
stop_time = start_time + timedelta(seconds=duration_minutes)
3737

3838
programme = SubElement(tv, "programme", start=start_time.strftime("%Y%m%d%H%M%S %z"),
3939
stop=stop_time.strftime("%Y%m%d%H%M%S %z"), channel=channel_name)

0 commit comments

Comments
 (0)