implement wtv-favorites with huge help from @JarHead4

This commit is contained in:
zefie
2022-10-08 17:37:36 -04:00
parent dcd13d6ace
commit 7bf2d2e6fa
88 changed files with 4601 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
var minisrv_service_file = true;
var favstore_exists = ssid_sessions[socket.ssid].favstore.favstoreExists();
if (favstore_exists != true)
{
ssid_sessions[socket.ssid].favstore.createFavstore();
headers = `300 OK
Location: wtv-favorite:/favorite`
} else {
var folder_array = ssid_sessions[socket.ssid].favstore.getFolders();
var url = request_headers.request;
var key = url.split('?')[1]
headers = `400 You have not assigned a favorite to ${key}`
}