Repository: web-scrobbler/web-scrobbler (ts)

Issue:
WeAreOne.fm - Connector Request
**Provide information about website**
A short description of the website, sample URLs, (demo) accounts for testing purposes. If (demo) accounts are not for public use, you can mail them to the project developers.

https://weareone.fm/

**Additional context**
Add any other context or screenshots about the request here.

There are multiple radiostations, about 8. If you click on the colored buttons on the side, the Player will be tuned in to the station that you want.
![image](https://github.com/web-scrobbler/web-scrobbler/assets/5560381/93006dbc-8dbb-4394-a41f-7e825ec8da1a)

You can see the current Song over here, I've seen that you can get the data from the official API. But I am to stupid to program the connector.
Artist: ``document.getElementById("stream-tracklist").children[0].children[0].children[1].children[0].innerText.split("\n")[0]``
Track: ``document.getElementById("stream-tracklist").children[0].children[0].children[1].children[0].innerText.split("\n")[1]``
![image](https://github.com/web-scrobbler/web-scrobbler/assets/5560381/b30423cf-45a4-453f-8f63-f504b20316df)


The only way to get the Info when the player is playing is: ``document.getElementsByClassName("fa-pause-circle").length`` -> 1=playing.

it would be great if this could be added to the Scrobbler, since I like to listen to the Music, and want to know the songs that did run, while I'd tune in to that radio.

Best regards,
Calvin


Pull request description:
Add new connector for WeAreOne.fm
Resolves #4663

Patch:
diff --git a/src/connectors/weareone.ts b/src/connectors/weareone.ts
new file mode 100644
index 00000000..bc1bb226
--- /dev/null
+++ b/src/connectors/weareone.ts
@@ -0,0 +1,31 @@
+export {};
+
+const filter = MetadataFilter.createFilter({ track: removeTrailingBr });
+
+Connector.playerSelector = 'body.content';
+
+Connector.getArtistTrack = () => {
+	const trackArtist = document.querySelector(
+		'#tracklist-group-1 > div > div > div:nth-child(1)',
+	)?.innerHTML;
+
+	return Util.splitArtistTrack(trackArtist, ['<br>']);
+};
+
+Connector.isPlaying = function () {
+	const playButtons = document.querySelectorAll('#radio-boxes i');
+
+	for (const playButton of playButtons) {
+		if (playButton.classList.contains('fa-pause-circle')) {
+			return true;
+		}
+	}
+
+	return false;
+};
+
+Connector.applyFilter(filter);
+
+function removeTrailingBr(text: string) {
+	return text.replace(/<br>$/, '');
+}
diff --git a/src/core/connectors.ts b/src/core/connectors.ts
index 99ce7df5..29cb5c6a 100644
--- a/src/core/connectors.ts
+++ b/src/core/connectors.ts
@@ -2419,6 +2419,12 @@ export default <ConnectorMeta[]>[
 		js: 'scrobbleradio.js',
 		id: 'scrobbleradio',
 	},
+	{
+		label: 'weareone.fm',
+		matches: ['*://weareone.fm/*'],
+		js: 'weareone.js',
+		id: 'weareone',
+	},
 	{
 		label: 'Bollerwagen',
 		matches: ['*://radiobollerwagen.de/*'],
diff --git a/src/core/content/util.ts b/src/core/content/util.ts
index 1f4d30c2..183822e1 100644
--- a/src/core/content/util.ts
+++ b/src/core/content/util.ts
@@ -47,6 +47,7 @@ export type Separator =
 	| '~'
 	| ' | '
 	| '<br/>'
+	| '<br>'
 	| ' by '
 	| ', '
 	| '·'


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 02eff227..4ac60e65 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -25,7 +25,7 @@ jobs:
         run: npm run test
 
   test_typescript:
-    name: Run tests
+    name: Run typescript checks
     runs-on: ubuntu-latest
     steps:
       - name: Checkout the repository