diff --git a/controlers/music-controller.ts b/controlers/music-controller.ts index 51b1b62..4517e59 100644 --- a/controlers/music-controller.ts +++ b/controlers/music-controller.ts @@ -6,7 +6,7 @@ import { saveAudioToPlaylist, savePlaylist, } from '../services/sqlwrapper.js'; -import { uuid } from 'uuidv4'; +import { v1 } from 'uuid'; const readFileAsync = promisify(fs.readFile); class MusicController { @@ -30,7 +30,7 @@ class MusicController { ? request.files['imageFile'][0] : null; - const trackId = uuid(); + const trackId = v1(); const folderName = `${trackName}_${trackAuthor}_${trackId}`; // Генерация уникального id const folderPath = path.join('uploads', folderName); if (fs.existsSync(folderPath)) { diff --git a/uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/4x4.mp3 b/uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/4x4.mp3 similarity index 100% rename from uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/4x4.mp3 rename to uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/4x4.mp3 diff --git a/uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/4x4.png b/uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/4x4.png similarity index 100% rename from uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/4x4.png rename to uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/4x4.png diff --git a/uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/info.txt b/uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/info.txt similarity index 50% rename from uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/info.txt rename to uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/info.txt index e20e634..c5d0bff 100644 --- a/uploads/4x4_Big Baby Tape_da28c9cb-3dcc-4e5b-a9be-abdaca4bb098/info.txt +++ b/uploads/4x4_Big Baby Tape_d08bb050-97e3-11ee-b9c1-3778e44074dc/info.txt @@ -1,3 +1,3 @@ -id: da28c9cb-3dcc-4e5b-a9be-abdaca4bb098 +id: d08bb050-97e3-11ee-b9c1-3778e44074dc trackName: 4x4 trackAuthor: Big Baby Tape \ No newline at end of file diff --git "a/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/dd.png" "b/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/dd.png" deleted file mode 100644 index d958d3e..0000000 Binary files "a/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/dd.png" and /dev/null differ diff --git "a/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/info.txt" "b/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/info.txt" deleted file mode 100644 index fbfb563..0000000 --- "a/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/info.txt" +++ /dev/null @@ -1,3 +0,0 @@ -id: 8012907c-274a-4bd9-9be7-4297ef09656e -trackName: Skoraya -trackAuthor: kakbudda \ No newline at end of file diff --git a/uploads/skoraya_kakbudda_9c546ed0-97e8-11ee-b2c4-7d63b45d46c0/info.txt b/uploads/skoraya_kakbudda_9c546ed0-97e8-11ee-b2c4-7d63b45d46c0/info.txt new file mode 100644 index 0000000..67b36f7 --- /dev/null +++ b/uploads/skoraya_kakbudda_9c546ed0-97e8-11ee-b2c4-7d63b45d46c0/info.txt @@ -0,0 +1,3 @@ +id: 9c546ed0-97e8-11ee-b2c4-7d63b45d46c0 +trackName: skoraya +trackAuthor: kakbudda \ No newline at end of file diff --git "a/uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/dd.mp3" b/uploads/skoraya_kakbudda_9c546ed0-97e8-11ee-b2c4-7d63b45d46c0/skoraya.mp3 similarity index 100% rename from "uploads/dd_\320\220\320\262\321\202\320\276\321\200 \321\202\321\200\320\265\320\272\320\260_8012907c-274a-4bd9-9be7-4297ef09656e/dd.mp3" rename to uploads/skoraya_kakbudda_9c546ed0-97e8-11ee-b2c4-7d63b45d46c0/skoraya.mp3