Open Rex000 opened 4 years ago
Firefox addon development isn't really something I'm versed in I'm afraid. I don't hate the idea of getting in to it but I'm certainly not at the point I could do much right now. Then again, Coronavirus quarantines could be the ideal time to learn ;)
What bugs or missing features are you talking about? I'll have a quick look on the off chance it is something I could sort out on my fork.
What bugs or missing features are you talking about? I'll have a quick look on the off chance it is something I could sort out on my fork.
Myself and others have been reporting issues over here but since @Hunter5000 is gone, there was no one to take care of them.
https://github.com/Hunter5000/twitch-fox/issues/5
https://github.com/Hunter5000/twitch-fox/issues/11
https://github.com/Hunter5000/twitch-fox/issues/12
I want to add that I had been using v3.1.12 until Sept, 2019 on Firefox 56.0.2. It was the best version. After that, Twitch decided to get rid of their old API and switched to the new Helix API, due to which v3.1.12 of this add-on became useless. I had to switch to the latest version which is v4.2.3 which has all the above mentioned bugs and missing features. It would be great if v3.1.12 could be converted to the new Helix API somehow. If not then maybe fix v4.2.3 somehow.
Thanks!
Hey @Rex000, I happened to fork this addon a while ago for myself, but I figured i'll share it here. I pretty much rewrote 80% of the code and fixed most of reported by you issues:
From #11:
From #14:
From #15:
You can try it out without removing original one Let me know if you're willing to try it out, and if you find any issues https://github.com/kubaska/twitch-fox
Hey @kubaska ,
This is really nice to hear that finally someone is doing work on this addon. I have been using Firefox 56.0.2 because of a number of addons including old Pocket and Tab mix plus. Your addon didn't work on it so I had to try it on the new Firefox in sandbox. But when I tried loading my offline list to it, it didn't load. I also tried following a channel by clicking on the heart icon but it didn't show up on my followed channels list either. Idk maybe it's because I'm running it in sandbox?
Also, you mentioned on your page that it has the ability to follow games now, but I couldn't find that option.
Another big issue or perhaps the biggest one right now for me is #19 if you can do something about it please.
Hey @Rex000, I installed Firefox 56 and indeed it does not work as expected. I'll try to explain whats going on: When background script starts, extension registers a tab change event listener. This is used to extract access token for those who want to login to Twitch. Previously, that event fired every single time user navigated to a new page. I added a filter to only match token extract page for performance reasons. This filter is supported on FF 61+. Earlier versions refuse to load background script entirely when it is present.
Regarding offline list, do you mean exported follows from v4.2.3? I remember testing importing from old version and it worked fine. Maybe there is something wrong with your backup? If you can send me the file I'll see whats wrong. You can send it here or email it to me at: kontakt (at) kubaskowy.ovh
The locally followed channels do not end up on Followed Channels tab now, but in extension options. I wrote it that way because Twitch does not support requesting users in bulk. So if you have 800 channels, it sends 800 requests every time you start the browser, and I wanted to avoid that. (And if the request fails there was no code to retry) I might bring it back for Helix update in some mini version.
As for following games, you likely misead: I added ability to follow streams locally while being logged into Twitch - so you don't have to choose between your Twitch and local follows anymore.
Finally, Thanks for trying it out. I didn't know anyone was using FF this old. Out of curiosity, I googled this Tab Mix Plus extension and it looks like devs released new version of it with modern FF support: https://github.com/onemen/TabMixPlus I don't want to lecture you, cause you probably have a good reason to use old FF, but maybe its time to update? You're missing out on some big features.
Hey @kubaska,
Thanks for the explanation on why the addon isn't working on 56.0.2, and it does make sense.
Yes, by offline list I mean my exported list from 4.2.3. Sorry for using the wrong term about followed channels, I got confused. I meant "Currently live followed channels". But guess what, I've figured out the issue. It's actually the content of the exported files. The original addon uses only channel ID's, whereas yours is more detailed and has channel names in it too.
Here is the list generated by v4.2.3
And here is the list generated by v4.3.0
So this is why it's not loading my list from v4.2.3. Can it somehow be made to load the list from 4.2.3? Otherwise I'd have to manually follow 800+ channels again.
There is an issue though. I tried adding some live channels by clicking the heart icon but they often take time to show up in my "Currently live channels' tab. Same thing with unfollows, it takes some time, maybe a minute, for them to be removed from my "Currently live channels' tab. The number of live channels that shows on the Twitch Fox icon doesn't update either until they are fully removed.
By following games, yes I kind of misunderstood. I meant the line where it says "Receive notifications for channels and games". I thought you meant that it now has the ability to follow games offline, just like it did up till v3. Is it possible to add it again in v4?
Though regarding what you stated about the "Followed Channels tab"- in the original addon it loads the followed channels only when I click on that tab, and as I scroll down it loads more of them and so on. Otherwise it doesn't load them from what I've noticed.
You're very right about using the new Firefox and I want to do that too. Also thanks, I can't recall if I ever came across that Tab mix plus github link that you provided. I remember trying a few things including workarounds and forks on github or elsewhere but they didn't work. But I could live with that. The thing is that the old Pocket extension is so good that still today there is nothing like it and Idk why. The closest I could find was "In My Pocket" addon but it's not that good.
Hey @Rex000, I released an update that fixes legacy imports. By importing legacy follows, you'll only see channel IDs in addon options, but heart icons in popup will work fine.
Adding or removing follows works with a delay, yes. It instead gets queued for next follow refresh, which is 1 minute by default. I didn't really bother to fix this. Lets say it gives you final chance to think if you want to unfollow said channel.
The "following games" line got copied from this repo when I forked it, haha. How would following games work? Would it be just a list of games you picked, but in a separate tab?
Oh and try importing the 800+ channels list again. If it shits itself again, please send me the whole list, so I can investigate. (I dont really want to follow 800 channels by hand)
Hey @kubaska,
Thanks for the new build, it now seems to be able to import the full list. Too bad though that we can only see channel ID's and not the names in the options anymore. Another thing I noticed though is that when you hover the mouse pointer over a channel name underneath the thumbnail where it says "XX viewers on [channel]", it doesn't show the actual channel name in the tooltip anymore. This was a useful thing in the original addon mainly because of non-English streamers who often have their names in their own language. The tooltip would show the actual English name of their channel.
Thanks for the explanation on the follow/unfollow delay. I can surely live with that as long as it does its job fine.
About the following games feature, it was present up until v3.1.12 but was removed in v4. Yes it means to have a separate tab that kept a list of your followed games' in thumbnail form. The list was managed offline, just like the list of offline followed channels. It was pretty convenient because whenever you wanted to see any available live streams for a game, you would just click on the game's thumbnail and it would list all the available streams. Not only that, but it also showed the number of currently live streams as well as the total combined number of viewers underneath each game's thumbnail. Currently you have to go to the games tab, type and search for the game, and then it shows you the game's thumbnail where you can select different options such as View current livestreams, View videos, View clips, etc.
Hey @Rex000, Im glad importing is working fine. I didn't even realize channel name tooltip used different name, haha :D It got removed because I handle click events differently, and tooltip often got in the way and I felt it was too annoying. I'll bring it back in old way or another in next release.
I just looked up the docs and it seems possible to make following games happen. Since I have to remove few features to port this addon to new api, I'll probably add this one to balance it out.
I will focus on changing API to new one for now since current one is going away in february.
Hey @kubaska,
It's great to hear it, it would be great if we could follow games offline. Though I really hope the new api doesn't cause any problems in offline following of channels and games. I don't know why twitch has to do this so soon, it's only been like 4 years since they changed the api. They don't realize how hard it is for coders to rework the code again. I remember how the makers of various addons were angry that the switch to new api wasn't really friendly to them.
Anyways, I've found some more issues. Lol.
So when you click on a game in the Games tab, for instance "Just Chatting", it shows you the currently live streams for it. You scroll down to see more results, but then at some point it just stops loading any more results. It's happening more than often and the behavior is pretty random too as sometimes it stops after 100 results, sometimes 200, sometimes 600, and so on. I double checked with Twitch and there were certainly more results available but the addon didn't load them. The Refresh button on the top didn't help either. The addon just refuses to load any more results no matter what.
The Refresh button in general doesn't seem to be working as intended like it used to. Many channels that got offline didn't get removed even after clicking on it several times. In the original addon they get removed almost instantly.
Another thing I noticed is that the original addon shows the total count of channels in the options. However in 4.4.0, there is currently no way to tell as to what is my total count of followed channels. Also if I load my follow list from a backup, there is no way to tell if my follow list is loaded perfectly or not without missing any entry. So it would be pretty handy to have that figure display in the options or just anywhere convenient in the the new addon too.
I also wanted to ask what you mean by "lazy loading" of thumbnails. From what I noticed whenever I click on "Enlarge preview", they load like before but in a slow motion kind of way. If that's what it means, then I personally would prefer the old smooth way of loading thumbnails as is in the original addon. I however would like to suggest something from v3. The addon would load a "light" or lower-res version of thumbnails to display in the list of live channels. When you clicked on "Enlarge preview" for any channel, it would load a bigger higher-res version of that thumbnail. This setting was perfect because it would only load the high-res version if you clicked on "Enlarge preview". That helped load the live channels display list much quicker as well.
@kubaska URGENT ISSUE!
I added some new channels to my list and everything went fine. Then something came up and I closed the browser and went afk. Then I came back, opened the browser, to my surprise, the list wasn't loading and I wasn't seeing any currently live channels. I kept waiting for it to load then I went into options and saw that my list was wiped out?!
Luckily I had made a backup so I imported it and then it finally got loaded. Though it took a bit too much time for the currently live channels to show up. Then just to check, I closed my browser and opened it again. Same issue happened and my list got wiped out.
Why is this happening? Can you look into this? Thanks.
Hey @Rex000, I don't have much time rn, so I'll keep this short. The described issue is most probably the same as before - browser limiting storage space. Please send the list so I can check.
Regarding prev. comment,: I tested loading more streams from category and its working fine for me though I'll test this more later.
Total count of channels is a great addition, consider it done for next release
Lazy loading loads images as you scroll the list. Try grabbing the scrollbar and rapidly moving it to the end of the list. You'll see that images just start to load. Once an image gets loaded, displaying it in "Enlarge preview" should be instant. Issue that you describing would happen if I loaded smaller version of image for stream list, and then loaded bigger for "enlarge preview".
Hey @kubaska,
I totally understand, and thanks for the explanation on the thumbnail image loading. Really sorry to be a bother but I've been testing your addon quite extensively so that I can make sure to provide quick and thorough feedback as much as possible. It's really frustrating because I even uninstalled my old Firefox and installed new Firefox because after testing in a sandbox environment I was convinced that the major issue of not being able to add more than 831 channels was finally fixed.
Loading streams from category and even from the "Browse top live streams" tab is still an issue for me. I just checked again in the "Browse top live streams" tab and it only loaded 200 results. I then got back out of it and entered again, same thing. Then I got back out again then entered again and then it finally loaded more results. Though I noticed that after some time of scrolling down it started to show duplicate channels and it kept going on endlessly repeating the same channels over and over the more I scrolled down.
Now on to the main issue. So I created a fresh dummy list from v4.4.0 so that there is no chance of any kind of confusion if my old list is the problem. I restarted the browser and it did show the currently live channels... but only like 200+ of them out of 900+ that were live. I then went to the options and imported the same list, and now it loaded the full 900+ live streams. I tested this several times but it kept doing the same thing.
Now I imported my original list. It loaded fine and showed all the currently live channels. I restarted the browser and... it then loaded the same 200+ live channels from the dummy list? Very strange. I repeated this several times but it just kept loading the same 200+ live streams that are not from my original list but from the dummy list. Seems to me that the dummy list has gotten stuck somewhere in the addon.
So in short, as long as the browser isn't closed and I manually import my original list, only then it loads my list fine, but only for that session. Restarted the browser and the same old 200+ channels were back from the dummy list. There doesn't seem to be any way to remove them anymore, they just keep coming back. I even cleared the browser cache and restarted my PC to no avail.
I have sent you both lists. Hope you can figure it all out. Thanks!
Hey @Rex000, I loaded both lists to my browser just fine. I even merged both lists you sent me totalling to 1800 follows and still loaded fine AND persisted through browser restarts. I don't think addon is the issue here.
Imported list persist in browser session, because I set follows in memory without checking if browser correctly saved them on drive. (I was actually thinking about this the other day and thought it could be an issue - I plan to fix this for next release) You use the list from memory and when you restart the browser, follows load from drive - and since previous save failed - it loads previous correct state.
So somehow setting follows via browser fails. What version did you update to? Did you do a clean install, or upgrade? Did you change anything in about:config?
Hey @kubaska,
You're right. Something unknown is happening on my end.
What I did is I uninstalled the old version and manually deleted the Appdata folders including the Profile folder too, which from what I know is the method for fully uninstalling Firefox. Then I downloaded and installed the latest Firefox 92.0.1 x64.
I have tried the original addon too and it's doing the same thing! This is so weird. Idk why my browser is failing to save the list upon exit? There is no browser crash of any sort on exit either. I just did a clean install yet again and the issue still persists. Ran the browser as administrator as well. I have no clue what's going on anymore.
Hey @Rex000, I figured it out. As I suspected, the issue is the browser limiting storage. I missed the footnote on browser API docs mentioning that those limits were not enforced til FF 79, and since I tested it on FF 78 (current ESR) it was working fine for me.
I honestly have no idea how to circumvent this. I could switch to local storage which does not have those kind of restrictions, but I don't want to give up synchronization.
Ok I decided what I'll do: Im gonna give the option to switch storage area for local follows. This way the user will have an option to choose what suits them the best. I was considering adding some compression library, but its just postponing the issue. You'll add another 200 channels and we're back to square one. Another option would be splitting follows to multiple variables but it would be hell to code around.
You can follow up to ~500 channels on sync storage now so I think thats enough. If user wants to follow more than that they can switch to local storage or just follow through Twitch.
Hey @kubaska,
Ah, thanks for finding out the real cause. I was going bonkers as to what's happening on my end. It's a shame they restricted it like that in 2021 instead of giving more freedom.
Your idea sounds perfect given the circumstances. If it makes it work then it would be great. I don't use Firefox's sync feature so I'd be fine without it.
Hey @Rex000, While working on Helix api update, I identified and fixed issues you reported. New version is available here.
Since this is probably final v4 release I also uploaded a second version featuring local storage. Before installing, please export follows, since you'll have to load them in new ver. - I did not bother with option toggle, because I want to focus on Helix now.
Hey @kubaska,
Great job on the addon! The offline version seems to be working fine so far. I came across a few issues however that I thought I should report:
Infinite scrolling of lists still persists as it starts repeating the same results over endlessly after a bit if you keep scrolling down.
While scrolling down a list, it occurred quite often that I clicked on "Enlarge preview" on a thumbnail and it did show the enlarged preview, but the spot where the thumbnail was present just got blank. The thumbnail was completely gone and there was no way to bring it back. It kept happening with more thumbnails too as I clicked on their "Enlarge preview" button.
The addon doesn't remember last tab setting anymore when the browser is closed and always shows the "Browse the top live streams" tab whenever the browser is reopened.
While you're scrolling a list in a tab, for instance "View streams of currently live followed channels"; if a new channel comes online or an existing channel goes offline, the list doesn't get updated. I waited for several minutes for it to update but it didn't. Then I found out that it only updates if you switch to another tab and then come back to it. The "Refresh" button seems permanently disabled in the "View streams of currently live followed channels" tab so there is no other way to see the new live streams than to first switch to a different tab and then get back to this tab again.
Lastly, a couple of suggestions for future updates:
There is a button in v4.2.3 options called "Remove all follows". It comes in handy if you want to quickly purge the database and start fresh. Would be nice to have it back.
Also, would be nice if the addon can have the ability to search for tags.
Once again great work on the addon, I really appreciate it.
Hey @Rex000, Thanks! Im glad to hear that. As for issues, answering respectively:
Suggestions:
If any more issues come up report them and I'll release patch next week.
Hey @kubaska,
You're right. I just checked for streams and the duplication does seem to happen after 900 results. I just noticed that Infinite scrolling is also happening in the "Browse top games" tab if you use the search filter to search for a specific game.
- This is intentional to prevent resetting whole result list and scroll position. Now that I sorted it out I'll maybe add it back for v5
I see, it does make sense. However if possible, for the time being it would be handy if at least the "Refresh results" button could work in the "View currently live followed channels" tab so you could manually refresh the list. Just an idea.
A couple more things:
The "Exit search" button appears to be disabled everywhere except the "Browse the top games" and "Search for channels" tabs. Imo it's needed in other tabs too because currently whenever you use the filter to search for something, then afterwards you have to manually clear the filter every time by using backspace in order to bring back the full list.
Also I just noticed albeit late that the "View recent videos from followed channels" tab shows nothing. I don't know if it's intentional so just thought I'd ask about it.
Hey @Rex000, Apologies for late reply. tl;dr: my hard drive failed and I had to buy a new one; fortunately, I was able to copy all important stuff over.
Now, onto the issues:
I'll release the patch over the weekend.
Hey @kubaska,
Oh I'm sorry about your hard drive. I'm glad you were able to recover important stuff. I'll wait for the update. Thanks!
Hey @Rex000, I uploaded new version for you to use. The exit search issue turned out to be more difficult and tangled with other UI code than I thought so I did not include it, sorry.
Hey @kubaska,
Sorry for the late response, I was a bit busy. Thanks a lot for the new build, the infinite scrolling thing seems to be fixed now, and the list now loads around 800+ results, sometimes 900+, it's variable.
A couple of things that came to my attention so far:
Also, a related suggestion. It would better to have it display the number of current live streams instead of the number of viewers. Or even better if it could display both.
Thanks!
Hey @Rex000, Sorry for my exceedingly long response time. For the last month I've been exploring other options on how to port the extension to some reactive framework as I wanted to do earlier this year. I tried Vue+Vuex for a bit, because I have a lot experience with it and Preact with redux and with both of them I felt like I hacked my way around. The UI stuff was def much much easier and better structured but the rest was a pain. So in the end I decided to fall back to original code and work with what I have. I feel like this is the best decision for both me and addon.
I expect to have a stable release mid-december. Im excited to say that it'll feature an entirely new way to browse Twitch.
As for your reported issues: since they are so minor I wont be fixing them. I feel like 4.4.2 is in 'good enough' state for the remaining 2 or so months. I'd be more eager to provide a patch but since we're the only ones using this Im not really concerned.
Hey @kubaska,
No problem mate, I can understand. Glad to know that you worked so much on this addon. You have done a great job so far without a doubt.
As for fixing those minor issues, it's ok, I don't expect them all to be fixed. I just feel that whenever I find something, I should at least bring it to your knowledge, because who knows maybe some could be easier to fix.
I hope the next build/release is in every way better than the current version. Best of luck!
Hex @Rex000, Just wanted to let you know that I released Twitch Fox 5, since old API is shutting down today. Should be fine to just install new version over old, but if there's any issues I added an option to reset all settings.
Hey @kubaska,
I'm glad you ported it to the new API. I've just downloaded it and so far it's been working fine. I'll be sure to report any abnormalities.
Thank you so much for your continued work on this addon!
Hey @kubaska,
I just noticed a new updated version (5.1.0) got downloaded. I'm really glad that we can finally follow games now. Thanks so much for that.
There are a couple of things I noticed and a suggestion.
"Refresh the results" button doesn't seem to work and gets stuck on "Loading... please wait".
Currently there is no way to quickly scroll to the top of the list. It would be nice if the Home key could be used for that, and also if the PgUp and PgDn keys could be made usable.
Longer game names don't fully display in the games tab and that can get confusing. What can be done is make it so that if you hover the mouse on the name it displays the full name as a tool tip.
If you remember, v3 of Twitch Fox used to display the no. of current live streams under each game thumbnail, as well as the no. of viewers. It also sorted games in descending order, I think based on the no. of viewers. For instance:
GAME-1 | GAME-2 | GAME-3 |
---|---|---|
15 streams | 15 streams | 14 streams |
5000 viewers | 4800 viewers | 4800 viewers |
And so on.
It would be great to have this feature back since it allows to immediately know which games are currently live and hot, instead of clicking on each of them just to see if there are even any live streams available or not.
Thanks for the great work!
Hey @Rex000, I'm glad you like the changes.
Thanks for reporting and using the addon.
Hey @kubaska,
Ah I see, I thought the refresh button had some problem. It's clickable in the games tab though. I wish it was usable in the streams tab as I've noticed that often times when I click on a stream, the twitch page shows that the stream got offline a few minutes ago, but it still shows the thumbnail in the tab.
A couple more issues I just came across:
I accidentally removed Twitch Fox while removing another addon. When I reinstalled it and loaded my list, it only had my followed channels but not the games. The followed games tab was completely empty.
When searching for a stream or game, the "exit search" button doesn't work. The only way is to either change the tab then come back or manually delete the search letters. I don't remember if this was the case before so I thought I should bring it up.
Glad to hear that the game data can be displayed. It's a shame that they made the api less useful than it used to be instead of the other way around. I really hope the GQL api works as it would be a very useful feature to have.
Thanks!
Could anyone please takeover the development of this extension or just create a fork of it? The author has been M.I.A since Nov, 2017 and it doesn't look like he's coming back. The last version of this addon has bugs and missing features that were there before up until v3.1.12.
@Castria Can you do it?