The daily and weekly show list now only lists shows in the US( or other places, as long as they are in US). Before it display all shows even if they did not air in the US. Eventually I think i'll add that ability back as an option, but I want to work on other things before hand. This was quite the challenge on how to best implement. At first I had it in the view, but this had the side effect of having pages with 10 shows, then the next could be like 2 shows. So that felt very bad design and could confuse people if they were seeing the full list and what not. So this clearly needed to be done when grabbing the data then display it all. So then I would sort that. However, this would display the same thing as the previous one. So finally I rewrote the code itself to now grab the first page, check to see to if there are multiple pages. If so, then go ahead and get the next page. I would then append the pages to each other. This didn't work well. As now I had a list with multiple indexes. Which made displaying it tricky. I then had a break through idea that to take the list that was return and loop over it and append it to a brand new list. This worked perfectly! I now have a list with all shows which then gets sent and sorted if the country has US. So there it is.
Back