Koenvh1 / ets2-local-radio

Radio from wherever you are in ETS2/ATS
https://koenvh.nl/projects/ets2-local-radio
Mozilla Public License 2.0
236 stars 40 forks source link

ETS radios on ATS #159

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello, I love the Local Radio plugin, I really enjoyed using it on ETS 2, but wanting to use it on ATS I don't have American radios I have European radios, For example in Los Angeles available radios are spanish radios What must be done to be able to use it with ATS? I tried several times and it is impossible for me to have the American radios, I use the last version released 20 days ago

Koenvh1 commented 3 years ago

It detects whether a process called "amtrucks.exe" is running. Apparently that is not working on your system for whatever reason. You can try to launch another program with that name to see if it switches then: amtrucks.zip

ghost commented 3 years ago

On old version it works (11-2019), I've American radios, but my browser crashes randomly every 5/10minutes because out of memory but on new versions it doesn't work If i click on "view all radios", I've this image

10 min later : Ok I understand, when I do this, I've American Radios, but if if refresh, i've ETS 2 radios, so for me never refresh !!!! https://www.youtube.com/watch?v=casTsndgC6E

cmse84 commented 3 years ago

I'm having the exact same issue and have to go through exactly the same steps as MrJlien to get it working. I tried the dummy amtrucks.exe but it didn't work either.

I've tried several different steps for a couple of hours but the only way I don't end up on european channels is by mimicking the steps by MrJlien. I've seen one or two other people on the web having the same issue. Very odd.

cmse84 commented 3 years ago

And after working a couple of times I'm back listening to spanish stations in Las Vegas even doing the previous described procedure. It sucks not being able to use this fantastic addon.

Koenvh1 commented 3 years ago

@cmse84 At the bottom of the web page, does it say ets2, ats or none (next to the "Switch theme" button) when ATS is running?

cmse84 commented 3 years ago

@Koenvh1 It says ATS, I don't have ETS2 installed. Yesterday it worked on and off but mostly on, today barely at all.

1

After pressing the "Toggle show all" link the stations displays but have the wrong flags and since the server thinks I'm too far away the stations won't play: 2

I've also tried:

Koenvh1 commented 3 years ago

Okay, so ATS is detected, yet it seems to still load the wrong stations. Strange.

Here is a small snippet you can add to your custom.js file (see the README) that adds a "Force ATS" button (next to the "Report broken station" button):

$('<a href="#" onclick="forceAts()" class="btn btn-xs btn-primary force-ats">Force ATS</a>').insertAfter(".lang-broken-station");
function forceAts() {
        g_skinConfig["threshold"]["ets2"] = g_skinConfig["threshold"]["ats"];
        g_skinConfig["ets2"]["map"] = g_skinConfig["ats"]["map"];
        g_skinConfig["ets2"]["stations"] = g_skinConfig["ats"]["stations"];

        g_skinConfig["threshold"]["none"] = g_skinConfig["threshold"]["ats"];
        g_skinConfig["none"] = {};
        g_skinConfig["none"]["map"] = g_skinConfig["ats"]["map"];
        g_skinConfig["none"]["stations"] = g_skinConfig["ats"]["stations"];

        $(".force-ats").remove();

        loadScripts();
}

Should work, although minimally tested and not meant as a permanent fix. Please let me know whether that works.

cmse84 commented 3 years ago

@Koenvh1 Thank you! It works but it's a bit janky. I have to do it exactly like this or it wont work:

  1. Start Local Radio
  2. Click "Open ETS2 Local Radio link" (or browse http://localhost:8330)
  3. Click "Force ATS"
  4. Start up ATS and load the game. As soon as I've loaded on to the map everything works as intended for the entire session.

Tried some other combos but this was the only way I could get it to work.

BUT... :)

If I refresh the site with F5 everything is back in spanish in Las Vegas. I think I had french stations in Santa Fee and I then had to repeat each step above to get it working again. The Force ATS-button doesn't seem to be working when ATS is running. Ofc, this is of no real concern since I'm not usually spamming the F5 key in the browser for no reason.

Going to try ATS with Local Radio on my laptop with an older version of Win 10 tomorrow.

Koenvh1 commented 3 years ago

It's a bodge, but a working one. I did not expect it to work fully smoothly. Something that might be worth looking into is your antivirus software, especially if it comes with its own firewall.

cmse84 commented 3 years ago

@Koenvh1 Running default Windows firewall and Defender. Disabled them both completely to no avail. At least I can get it running consistently now.