mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-09-03 05:10:00 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0e798c052 |
@@ -25,6 +25,7 @@ import { RecentlyPlayedOptions } from "./AbstractSource.js";
|
||||
import { MemoryPositionalSource } from "./MemoryPositionalSource.js";
|
||||
import { normalizeWSAddress } from "../utils/NetworkUtils.js";
|
||||
import { baseFormatPlayObj } from "../utils/PlayTransformUtils.js";
|
||||
import { artistNamesToCredits } from "../../core/StringUtils.js";
|
||||
|
||||
const CLIENT_STATE = {
|
||||
0: 'connecting',
|
||||
@@ -181,8 +182,8 @@ export class MusikcubeSource extends MemoryPositionalSource {
|
||||
}
|
||||
},
|
||||
} = obj;
|
||||
const artists = [];
|
||||
const albumArtists = [];
|
||||
const artists: string[] = [];
|
||||
const albumArtists: string[] = [];
|
||||
if(artist !== undefined) {
|
||||
artists.push(artist);
|
||||
}
|
||||
@@ -191,8 +192,8 @@ export class MusikcubeSource extends MemoryPositionalSource {
|
||||
}
|
||||
const play: PlayObjectLifecycleless = {
|
||||
data: {
|
||||
artists: artists,
|
||||
albumArtists,
|
||||
artists: artistNamesToCredits(artists),
|
||||
albumArtists: artistNamesToCredits(albumArtists),
|
||||
album: album === '' ? undefined : album,
|
||||
track: title === '' ? undefined: title,
|
||||
duration: playing_duration
|
||||
|
||||
@@ -9,7 +9,7 @@ import { UpstreamError } from "../common/errors/UpstreamError.js";
|
||||
import { DEFAULT_RETRY_MULTIPLIER, FormatPlayObjectOptions, InternalConfig, PlayPlatformId } from "../common/infrastructure/Atomic.js";
|
||||
import { SubSonicSourceConfig } from "../common/infrastructure/config/source/subsonic.js";
|
||||
import { getSubsonicResponse, SubsonicResponse, SubsonicResponseCommon } from "../common/vendor/subsonic/interfaces.js";
|
||||
import { parseRetryAfterSecsFromObj, removeDuplicates, sleep } from "../utils.js";
|
||||
import { removeDuplicates } from "../utils.js";
|
||||
import { findCauseByFunc } from "../utils/ErrorUtils.js";
|
||||
import { RecentlyPlayedOptions } from "./AbstractSource.js";
|
||||
import MemorySource from "./MemorySource.js";
|
||||
@@ -18,6 +18,7 @@ import { PlayerStateOptions } from './PlayerState/AbstractPlayerState.js';
|
||||
import { Logger } from '@foxxmd/logging';
|
||||
import { baseFormatPlayObj } from '../utils/PlayTransformUtils.js';
|
||||
import { noRetryOnUpstreamError, tryApiCall } from '../utils/RequestUtils.js';
|
||||
import { artistNameToCredit } from '../../core/StringUtils.js';
|
||||
|
||||
dayjs.extend(isSameOrAfter);
|
||||
|
||||
@@ -78,7 +79,7 @@ export class SubsonicSource extends MemorySource {
|
||||
|
||||
const play: PlayObjectLifecycleless = {
|
||||
data: {
|
||||
artists: [artist],
|
||||
artists: [artistNameToCredit(artist)],
|
||||
album,
|
||||
track: title,
|
||||
duration,
|
||||
|
||||
@@ -18,6 +18,7 @@ import { RecentlyPlayedOptions } from "./AbstractSource.js";
|
||||
import { MemoryPositionalSource } from "./MemoryPositionalSource.js";
|
||||
import { isDebugMode } from "../utils.js";
|
||||
import { baseFormatPlayObj } from "../utils/PlayTransformUtils.js";
|
||||
import { artistNamesToCredits } from "../../core/StringUtils.js";
|
||||
|
||||
const CLIENT_PLAYER_STATE: Record<PlayerState, ReportedPlayerStatus> = {
|
||||
'playing': REPORTED_PLAYER_STATUSES.playing,
|
||||
@@ -142,8 +143,8 @@ export class VLCSource extends MemoryPositionalSource {
|
||||
artist
|
||||
} = obj;
|
||||
|
||||
let artists = [];
|
||||
let albumArtists = [];
|
||||
let artists: string[] = [];
|
||||
let albumArtists: string[] = [];
|
||||
const validArtist = firstNonEmptyStr([artist, StreamArtist, ALBUMARTIST, Writer]);
|
||||
if(artist !== undefined) {
|
||||
artists.push(validArtist);
|
||||
@@ -217,8 +218,8 @@ export class VLCSource extends MemoryPositionalSource {
|
||||
|
||||
const play: PlayObjectLifecycleless = {
|
||||
data: {
|
||||
artists: artists,
|
||||
albumArtists,
|
||||
artists: artistNamesToCredits(artists),
|
||||
albumArtists: artistNamesToCredits(albumArtists),
|
||||
album,
|
||||
track: trackName,
|
||||
duration: length
|
||||
|
||||
Reference in New Issue
Block a user