mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
feat: Add explicit status for Navidrome and OpenSubsonic (#1220)
* add navidrome explicit status * add ExplicitStatus enum and support opensubsonic * add explicit status to cards
This commit is contained in:
@@ -5,6 +5,7 @@ import { ssType } from '/@/shared/api/subsonic/subsonic-types';
|
||||
import {
|
||||
Album,
|
||||
AlbumArtist,
|
||||
ExplicitStatus,
|
||||
Genre,
|
||||
LibraryItem,
|
||||
Playlist,
|
||||
@@ -146,6 +147,12 @@ const normalizeSong = (
|
||||
discNumber: item.discNumber || 1,
|
||||
discSubtitle: null,
|
||||
duration: item.duration ? item.duration * 1000 : 0,
|
||||
explicitStatus:
|
||||
item.explicitStatus === 'explicit'
|
||||
? ExplicitStatus.EXPLICIT
|
||||
: item.explicitStatus === 'clean'
|
||||
? ExplicitStatus.CLEAN
|
||||
: null,
|
||||
gain:
|
||||
item.replayGain && (item.replayGain.albumGain || item.replayGain.trackGain)
|
||||
? {
|
||||
@@ -247,6 +254,12 @@ const normalizeAlbum = (
|
||||
comment: null,
|
||||
createdAt: item.created,
|
||||
duration: item.duration * 1000,
|
||||
explicitStatus:
|
||||
item.explicitStatus === 'explicit'
|
||||
? ExplicitStatus.EXPLICIT
|
||||
: item.explicitStatus === 'clean'
|
||||
? ExplicitStatus.CLEAN
|
||||
: null,
|
||||
genres: getGenres(item),
|
||||
id: item.id.toString(),
|
||||
imagePlaceholderUrl: null,
|
||||
|
||||
Reference in New Issue
Block a user