-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from chourmovs/beta
6
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="fr"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Blissify Webapp</title> | ||
</head> | ||
<body> | ||
<h1>Blissify Webapp</h1> | ||
|
||
<!-- Bouton pour rechercher la bibliothèque musicale --> | ||
<form id="network-path-form"> | ||
<label for="network-path">Entrez le chemin du dossier réseau :</label> | ||
<input type="text" id="network-path" name="network-path" placeholder="smb://192.168.1.xxx/Musique" required> | ||
<button type="submit">Rechercher</button> | ||
</form> | ||
|
||
<!-- <button onclick="searchMusic()">Rechercher Bibliothèque Musicale</button> | ||
<pre id="music-output"></pre> --> | ||
|
||
<!-- Bouton pour lancer l'analyse --> | ||
<button onclick="startAnalysis()">Lancer l'Analyse</button> | ||
<pre id="analysis-output"></pre> | ||
|
||
<!-- Bouton pour chercher l'instance Volumio --> | ||
<button onclick="searchVolumio()">Chercher Volumio</button> | ||
<pre id="volumio-output"></pre> | ||
|
||
<!-- Bouton pour uploader song.db --> | ||
<button onclick="uploadSongDb()">Uploader song.db</button> | ||
<pre id="upload-output"></pre> | ||
|
||
<script> | ||
|
||
function searchMusic() { | ||
fetch('/search-music') | ||
.then(response => response.text()) | ||
.then(data => document.getElementById('music-output').innerText = data); | ||
} | ||
|
||
function startAnalysis() { | ||
fetch('/start-analysis') | ||
.then(response => response.text()) | ||
.then(data => document.getElementById('analysis-output').innerText = data); | ||
} | ||
|
||
function searchVolumio() { | ||
fetch('/search-volumio') | ||
.then(response => response.text()) | ||
.then(data => document.getElementById('volumio-output').innerText = data); | ||
} | ||
|
||
function uploadSongDb() { | ||
fetch('/upload-songdb', { method: 'POST' }) | ||
.then(response => response.text()) | ||
.then(data => document.getElementById('upload-output').innerText = data); | ||
} | ||
|
||
document.getElementById('network-path-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
const networkPath = document.getElementById('network-path').value; | ||
|
||
fetch(`/find-directory?path=${encodeURIComponent(networkPath)}`) | ||
.then(response => response.text()) | ||
.then(data => { | ||
document.getElementById('result').innerText = data; | ||
}) | ||
.catch(error => { | ||
document.getElementById('result').innerText = `Erreur: ${error}`; | ||
}); | ||
}); | ||
|
||
</script> | ||
</body> | ||
</html> |