Skip to content

Commit 4bd996e

Browse files
committed
Merge branch 'develop'
2 parents af037ee + a6ddc2b commit 4bd996e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1205
-452
lines changed

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Checklist before requesting a review
2+
3+
- [ ] **I am opening this PR for the [`develop` branch](https://github.com/FoxxMD/multi-scrobbler/tree/develop) and NOT `master`.**
4+
- [ ] I have read the [contributing guidelines.](../CONTRIBUTING.md)
5+
6+
## Type of change
7+
8+
Please delete options that are not relevant.
9+
10+
- [ ] Bug fix (non-breaking change which fixes an issue)
11+
- [ ] New feature (non-breaking change which adds functionality)
12+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13+
- [ ] This change requires a documentation update
14+
15+
## Describe your changes
16+
17+
18+
19+
## Issue number and link, if applicable
20+

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Creating a Pull Request
2+
3+
Please follow these guidelines when contributing code to this repository:
4+
5+
* The PR **must be for the [`develop` branch.](https://github.com/FoxxMD/multi-scrobbler/tree/develop)** The `master` branch is for releases only.
6+
* Use [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) format when creating commits.
7+
* Preferably, please use a [feature branch](https://stackoverflow.com/a/39586780/1469797) instead of committing directly to `develop`.
8+
* Ensure that if your code is covered by [an existing test](./src/backend/tests) that you have updated the test accordingly

config/webscrobbler.json.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
33
"name": "MyWebScrobbler",
4-
"slug": null,
54
"data": {
5+
"slug": null,
66
"whitelist": [],
77
"blacklist": []
88
}

docsite/docs/configuration/configuration.md

Lines changed: 24 additions & 20 deletions
Large diffs are not rendered by default.

flatpak/io.github.foxxmd.multiscrobbler.metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
</screenshot>
4444
</screenshots>
4545
<releases>
46+
<release version="0.6.3" date="2024-01-10"/>
4647
<release version="0.6.2" date="2023-11-29"/>
4748
<release version="0.6.1" date="2023-10-24"/>
4849
<release version="0.6.0" date="2023-10-04"/>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "multi-scrobbler",
3-
"version": "0.6.2",
3+
"version": "0.6.3",
44
"description": "scrobble plays from multiple sources to multiple clients",
55
"scripts": {
66
"schema": "npm run -s schema-aio & npm run -s schema-source & npm run -s schema-client & npm run -s schema-aiosource & npm run -s schema-aioclient",
@@ -12,7 +12,7 @@
1212
"typedoc": "typedoc",
1313
"circular": "madge --circular --extensions ts src/index.ts",
1414
"test": "react-scripts test",
15-
"test:backend": "mocha --extension ts --reporter spec --recursive src/backend/tests/scrobbler/**/*.test.ts",
15+
"test:backend": "mocha --extension ts --reporter spec --recursive src/backend/tests/**/*.test.ts",
1616
"eject": "react-scripts eject",
1717
"dev": "concurrently -p name -c \"yellow,magenta,blue\" -n \"webpack-server,nodemon-server,CRA\" \"npm run dev:server:webpack\" \"npm run dev:server:nodemon\" \"npm run dev:client\"",
1818
"dev:client": "BROWSER=none REACT_APP_VERSION=$npm_package_version react-scripts start",

register.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@ tsNode.register({
2121
project: './src/backend/tsconfig.json'
2222
});
2323

24-
process.env.CONSOLE_LEVEL = parseBool(process.env.DEBUG_MODE) ? undefined : 'false';
24+
if(!parseBool(process.env.DEBUG_MODE)) {
25+
process.env.CONSOLE_LEVEL = 'false';
26+
}
2527
process.env.FILE_LEVEL = 'false';

src/backend/common/schema/aio.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,8 +1335,15 @@
13351335
"LogOptions": {
13361336
"properties": {
13371337
"console": {
1338-
"$ref": "#/definitions/LogLevel",
13391338
"description": "Specify the minimum log level streamed to the console (or docker container)",
1339+
"enum": [
1340+
"debug",
1341+
"error",
1342+
false,
1343+
"info",
1344+
"verbose",
1345+
"warn"
1346+
],
13401347
"title": "console"
13411348
},
13421349
"file": {

src/backend/common/vendor/LastfmApiClient.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {DEFAULT_RETRY_MULTIPLIER, FormatPlayObjectOptions} from "../infrastructu
66
import { LastfmData } from "../infrastructure/config/client/lastfm";
77
import { PlayObject } from "../../../core/Atomic";
88
import {isNodeNetworkException} from "../errors/NodeErrors";
9+
import {nonEmptyStringOrDefault, splitByFirstFound} from "../../../core/StringUtils";
10+
import {source} from "common-tags";
911

1012
const badErrors = [
1113
'api key suspended',
@@ -61,7 +63,7 @@ export default class LastfmApiClient extends AbstractApiClient {
6163
mbid,
6264
} = obj;
6365
// arbitrary decision yikes
64-
let artistStrings = artists !== undefined ? artists.split(',') : [artistName];
66+
let artistStrings = splitByFirstFound(artists, [','], [artistName]);
6567
return {
6668
data: {
6769
artists: [...new Set(artistStrings)] as string[],
@@ -71,9 +73,9 @@ export default class LastfmApiClient extends AbstractApiClient {
7173
playDate: time !== undefined ? dayjs.unix(time) : undefined,
7274
meta: {
7375
brainz: {
74-
album: albumMbid === '' ? undefined : albumMbid,
75-
artist: artistMbid === '' ? undefined : artistMbid,
76-
track: mbid === '' ? undefined : mbid
76+
album: nonEmptyStringOrDefault<undefined>(albumMbid),
77+
artist: splitByFirstFound<undefined>(artistMbid, [',',';'], undefined),
78+
track: nonEmptyStringOrDefault<undefined>(mbid)
7779
}
7880
}
7981
},

0 commit comments

Comments
 (0)