fHDHR / fHDHR_plugin_origin_locast

Do What The F*ck You Want To Public License
4 stars 1 forks source link

Missing channels in Guide #13

Closed jcastilloalonso closed 3 years ago

jcastilloalonso commented 3 years ago

Hi,

I noticed that the amount of channels that are shown in Guide is not complete. Guide has 36 channels while Locast shows 44 available channels. Not sure what I can provide you to identify why some are missing.

Thanks!

tharris9d commented 3 years ago

I updated to the latest version and I am also missing channels on the Locast Plex side that don't match up with fHDHR? So weird. I ran Locast2Plex to see if Plex had issues but Locast2Plex shows the proper Los Angeles Locast channels. I will upload a screenshot soon.

deathbybandaid commented 3 years ago

Try deleting your database, starting, and verify there are no duplicate channel numbers on the channel page.

deathbybandaid commented 3 years ago

I have some more reworking of the channels system in progress that will help with duplicate number issues

deathbybandaid commented 3 years ago

Also to clarify, is this latest release, or main branch?

deathbybandaid commented 3 years ago

The only recent changes that are channels/epg related are to make changes made via channel editting apply immediately

jcastilloalonso commented 3 years ago

Using main branch. Channel order is also not correct in guide (if it helps or it's supposed to be organized)

jcastilloalonso commented 3 years ago

Deleted data/cache/fhdhr.db and same result. I do notice they are sorted but by first letter and not numeric (like 11.2,11.3,2.1 etc.)

I notice that the main channels are missing (4.1, 5.1, 8.1, 11.1, etc.)

deathbybandaid commented 3 years ago

Channel order isn't important

deathbybandaid commented 3 years ago

What DMA number?

jcastilloalonso commented 3 years ago

DMA 623

jcastilloalonso commented 3 years ago

Sidenote, fHDHR web interface doesn't show DMA anymore, I just know it from heart :)

deathbybandaid commented 3 years ago

Odd, I'll have to fix the 'origin' page too

deathbybandaid commented 3 years ago

I checked the epg from locast, and those channels are still there, I will look first thing

deathbybandaid commented 3 years ago

Are channels missing on channels page, or just the guide/xmltv

tharris9d commented 3 years ago

Here is a screen shot of some weird behavior from the latest Main release. It is pulling phoenix stations. The highlighted stations should all be KTLA 5.1, 5.2, 5.3 from Los Angeles. It only happened on the new main release. image

jcastilloalonso commented 3 years ago

Are channels missing on channels page, or just the guide/xmltv

Just guide.

deathbybandaid commented 3 years ago

This is why I started making releases, bugs like this get caught by the loyalists?

deathbybandaid commented 3 years ago

Also, based on some newer threads for l2p, I think Locast may be mucking up their API

jcastilloalonso commented 3 years ago

This is why I started making releases, bugs like this get caught by the loyalists?

That's the idea right? a public way of doing QC.

Let me know if you want me to try older releases to see if it happens with older releases.

deathbybandaid commented 3 years ago

I couldn't sleep, so I started fixing the 'origin' tab (Locast).

I figured out how to do a flask template outside of my main templates directory, and a tomorrow release will bring back the contents of that page.

Since the 'origin' web page will no longer be part of the core codebase, it will be easier to write custom stuff per varient of fHDHR.

Also Also, I am adding an /api/origin endpoint, which each varient could potentially have some extra custom tools. For Locast, it might be useful to use this new API to show DMA information for other zones in tabbed "pretty" JSON format

deathbybandaid commented 3 years ago

I also have some plans to restructure the Guide page to merge with the xmltv page, and possibly provide additional endpoints for alternative EPG methods (such as the tvtv method added earlier today)

deathbybandaid commented 3 years ago

I also just want to note that when coding, to sort numerically, doesn't always work cleanly, you'll often see 11 before 2 because that's how things work.

deathbybandaid commented 3 years ago

I may have had a mental lapse, I had forgotten to push some code from my dev branch to here

https://github.com/fHDHR/fHDHR_Locast/pull/125

This include multiple adjustments to EPG/XMLTV, the addition of a new EPG method for tvtv.us, and the new 'origin' page

I've also added a couple API tools.

/api/origin/tools?method=channels&dma=623

[
    {
        "id": 231,
        "dma": 623,
        "stationId": "20371",
        "name": "KDTNDT",
        "callSign": "2.1 DYSTR",
        "logoUrl": "https://static.locastnet.org/logo/623/1606463266046_DYSTR.png",
        "active": true,
        "listings": [],
        "sequence": 10,
        "logo226Url": "https://static.locastnet.org/roku/Dallas/KDTN.png",
        "tivoId": 69024934
    },
    {
        "id": 232,
        "dma": 623,
        "stationId": "19616",
        "name": "KDFWDT",
        "callSign": "4.1 FOX",
        "logoUrl": "https://static.locastnet.org/logo/Dallas/KDFW.png",
        "active": true,
        "listings": [],
        "sequence": 20,
        "logo226Url": "https://static.locastnet.org/roku/Dallas/KDFW.png",
        "tivoId": 69022690
    },
    {
        "id": 1577971909791,
        "dma": 623,
        "stationId": "49091",
        "name": "KDFWDT2",
        "callSign": "4.2 DECADES",
        "logoUrl": "https://static.locastnet.org/logo/Dallas/DECADES.png",
        "active": true,
        "listings": [],
        "sequence": 30,
        "logo226Url": "https://fans.tmsimg.com/assets/s91415_h3_aa.png",
        "tivoId": 69031731
    },
...
]

/api/origin/tools?method=zipcode&zipcode=10007

{
    "DMA": "501",
    "name": "New York",
    "small_url": "https://static.locastnet.org/cities/new-york.jpg",
    "large_url": "https://static.locastnet.org/cities/background/new-york.jpg",
    "active": true,
    "announcements": [],
    "latitude": 40.71385,
    "longitude": -74.00775
}

Hopefully one of you has some free time to test this sooner than later

jcastilloalonso commented 3 years ago

And they are showing up now. As always thanks a lot for your time and effort on this project. It really helps a lot! I'm ok with closing, but leaving it open for tharris9d to confirm on his side.

tharris9d commented 3 years ago

@deathbybandaid I will be testing this morning and reply back here when done.

tharris9d commented 3 years ago

I did a fresh install of the latest main code. If I use zip code in the Plex UI instead of xmltv path http://127.0.0.1:5005/api/xmltv?method=get&source=origin it works perfectly. If I use the xmltv url I get all the guide info but it's 4 hours off. All the channels are working and line up now either way. Any idea on why the guide info is off again on the xmltv.xml info? FYI: This is a fresh install but I still cleared cache and updated the locast xmltv.

jcastilloalonso commented 3 years ago

. If I use the xmltv url I get all the guide info but it's 4 hours off.

Nice catch, I also see the same here. Right now 1:00pm shows 7:00pm shows in guide. So a 6hrs difference for central time

deathbybandaid commented 3 years ago

for both of you, if you want to test

https://github.com/fHDHR/fHDHR_Locast/pull/126

I've implemented some behind-the-scenes changes to the channel numbering system to allow channels like "3.10", this should also improve guide data.

A fresh db is not required, but recommended.

tharris9d commented 3 years ago

Tested fHDHR/fHDHR_Locast#126. The advanced button is nice. I am exactly 8 hours off in the guide. It's showing the Rams vs Patriots playing now. LOL The Channels and Channel editor numbering is exactly what I was looking for. AWESOME.

deathbybandaid commented 3 years ago

that's odddddd,,, as all the timestamps involved are UTC

deathbybandaid commented 3 years ago

if you go to the xmltv page, and click the epg link, you can see the timestamps that were pulled from Locasts API

deathbybandaid commented 3 years ago

so for me, in Eastern Time, everything seems to be correct, I can toggle between zap2it and origin, and see the same shows on for right now

tharris9d commented 3 years ago

The xmltv looks correct too. The guide ui and Plex is pulling it incorrectly here on the west coast. Maybe a setting I missed? `<programme start="20201210170000 +0000" stop="20201210203000 +0000" channel="11.1">

NFL Football The Rams (8-4) host the Patriots (6-6) in a Super Bowl 53 rematch. New England won its sixth championship, 13-3 over Los Angeles on Feb. 3, 2019. The Patriots play consecutive games at SoFi Stadium after routing the Chargers 45-0 last week. Movie: Unavailable 12600000 Football Football Sports event Sports event Sports Sports N/A

`

deathbybandaid commented 3 years ago

I haven't changed anything that would have an effect on time

However, you may need to remove it from plex, restart plex, and readd.

tharris9d commented 3 years ago

I haven't changed anything that would have an effect on time

However, you may need to remove it from plex, restart plex, and readd.

I started with a fresh install again, added the app with xmltv url and got the same 8 hours off guide issue. If I use the zip code through plex it pulls the proper guide info. So weird.

deathbybandaid commented 3 years ago

you can also try the zap2it and tvtv options for xmltv and see if you get the same offset

jcastilloalonso commented 3 years ago

Here are screenshots on how it looks for me https://imgur.com/a/MknYeZA

deathbybandaid commented 3 years ago

WAIT,, let me push something

deathbybandaid commented 3 years ago

try now with

https://github.com/fHDHR/fHDHR_Locast/pull/127

deathbybandaid commented 3 years ago

fHDHR/fHDHR_Locast#127 actually breaks something else I was working on, with some missing guide information

jcastilloalonso commented 3 years ago

cleared cache and still shows the wrong time.

server date is CST if it makes any difference: $ date Thu Dec 10 14:03:09 CST 2020

deathbybandaid commented 3 years ago

you installed fHDHR/fHDHR_Locast#127?

jcastilloalonso commented 3 years ago

yes sir, just did a git pull as I saw you merged it

tharris9d commented 3 years ago

I did another fresh install for fHDHR/fHDHR_Locast#127. I am still showing the wrong time in the guide in the web ui and in Plex. Also tvtv is giving me an internal server error. Zap2it is only giving me 3 channels.

deathbybandaid commented 3 years ago

@tharris9d in your config set

[tvtv]
postalcode = 
lineuptype = ota
deathbybandaid commented 3 years ago

Are either of you using a VPS or anything like that?

deathbybandaid commented 3 years ago

well, I just doublechecked the Locast EPG, and I'm reverting fHDHR/fHDHR_Locast#127 as that has no effect here

jcastilloalonso commented 3 years ago

Using CentOS 7 with Python 3.7 manually compiled, home server no VPS or anything.

deathbybandaid commented 3 years ago

This is confusing, I can't think of anything that would offset your guide data, and mine works perfectly

jcastilloalonso commented 3 years ago

me neither, 8 hrs is more than difference with UTC