Comments (13)
The account works. I use it with Kodi on my FireTV-Stick all the time and if I leave out the getinfo() the account works with stb-prox as well.
Your code is no bad at all. It's readable, reasonable short and and it works.
And I like, that you decided to go with a framework (fastapi), though I would have taken just a plain simple Flask since you don't need to build your own api. Just implement one. But it's good as it is.
But: I can see from the structure of your program that you are not a professional.
If you want I can help you improve (I'm a python professional).
If you'd like, I'll submit Pull-Reuqests with the fixes and enhancements that I make.
The problem that I have:
the portal above is the only account I have
Different portals seem to behave a little different
It's impossible for me to test.
I'd fix the 404 thing which I described above, but it may brake other portals
So we have to communicate and test each others code.
If we had accounts on several portals, we could do that automatically using unit-tests.
What do you think?
from stb-proxy.
I think it's a great idea. I can help with multiple portal credentials for the test.
from stb-proxy.
Hi @kettenbach-it, I've sent you an email with working credentials.
from stb-proxy.
Okay, this portal returns a 404 for the request in getinfo()
Question is: what is getinfo() good for anyway?
The data requested in getinfo() is never used.
The same applies for getprofile() btw.
After ignoring the 404 of getinfo(), that portal works.
from stb-proxy.
In my testing getting a token doesn't mean the account works, neither does getting a valid profile.
A lot of accounts that do work need the get profile request before it will return a playlist and let you play channels.
I'm not a expert on this. I just put this proxy together because I couldn't get others to work.
I'm also not a "real" programmer. I just know a little python.
from stb-proxy.
If you are sure the account works, but fails the profile and info requests, I could make the app not fail if those requests fail.
from stb-proxy.
@rockydares Oh, this is really good
Suggestion: I'll dig into the code a little deeper and I'll write a fully automated test suite, that will test the code and all its future changes to comply with all portal urls that we have.
from stb-proxy.
Thats no problem help is welcome.
I have a couple other projects where I have used flask. I read that fastapi was much faster so I decided to try it for this and it does seem really fast.
I was using get info as the final test to see if the portal is working. Instead we could get the token then get the profile (unconditionally) and then see if we can get the playlist. If we get the playlist then we can assume the account is good. Without testing your credentials for myself it seems that would fix your issues without breaking how it currently works.
EDIT: we don't actually need to test accounts... that's just something I thought would be nice.
from stb-proxy.
I was using get info as the final test to see if the portal is working. Instead we could get the token then get the profile (unconditionally) and then see if we can get the playlist. If we get the playlist then we can assume the account is good. Without testing your credentials for myself it seems that would fix your issues without breaking how it currently works.
Either that, or we specify in a configuration parameter what type the portal is and implement the appropriate login scheme for each portal. I will check on that soon.
@rockydares Can you send me the portal accesses? Preferably by private mail. In my Github profile you will find my website and on the website an email address - if need with GPG Key.
I promise not to misuse it.
I will pass the portal accesses to the tests in an environment variable so that the accesses do not appear in the code.
We can also store them as a secret variable in the Github CI/CD.
from stb-proxy.
@rockydares Got them! I'll write some tests during the week if I find some spare time during the day
from stb-proxy.
@rockydares I started working on the tests. Are you sure these portals are working!?
from stb-proxy.
Those were working when I gave you. I tested personally. But if any of those not working now, I can send fresh credentials with more portals.
from stb-proxy.
How long will these credentials be valid?
In case you don't know the CI/CD mechanism yet:
With CI/CD (for Continuous Integration / Continuous Delivery), the tests stored in the code are automatically executed on the Github server with every commit of new code and only if all tests ran correctly - i.e. if the new code still connects correctly to the stored portals - is the Pull-Request released for the merge.
For our case, this would be very useful to make sure over time that all types of portals still work.
The credentials for portals are stored in a secret area of Github so that only the owner of the project can see them.
When the credentials lose their validity, they need to be renewed.
If this is often the case, the whole mechanism makes no sense.
from stb-proxy.
Related Issues (20)
- http://comag.rip:8000/c/
- Playlist editor lags out on very large playlist HOT 14
- Http proxy With auth support HOT 3
- HD Homerun for Plex HOT 2
- EPG not in xlmtv HOT 1
- Format or MIME Type not found HOT 5
- add "on and off" toggle for each portal HOT 1
- feature idea HOT 1
- filter channel by genre id and avoid update all playlist. HOT 4
- None of the accounts tested OK
- Need Help HOT 5
- Need configurations instructions
- Problems with Plex channel / EPG ID length HOT 1
- Streams are not terminated properly with ffmpeg HOT 2
- Serial Number -- Authentication Failures HOT 3
- Cannot understand how the fallback channel works HOT 3
- Windows or linux HOT 2
- [Feature Request] Merging m3u and epg from all MAC's within a portal.
- [Feature Request] Ability to record channels
- Feature request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stb-proxy.