mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
remove pagination
This commit is contained in:
@@ -2,18 +2,13 @@ import { ref } from "@vue/reactivity";
|
||||
|
||||
let folders_uri = "http://127.0.0.1:9876";
|
||||
|
||||
const getData = async (path, last_id) => {
|
||||
const getData = async (path) => {
|
||||
let url;
|
||||
const songs = ref(null);
|
||||
const folders = ref(null);
|
||||
|
||||
const encoded_path = encodeURIComponent(path.replaceAll("/", "|"));
|
||||
|
||||
if (last_id) {
|
||||
url = `${folders_uri}/f/${encoded_path}::${last_id}`;
|
||||
} else {
|
||||
url = url = `${folders_uri}/f/${encoded_path}::None`;
|
||||
}
|
||||
const encoded_path = encodeURIComponent(path.replaceAll("/", "|"));
|
||||
url = url = `${folders_uri}/f/${encoded_path}`;
|
||||
|
||||
const res = await fetch(url);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ const playAudio = (path) => {
|
||||
};
|
||||
|
||||
audio.ontimeupdate = () => {
|
||||
pos.value = (audio.currentTime / audio.duration) * 100;
|
||||
pos.value = (audio.currentTime / audio.duration) * 1000;
|
||||
};
|
||||
|
||||
audio.addEventListener("ended", () => {
|
||||
@@ -41,7 +41,7 @@ function playPrev() {
|
||||
|
||||
function seek(pos) {
|
||||
console.log(pos);
|
||||
audio.currentTime = (pos / 100) * audio.duration;
|
||||
audio.currentTime = (pos / 1000) * audio.duration;
|
||||
}
|
||||
|
||||
function playPause() {
|
||||
|
||||
Reference in New Issue
Block a user