mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-25 21:14:22 +00:00
lots of progress on apple music integration
This commit is contained in:
@@ -10,6 +10,7 @@ const indexer = require( './indexer.js' );
|
||||
const axios = require( 'axios' );
|
||||
const ip = require( 'ip' );
|
||||
const jwt = require( 'jsonwebtoken' );
|
||||
const shell = require( 'electron' ).shell;
|
||||
|
||||
|
||||
app.use( bodyParser.urlencoded( { extended: false } ) );
|
||||
@@ -64,6 +65,8 @@ let currentDetails = {
|
||||
let connectedMain = {};
|
||||
// TODO: Add backend integration
|
||||
|
||||
require( './appleMusicRoutes.js' )( app );
|
||||
|
||||
app.get( '/', ( request, response ) => {
|
||||
response.sendFile( path.join( __dirname + '/client/showcase.html' ) );
|
||||
} );
|
||||
@@ -72,6 +75,11 @@ app.get( '/getLocalIP', ( req, res ) => {
|
||||
res.send( ip.address() );
|
||||
} );
|
||||
|
||||
app.get( '/useAppleMusic', ( req, res ) => {
|
||||
shell.openExternal( 'http://localhost:8081/apple-music' );
|
||||
res.send( 'ok' );
|
||||
} );
|
||||
|
||||
app.get( '/openSongs', ( req, res ) => {
|
||||
// res.send( '{ "data": [ "/home/janis/Music/KB2022" ] }' );
|
||||
res.send( '{ "data": [ "/mnt/storage/SORTED/Music/audio/KB2022" ] }' );
|
||||
|
||||
Reference in New Issue
Block a user