Ok, just a quick update on where I am...
I'm going to mostly abandon the way fekker approached a bunch of things, but still use a lot of what has already been assembled (because I'm lazy, and learning all this xbmc addon stuff is hard!
)
I have refactored the entire section that parses data
for movies only. Calls using the Netflix API were returning JSON objects, and I am just using those to fill out the movie data, and passing it back into the functions that are already there.
Basically, instead of having to do this to get the movie/show Title:
Code:
matchTitle = re.search(r'[\'"]title[\'"]: {.*?[\'"]regular[\'"]: u{0,1}(\'|")(.*?)\1.*?},', curQueueItem, re.DOTALL | re.MULTILINE)
if matchTitle:
curX.Title = matchTitle.group(2).strip()
I can instead just do this:
Code:
if 'title' in curQueueItem:
curX.Title = curQueueItem['title']['regular']
Using the JSON object as it's intended (or a python <dict> type, apparently). This is WAY cleaner and easier to maintain going forward, I think. I can only assume that in the past the results returned from the Netflix API were nastier, necessitating the ugly regex that fekker previously used (and seriously, who wants to try to maintain that?)
Now that I understand a little better what the underlying logic should be, I can move forward into TV shows next, then things like recently watched, recommended, new arrivals, search, etc...
I won't be focusing on queue management at all, unless I'm feeling up for it later (instant or disc). I don't really manage my queue from my tv (phone and computer instead). Just FYI.
I also have NO idea how to release the final results back into the wild at the moment (nor do I think it would be a good idea right now, anyway - too many things are broken). I may ask for some help later in how to go about doing that.
Onward!