Skip to content

Commit

Permalink
Merge branch 'v3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenvh1 committed Aug 28, 2021
2 parents 842679f + 8e46064 commit 719dc78
Show file tree
Hide file tree
Showing 35 changed files with 411 additions and 235 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Each country has its own (random) colour, to make it easier to see the differenc
### What is the PeerID and what does it do? / Can I use my phone/tablet to control the radio?
The PeerID is an ID that identifies that instance of ATS/ETS2 Local Radio.
It allows you to control Local Radio from another device, like a phone or tablet.
Simply go to the URL shown in the server on your phone or tablet (e.g. http://localradio.koenvh.nl/?api=http://xxx.xxx.xxx.xxx:xxxx), click "Connect to another device",
Simply go to the URL shown in the server on your phone or tablet (e.g. http://xxx.xxx.xxx.xxx:xxxx), click "Connect to another device",
enter your computer's PeerID and you're ready to go.
All input on your second device will be redirected to your computer.

Expand Down Expand Up @@ -114,9 +114,9 @@ To make clear that it also supports ATS, I started using the name ATS/ETS2 Local
Generally speaking, I use ETS2 Local Radio, but I'm not really consistent when it comes to naming.

### Can I still run this program locally like v2?
Yes you can. Just click the "Clone or download" button above, and then click "Download ZIP".
Then just copy the contents of the web folder to the web folder of your Local Radio installation.
You can then visit http://localhost:8330 to use your local files instead.
Yes you can. Click the "Clone or download" button above, and then click "Download ZIP".
Then copy the contents of the web folder to the web folder of your Local Radio installation.
Edit the config.js file (overwritten on update), or set the config in the custom.js file (permanent).

## Troubleshooting:
### Can't access it from another device
Expand Down Expand Up @@ -203,8 +203,9 @@ You will need to manually remove the following files from the ETS2/ATS installat

I could not have possibly done this alone, so thanks to the following people:
* SCS Software for creating ETS2
* **nlhans for creating the [ETS2 SDK plugin](https://github.com/nlhans/ets2-sdk-plugin)**
* **Michael Koch for creating [GPP](http://www.mikoweb.eu/?page_id=54)**
* nlhans for creating the [ETS2 SDK plugin](https://github.com/nlhans/ets2-sdk-plugin)
* Michael Koch for creating [GPP](http://www.mikoweb.eu/?page_id=54)
* Loading.io for the radio loading icon
* All the translators
* Everyone who submitted a new station
* You, the user
Expand All @@ -222,10 +223,14 @@ _The in-game view when switching stations (if the overlay is installed)_

_Another in-game view when switching stations (if the overlay is installed)_

![Screenshot](https://i.imgur.com/lrGysB7.png)
![Screenshot](https://user-images.githubusercontent.com/5168825/130339936-79c77cd8-312e-4e08-ba58-4bbe76b3ea60.png)

_An example of the web interface near Dresden_
_An example of the web interface_

![Screenshot](https://i.imgur.com/E9h001F.jpg)
![Screenshot](https://user-images.githubusercontent.com/5168825/130339941-d3f20613-871a-4b1c-a774-01d9358c8ad8.png)

_Another example of the web interface (dark theme)_

![Screenshot](https://i.imgur.com/R8SjMna.png)

_The interface on the mobile app/website_
Binary file modified server/.vs/ETS2 Local Radio desktop/v16/.suo
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
700c4eda70b9714403169a417b7340f357aa597c
14 changes: 10 additions & 4 deletions server/Capture/obj/Debug/Capture.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ F:\Downloads\Direct3DHook\Capture\obj\Debug\Capture.csproj.CoreCompileInputs.cac
F:\Downloads\Direct3DHook\Capture\obj\Debug\Capture.csproj.CopyComplete
F:\Downloads\Direct3DHook\Capture\obj\Debug\Capture.dll
F:\Downloads\Direct3DHook\Capture\obj\Debug\Capture.pdb
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.csprojAssemblyReference.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll.config
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.pdb
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.Properties.Resources.resources
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.csproj.GenerateResource.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.csproj.CoreCompileInputs.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.csproj.CopyComplete
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Debug\Capture.pdb
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll.config
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.pdb
Binary file not shown.
Binary file modified server/Capture/obj/Debug/Capture.dll
Binary file not shown.
Binary file modified server/Capture/obj/Debug/Capture.pdb
Binary file not shown.
Binary file not shown.
16 changes: 8 additions & 8 deletions server/Capture/obj/Release/Capture.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll.config
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\Capture.pdb
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csproj.AssemblyReference.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.Properties.Resources.resources
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csproj.GenerateResource.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csproj.CoreCompileInputs.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csproj.CopyComplete
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.pdb
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook32Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyHook64Svc.exe
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad32.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\bin\EasyLoad64.dll
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csprojAssemblyReference.cache
F:\Mods\ETS2\ETS2 Map Capture Tool\ets2-local-radio\server\Capture\obj\Release\Capture.csproj.CoreCompileInputs.cache
Binary file not shown.
Binary file modified server/Capture/obj/Release/Capture.dll
Binary file not shown.
Binary file modified server/Capture/obj/Release/Capture.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<Reference Include="Gma.System.MouseKeyHook, Version=5.6.130.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MouseKeyHook.5.6.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SlimDX, Version=4.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86">
<HintPath>..\packages\SlimDX.4.0.13.44\lib\NET40\SlimDX.dll</HintPath>
Expand Down Expand Up @@ -172,6 +172,9 @@
<Name>Capture</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion server/ETS2 Local Radio desktop/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ private void removeBinding(object sender, KeyEventArgs e)

private void URLLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://localradio.koenvh.nl/?api=" + comboIP.SelectedItem.ToString());
Process.Start(comboIP.SelectedItem.ToString());
}

private void Koenvh_Click(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion server/ETS2 Local Radio desktop/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MouseKeyHook" version="5.6.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
<package id="SlimDX" version="4.0.13.44" targetFramework="net45" />
<package id="Svg" version="2.4.3" targetFramework="net45" />
</packages>
Binary file modified server/bin/Capture.dll
Binary file not shown.
Binary file modified server/bin/Capture.pdb
Binary file not shown.
9 changes: 5 additions & 4 deletions web/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ var g_skinConfig = {
"whitenoise": true, //Whether to play static when a station is far away
"transition-whitenoise": true, //Whether to play static when changing stations
"peerJSkey": "damhc79361fhto6r", //API key for PeerJS (remote control), no reason to change this yet
"url-prefix": "http://localradio.koenvh.nl/",
"ets2": {
"map": "cities-ets2.js", //What map you're using, this is default + ProMods + RusMap + Project Balkans + Egypt add-on by default. Pick one of the files in the cities folder.
"stations": "stations-europe.js", //What stations file to use, currently only stations-europe available.
"map": "http://localradio.koenvh.nl/cities/cities-ets2.js", //What map you're using, this is default + ProMods + RusMap + Project Balkans + Egypt add-on by default. Pick one of the files in the cities folder.
"stations": "http://localradio.koenvh.nl/stations/stations-europe.js", //What stations file to use, currently only stations-europe available.
},
"ats": {
"map": "cities-ats.js", //What map you're using, this is default by default.
"stations": "stations-america.js", //What stations file to use, currently only stations-america available.
"map": "http://localradio.koenvh.nl/cities/cities-ats.js", //What map you're using, this is default by default.
"stations": "http://localradio.koenvh.nl/stations/stations-america.js", //What stations file to use, currently only stations-america available.
}
};
22 changes: 10 additions & 12 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</button>
<div class="navbar-header">
<a class="navbar-brand" href="javascript:location.reload(true);">
Local Radio
<img src="lib/img/logo-nav.svg" alt="Logo" height="42" style="margin-top: -10px">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
Expand Down Expand Up @@ -91,8 +91,7 @@ <h1 class="text-center lang-stations">Stations:</h1>
<div class="col-lg-12">
<div class="alert alert-dismissible alert-danger unsupported-browser"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span class="lang-unsupported-browser">Your browser may not support all radio stations. Please open ETS2 Local Radio in either Mozilla Firefox or Microsoft Edge.</span> </div>
<div class="alert alert-dismissible alert-warning https"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span class="lang-https">Your browser has automatically redirected you to the HTTPS version. Local Radio does not support HTTPS. Please visit the HTTP version of the page.</span> </div>
<div class="alert alert-dismissible alert-warning non-local"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span class="lang-https">Recent version of Google Chrome have started blocking connections to local servers, including Local Radio. Please use the <a class="btn btn-xs btn-default" target="_blank" href="https://github.com/Koenvh1/ets2-local-radio/issues/150">ETS2 Local Radio viewer</a>, or open this page in a different browser.</span> </div>
<div class="alert alert-dismissible alert-info update"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span class="lang-update-available">An update is available!</span> <a class="btn btn-xs btn-default" href="https://github.com/Koenvh1/ets2-local-radio/releases"><span class="lang-update-now">Update now</span></a> </div>
<div class="alert alert-dismissible alert-primary update"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><span class="lang-update-available">An update is available!</span> <a class="btn btn-xs btn-default" href="https://github.com/Koenvh1/ets2-local-radio/releases"><span class="lang-update-now">Update now</span></a> </div>
<!--div class="alert alert-primary statusMessage"></div-->
<div class="alert alert-primary remote lang-controlled-remotely">This player is being controlled remotely</div>
<div class="hidden-sm hidden-xs">
Expand All @@ -109,7 +108,7 @@ <h1 class="text-center lang-stations">Stations:</h1>
<div class="row">
<div id="stationsList">
<div class="col-xs-12 text-center ">
<img src="lib/img/loading.gif" alt="Loading"><br>
<img src="lib/img/loading.svg" alt="Loading"><br>
<h3 class="lang-waiting-coordinates">Waiting for your in-game coordinates...</h3><br>
</div>
</div>
Expand All @@ -121,15 +120,15 @@ <h3 class="lang-waiting-coordinates">Waiting for your in-game coordinates...</h3
<div class="row">
<div class="col-lg-12">
<p class="well-sm">
<span class="lang-closest-city">Closest city is: <span class="nearestCity"></span>, <span class="distance"></span> meters away</span> |
<span class="lang-amount-static">Amount of static:</span> <span class="whitenoise-volume"></span> |
PeerID: <span class="peer-id"></span> |
<span class="lang-closest-city">Closest city is: <span class="nearestCity">-</span>, <span class="distance">-</span> meters away</span> |
<span class="lang-amount-static">Amount of static:</span> <span class="whitenoise-volume">-</span> |
PeerID: <span class="peer-id">00000</span> |
<span class="game">ets2</span> |
<button onclick="toggleTheme();" id="themeToggle" class="btn btn-xs btn-primary lang-chgtheme">Switch Theme</button> |
<span class="lang-brightness">Brightness:</span>
<button onclick="$('.brightness').css('opacity', '+=0.05');" class="btn btn-xs btn-primary">-</button>
<button onclick="$('.brightness').css('opacity', '-=0.05');" class="btn btn-xs btn-primary">+</button> |
<a onclick="g_show_all = !g_show_all;" href="#" class="lang-show-all">Toggle show all</a>
<button onclick="g_show_all = !g_show_all;" class="btn btn-xs btn-primary lang-show-all">Toggle show all</button>
</p>
<div class="text-center" style="margin-bottom: 10px">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
Expand All @@ -156,7 +155,7 @@ <h3 class="lang-waiting-coordinates">Waiting for your in-game coordinates...</h3
</div>
<div class="music-controller-station">
<div class="station-image-container">
<img src="lib/img/loading.gif" class="current-station-image">
<img src="lib/img/loading.svg" class="current-station-image">
</div>
<div>
<h2 class="station-title overflow current-station"></h2>
Expand Down Expand Up @@ -197,17 +196,16 @@ <h4 class="modal-title lang-enter-peerid-title">Enter the PeerID</h4>
<script>
var url = new URL(window.location);
g_api = url.searchParams.get("api") || "";
$("a[href='map.html']").attr("href", $("a[href='map.html']").attr("href") + "?api=" + g_api);

function loadScripts() {
console.log("Start loading scripts");
$.ajax({
url: "stations/" + g_skinConfig[g_game].stations,
url: g_skinConfig[g_game].stations,
dataType: "script",
timeout: 3000
}).done(function () {
$.ajax({
url: "cities/" + g_skinConfig[g_game].map,
url: g_skinConfig[g_game].map,
dataType: "script",
timeout: 3000
}).done(function () {
Expand Down
Loading

0 comments on commit 719dc78

Please sign in to comment.