2013-06-29, 16:53
(2013-06-29, 15:15)geebs61 Wrote: As I mentioned earlier, I found Interleaving to be quite limited and felt that it could be expanded to include a little more functionality. I inquired about the logistics of enabling the interleaving of more than one episode at a time from another channel, as it would have helped achieve a specific programming order I was attempting. The only useful interaction on the subject I received was from Blazin912, that dude is good people.
Anyway, I finally had the time to sit down and look up the proper Python syntax for a FOR loop, and shortly after that I had an interleaving function that was far more versatile than it had been previously.
Rules.py Special L.I.A.T Edition
I've added two options to the Interleave rules. "Play # Episodes" Allows you to interleave multiple episodes from the channel being interleaved, instead of being restricted to interleaving one episode at a time.
Previous function:
(assuming interleaving ch.2 into ch.1)
Code:Min = 1 / Max = 1 : 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Min = 2 / Max = 2 : 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2
Min = 3 / Max = 3 : 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2
New function:
Code:Min = 1 / Max = 1 / Episodes = 1: 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Min = 1 / Max = 1 / Episodes = 2: 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2
Min = 3 / Max = 3 / Episodes = 2: 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2
I have also added "Starting Position" option. This changes where the channel starts interleaving. A value of "1" (default) acts the same as current functionality. Beginning interleaving AFTER the first episode of the base channel. A value of "0" will begin interleaving BEFORE the first episode of the base channel.
Previous Function:
Code:Min = 1 / Max = 1 : 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
New Function:
Code:Min = 1 / Max = 1 / Episodes = 1 / Start = 1: 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Min = 1 / Max = 1 / Episodes = 1 / Start = 0: 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1
As usual, anyone can use it at their own risk. I assume no liability if it borks up your system. I made this for my means, and to the best of my knowledge. There wasn't a lot changed (I literally only added 2 variables, the necessary info to initialize them, and a FOR loop) but i'm not a Python dev, so there may be more elegant ways of doing this.
I just thought it these additions might have some value to others as well. If you find this causes any bugs, you can let me know. I mean. It'd be cool to know, but I almost positively won't know or care to look into fixing it (again, not a py dev). I haven't had any problems with it so far though, and it is behaving exactly as I expect it to.
I am always for more versatility. Hopefully, Jason will add this into the core program. Have you submitted this to him? If not, maybe send him a private message and alert him to this post.
Thanks,
Mark
(2013-06-29, 15:45)FoxBJK Wrote: Hey all! Can someone help me clear out ALL of this addon's settings? I was having issues for the longest time, and removed the addon, but with the latest pre-release builds I want to try again. Things aren't working. Videos won't play, channels won't load, the addon is generally unstable. Before I look into it any further, I want to obliterate all of PseudoTV's settings. I thought uninstalling the addon would be enough, but channels I previously created are still here, so clearly something was missed. Aside from uninstalling, what folders do I need to delete? I'm on a Mac, in case that matters.
Thanks!
Delete the settings.xml and the settings2.xml. They hold all of the channel and settings information.
Mark