lethak / LTKDIFMU-userscript

No more Audio and Visual ads. Allows AFK, Allows AdBlock, on all radios from AudioAddict including www.di.fm and more.
111 stars 8 forks source link

[2018.2.167] Track download button is missing from the DOM (Premium Account) #17

Closed domdorn closed 6 years ago

domdorn commented 6 years ago

I just wanted to check why the download button disappeared and noticed, that you're now obfuscating the source... why?!

lethak commented 6 years ago

Hi, What do you mean by "the download button disappeared ?" All current and previous releases are still there https://github.com/lethak/LTKDIFMU-userscript/releases

As for the obfuscation, its simply minified and packaged using automated tools like babel and webpack to dramatically reduce the script size since I started including a lot of library to start building a more complex framework for future ideas I would like to add. (I will publish the code base later when its completed, and it will be on another repository)

If you wish to fork the project you can do so using this tag prior to minification https://github.com/lethak/LTKDIFMU-userscript/tree/v2018.1.4b

domdorn commented 6 years ago

image the download button in this screenshot disappeared.

as for minification: It would be great if you could still also provide the unminified source in the repository. this would get experienced users the chance to debug issues themselves and provide contributions to your user-script. it would also give me the peace of mind, that my credentials are not sent-out to another website, as I can look through the code and see whats going on.

Thanks, Dominik

lethak commented 6 years ago

Ah this download button ! :D this seems to be missing indeed ! I will take a look

lethak commented 6 years ago

It seems the di player's DOM was updated, and the userscript was not able to find a suitable container to add the button to. I will add an error console message if no suitable DOM container can be found for future iterations of this event.

Fixed in: https://github.com/lethak/LTKDIFMU-userscript/releases/tag/v2018.3.4

domdorn commented 6 years ago

Hi.. this issue reappeared for me

lethak commented 6 years ago

Hi, I have not worked on this for a while but everything is still working as intended from my side, do you have more details ? browser, userscript loader, versions, etc. (open a new issues with steps to reproduce) thanks

lethak commented 6 years ago

Thanks. Indeed something changed on DI's side for Premium Accounts, I'll look into it soon

domdorn commented 6 years ago

thanks!

lethak commented 6 years ago

Do you have an error in the javascript console ?

Cannot find a suitable DOM container to inject the download button

domdorn commented 6 years ago

I'm having this one when loading the page image

I also noticed that sometimes the Download Icon is there, and sometimes it disappears (e.g. when switching to another channel) .. however, there's nothing logged in the console.

A "workaround" seems to be to switch to a channel that has a live-show running.. after that, the download button appears, then I can switch to other channels and the download button also appears.. after some clicking around (switching channels) it disappears again and I have to switch to a live-channel.. If I'd have to guess, i'd look for some global state?

lethak commented 6 years ago

Let me know if v2018.7.1 fixed your problem.

If not, you should have new console errors to forward here ;)

domdorn commented 6 years ago

hmm.. its still somehow flacky.. sometimes works, other times not.. exception looks the same as before.. ( I checked that I'm now using 2018.7.1 ) image

is there a way I can debug it?

lethak commented 6 years ago

Alright, I was lazy and did not compensated properly for the "index 95" error (I could have..) will do soon. This error means the DI request/responder webplayer:ads:shouldShowMidroll is missing. This error is only showing with premium accounts, and I have no such account available to test atm. So, thank you for helping.

can you try in the console:

di.app.request('webplayer:ads:shouldShowMidroll')

what is the outpout ?

lethak commented 6 years ago

Alright, give it a new try

lethak commented 6 years ago

fixed in v2018.7.5 (commit message stating 2018.7.8 is a mistake)

Thanks for your help

domdorn commented 6 years ago

I'm still having the issue when continuing my stream on "Big Room House" which continues in the last song image

lethak commented 6 years ago

This is another problem altogether based on your connection being too slow at loading the track. (#19)

I'll find something to solve this

domdorn commented 6 years ago

hmm.. I have a 100mbit+ connection here, so connection speed shouldn't be a problem.. are you adding the download track button only when the track is loaded? the url is in the json response of the channel xhr request image

lethak commented 4 years ago

Fixed as of 0254dd3fda4556ca0dcddcbeefe036f2741bed8a (v2020.3.429) (better late than never :))