- Downloads now store original Japanese in TITLE/ARTIST/ALBUM tags so Apple Music, iTunes, YTM etc. all see the authentic original text - Sort tags (TITLESORT/ARTISTSORT/ALBUMSORT) written with romaji for apps that use them for sorting/display - iTunes-resolved English artist name used for ARTISTSORT and folder names when available (more accurate than kuromoji for known artists) - rawArtist parameter added to downloadTrack so YTM search query uses the original Japanese channel name (fixes wrong song downloads) - spotify.js: artistName preserved as original; itunesArtistName stored separately so the Spotify importer shows Japanese titles - romaji index now includes titleRomaji/artistRomaji/albumRomaji fields - Frontend: showRomaji setting (Settings > Bibliothek) — when on, player bar, now-playing, queue, and song lists all show romaji via index lookup - refreshDisplayMode() updates all live UI when the toggle is saved Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
74 lines
1.3 KiB
JavaScript
74 lines
1.3 KiB
JavaScript
// Shared mutable state — imported as { S } in every module
|
|
export const S = {
|
|
cfg: { url: '', user: '', pass: '', lastfmKey: '', backendUrl: '', showPlayCount: false, showRomaji: false },
|
|
|
|
// Playback
|
|
queue: [],
|
|
qIdx: -1,
|
|
_origQueue: null,
|
|
shuffle: false,
|
|
repeat: false,
|
|
radioMode: false,
|
|
audio: null,
|
|
previewAudio: null,
|
|
previewCurrent: null,
|
|
_scrubbing: false,
|
|
_msPosLast: 0,
|
|
_trackChanging: false,
|
|
queueOpen: false,
|
|
|
|
// Now Playing overlay
|
|
npOpen: false,
|
|
npQueueMode: false,
|
|
npLyricsMode: false,
|
|
|
|
// Navigation history
|
|
_navStack: [],
|
|
_navCursor: -1,
|
|
_navJumping: false,
|
|
|
|
// Search
|
|
searchTimer: null,
|
|
globalSearchTimer: null,
|
|
_mobileSearchTimer: null,
|
|
|
|
// Song info / edit
|
|
infoSong: null,
|
|
|
|
// Download
|
|
downloadTarget: null,
|
|
dlType: 'track',
|
|
jobs: {},
|
|
|
|
// Playlists
|
|
_currentPlaylist: null,
|
|
plModalSongs: [],
|
|
cachedPlaylists: [],
|
|
|
|
// Navidrome REST auth
|
|
_ndToken: null,
|
|
|
|
// Artist images cache
|
|
artistImgCache: {},
|
|
|
|
// Audiobookshelf
|
|
abs: {
|
|
url: '', token: null, userId: null,
|
|
currentLibraryId: null,
|
|
},
|
|
absPlayer: {
|
|
open: false,
|
|
item: null,
|
|
_sessionId: null,
|
|
audioTracks: [],
|
|
trackIdx: 0,
|
|
chapters: [],
|
|
chapterIdx: -1,
|
|
playing: false,
|
|
currentTime: 0,
|
|
duration: 0,
|
|
speed: 1.0,
|
|
sleepRemaining: null,
|
|
},
|
|
};
|