[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(config): Implement property to control whether a source/client is used

* QoL improvement -- Instead of needing to rename a config file so it is not read by MS a user can now use the 'enable' property in all source/client configs to enable or disable loading the config
* Added property to all config examples

FoxxMD (Sep 20, 2023, 11:31 AM EDT) ac2d453a 860d2d95

+469 -3
+2
config/config.json.example
··· 21 21 "sources": [ 22 22 { 23 23 "type": "spotify", 24 + "enable": true, 24 25 "clients": ["myConfig"], 25 26 "name": "mySpotifySource", 26 27 "data": { ··· 33 34 "clients": [ 34 35 { 35 36 "type": "maloja", 37 + "enable": true, 36 38 "name": "myConfig", 37 39 "data": { 38 40 "url": "http://localhost:42010",
+1
config/deezer.json.example
··· 1 1 [ 2 2 { 3 3 "name": "FoxxMDeezer", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "clientId": "a89cba1569901a0671d5a9875fed4be1",
+1
config/jellyfin.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyJellyfin", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "users": ["FoxxMD"],
+1
config/jriver.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyJriver", 4 + "enable": true, 4 5 "data": { 5 6 "url": "0.0.0.0", 6 7 "username": "auser",
+1
config/kodi.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyKodi", 4 + "enable": true, 4 5 "data": { 5 6 "url": "http://localhost:8080/jsonrpc", 6 7 "username": "myUser",
+1
config/lastfm.json.example
··· 1 1 [ 2 2 { 3 3 "name": "myLastFm", 4 + "enable": true, 4 5 "configureAs": "client", 5 6 "data": { 6 7 "apiKey": "a89cba1569901a0671d5a9875fed4be1",
+1
config/listenbrainz.json.example
··· 1 1 [ 2 2 { 3 3 "name": "brainz", 4 + "enable": true, 4 5 "configureAs": "client", 5 6 "data": { 6 7 "token": "029b081ba-9156-4pe7-88e5-3be671f5ea2b",
+1
config/maloja.json.example
··· 1 1 [ 2 2 { 3 3 "name": "myMaloja", 4 + "enable": true, 4 5 "data": { 5 6 "url": "http://localhost:42010", 6 7 "apiKey": "myMalojaKey"
+1
config/mopidy.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyMopidy", 4 + "enable": true, 4 5 "data": { 5 6 "url": "localhost", 6 7 "uriBlacklist": [],
+1
config/mpris.json.example
··· 1 1 [ 2 2 { 3 3 "name": "ubuntu", 4 + "enable": true, 4 5 "data": { 5 6 "whitelist": ["vlc", "mpd"], 6 7 "blacklist": ["spotify"]
+1
config/plex.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyPlex", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "user": ["username@gmail.com","anotherUser@gmail.com"],
+1
config/spotify.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MySpotify", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "clientId": "a89cba1569901a0671d5a9875fed4be1",
+1
config/subsonic.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MySubsonic", 4 + "enable": true, 4 5 "data": { 5 6 "url": "http://localhost:4040/airsonic", 6 7 "user": "yourUser",
+1
config/tautulli.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyTautuilli", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "user": ["username@gmail.com","anotherUser@gmail.com"],
+1
config/ytmusic.json.example
··· 1 1 [ 2 2 { 3 3 "name": "MyYTMusic", 4 + "enable": true, 4 5 "clients": [], 5 6 "data": { 6 7 "cookie": "VISITOR_INFO1_LIVE=jMDXz2_L8rY; __Secure-3PAPISID=3AxsXpSXGqOInSDn1jEKn; DEVICE_INFO=ChxOekU0TmTBpjek5EWZ0G; YSC=7gZdl3Zdl3; SID=TwhNsaZRXYTAtXxzGyu6rZdpg2HvGROeW8J4Ym_FhkhoZMUYEQ.; __Secure-1PSID=TwhNOsaZRXYTyRBe4rxAtXRIKsIEtk_Qot2VLBNfHQrQ.; __Secure-3PSID=ZRXYTAtXRIKsIEtk_Qot2yRBerZdpg2HvvZRXYTAtXRIKsIEtk_Qot2yRBerkuZICFQ.; HSID=A1UMmELW79; SSID=AKhomOs; APISID=IlHHmuzkPdQzZZDhHn3; SAPISID=3AxsXpy0u75Qb/n1jEKn; __Secure-1PAPISID=3AxsXpQb/AkSDn1jEKn; LOGIN_INFO=AFmP6vFpyVCZZAIgDwbkhWMBBhluaIWAPP:QUQ314UW5NWMjNmd2ZUJnYnJsakdIMjZoaE5zVVMjNmd2ZZUiHRlb3ZlV3ZIcUVyRVIMjNmdjNmd2ZZUivYlNqX2ZNZUiHdUNFNFdaYmJIW1NkJRX3hqdlU2YnFESkFuSS1uTldnZVRmLXNjWFc5OUJuR3dTd3JsZGZYa2EtZFQ2a0k2Ry1KQQ==; PREF=volume=26; SIDCC=AFvI_94PxXwls-ndqpGfPgFX3FWj80y_94PxXwls-ndqfSh15sP; __Secure-1PSIDCC=AFvIBnUbRr96I96UCIp2U4T8HRVk2B0HfKzhzxwsiP; __Secure-3PSIDCC=AFvIB3bINuUN0ETDR9gO91wpwWIVmpGki3BxT3bINuUN0ETDR9gO91wCH",
+7
src/backend/common/infrastructure/config/common.ts
··· 1 1 export interface CommonConfig { 2 2 name?: string 3 3 data?: CommonData 4 + /** 5 + * Should MS use this client/source? Defaults to true 6 + * 7 + * @default true 8 + * @examples [true] 9 + * */ 10 + enable?: boolean 4 11 } 5 12 6 13 export interface CommonData {
+27
src/backend/common/schema/aio-client.json
··· 101 101 "description": "Specific data required to configure this client", 102 102 "title": "data" 103 103 }, 104 + "enable": { 105 + "default": true, 106 + "description": "Should MS use this client/source? Defaults to true", 107 + "examples": [ 108 + true 109 + ], 110 + "title": "enable", 111 + "type": "boolean" 112 + }, 104 113 "name": { 105 114 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", 106 115 "examples": [ ··· 203 212 "description": "Specific data required to configure this client", 204 213 "title": "data" 205 214 }, 215 + "enable": { 216 + "default": true, 217 + "description": "Should MS use this client/source? Defaults to true", 218 + "examples": [ 219 + true 220 + ], 221 + "title": "enable", 222 + "type": "boolean" 223 + }, 206 224 "name": { 207 225 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", 208 226 "examples": [ ··· 318 336 "$ref": "#/definitions/MalojaClientData", 319 337 "description": "Specific data required to configure this client", 320 338 "title": "data" 339 + }, 340 + "enable": { 341 + "default": true, 342 + "description": "Should MS use this client/source? Defaults to true", 343 + "examples": [ 344 + true 345 + ], 346 + "title": "enable", 347 + "type": "boolean" 321 348 }, 322 349 "name": { 323 350 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.",
+117
src/backend/common/schema/aio-source.json
··· 139 139 "$ref": "#/definitions/DeezerData", 140 140 "title": "data" 141 141 }, 142 + "enable": { 143 + "default": true, 144 + "description": "Should MS use this client/source? Defaults to true", 145 + "examples": [ 146 + true 147 + ], 148 + "title": "enable", 149 + "type": "boolean" 150 + }, 142 151 "name": { 143 152 "description": "Unique identifier for this source.", 144 153 "title": "name", ··· 265 274 "$ref": "#/definitions/JRiverData", 266 275 "title": "data" 267 276 }, 277 + "enable": { 278 + "default": true, 279 + "description": "Should MS use this client/source? Defaults to true", 280 + "examples": [ 281 + true 282 + ], 283 + "title": "enable", 284 + "type": "boolean" 285 + }, 268 286 "name": { 269 287 "description": "Unique identifier for this source.", 270 288 "title": "name", ··· 417 435 "$ref": "#/definitions/JellyData", 418 436 "title": "data" 419 437 }, 438 + "enable": { 439 + "default": true, 440 + "description": "Should MS use this client/source? Defaults to true", 441 + "examples": [ 442 + true 443 + ], 444 + "title": "enable", 445 + "type": "boolean" 446 + }, 420 447 "name": { 421 448 "description": "Unique identifier for this source.", 422 449 "title": "name", ··· 545 572 "$ref": "#/definitions/KodiData", 546 573 "title": "data" 547 574 }, 575 + "enable": { 576 + "default": true, 577 + "description": "Should MS use this client/source? Defaults to true", 578 + "examples": [ 579 + true 580 + ], 581 + "title": "enable", 582 + "type": "boolean" 583 + }, 548 584 "name": { 549 585 "description": "Unique identifier for this source.", 550 586 "title": "name", ··· 600 636 "data": { 601 637 "$ref": "#/definitions/LastFmSourceData", 602 638 "title": "data" 639 + }, 640 + "enable": { 641 + "default": true, 642 + "description": "Should MS use this client/source? Defaults to true", 643 + "examples": [ 644 + true 645 + ], 646 + "title": "enable", 647 + "type": "boolean" 603 648 }, 604 649 "name": { 605 650 "description": "Unique identifier for this source.", ··· 751 796 "$ref": "#/definitions/ListenBrainzSourceData", 752 797 "title": "data" 753 798 }, 799 + "enable": { 800 + "default": true, 801 + "description": "Should MS use this client/source? Defaults to true", 802 + "examples": [ 803 + true 804 + ], 805 + "title": "enable", 806 + "type": "boolean" 807 + }, 754 808 "name": { 755 809 "description": "Unique identifier for this source.", 756 810 "title": "name", ··· 965 1019 "$ref": "#/definitions/MPRISData", 966 1020 "title": "data" 967 1021 }, 1022 + "enable": { 1023 + "default": true, 1024 + "description": "Should MS use this client/source? Defaults to true", 1025 + "examples": [ 1026 + true 1027 + ], 1028 + "title": "enable", 1029 + "type": "boolean" 1030 + }, 968 1031 "name": { 969 1032 "description": "Unique identifier for this source.", 970 1033 "title": "name", ··· 1111 1174 "$ref": "#/definitions/MopidyData", 1112 1175 "title": "data" 1113 1176 }, 1177 + "enable": { 1178 + "default": true, 1179 + "description": "Should MS use this client/source? Defaults to true", 1180 + "examples": [ 1181 + true 1182 + ], 1183 + "title": "enable", 1184 + "type": "boolean" 1185 + }, 1114 1186 "name": { 1115 1187 "description": "Unique identifier for this source.", 1116 1188 "title": "name", ··· 1154 1226 "data": { 1155 1227 "$ref": "#/definitions/PlexSourceData", 1156 1228 "title": "data" 1229 + }, 1230 + "enable": { 1231 + "default": true, 1232 + "description": "Should MS use this client/source? Defaults to true", 1233 + "examples": [ 1234 + true 1235 + ], 1236 + "title": "enable", 1237 + "type": "boolean" 1157 1238 }, 1158 1239 "name": { 1159 1240 "description": "Unique identifier for this source.", ··· 1424 1505 "$ref": "#/definitions/SpotifySourceData", 1425 1506 "title": "data" 1426 1507 }, 1508 + "enable": { 1509 + "default": true, 1510 + "description": "Should MS use this client/source? Defaults to true", 1511 + "examples": [ 1512 + true 1513 + ], 1514 + "title": "enable", 1515 + "type": "boolean" 1516 + }, 1427 1517 "name": { 1428 1518 "description": "Unique identifier for this source.", 1429 1519 "title": "name", ··· 1644 1734 "$ref": "#/definitions/SubsonicData", 1645 1735 "title": "data" 1646 1736 }, 1737 + "enable": { 1738 + "default": true, 1739 + "description": "Should MS use this client/source? Defaults to true", 1740 + "examples": [ 1741 + true 1742 + ], 1743 + "title": "enable", 1744 + "type": "boolean" 1745 + }, 1647 1746 "name": { 1648 1747 "description": "Unique identifier for this source.", 1649 1748 "title": "name", ··· 1687 1786 "data": { 1688 1787 "$ref": "#/definitions/PlexSourceData", 1689 1788 "title": "data" 1789 + }, 1790 + "enable": { 1791 + "default": true, 1792 + "description": "Should MS use this client/source? Defaults to true", 1793 + "examples": [ 1794 + true 1795 + ], 1796 + "title": "enable", 1797 + "type": "boolean" 1690 1798 }, 1691 1799 "name": { 1692 1800 "description": "Unique identifier for this source.", ··· 1807 1915 "data": { 1808 1916 "$ref": "#/definitions/YTMusicData", 1809 1917 "title": "data" 1918 + }, 1919 + "enable": { 1920 + "default": true, 1921 + "description": "Should MS use this client/source? Defaults to true", 1922 + "examples": [ 1923 + true 1924 + ], 1925 + "title": "enable", 1926 + "type": "boolean" 1810 1927 }, 1811 1928 "name": { 1812 1929 "description": "Unique identifier for this source.",
+144
src/backend/common/schema/aio.json
··· 212 212 "$ref": "#/definitions/DeezerData", 213 213 "title": "data" 214 214 }, 215 + "enable": { 216 + "default": true, 217 + "description": "Should MS use this client/source? Defaults to true", 218 + "examples": [ 219 + true 220 + ], 221 + "title": "enable", 222 + "type": "boolean" 223 + }, 215 224 "name": { 216 225 "description": "Unique identifier for this source.", 217 226 "title": "name", ··· 386 395 "data": { 387 396 "$ref": "#/definitions/JRiverData", 388 397 "title": "data" 398 + }, 399 + "enable": { 400 + "default": true, 401 + "description": "Should MS use this client/source? Defaults to true", 402 + "examples": [ 403 + true 404 + ], 405 + "title": "enable", 406 + "type": "boolean" 389 407 }, 390 408 "name": { 391 409 "description": "Unique identifier for this source.", ··· 539 557 "$ref": "#/definitions/JellyData", 540 558 "title": "data" 541 559 }, 560 + "enable": { 561 + "default": true, 562 + "description": "Should MS use this client/source? Defaults to true", 563 + "examples": [ 564 + true 565 + ], 566 + "title": "enable", 567 + "type": "boolean" 568 + }, 542 569 "name": { 543 570 "description": "Unique identifier for this source.", 544 571 "title": "name", ··· 666 693 "data": { 667 694 "$ref": "#/definitions/KodiData", 668 695 "title": "data" 696 + }, 697 + "enable": { 698 + "default": true, 699 + "description": "Should MS use this client/source? Defaults to true", 700 + "examples": [ 701 + true 702 + ], 703 + "title": "enable", 704 + "type": "boolean" 669 705 }, 670 706 "name": { 671 707 "description": "Unique identifier for this source.", ··· 723 759 "$ref": "#/definitions/LastFmSourceData", 724 760 "title": "data" 725 761 }, 762 + "enable": { 763 + "default": true, 764 + "description": "Should MS use this client/source? Defaults to true", 765 + "examples": [ 766 + true 767 + ], 768 + "title": "enable", 769 + "type": "boolean" 770 + }, 726 771 "name": { 727 772 "description": "Unique identifier for this source.", 728 773 "title": "name", ··· 867 912 ], 868 913 "description": "Specific data required to configure this client", 869 914 "title": "data" 915 + }, 916 + "enable": { 917 + "default": true, 918 + "description": "Should MS use this client/source? Defaults to true", 919 + "examples": [ 920 + true 921 + ], 922 + "title": "enable", 923 + "type": "boolean" 870 924 }, 871 925 "name": { 872 926 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", ··· 970 1024 "description": "Specific data required to configure this client", 971 1025 "title": "data" 972 1026 }, 1027 + "enable": { 1028 + "default": true, 1029 + "description": "Should MS use this client/source? Defaults to true", 1030 + "examples": [ 1031 + true 1032 + ], 1033 + "title": "enable", 1034 + "type": "boolean" 1035 + }, 973 1036 "name": { 974 1037 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", 975 1038 "examples": [ ··· 1110 1173 "data": { 1111 1174 "$ref": "#/definitions/ListenBrainzSourceData", 1112 1175 "title": "data" 1176 + }, 1177 + "enable": { 1178 + "default": true, 1179 + "description": "Should MS use this client/source? Defaults to true", 1180 + "examples": [ 1181 + true 1182 + ], 1183 + "title": "enable", 1184 + "type": "boolean" 1113 1185 }, 1114 1186 "name": { 1115 1187 "description": "Unique identifier for this source.", ··· 1370 1442 "$ref": "#/definitions/MPRISData", 1371 1443 "title": "data" 1372 1444 }, 1445 + "enable": { 1446 + "default": true, 1447 + "description": "Should MS use this client/source? Defaults to true", 1448 + "examples": [ 1449 + true 1450 + ], 1451 + "title": "enable", 1452 + "type": "boolean" 1453 + }, 1373 1454 "name": { 1374 1455 "description": "Unique identifier for this source.", 1375 1456 "title": "name", ··· 1400 1481 "$ref": "#/definitions/MalojaClientData", 1401 1482 "description": "Specific data required to configure this client", 1402 1483 "title": "data" 1484 + }, 1485 + "enable": { 1486 + "default": true, 1487 + "description": "Should MS use this client/source? Defaults to true", 1488 + "examples": [ 1489 + true 1490 + ], 1491 + "title": "enable", 1492 + "type": "boolean" 1403 1493 }, 1404 1494 "name": { 1405 1495 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", ··· 1660 1750 "$ref": "#/definitions/MopidyData", 1661 1751 "title": "data" 1662 1752 }, 1753 + "enable": { 1754 + "default": true, 1755 + "description": "Should MS use this client/source? Defaults to true", 1756 + "examples": [ 1757 + true 1758 + ], 1759 + "title": "enable", 1760 + "type": "boolean" 1761 + }, 1663 1762 "name": { 1664 1763 "description": "Unique identifier for this source.", 1665 1764 "title": "name", ··· 1759 1858 "data": { 1760 1859 "$ref": "#/definitions/PlexSourceData", 1761 1860 "title": "data" 1861 + }, 1862 + "enable": { 1863 + "default": true, 1864 + "description": "Should MS use this client/source? Defaults to true", 1865 + "examples": [ 1866 + true 1867 + ], 1868 + "title": "enable", 1869 + "type": "boolean" 1762 1870 }, 1763 1871 "name": { 1764 1872 "description": "Unique identifier for this source.", ··· 2094 2202 "$ref": "#/definitions/SpotifySourceData", 2095 2203 "title": "data" 2096 2204 }, 2205 + "enable": { 2206 + "default": true, 2207 + "description": "Should MS use this client/source? Defaults to true", 2208 + "examples": [ 2209 + true 2210 + ], 2211 + "title": "enable", 2212 + "type": "boolean" 2213 + }, 2097 2214 "name": { 2098 2215 "description": "Unique identifier for this source.", 2099 2216 "title": "name", ··· 2314 2431 "$ref": "#/definitions/SubsonicData", 2315 2432 "title": "data" 2316 2433 }, 2434 + "enable": { 2435 + "default": true, 2436 + "description": "Should MS use this client/source? Defaults to true", 2437 + "examples": [ 2438 + true 2439 + ], 2440 + "title": "enable", 2441 + "type": "boolean" 2442 + }, 2317 2443 "name": { 2318 2444 "description": "Unique identifier for this source.", 2319 2445 "title": "name", ··· 2357 2483 "data": { 2358 2484 "$ref": "#/definitions/PlexSourceData", 2359 2485 "title": "data" 2486 + }, 2487 + "enable": { 2488 + "default": true, 2489 + "description": "Should MS use this client/source? Defaults to true", 2490 + "examples": [ 2491 + true 2492 + ], 2493 + "title": "enable", 2494 + "type": "boolean" 2360 2495 }, 2361 2496 "name": { 2362 2497 "description": "Unique identifier for this source.", ··· 2488 2623 "data": { 2489 2624 "$ref": "#/definitions/YTMusicData", 2490 2625 "title": "data" 2626 + }, 2627 + "enable": { 2628 + "default": true, 2629 + "description": "Should MS use this client/source? Defaults to true", 2630 + "examples": [ 2631 + true 2632 + ], 2633 + "title": "enable", 2634 + "type": "boolean" 2491 2635 }, 2492 2636 "name": { 2493 2637 "description": "Unique identifier for this source.",
+27
src/backend/common/schema/client.json
··· 98 98 "description": "Specific data required to configure this client", 99 99 "title": "data" 100 100 }, 101 + "enable": { 102 + "default": true, 103 + "description": "Should MS use this client/source? Defaults to true", 104 + "examples": [ 105 + true 106 + ], 107 + "title": "enable", 108 + "type": "boolean" 109 + }, 101 110 "name": { 102 111 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", 103 112 "examples": [ ··· 192 201 "description": "Specific data required to configure this client", 193 202 "title": "data" 194 203 }, 204 + "enable": { 205 + "default": true, 206 + "description": "Should MS use this client/source? Defaults to true", 207 + "examples": [ 208 + true 209 + ], 210 + "title": "enable", 211 + "type": "boolean" 212 + }, 195 213 "name": { 196 214 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.", 197 215 "examples": [ ··· 299 317 "$ref": "#/definitions/MalojaClientData", 300 318 "description": "Specific data required to configure this client", 301 319 "title": "data" 320 + }, 321 + "enable": { 322 + "default": true, 323 + "description": "Should MS use this client/source? Defaults to true", 324 + "examples": [ 325 + true 326 + ], 327 + "title": "enable", 328 + "type": "boolean" 302 329 }, 303 330 "name": { 304 331 "description": "Unique identifier for this client. Used with sources to restrict where scrobbles are sent.",
+117
src/backend/common/schema/source.json
··· 180 180 "$ref": "#/definitions/DeezerData", 181 181 "title": "data" 182 182 }, 183 + "enable": { 184 + "default": true, 185 + "description": "Should MS use this client/source? Defaults to true", 186 + "examples": [ 187 + true 188 + ], 189 + "title": "enable", 190 + "type": "boolean" 191 + }, 183 192 "name": { 184 193 "description": "Unique identifier for this source.", 185 194 "title": "name", ··· 298 307 "$ref": "#/definitions/JRiverData", 299 308 "title": "data" 300 309 }, 310 + "enable": { 311 + "default": true, 312 + "description": "Should MS use this client/source? Defaults to true", 313 + "examples": [ 314 + true 315 + ], 316 + "title": "enable", 317 + "type": "boolean" 318 + }, 301 319 "name": { 302 320 "description": "Unique identifier for this source.", 303 321 "title": "name", ··· 442 460 "$ref": "#/definitions/JellyData", 443 461 "title": "data" 444 462 }, 463 + "enable": { 464 + "default": true, 465 + "description": "Should MS use this client/source? Defaults to true", 466 + "examples": [ 467 + true 468 + ], 469 + "title": "enable", 470 + "type": "boolean" 471 + }, 445 472 "name": { 446 473 "description": "Unique identifier for this source.", 447 474 "title": "name", ··· 562 589 "$ref": "#/definitions/KodiData", 563 590 "title": "data" 564 591 }, 592 + "enable": { 593 + "default": true, 594 + "description": "Should MS use this client/source? Defaults to true", 595 + "examples": [ 596 + true 597 + ], 598 + "title": "enable", 599 + "type": "boolean" 600 + }, 565 601 "name": { 566 602 "description": "Unique identifier for this source.", 567 603 "title": "name", ··· 703 739 "data": { 704 740 "$ref": "#/definitions/LastFmSourceData", 705 741 "title": "data" 742 + }, 743 + "enable": { 744 + "default": true, 745 + "description": "Should MS use this client/source? Defaults to true", 746 + "examples": [ 747 + true 748 + ], 749 + "title": "enable", 750 + "type": "boolean" 706 751 }, 707 752 "name": { 708 753 "description": "Unique identifier for this source.", ··· 752 797 "$ref": "#/definitions/ListenBrainzSourceData", 753 798 "title": "data" 754 799 }, 800 + "enable": { 801 + "default": true, 802 + "description": "Should MS use this client/source? Defaults to true", 803 + "examples": [ 804 + true 805 + ], 806 + "title": "enable", 807 + "type": "boolean" 808 + }, 755 809 "name": { 756 810 "description": "Unique identifier for this source.", 757 811 "title": "name", ··· 958 1012 "$ref": "#/definitions/MPRISData", 959 1013 "title": "data" 960 1014 }, 1015 + "enable": { 1016 + "default": true, 1017 + "description": "Should MS use this client/source? Defaults to true", 1018 + "examples": [ 1019 + true 1020 + ], 1021 + "title": "enable", 1022 + "type": "boolean" 1023 + }, 961 1024 "name": { 962 1025 "description": "Unique identifier for this source.", 963 1026 "title": "name", ··· 1096 1159 "$ref": "#/definitions/MopidyData", 1097 1160 "title": "data" 1098 1161 }, 1162 + "enable": { 1163 + "default": true, 1164 + "description": "Should MS use this client/source? Defaults to true", 1165 + "examples": [ 1166 + true 1167 + ], 1168 + "title": "enable", 1169 + "type": "boolean" 1170 + }, 1099 1171 "name": { 1100 1172 "description": "Unique identifier for this source.", 1101 1173 "title": "name", ··· 1132 1204 "$ref": "#/definitions/PlexSourceData", 1133 1205 "title": "data" 1134 1206 }, 1207 + "enable": { 1208 + "default": true, 1209 + "description": "Should MS use this client/source? Defaults to true", 1210 + "examples": [ 1211 + true 1212 + ], 1213 + "title": "enable", 1214 + "type": "boolean" 1215 + }, 1135 1216 "name": { 1136 1217 "description": "Unique identifier for this source.", 1137 1218 "title": "name", ··· 1316 1397 "$ref": "#/definitions/SpotifySourceData", 1317 1398 "title": "data" 1318 1399 }, 1400 + "enable": { 1401 + "default": true, 1402 + "description": "Should MS use this client/source? Defaults to true", 1403 + "examples": [ 1404 + true 1405 + ], 1406 + "title": "enable", 1407 + "type": "boolean" 1408 + }, 1319 1409 "name": { 1320 1410 "description": "Unique identifier for this source.", 1321 1411 "title": "name", ··· 1442 1532 "$ref": "#/definitions/SubsonicData", 1443 1533 "title": "data" 1444 1534 }, 1535 + "enable": { 1536 + "default": true, 1537 + "description": "Should MS use this client/source? Defaults to true", 1538 + "examples": [ 1539 + true 1540 + ], 1541 + "title": "enable", 1542 + "type": "boolean" 1543 + }, 1445 1544 "name": { 1446 1545 "description": "Unique identifier for this source.", 1447 1546 "title": "name", ··· 1564 1663 "$ref": "#/definitions/PlexSourceData", 1565 1664 "title": "data" 1566 1665 }, 1666 + "enable": { 1667 + "default": true, 1668 + "description": "Should MS use this client/source? Defaults to true", 1669 + "examples": [ 1670 + true 1671 + ], 1672 + "title": "enable", 1673 + "type": "boolean" 1674 + }, 1567 1675 "name": { 1568 1676 "description": "Unique identifier for this source.", 1569 1677 "title": "name", ··· 1675 1783 "data": { 1676 1784 "$ref": "#/definitions/YTMusicData", 1677 1785 "title": "data" 1786 + }, 1787 + "enable": { 1788 + "default": true, 1789 + "description": "Should MS use this client/source? Defaults to true", 1790 + "examples": [ 1791 + true 1792 + ], 1793 + "title": "enable", 1794 + "type": "boolean" 1678 1795 }, 1679 1796 "name": { 1680 1797 "description": "Unique identifier for this source.",
+7 -1
src/backend/scrobblers/ScrobbleClients.ts
··· 296 296 if (isValidConfig !== true) { 297 297 throw new Error(`Config object from ${clientConfig.source || 'unknown'} with name [${clientConfig.name || 'unnamed'}] of type [${clientConfig.type || 'unknown'}] has errors: ${isValidConfig.join(' | ')}`) 298 298 }*/ 299 - const {type, name, data: d = {}} = clientConfig; 299 + const {type, name, enable = true, data: d = {}} = clientConfig; 300 + 301 + if(enable === false) { 302 + this.logger.warn(`${type} (${name}) client was disabled by config`); 303 + return; 304 + } 305 + 300 306 // add defaults 301 307 const data = {...defaults, ...d}; 302 308 let newClient;
+7 -2
src/backend/sources/ScrobbleSources.ts
··· 410 410 } 411 411 } 412 412 413 - addSource = async (clientConfig: any, defaults: SourceDefaults = {}) => { 413 + addSource = async (clientConfig: ParsedConfig, defaults: SourceDefaults = {}) => { 414 414 // const isValidConfig = isValidConfigStructure(clientConfig, {name: true, data: true, type: true}); 415 415 // if (isValidConfig !== true) { 416 416 // throw new Error(`Config object from ${clientConfig.source || 'unknown'} with name [${clientConfig.name || 'unnamed'}] of type [${clientConfig.type || 'unknown'}] has errors: ${isValidConfig.join(' | ')}`) ··· 422 422 logger: this.logger 423 423 }; 424 424 425 - const {type, name, data: d = {}, options: clientOptions = {}} = clientConfig; 425 + const {type, name, data: d = {}, enable = true, options: clientOptions = {}} = clientConfig; 426 + 427 + if(enable === false) { 428 + this.logger.warn(`${type} (${name}) source was disabled by config`); 429 + return; 430 + } 426 431 427 432 // add defaults 428 433 const {options: defaultOptions = {}, ...restDefaults} = defaults;