mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-02 06:52:19 +00:00
Move initial track default back to config
This commit is contained in:
parent
5830ac1021
commit
a3c32fb916
2 changed files with 15 additions and 15 deletions
14
js/config.js
14
js/config.js
|
|
@ -1,4 +1,5 @@
|
|||
import skin from "../skins/base-2.91.wsz";
|
||||
import llamaAudio from "../mp3/llama-2.91.mp3";
|
||||
|
||||
/* global SENTRY_DSN */
|
||||
|
||||
|
|
@ -12,9 +13,20 @@ if (hash) {
|
|||
}
|
||||
}
|
||||
|
||||
// Backwards compatibility with the old syntax
|
||||
if (config.audioUrl && !config.initialTracks) {
|
||||
config.initialTracks = [{ url: config.audioUrl }];
|
||||
}
|
||||
|
||||
// Turn on the incomplete playlist window
|
||||
export const skinUrl = config.skinUrl === undefined ? skin : config.skinUrl;
|
||||
export const audioUrl = config.audioUrl;
|
||||
export const initialTracks = config.initialTracks || [
|
||||
{
|
||||
metaData: { artist: "DJ Mike Llama", title: "Llama Whippin' Intro" },
|
||||
url: llamaAudio
|
||||
}
|
||||
];
|
||||
|
||||
export const hideAbout = config.hideAbout || false;
|
||||
export const initialState = config.initialState || undefined;
|
||||
export const sentryDsn = SENTRY_DSN;
|
||||
|
|
|
|||
16
js/index.js
16
js/index.js
|
|
@ -7,13 +7,12 @@ import visor from "../skins/Vizor1-01.wsz";
|
|||
import xmms from "../skins/XMMS-Turquoise.wsz";
|
||||
import zaxon from "../skins/ZaxonRemake1-0.wsz";
|
||||
import green from "../skins/Green-Dimension-V2.wsz";
|
||||
import llamaAudio from "../mp3/llama-2.91.mp3";
|
||||
import Winamp from "./winamp";
|
||||
|
||||
import {
|
||||
hideAbout,
|
||||
skinUrl,
|
||||
audioUrl,
|
||||
initialTracks,
|
||||
initialState,
|
||||
sentryDsn
|
||||
} from "./config";
|
||||
|
|
@ -47,22 +46,11 @@ Raven.context(() => {
|
|||
return;
|
||||
}
|
||||
|
||||
const audio =
|
||||
audioUrl === undefined
|
||||
? {
|
||||
metaData: {
|
||||
artist: "DJ Mike Llama",
|
||||
title: "Llama Whippin' Intro"
|
||||
},
|
||||
url: llamaAudio
|
||||
}
|
||||
: { url: audioUrl };
|
||||
|
||||
const winamp = new Winamp({
|
||||
initialSkin: {
|
||||
url: skinUrl
|
||||
},
|
||||
initialTracks: [audio],
|
||||
initialTracks,
|
||||
avaliableSkins: [
|
||||
{ url: base, name: "<Base Skin>" },
|
||||
{ url: green, name: "Green Dimension V2" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue