{"action":"created","issue":{"url":"https://api.github.com/repos/google/sagetv/issues/161","repository_url":"https://api.github.com/repos/google/sagetv","labels_url":"https://api.github.com/repos/google/sagetv/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/google/sagetv/issues/161/comments","events_url":"https://api.github.com/repos/google/sagetv/issues/161/events","html_url":"https://github.com/google/sagetv/issues/161","id":167744500,"number":161,"title":"Integrated support for Schedules Direct EPG","user":{"login":"enternoescape","id":4162345,"avatar_url":"https://avatars.githubusercontent.com/u/4162345?v=3","gravatar_id":"","url":"https://api.github.com/users/enternoescape","html_url":"https://github.com/enternoescape","followers_url":"https://api.github.com/users/enternoescape/followers","following_url":"https://api.github.com/users/enternoescape/following{/other_user}","gists_url":"https://api.github.com/users/enternoescape/gists{/gist_id}","starred_url":"https://api.github.com/users/enternoescape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enternoescape/subscriptions","organizations_url":"https://api.github.com/users/enternoescape/orgs","repos_url":"https://api.github.com/users/enternoescape/repos","events_url":"https://api.github.com/users/enternoescape/events{/privacy}","received_events_url":"https://api.github.com/users/enternoescape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":56,"created_at":"2016-07-27T00:46:10Z","updated_at":"2016-08-14T02:36:51Z","closed_at":null,"body":"This is one of the barriers to entry for new SageTV users. Schedules Direct needs to be a first class citizen fully integrated into SageTV. It needs to be selectable and configurable within the UI.\r\n\r\nI have been looking at doing this over the past few weeks and I think it would be best to build everything from the ground up instead of using the plugin. Re-writing this EPG service will result in it being written as a piece of the core, using all that is available internally and not something that is somewhat disconnected. We should also be able to eliminate some library dependencies that we would otherwise need to account for to use the plugin code.\r\n\r\nFor the JSON parsing, I propose that we use Gson since it's owned by Google already and a compatible license. I will just take the parts we need and change the root class path to sage.epg.sd.gson so it doesn't conflict with any plugins. I would leave the Gson code otherwise unchanged so we could upgrade it if the need were to arise without any serious complications. The path for the schedules direct classes would be sage.epg.sd.\r\n\r\nMy first goal would be to get everything working as well as the current integrated solution along with UI support. After that is committed, I would take a look at ways we can incorporate additional data provided by SD that SageTV may not currently have a use for, but would provide an opportunity for new options/features.\r\n\r\nI propose that we add the following option to the EPG Lineup Setup Wizard.\r\n`Use Schedules Direct Guide Data with this Source`\r\n\r\n1) The next screen would ask for your username if this is your first time, if this is not your first time skip to step 2.\r\n\r\n`Please enter your username for Schedules Direct.`\r\n`<text box>`\r\n\r\nThe next screen would ask for your password if this is your first time. Passwords are stored as a sha1 hash in hex somewhere other than Sage.properties.\r\n\r\n`Please enter your password for Schedules Direct.`\r\n`<masked text box>`\r\n\r\n2) If this is not your first time, you are presented with the option to use your existing username and password or change them. Selecting to change then takes you back to 1 with the username already populated in case you just wanted to change your password.\r\n\r\n`Use Existing Username and Password`\r\n`Change Username and Password`\r\n\r\n3) If authentication fails, you will see a message to that effect, then be taken to 2. You are not forced to change the saved username and password, but of course you should probably enter everything again. If the server is offline, you will see a message indicating this and your username and password will be saved, but you will be unable to proceed and will also be taken to 2. If everything goes well, you proceed on.\r\n\r\n`Authentication with Schedules Direct failed. Please check your username and password.`\r\n`Schedules Direct not available right now. Please try again in 30 minutes.`\r\n\r\n4) The API will then query for your existing lineups and allow you to select from what you already have or add a new one. If no lineups currently exist, you are taken to step 5 directly. When removing, it will check to see if any other capture device is using the lineup you are about to remove and will warn you about this fact.\r\n\r\n`Please select an existing lineup or add a new lineup.`\r\n\r\n`Lineup 1` > prompt if you want to select the lineup or remove it. If you select, you're done.\r\n`Lineup 2` > prompt if you want to select the lineup or remove it. If you select, you're done.\r\n`Lineup 3` > prompt if you want to select the lineup or remove it. If you select, you're done.\r\n\r\n`Add a New Lineup` > go to step 4 if you have never added a new lineup. If you have gone through steps 5 through 7 before, you will be shown a dialog asking if you would like to select the same region, country, postal code again which takes you directly to 8 or if you want to select something else, you'll go to step 5.\r\n\r\n`Would you like to use the previously entered Region, Country and Postal Code (North America, United States, 12345)?`\r\n`Use the Postal Code 12345` > go to step 8.\r\n`Select a different Region, Country and Postal Code` > go to step 5.\r\n\r\nThe select or remove dialog would be:\r\n`Select this Lineup`\r\n`Remove this Lineup`\r\n\r\n5) Get the list of regions and countries from SD. List regions to select from, selecting one takes you to step 6.\r\n\r\n`Please select your region.`\r\n`North America`\r\n`Europe`\r\n`Latin America`\r\n`etc...`\r\n\r\n6) List countries for region selected in the previous step. Selecting one takes you to step 7.\r\n\r\n`Please select your country.`\r\n`United States`\r\n`Canada`\r\n\r\n7) Query for postal code including an example.\r\n\r\n`Please enter your postal code. (Ex. 12345)`\r\n`<text box>`\r\n\r\nAfter entering the postal code, it will be checked against the regex provided from SD to ensure it's valid. If it's not valid, an error message will appear. Otherwise, we proceed to step 7.\r\n\r\n`You have entered an invalid postal code.`\r\n\r\n8) The API will now query for all of the lineups in the provided postal code and present you with a list. At this point, your region, country and postal code have been saved so your last selections can be used to skip these steps for adding the a second lineup. Making a selection here adds the lineup to your account and you're done.\r\n\r\n`Please select your cable or satellite provider (press a key to jump to lineups starting with that letter):`\r\n`Provider 1`\r\n`Provider 2`\r\n`Provider 3`\r\n\r\nThere will of course be more to discuss, but I just wanted to get a few ideas out there in case anyone has better ideas on how the UI should flow for this feature or if any of my ideas will be harder than I think to implement and what might be a better alternative. For those who do not know, Schedules Direct stores your lineup selections on their server and the UI suggestions I posted here are based on this fact."},"comment":{"url":"https://api.github.com/repos/google/sagetv/issues/comments/239652556","html_url":"https://github.com/google/sagetv/issues/161#issuecomment-239652556","issue_url":"https://api.github.com/repos/google/sagetv/issues/161","id":239652556,"user":{"login":"enternoescape","id":4162345,"avatar_url":"https://avatars.githubusercontent.com/u/4162345?v=3","gravatar_id":"","url":"https://api.github.com/users/enternoescape","html_url":"https://github.com/enternoescape","followers_url":"https://api.github.com/users/enternoescape/followers","following_url":"https://api.github.com/users/enternoescape/following{/other_user}","gists_url":"https://api.github.com/users/enternoescape/gists{/gist_id}","starred_url":"https://api.github.com/users/enternoescape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enternoescape/subscriptions","organizations_url":"https://api.github.com/users/enternoescape/orgs","repos_url":"https://api.github.com/users/enternoescape/repos","events_url":"https://api.github.com/users/enternoescape/events{/privacy}","received_events_url":"https://api.github.com/users/enternoescape/received_events","type":"User","site_admin":false},"created_at":"2016-08-14T02:36:51Z","updated_at":"2016-08-14T02:36:51Z","body":"Your changes gave me some inspiration on how I should be implementing certain parts of the SD EPG solution, so even though you were concerned that it would be disruptive, it has actually been very helpful. :)"}}
{"actor":{"display_login":"enternoescape"}}