(2016-12-21, 20:41)primaeval Wrote: (2016-12-21, 20:20)FXB78 Wrote: @primaeval - I think I've spotted a bit of an unusual issue with AutoPlayWiths/always. In the main this works however today I have chosen "World Championship of Darts" on SS3 and it kicks me out of the guide & gives an error in the log. It also screwed by db up which I managed to fix. I think the issue is either because the programme is heavily repeated or the fact it's on both SS3 & SS1 at the same time, not sure. Anyway, this is the message it gives:
Code:
18:14:09.674 T:10224 ERROR: Database.eventLoop() >>>>>>>>>> exception! __init__() takes at most 8 arguments (9 given) = _getFullAutoplaywiths
In the meantime I just chose AutoPlayWiths/once & this seems ok, so no great problem but thought it worth mentioning.
Thanks.
Thanks. I haven't used AutoPlayWiths for a long time. It might well be broken as there was a huge change to the programs table in the database recently. If you can find out exactly what is missing please let me know.
I think I've figured it out, it seems it was the programs table which was screwed up. I made changes to source.py and it now seems to be all working. You might want to have a quick look over what I did but essentially c.lineup was duplicated in 'always' and missing from 'once'. I also added in "if not c: return" although I don't know for sure if this is needed.
This is the code from 1407 - 1427:
Code:
if not c:
return
#once
c.execute("SELECT DISTINCT c.id, c.title as channel_title,c.lineup,c.logo,c.stream_url,c.visible,c.weight, p.* FROM programs p, channels c, autoplaywiths a WHERE c.id = p.channel AND a.type = 0 AND p.title = a.program_title AND a.start_date = p.start_date")
for row in c:
channel = Channel(row["id"], row["channel_title"], row["lineup"], row["logo"], row["stream_url"], row["visible"], row["weight"])
program = Program(channel, title=row['title'], sub_title=row['sub_title'], startDate=row['start_date'], endDate=row['end_date'],
description=row['description'], categories=row['categories'],
imageLarge=row["image_large"],imageSmall=row["image_small"],
season=row["season"],episode=row["episode"],is_movie=row["is_movie"],language=row["language"],autoplaywithScheduled=True)
programList.append(program)
#always
c.execute("SELECT DISTINCT c.id, c.title as channel_title,c.lineup,c.logo,c.stream_url,c.visible,c.weight, p.* FROM programs p, channels c, autoplaywiths a WHERE c.id = p.channel AND a.type = 1 AND p.title = a.program_title AND p.start_date >= ? AND p.end_date <= ?", [start,end])
for row in c:
channel = Channel(row["id"], row["channel_title"], row['lineup'], row["logo"], row["stream_url"], row["visible"], row["weight"])
program = Program(channel, title=row['title'], sub_title=row['sub_title'], startDate=row['start_date'], endDate=row['end_date'],
description=row['description'], categories=row['categories'],
imageLarge=row["image_large"],imageSmall=row["image_small"],
season=row["season"],episode=row["episode"],is_movie=row["is_movie"],language=row["language"],autoplaywithScheduled=True)
programList.append(program)
c.close()