Closed helotbc closed 2 years ago
K-Music v1.1.0 support folder playlist. You can organize songs by using folder.
Ahmad, You didn't address my question. Does the app support .m3u files? Can this be added as a feature? I find it easier to create the playlist on my computer and save the file on to the SD chip. On Tue, 2021-01-12 at 13:36 -0800, Ahmad Malik wrote:
Closed #7.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. --
Thanks,
Brendan Carroll 617.794.8801
I have attached an .m3u file. I hope it helps. On Tue, 2021-01-12 at 22:07 -0800, Ahmad Malik wrote:
Not support m3u i need to understand how m3u works before adding this features to k- music
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. --
Thanks,
Brendan Carroll 617.794.8801
I have attached an .m3u file. I hope it helps. On Tue, 2021-01-12 at 22:07 -0800, Ahmad Malik wrote: Not support m3u i need to understand how m3u works before adding this features to k- music — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. -- Thanks, Brendan Carroll 617.794.8801
where is the .m3u file provided? i cannot find it in this github issue.... I am making a music player and would like to understand how m3u works... Only "reliable" examples i could find is from wikipedia....
@cyan-2048 can you create M3U playlist using your computer. Below is mine on lubuntu, audacious, mtp mode. But i can't save the M3U file on mtp mode
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/ALAC_test.alac.m4a
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/FLA_test.flac
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/M4A_test.m4a
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/MP3_test.mp3
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/MP4_audio.m4a
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/WAV_test.wav
file:///run/user/1000/gvfs/mtp%3Ahost%3D%255Busb%253A002%252C005%255D/Internal%20Storage/Musics/test2/WMA_test.wma
i don't know how to make m3u files... i don't use it at all.....
Guys, I've used the Clementine app to create .m3u files. One trick is that you have to: open the file in a text editor, Save As, choose the line ending as WINDOWS. My phones couldn't interpret the file otherwise. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 04:51 -0700, Cyan wrote:
I have attached an .m3u file. I hope it helps. On Tue, 2021-01-12 at 22:07 -0800, Ahmad Malik wrote: Not support m3u i need to understand how m3u works before adding this features to k- music — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. -- Thanks, Brendan Carroll 617.794.8801 where is the .m3u file provided? i cannot find it in this github issue.... I am making a music player and would like to understand how m3u works... Only "reliable" examples i could find is from wikipedia.... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@helotbc please share your m3u playlist. Paste it on pastebin.com
Done. Let me know if you need anything further. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 07:58 -0700, Ahmad Malik wrote:
@helotbc please share your m3u playlist. Paste it on pastebin.com — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Done. Let me know if you need anything further. -- Thanks, Brendan Carroll 617.794.8801 … On Fri, 2022-04-22 at 07:58 -0700, Ahmad Malik wrote: @helotbc please share your m3u playlist. Paste it on pastebin.com — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
link to pastebin.com ?
I've never used pastebin and not sure what you need. I've attached the file to this email. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 08:03 -0700, Ahmad Malik wrote:
Done. Let me know if you need anything further. -- Thanks, Brendan Carroll 617.794.8801 … On Fri, 2022-04-22 at 07:58 -0700, Ahmad Malik wrote: @helotbc please share your m3u playlist. Paste it on pastebin.com — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> link to pastebin.com ? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>
@helotbc Github comment section and my email inbox does not show any file attachment
@helotbc please cooperate and upload the file somewhere else other than your email provider
Please find the file attached...
Change the file extension to .m3u
Uploaded to github. Let me know if you can't see it. Remove the .txt in the file name. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 08:16 -0700, Cyan wrote:
@helotbc please cooperate and upload the file somewhere else other than your email provider — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@helotbc do you mind sending a picture of one of the folders the music found in the m3u file is located at?
Change the file extension to .m3u
thanks
Here's an image of the file on my OS: --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 08:28 -0700, Cyan wrote:
@helotbc do you mind sending a picture of one of the folders the music found in the m3u file is located at? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
I put this file on my device in the /Music folder with the .mp3 files. In past experience the music player identifies the .m3u and lists it under the PlayList category. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 08:28 -0700, Cyan wrote:
@helotbc do you mind sending a picture of one of the folders the music found in the m3u file is located at? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@helotbc please stop trying to send attachments through email, no one in github can see it
@helotbc please stop trying to send attachments through email, no one in github can see it
i saw that already, @helotbc sent an image through email
anyways, i think i have understood how m3u works thanks @helotbc
Good luck guys! --
Thanks,
Brendan Carroll 617.794.8801
On Sat, 2022-04-23 at 06:47 -0700, Cyan wrote:
anyways, i think i have understood how m3u works thanks @helotbc — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Tested out Phonograph app for android, i get this.... so far my brain can only implement:
if user imports playlist which uses relative folder directories, i will not include ../
because b2g does not support directories like this..... having to implement my own way of getting file using ../
is too much...
i will i skip filepath structure that's not supported like C:\
if user will export playlist and all the music is found in the same folder(aka /Music) will export using relative directories, else if user exports playlist with folders not in the same directory, use File object filename property(will use fullpath but only accessable for the same kaios device, some kaios device have different filepath structure).
actually maybe i will not implement a way to export with relative filepath, because i am too lazy to implement a way to export file to a directory ahahhahaha
function parseM3U(file) {
if (file.constructor.name !== "File") return console.error("Not a File object");
if (!file.name) return console.error("No filename");
let text = blob2text(file);
let array = text.split("\n");
if (array[0] !== "#EXTM3U") return console.error("Not an M3U file");
let filepath = file.name.split("/").slice(0, -1).join("/") + "/";
array = array
.map((a) => a.replace(/\\/g, "/"))
.filter((a) => {
if (a.startsWith("#")) return false;
if (/^(.*):\//.test(a)) return false;
if (a.includes("../")) return false;
if (a == "") return false;
return true;
})
.map((a) => (a.startsWith("/") ? a : filepath + a));
return array;
}
var text = `#EXTM3U
Alternative\\Band - Song.mp3
Classical\\Other Band - New Song.mp3
Stuff.mp3
D:\\More Music\\Foo.mp3
..\\Other Music\\Bar.mp3
http://www.example.com:8000/Listen.mp3
http://www.example.com/~user/Mine.mp3
/storage/6912-2BCA/Music/MNL48/River - Disk 1/MNL48 - River.mp3`
parseM3U(new File([text],"/sdcard/music/test.m3u"))
/*
returns:
[
"/sdcard/music/Alternative/Band - Song.mp3",
"/sdcard/music/Classical/Other Band - New Song.mp3",
"/sdcard/music/Stuff.mp3",
"/storage/6912-2BCA/Music/MNL48/River - Disk 1/MNL48 - River.mp3",
]
*/
// sync xmlhttp is acceptable for things stored in ram i guess
function blob2text(b) {
var blob = b.slice(0, b.size, "text/plain"),
uri = URL.createObjectURL(blob),
xhr = new XMLHttpRequest();
xhr.open("GET", uri, false);
xhr.send();
URL.revokeObjectURL(uri);
return xhr.responseText;
}
sync blob2text
The issues was closed. Please duplicate this issue on your repository and i will follow up the discussion
Maybe you can use 3rd party libraries to parse m3u files, https://github.com/nickdesaulniers/javascript-playlist-parser
http://www.example.com/~user/Mine.mp3 // if path is valid http then use the path as stream src
/storage/6912-2BCA/Music/MNL48/River - Disk 1/MNL48 - River.mp3 // find "MNL48 - River.mp3" in local files registry, if exist use local path as stream src else skip from playlist
re-open the issues and WIP[DONE]
DONE External Playlist(only support m3u) @helotbc Please test the latest version
I'm sorry, I can't test. I no longer have that device. --
Thanks,
Brendan Carroll 617.794.8801
On Tue, 2022-04-26 at 14:06 -0700, Ahmad Malik wrote:
DONE External Playlist(only support m3u) @helotbc Please test the latest version — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Please send me the link to your github site and I'll upload. --
Thanks,
Brendan Carroll 617.794.8801
On Fri, 2022-04-22 at 08:11 -0700, Ahmad Malik wrote:
@helotbc Github comment section and my email inbox does not show any file attachment — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
I have an Alcatel Flip 3 running KaiOS 2.5.2. The kaimusic app doesn't recognize the .m3u playlist files on the SD card. Can this feature be added?
Thanks, Brendan