mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-25 04:54:23 +00:00
finish + add package script (not working yet)
This commit is contained in:
@@ -114,8 +114,8 @@ app.get( '/clientStatusUpdate/:status', ( req, res ) => {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
app.get( '/openSongs', ( req, res ) => {
|
app.get( '/openSongs', ( req, res ) => {
|
||||||
// res.send( '{ "data": [ "/home/janis/Music/KB2022" ] }' );
|
res.send( '{ "data": [ "/home/janis/Music/KB2022" ] }' );
|
||||||
res.send( '{ "data": [ "/mnt/storage/SORTED/Music/audio/KB2022" ] }' );
|
// res.send( '{ "data": [ "/mnt/storage/SORTED/Music/audio/KB2022" ] }' );
|
||||||
// res.send( { 'data': dialog.showOpenDialogSync( { properties: [ 'openDirectory' ], title: 'Open music library folder' } ) } );
|
// res.send( { 'data': dialog.showOpenDialogSync( { properties: [ 'openDirectory' ], title: 'Open music library folder' } ) } );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ body {
|
|||||||
height: 55vh;
|
height: 55vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 0.5%;
|
margin-bottom: 0.5%;
|
||||||
margin-top: 0.5%;
|
margin-top: 0.25%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-song {
|
.current-song {
|
||||||
@@ -141,7 +141,7 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: 2vh;
|
margin-top: 1vh;
|
||||||
padding: 1vh;
|
padding: 1vh;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: rgba( 0, 0, 0, 0.4 );
|
background-color: rgba( 0, 0, 0, 0.4 );
|
||||||
@@ -152,7 +152,7 @@ body {
|
|||||||
width: 30vh;
|
width: 30vh;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center;
|
object-position: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
font-size: 30vh !important;
|
font-size: 30vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,3 +182,19 @@ body {
|
|||||||
.mode-selector-wrapper:hover {
|
.mode-selector-wrapper:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dancing-style {
|
||||||
|
font-size: 250%;
|
||||||
|
margin: 0;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
position: fixed;
|
||||||
|
font-size: 12px;
|
||||||
|
transform: rotate(270deg);
|
||||||
|
left: -150px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="info">Designed and developed by Janis Hutz https://janishutz.com</div>
|
||||||
<div class="content" id="app">
|
<div class="content" id="app">
|
||||||
<div v-if="hasLoaded" style="width: 100%">
|
<div v-if="hasLoaded" style="width: 100%">
|
||||||
<div class="current-song-wrapper">
|
<div class="current-song-wrapper">
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
<div class="current-song">
|
<div class="current-song">
|
||||||
<progress max="1000" id="progress" :value="progressBar"></progress>
|
<progress max="1000" id="progress" :value="progressBar"></progress>
|
||||||
<h1>{{ playingSong.title }}</h1>
|
<h1>{{ playingSong.title }}</h1>
|
||||||
|
<p class="dancing-style" v-if="playingSong.dancingStyle">{{ playingSong.dancingStyle }}</p>
|
||||||
<p>{{ playingSong.artist }}</p>
|
<p>{{ playingSong.artist }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ createApp( {
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
getTimeUntil( ) {
|
getTimeUntil() {
|
||||||
return ( song ) => {
|
return ( song ) => {
|
||||||
let timeRemaining = 0;
|
let timeRemaining = 0;
|
||||||
for ( let i = this.queuePos; i < this.songs.length; i++ ) {
|
for ( let i = this.queuePos; i < this.songs.length; i++ ) {
|
||||||
@@ -41,10 +41,18 @@ createApp( {
|
|||||||
}
|
}
|
||||||
timeRemaining += parseInt( this.songs[ i ].duration );
|
timeRemaining += parseInt( this.songs[ i ].duration );
|
||||||
}
|
}
|
||||||
if ( timeRemaining === 0 ) {
|
if ( this.isPlaying ) {
|
||||||
return 'Currently playing';
|
if ( timeRemaining === 0 ) {
|
||||||
|
return 'Currently playing';
|
||||||
|
} else {
|
||||||
|
return 'Playing in less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 'Playing in less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min';
|
if ( timeRemaining === 0 ) {
|
||||||
|
return 'Plays next';
|
||||||
|
} else {
|
||||||
|
return 'Playing less than ' + Math.ceil( timeRemaining / 60 - this.pos / 60 ) + 'min after starting to play';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fancy-view">
|
<div class="fancy-view">
|
||||||
<span class="material-symbols-outlined fancy-view-song-art" v-if="!song.hasCoverArt">music_note</span>
|
<span class="material-symbols-outlined fancy-view-song-art" v-if="!song.hasCoverArt">music_note</span>
|
||||||
|
<img v-else-if="song.hasCoverArt && song.coverArtOrigin === 'api'" :src="song.coverArtURL" class="fancy-view-song-art">
|
||||||
<img v-else :src="'http://localhost:8081/getSongCover?filename=' + song.filename" class="fancy-view-song-art">
|
<img v-else :src="'http://localhost:8081/getSongCover?filename=' + song.filename" class="fancy-view-song-art">
|
||||||
<button @click="exit()" id="exit-button"><span class="material-symbols-outlined" style="font-size: 4vh;">close</span></button>
|
<button @click="exit()" id="exit-button"><span class="material-symbols-outlined" style="font-size: 4vh;">close</span></button>
|
||||||
<div class="controls-wrapper">
|
<div class="controls-wrapper">
|
||||||
|
|||||||
@@ -1,4 +1,34 @@
|
|||||||
const { defineConfig } = require('@vue/cli-service')
|
const { defineConfig } = require('@vue/cli-service')
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
transpileDependencies: true
|
transpileDependencies: true,
|
||||||
|
pluginOptions: {
|
||||||
|
electronBuilder: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
"appId": "com.janishutz.MusicPlayer",
|
||||||
|
"copyright": "Copyright (c) 2023 MusicPlayer contributors",
|
||||||
|
"buildVersion": "V2.0.0",
|
||||||
|
builderOptions: {
|
||||||
|
files: [
|
||||||
|
"**/*",
|
||||||
|
{
|
||||||
|
from: "./*",
|
||||||
|
to: "./*",
|
||||||
|
filter: [ "**/*" ]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
extraFiles: [
|
||||||
|
{
|
||||||
|
from: "./src/config",
|
||||||
|
to: "./config",
|
||||||
|
filter: [ "*.config.json" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
from: "./src/client",
|
||||||
|
to: "./client",
|
||||||
|
filter: [ "**/*" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
4
package.sh
Executable file
4
package.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
cd frontend/
|
||||||
|
npm i
|
||||||
|
|
||||||
|
npm run electron:build -- --linux deb rpm --win nsis
|
||||||
Reference in New Issue
Block a user