Closed Renkyz closed 2 weeks ago
Okay, I‘ve fixed this bug for the other counter should not be a problem to do so for the playlist counter also 😄 I will ping you when I‘ll push a new release with the fix.
Nice, thanks Marcel! I also want to ask if there is there a way to toggle those connection counters off at all? Not an absolute must have for me, but just curious :)
Right now, no. I could add this option or at least place this info at a less viewable place (bottom of the page or something like that). But to be honest this feature is coming from the original project. So if there are more people who don‘t want to see this information I will add an option to hide it. This will be the easiest for me to do.
It's not a big deal for me so I'm not too worried about. Thanks for your consideration :)
Should be fixed now
Great! Will test it out now and wait for results. Thanks mate.
not true, 0 client and 0 playlist
@PilaScat I‘m not sure what you want to express with this screenshot. It does not match your text 🤔
@marcelGoerentz what I meant was that nobody is actually watching, he scores anyway
@PilaScat Maybe this is related to your RAM problem. Can you send me the logs?
Should be fixed now
I have tested for a whole day and can not reproduce the bug I was seeing anymore. The counter now seems accurate for me.
Updated the title to reflect what version had the bug for me when I created this issue. I'm now on 1.3.1 where it seems fixed of course.
Please close this issue when it has been fixed 😄
I noticed this the other day on 1.4.0. Not sure which versions are affected but I'm now on 1.4.1 and it still can happen. The playlist counter seems accurate but the client connections seem to get forgotten after some time and go back to 0, but playlist connection stays at the right number.
Strange, I will check if I can find it.
If it is difficult to find the issue, I personally wouldn't worry too much about it seeing as it is purely a cosmetic feature for me haha. Hopefully it's easy to figure out.
So after further testing, it seems the issue appears after a connection interruption or something like that. Not conclusive yet but this seems to be the case. The playlist counter is able to keep track but not the client counter for some reason. But, considering that this bug can take many hours to appear (for example I have had a test stream running for roughly 6 hours without a problem), and only if a sort of connection interuption takes place, I would consider this to be a pretty edge case scenario and not anything close to a priority fix. If there is anything specific I can do with regard to more testing, please let me know :)
Thank you but right now I think that should be fine.
I think I'll have to rewrite the complete buffer logic as it is hard to maintain and a complete mess -.- This will take some time, but at the end it will make everything easier and eventually fix this bug also!
I am about to update to 1.5.0. So far I've still been noticing issues with the connection counter and my most recent observation is that the client connections can bug out if more than 1 person watches the same channel. I've had a hard time replicating it by using my own devices in my own house but as soon as my friend connects remotely yo the same channel as me, that's when it seems to be able to mess up the counter. Not sure how else to better describe the issue.
I'm not too bothered about the feature tbh. It's as useful as not having the feature at all haha. The only thing that would make it worthwhile to me is if it told me what exact channel/playlist is being watched.
Ah this will be with the next update. I will update the API and then you can get a list of active channels sorted by playlist.
That will be great. Thanks again Marcel for all your work on this software. Myself and my friends who stream my city's local free to air TV channels from me really appreciate how well it is working for us haha.
That will be great. Thanks again Marcel for all your work on this software. Myself and my friends who stream my city's local free to air TV channels from me really appreciate how well it is working for us haha.
Please have a look at the latest beta, there is the extended API.
Running the beta now. Not sure exactly what has changed but I tested the client counter and it seems easy to trick still.
Here's what I did:
Loaded my channel list via the DVR IP in VLC player Played the first channel and checked Threadfin which said 1 playlist counter and 1 client counter. Skipped to the 2nd channel and all of a sudden Threadfin said 1 playlist counter, but 0 client counter. If I hit stop in VLC and then wait 10-20 seconds, then play the same channel again, the counter goes back to being accurate it seems. I'm testing alone at the moment without my friend who lives a few hours away from me in a rural town. Once he is able to try some of the channels as well and I have more testing done, I will let you know any additional info that we come up with :)
Other than the playlist counter, everything else seems to be working great!
Great to here, I didn‘t made changes to the Counter. But you can use this command to get the active playlists and channels from the API:
curl -X POST -H "Content-Type: application/json" -d '{"cmd":"getCurrentlyUsedChannels"}' http://localhost:34400/api/
Please adjust the url to your needs.
Thanks for all the testing.
How can I use that command? Do I execute it in cmd or something like that? I'm very unfamiliar with this sort of stuff, sorry haha.
It seems I just need to run it in cmd or powershell so I'll give that a go. By the way, the link to the API doccumentation leads to a 404 page for me. https://github.com/Threadfin/Threadfin-Documentation/blob/master/en/configuration.md#api
Also apparently Windows CMd doesn't like the single quotes.
C:\Users\Renkyz>curl -X POST -H "Content-Type: application/json" -d '{"cmd":"getCurrentlyUsedChannels"}' http://192.168.0.116:34400/api/
{
"error": "invalid character '\\'' looking for beginning of value"
}
Changing it to double quotes fixed it.
C:\Users\Renkyz>curl -X POST -H "Content-Type: application/json" -d "{\"cmd\":\"getCurrentlyUsedChannels\"}" http://192.168.0.116:34400/api/
{
"activeStreams": {
"playlists": {}
}
}
I'll go load up a channel on my spare machine and try again.
It works great. Just tested it running 2 different channels on 2 different machines. Both channels are in different playlists and running the command displayed all the information correctly :)
Yes, in command line
Good to hear 😄
Yeah I have to create a new document for the API and fix the link
Please check if latest beta fixed the issue.
Checking it now, will report back once my remotely located friend has a chance to test it with me :)
Still a little buggy. I used 1 device to load Channel 1 from Playlist A, this worked correctly and both counters were at 1. Then my friend and I both at the same time tried to load Channel 2 from Playlist B. All of a sudden the counter was 2 for playlists which is correct, but it stayed at 1 for client connections. Once I personally stopped watching the channel while my friend continued to watch it, I checked the counters again and playlist stayed at 2, but client connections went to 0. We are yet to see the client number go crazy like it has in the past, so it seems better so far but still not quite right. I'll continue monitoring it as more time passes. Thanks again for your efforts in dealing with this bug :)
Okay, I will remove this feature since the API is giving back a better overview about the used playlists and channels.
Yeah, accurate client connections would be nice though. The API command you gave me before only shows active playlists and I can't remember if you mentioned wether or not the number client connections could be displayed with that as well or not.
I'm still just using this as a .bat file that I can run whenever I need to:
curl -X POST -H "Content-Type: application/json" -d "{\"cmd\":\"getCurrentlyUsedChannels\"}" http://192.168.0.116:34400/api/ pause
Well, I will extend the API so the total count will be displayed also, if I didn’t before 😆
Cool, right now it just shows the active playlists ad which channels are being watched in each playlist. But it does not show how many clients are connected to each channel. If that's possible to add, that would be sufficient for me and probably most other users. Just need to make sure people actually know how to use that feature haha. Thinking about it, maybe it's possible to add a button in the GUI webpage that runs that command for the API and displays the results there for you? Might be a little over the top but a cool idea nonetheless haha. Thanks again mate!
In the latest beta I've extended the API. Please check if the counters are counting correctly now. I have not removed the info in the web server yet. That will be done in the next beta version.
Maybe I can Add a function in the web server to print out the counter per playlist. We will see 😃
Just downloaded it and testing it now. I noticed that the version number went back by 1. The previous beta was 1.6 (3-beta) and the latest beta is 1.6 (2-beta). Maybe you already know this but just want to make sure :) The extended API seems to work great though! I can now see client connection numbers being reported. Thanks very much :D
Yea the version number is intentionally. Okay, that sounds great :) There will be a new beta where the client counter will be removed. I think I also found the root cause when temporary Files are not deleted. Will fix this also.
Brilliant news! I will wait patiently for your next beta update. Hope things are going well for you.
Fixed in latest beta!
Just testing it now and can confirm that the playlist counter is indeed gone from the web page. The API is still working as normal with the command you gave me.
curl -X POST -H "Content-Type: application/json" -d "{\"cmd\":\"getCurrentlyUsedChannels\"}" http://192.168.0.116:34400/api/
pause
I just have that saved as a .bat file still so it's extremely simple for me to confirm which of my channels are being loaded etc. Thanks again for all your hard work on this Marcel :) this topic should now be considered closed.
@Renkyz You are welcome.
The new Playlist Connection counter seems to have a bug where it shows connections incorrectly. In my experience, when a client first starts a stream, it all works normally and the counter goes from 0/X to 1/X. But when the client stops watching, it seems to subtract 2 from the counter so instead of displaying 0/X, it shows -1/X. I'm not certain if this only happens if the client loses connection because of a network issue or some sort of crash, or if they simply just stop watching of theirown accord. It may happen for both situations, I have not tested it thoroughly yet. I'm also not sure why the Client Connection counter seems to have it correct, at least for me it seems to keep track of how many clients are indeed connected. This may also be bugged but I've not seen it yet. I'll attach a screenshot showing what I am talking about.