Beta Sling
(2020-02-11, 17:28)d21spike Wrote:
(2020-02-11, 04:50)Doctor Eggs Wrote: That didn't work for me. I was able to get it figured out by adding ordering to the query in the getChannels function so that the Orange URL is selected (which is the correct one) instead of the blue.

I sent you a pull request on Git with this update. It looks like there are a lot of changes in Git that I don't have locally so I'm pretty sure I made the change in the correct place. getChannels looks like it got moved to the Guide service.

For anyone that is also having this issue, you can go to addons/plugin.video.sling/resources/lib/service/slinger.py go to line 575 and change
"WHERE Channels.Name NOT LIKE '%Sling%' AND Channels.Hidden = 0 ORDER BY Channels.Name asc"
TO
"WHERE Channels.Name NOT LIKE '%Sling%' AND Channels.Hidden = 0 ORDER BY Channels.Name asc, Channels.Last_Update asc" 

Let me just say thank you for trying to help with this add-on, definitely shows you have at some insight into what you're doing.

That said let's look at the problem at hand. You're claiming that the guide is playing Sling Blue channels over Sling Orange channels implying that on the Sling side of things, they take preference to Sling Orange when both channels exist in a subscription package. Unfortunately, or fortunately (depending how you look at it), this is not the case. The following URL is a JSON list of channels you are subscribed to:
Sling Orange and Blue Channel Lineup
One thing to notice, we'll use the example from last time, is that it lacks the Blue versions of channels if there is an Orange alternative. Your PVR is trying to play a Blue channel, as such since it's not listed in your channel lineup it is not licensed and does not play. The problem becomes one of stale data cached on your system and not of channel preference from Sling.

On the topic of stale data. You mentioned "getChannels looks like it got moved to the Guide service," this tells me you're running an outdated version of the add-on. Specifically, older than 10 days ago or version 0.0.86. In this release, the Slinger service transitioned from a file based EPG to one where IPTV Simple calls on a web page hosted on the device. This web page is created on the fly by querying the database and has less chance of becoming stale as a file would. To tackle the stale data I requested that you run "Channel Update" and "Guide Update." At least in the current version, I have trouble believing this didn't rectify the issue...here's why:

In "Channel Update" after it pulls in the subscription package and processes the channels, the very last thing it does is in slinger.py, line 354 it loops through the channels in the database and deletes anything that wasn't returned in the subscription package. (This would have removed your Sling Blue channels from the database as they are not included in the URL I referenced above.) Triggering "Guide Update" on the now corrected channel lineup will pull in data for those channels and in versions prior to 0.0.86 it would recreate the playlist files used by IPTV Simple. (This is no longer required in newer versions since as I mentioned the page is dynamically created.)

As I said, the add-on constantly checks for subscription changes. Specifically, each visit to the main menu will retrieve your subscription package identifiers (sling.py, line 67) and each visit to the channels menu will pull in the page referenced above to include/exclude any subscription changes (channels.py, line 19). This is why you had no issues with playback here since there was no stale data.

Having addressed that, I hope you can see the problem is not the ordering of the data that comes back from the database but your PVR displaying channels you are no longer subscribed to. If there is something that truly needs addressed, it would be figuring out a way to not have this occur. Moving onto your fix. I went as far as populating the Channels table with both Sling Blue and Sling Orange channels, since as you can see above, as of current writing, the Sling Orange and Blue does not contain duplicates. Then I proceeded to test the query both with and without your fix, which also as of this time does indeed give prioritization to Sling Orange channels. My problem with this fix however is how it is accomplished and whether or not it can be broken, which I believe it can. You rely on adding Channels.Last_Update to the sort which simply is a timestamp of when the channel was last pulled from your subscription package. If the order of channels ever changes in the URL above, which it does, then this fix may no longer function. Closest example I can think of is, Post 11 where both channels were included. As such, we try to think of patches that can have a lasting effect on the issue and not just the symptom.

With all that said, I don't have a problem adding your "fix" into the add-on but I think I came up with a better one, more so in the regard that no matter what Sling Orange channels with be given priority. Your change added changed the ORDER BY to
"ORDER BY Channels.Name asc, Channels.Last_Update asc" whereas my suggestion is
"ORDER BY Channels.Name asc, substr(Channels.Call_Sign, -2) = '-M' desc".
As you can see, it would first sort the channels by name ascending and then afterwards sort it by the condition that the suffix of the Call_Sign is '-M', otherwise the only way I am aware of to tell the two types of channels apart. I'll make sure this gets added to the next iteration.     

