{"action":"created","issue":{"url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/391","labels_url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/391/labels{/name}","comments_url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/391/comments","events_url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/391/events","html_url":"https://github.com/SchizoDuckie/DuckieTV/issues/391","id":64434115,"number":391,"title":"custom scheduling for historical seasons and binge dump shows","user":{"login":"bkd69","id":9876954,"avatar_url":"https://avatars.githubusercontent.com/u/9876954?v=3","gravatar_id":"","url":"https://api.github.com/users/bkd69","html_url":"https://github.com/bkd69","followers_url":"https://api.github.com/users/bkd69/followers","following_url":"https://api.github.com/users/bkd69/following{/other_user}","gists_url":"https://api.github.com/users/bkd69/gists{/gist_id}","starred_url":"https://api.github.com/users/bkd69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkd69/subscriptions","organizations_url":"https://api.github.com/users/bkd69/orgs","repos_url":"https://api.github.com/users/bkd69/repos","events_url":"https://api.github.com/users/bkd69/events{/privacy}","received_events_url":"https://api.github.com/users/bkd69/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/labels/enhancement%20request","name":"enhancement request","color":"8FC6FF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-26T03:50:43Z","updated_at":"2015-03-26T05:59:31Z","closed_at":null,"body":"I should like to have the option to customize the calendar scheduling of any given show, as well as setting an arbitrary season+episode start point, for catching up with historical seasons. This would also work for binge dumps of stream service shows, where all the episodes get posted on a single day.\r\n\r\nFor example, Person of Interest is in its third season, but since I want to catch up on it, so I should be able to tell DuckieTV to start with S1E05, and schedule it for every Tuesday and Thursday until we're all caught up. Likewise for a binge dump, like The Unbreakable Kimmy Schmidt, I could tell it to just schedule it for every Sunday, and it would start at episode 1, and increment it from there.\r\n"},"comment":{"url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/comments/86355310","html_url":"https://github.com/SchizoDuckie/DuckieTV/issues/391#issuecomment-86355310","issue_url":"https://api.github.com/repos/SchizoDuckie/DuckieTV/issues/391","id":86355310,"user":{"login":"bkd69","id":9876954,"avatar_url":"https://avatars.githubusercontent.com/u/9876954?v=3","gravatar_id":"","url":"https://api.github.com/users/bkd69","html_url":"https://github.com/bkd69","followers_url":"https://api.github.com/users/bkd69/followers","following_url":"https://api.github.com/users/bkd69/following{/other_user}","gists_url":"https://api.github.com/users/bkd69/gists{/gist_id}","starred_url":"https://api.github.com/users/bkd69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkd69/subscriptions","organizations_url":"https://api.github.com/users/bkd69/orgs","repos_url":"https://api.github.com/users/bkd69/repos","events_url":"https://api.github.com/users/bkd69/events{/privacy}","received_events_url":"https://api.github.com/users/bkd69/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T05:59:31Z","updated_at":"2015-03-26T05:59:31Z","body":"We start by adding a field to our store of show titles, called 'scheduling', with values of either 'network' or 'local'. At present, all shows are network scheduled, which is to say, Duckie calls out to trakt.tv with the show title, and the date range of interest, and trakt.tv returns(*) the title, SxEy number, date of air, and episode title+synopsis, for each scheduled occurence in the requested time frame, which Duckie then dutifully records on the calendar.\r\n\r\nWith custom scheduling added, what happens when we add a show, is that we're then asked whether we want to use a custom schedule, at which point we're prompted  for the starting season and episode, and presented with a 7 day checklist to select which days we want to schedule the program for.\r\n\r\nIf we select the custom option, DuckieTV then sets the scheduling field to 'local', and records the weekdays that the program is scheduled for, maybe having a string of digits with 1 for Sunday and 7 for saturday, so a Mon-Fri schedule would be '23456', or as a binary setting of 00111110, or whatever's most convenient for the date function used in the code. This is followed by DuckieTV checking the dates of the future days of the week, and recording incremented SxEy numbers followed by the appropriate dates, for either 7 or 30 days out, depending on how things are already set. Now when the calendar writing occurs, DuckieTV is still going to have to pull the title and synopsis info for the given episode from trakt.tv, which gives a chance for some error checking, in regards to the season turnover. See, when trakt.tv returns a null value for S1E23, or E24, or E25, or whichever episode, that will be the indication that the season has to be incremented, so it now checks for S2E01, and starts incrementing the episode numbers from there.\r\n\r\n*: More or less. I'm just basing this on DuckieTV's behavior, so there might be some minor differences in the details, but nothing significant"}}