Thank you for posting this info. 

I updated to version 0.95 in Git, cleared out my addon_data folder, and it is still an issue.

I didn't realize that there was a function that deleted channels that weren't available to me but looking at sling.db shows that I still have both channels (COMEDY and COMEDY-M as well as all the other channels available in Orange and Blue). Having not known about the delete functionality, I thought is was a problem with priority which led me to add the additional order by.

When I signed up for Sling, I signed up for both Orange and Blue from the beginning so I'm not sure if that has something to do with it. Probably not but you mentioned earlier that I may have just recently changed my subscription.

When I go to Sling Orange and Blue Channel Lineup and search for "COMEDY" it only finds "COMEDY-M" as one of the channels which matches with what you mentioned above.

Ultimately it looks like the delete channels isn't working for me and that putting in the additional order by statement is not getting to the root cause of my issue. Agreed that ordering by ", substr(Channels.Call_Sign, -2) = '-M' desc" is a better temporary solution.

On a side note, the dynamic creation of channels.m3u and guide.xml is awesome! Thank you for that.
Reply


Messages In This Thread
Sling - by d21spike - 2020-01-17, 19:30
RE: Sling - by d21spike - 2020-01-18, 15:48
RE: Sling - by mxlance - 2020-01-18, 16:52
RE: Sling - by d21spike - 2020-01-19, 04:41
Sling - by MoreBloodWine - 2020-01-18, 17:07
RE: Sling - by eracknaphobia - 2020-01-18, 21:27
Sling - by MoreBloodWine - 2020-01-18, 21:30
RE: Sling - by usphil - 2020-01-18, 22:26
RE: Sling - by eracknaphobia - 2020-01-19, 01:33
Sling - by MoreBloodWine - 2020-01-19, 04:44
RE: Sling - by bzellinger - 2020-01-19, 14:29
RE: Sling - by d21spike - 2020-01-19, 15:19
RE: Sling - by d21spike - 2020-01-20, 20:04
RE: Sling - by bds3151 - 2020-01-20, 07:53
RE: Sling - by eracknaphobia - 2020-01-20, 15:35
RE: Sling - by bds3151 - 2020-01-20, 17:22
RE: Sling - by clones - 2020-01-29, 01:33
RE: Sling - by d21spike - 2020-01-29, 02:13
RE: Sling - by MoreBloodWine - 2020-01-20, 20:06
RE: Sling - by d21spike - 2020-01-20, 20:17
Sling - by MoreBloodWine - 2020-01-20, 20:27
RE: Sling - by mxlance - 2020-01-20, 23:12
RE: Sling - by eracknaphobia - 2020-01-20, 23:15
RE: Sling - by mxlance - 2020-01-20, 23:27
RE: Sling - by Penbrock - 2020-01-21, 05:49
RE: Sling - by Penbrock - 2020-01-22, 01:26
RE: Sling - by MoreBloodWine - 2020-01-21, 06:34
RE: Sling - by d21spike - 2020-01-21, 17:50
RE: Sling - by mxlance - 2020-01-21, 14:53
RE: Sling - by mxlance - 2020-01-21, 20:56
Sling - by MoreBloodWine - 2020-01-21, 23:26
RE: Sling - by hackthis02 - 2020-01-23, 07:11
RE: Sling - by d21spike - 2020-01-23, 13:13
RE: Sling - by hackthis02 - 2020-01-23, 16:28
RE: Sling - by d21spike - 2020-01-24, 22:53
RE: Sling - by bds3151 - 2020-01-24, 23:38
RE: Sling - by bds3151 - 2020-01-27, 04:26
RE: Sling - by bds3151 - 2020-01-27, 20:33
RE: Sling Buffering - by bds3151 - 2020-01-24, 22:09
RE: Sling Buffering - by bds3151 - 2020-01-24, 23:15
RE: Sling Buffering - by d21spike - 2020-01-28, 16:33
RE: Sling Buffering - by clones - 2020-01-28, 17:01
RE: Sling Buffering - by d21spike - 2020-01-28, 17:35
RE: Sling Buffering - by clones - 2020-01-29, 02:56
RE: Sling Buffering - by d21spike - 2020-01-29, 04:05
RE: Sling Buffering - by clones - 2020-01-29, 15:03
RE: Sling Buffering - by d21spike - 2020-01-29, 15:16
RE: Sling Buffering - by clones - 2020-01-29, 15:59
RE: Sling Buffering - by d21spike - 2020-01-29, 20:11
RE: Sling Buffering - by bds3151 - 2020-01-29, 20:55
RE: Sling Buffering - by bds3151 - 2020-01-29, 21:27
RE: Sling Buffering - by d21spike - 2020-02-03, 17:44
RE: Sling Buffering - by hackthis02 - 2020-02-03, 18:44
RE: Sling Buffering - by d21spike - 2020-02-03, 19:51
RE: Sling Buffering - by bds3151 - 2020-02-05, 17:51
RE: Sling Buffering - by d21spike - 2020-02-05, 22:47
RE: Sling Buffering - by clones - 2020-01-29, 21:33
RE: Sling Buffering - by clones - 2020-01-31, 14:57
RE: Sling Buffering - by bds3151 - 2020-01-28, 20:05
RE: Sling Buffering - by d21spike - 2020-01-28, 20:32
RE: Sling Buffering - by bds3151 - 2020-01-29, 18:18
RE: Sling - by mxlance - 2020-01-25, 18:09
RE: Sling - by clones - 2020-01-26, 02:45
RE: Sling - by clones - 2020-01-26, 20:37
RE: Sling - by clones - 2020-01-26, 22:58
RE: Sling - by mxlance - 2020-01-28, 14:32
RE: Sling - by clones - 2020-01-28, 17:21
RE: Sling - by mxlance - 2020-01-28, 17:47
RE: Sling - by DarrenHill - 2020-01-29, 21:24
RE: Sling - by hackthis02 - 2020-01-30, 05:37
RE: Sling - by hackthis02 - 2020-01-30, 19:14
RE: Sling - by Shaboobala - 2020-01-31, 00:31
RE: Sling - by mxlance - 2020-01-31, 17:55
RE: Sling - by Penbrock - 2020-02-01, 15:30
RE: Sling - by mxlance - 2020-02-01, 15:45
RE: Sling - by d21spike - 2020-02-01, 16:05
RE: Sling - by clones - 2020-02-02, 01:10
RE: Sling - by mxlance - 2020-02-01, 20:11
RE: Sling - by mxlance - 2020-02-02, 03:45
RE: Sling - by clones - 2020-02-02, 06:24
RE: Sling - by emveepee - 2020-02-02, 07:02
RE: Sling - by clones - 2020-02-02, 08:01
RE: Sling - by clones - 2020-02-02, 19:38
RE: Sling - by clones - 2020-02-03, 23:04
RE: Sling - by d21spike - 2020-02-04, 14:45
RE: Sling - by lhassell - 2020-02-14, 23:56
RE: Sling - by emveepee - 2020-02-02, 17:58
RE: Sling - by clones - 2020-02-02, 20:08
RE: Sling - by hackthis02 - 2020-02-03, 06:14
RE: Sling - by mxlance - 2020-02-03, 06:23
RE: Sling - by mxlance - 2020-02-03, 19:01
RE: Sling - by hackthis02 - 2020-02-03, 19:07
RE: Sling - by mxlance - 2020-02-03, 19:19
RE: Sling - by mxlance - 2020-02-03, 20:03
RE: Sling - by d21spike - 2020-02-03, 20:08
RE: Sling - by mxlance - 2020-02-03, 20:39
RE: Sling - by hackthis02 - 2020-02-04, 02:08
RE: Sling - by Smallmountains - 2020-02-04, 04:49
RE: Sling - by lhassell - 2020-02-04, 07:35
RE: Sling - by clones - 2020-02-06, 17:49
RE: Sling - by d21spike - 2020-02-06, 21:00
RE: Sling - by bds3151 - 2020-02-07, 21:14
RE: Sling - by d21spike - 2020-02-08, 04:38
RE: Sling - by bds3151 - 2020-02-08, 05:04
RE: Sling - by d21spike - 2020-02-08, 05:20
RE: Sling - by bds3151 - 2020-02-08, 06:00
RE: Sling - by d21spike - 2020-02-08, 06:05
RE: Sling - by bds3151 - 2020-02-08, 06:18
RE: Sling - by d21spike - 2020-02-08, 06:33
RE: Sling - by bds3151 - 2020-02-08, 06:53
RE: Sling - by bds3151 - 2020-02-08, 07:06
RE: Sling - by snoopyjoe - 2020-02-08, 08:53
Sling - by DarrenHill - 2020-02-08, 10:10
RE: Sling - by bds3151 - 2020-02-08, 15:08
RE: Sling - by DarrenHill - 2020-02-08, 16:40
RE: Sling - by bds3151 - 2020-02-09, 05:10
RE: Sling - by markeymark - 2020-02-09, 22:05
RE: Sling - by clones - 2020-02-10, 02:56
RE: Sling - by d21spike - 2020-02-10, 14:57
RE: Sling - by markeymark - 2020-02-11, 18:20
RE: Sling - by Doctor Eggs - 2020-02-10, 21:53
RE: Sling - by d21spike - 2020-02-10, 22:15
RE: Sling - by Doctor Eggs - 2020-02-11, 04:50
RE: Sling - by d21spike - 2020-02-11, 17:28
RE: Sling - by Doctor Eggs - 2020-02-11, 18:31
RE: Sling - by d21spike - 2020-02-11, 19:30
RE: Sling - by Doctor Eggs - 2020-02-11, 20:46
RE: Sling - by d21spike - 2020-02-11, 21:47
RE: Sling - by Doctor Eggs - 2020-02-11, 22:54
RE: Sling - by Doctor Eggs - 2020-02-12, 04:59
RE: Sling - by snoopyjoe - 2020-02-12, 07:52
RE: Sling - by d21spike - 2020-02-21, 15:22
RE: Sling - by RM4ever - 2020-02-21, 17:52
RE: Sling - by d21spike - 2020-02-21, 18:04
RE: Sling - by clones - 2020-02-13, 15:42
RE: Sling - by clones - 2020-02-14, 22:56
RE: Sling - by z419 - 2020-02-18, 19:10
RE: Sling - by hackthis02 - 2020-04-09, 21:06
RE: Sling - by RM4ever - 2020-02-21, 05:34
RE: Sling - by d21spike - 2020-02-21, 21:02
RE: Sling - by RM4ever - 2020-02-22, 22:11
RE: Sling - by d21spike - 2020-02-24, 17:40
RE: Sling - by Nitzkit - 2020-02-24, 00:44
RE: Sling - by Nitzkit - 2020-02-24, 02:16
Re:Sling - by Smallmountains - 2020-02-25, 03:08
RE: Sling - by d21spike - 2020-02-25, 15:04
RE: Sling - by clones - 2020-02-25, 17:57
RE: Sling - by d21spike - 2020-02-26, 04:07
RE: Sling - by mxlance - 2020-02-25, 18:32
RE: Sling - by d21spike - 2020-02-26, 04:02
RE: Sling - by Doctor Eggs - 2020-02-26, 01:22
RE: Sling - by d21spike - 2020-02-26, 01:33
RE: Sling - by Doctor Eggs - 2020-02-26, 06:10
RE: Sling - by d21spike - 2020-02-26, 14:25
RE: Sling - by snoopyjoe - 2020-02-27, 01:39
RE: Sling - by snoopyjoe - 2020-03-02, 05:12
RE: Sling - by d21spike - 2020-03-09, 13:25
RE: Sling - by d21spike - 2020-03-12, 20:01
RE: Sling - by Penbrock - 2020-03-14, 18:31
RE: Sling - by Penbrock - 2020-03-07, 13:40
RE: Sling - by Doctor Eggs - 2020-03-12, 20:52
RE: Sling - by d21spike - 2020-03-12, 21:11
RE: Sling - by d21spike - 2020-03-12, 21:28
RE: Sling - by snoopyjoe - 2020-03-12, 21:16
RE: Sling - by snoopyjoe - 2020-03-12, 21:48
RE: Sling - by Doctor Eggs - 2020-03-13, 15:11
RE: Sling - by usphil - 2020-03-13, 18:02
RE: Sling - by d21spike - 2020-03-16, 19:27
RE: Sling - by Doctor Eggs - 2020-03-17, 13:17
RE: Sling - by d21spike - 2020-03-17, 13:33
RE: Sling - by usphil - 2020-03-18, 00:34
RE: Sling - by usphil - 2020-03-15, 20:08
RE: Sling - by hackthis02 - 2020-03-19, 20:38
RE: Sling - by d21spike - 2020-03-19, 20:54
RE: Sling - by hackthis02 - 2020-03-19, 23:07
RE: Sling - by d21spike - 2020-03-20, 13:28
RE: Sling - by hackthis02 - 2020-03-25, 08:59
RE: Sling - by d21spike - 2020-03-25, 15:21
RE: Sling - by clones - 2020-03-26, 01:28
RE: Sling - by mikefreeman - 2020-03-27, 21:25
RE: Sling - by clones - 2020-03-28, 17:59
RE: Sling - by d21spike - 2020-04-09, 17:26
RE: Sling - by snoopyjoe - 2020-04-10, 21:57
RE: Sling - by d21spike - 2020-03-26, 14:11
RE: Sling - by snoopyjoe - 2020-04-05, 00:38
RE: Sling - by Penbrock - 2020-04-05, 01:48
RE: Sling - by cimbor - 2020-04-06, 05:20
RE: Sling - by cimbor - 2020-04-12, 05:22
Sling - by MoreBloodWine - 2020-04-12, 06:33
RE: Sling - by Doctor Eggs - 2020-04-13, 15:01
RE: Sling - by rifken - 2020-05-05, 02:03
RE: Sling - by markeymark - 2020-05-05, 14:43
RE: Sling - by rifken - 2020-05-05, 18:57
RE: Sling - by markeymark - 2020-05-05, 20:57
RE: Sling - by lasers - 2020-07-14, 00:06
RE: Sling - by markeymark - 2020-05-05, 14:44
RE: Sling - by snoopyjoe - 2020-05-05, 19:40
RE: Sling - by lasers - 2020-07-13, 23:22
RE: Sling - by rifken - 2020-05-06, 00:36
RE: Sling - by rifken - 2020-05-06, 00:37
RE: Sling - by mikefreeman - 2020-05-09, 08:03
RE: Sling - by JSAKelley - 2020-06-23, 03:35
RE: Sling - by Doctor Eggs - 2020-06-23, 03:41
RE: Sling - by clones - 2020-07-01, 00:31
RE: Sling - by Alizarin - 2020-06-27, 23:24
RE: Sling - by mxlance - 2020-07-01, 15:29
Sling- Auto Start Channel? - by lasakro - 2020-07-01, 22:58
RE: Sling - by feerlessleadr - 2020-07-11, 15:03
RE: Sling - by lasers - 2020-07-12, 20:23
RE: Sling - by lasers - 2020-07-12, 23:08
RE: Sling - by feerlessleadr - 2020-07-12, 23:55
RE: Sling - by lasers - 2020-07-13, 23:34
RE: Sling - by snoopyjoe - 2020-07-15, 19:28
RE: Sling - by lasers - 2020-07-16, 21:33
RE: Sling - by lasers - 2020-07-16, 21:35
RE: Sling - by feerlessleadr - 2020-07-16, 23:30
RE: Sling - by lasers - 2020-07-17, 14:40
RE: Sling - by feerlessleadr - 2020-07-17, 20:20
RE: Sling - by markeymark - 2020-07-14, 11:26
RE: Sling - by hackthis02 - 2020-07-14, 18:33
RE: Sling - by siegel177 - 2020-08-09, 18:54
RE: Sling - by DarrenHill - 2020-07-16, 22:40
RE: Sling - by lasers - 2020-07-27, 15:23
RE: Sling - by lhassell - 2020-07-31, 19:15
RE: Sling - by lhassell - 2020-07-31, 19:23
RE: Sling - by lhassell - 2020-08-07, 18:58
RE: Sling - by lhassell - 2020-08-11, 01:07
RE: Sling - by Doctor Eggs - 2020-08-11, 13:43
RE: Sling - by lhassell - 2020-08-12, 03:20
RE: Sling - by lasers - 2020-08-12, 15:38
RE: Sling - by bzellinger - 2020-08-31, 02:35
RE: Sling - by bzellinger - 2020-09-09, 16:00
RE: Sling - by Doctor Eggs - 2020-08-17, 16:02
RE: Sling - by usphil - 2020-08-20, 07:34
RE: Sling - by Alizarin - 2020-08-23, 00:24
RE: Sling - by Alizarin - 2020-09-07, 01:03
RE: Sling - by hackthis02 - 2020-08-20, 06:38
RE: Sling - by Alizarin - 2020-08-23, 01:16
RE: Sling - by usphil - 2020-09-10, 06:42
RE: Sling - by Doctor Eggs - 2020-09-10, 21:25
RE: Sling - by snoopyjoe - 2020-09-11, 21:59
RE: Sling - by Alizarin - 2020-09-14, 02:46
RE: Sling - by randallspicher - 2020-09-14, 22:53


Logout Mark Read Team Forum Stats Members Help
Sling0
This forum uses Lukasz Tkacz MyBB addons.