-
Notifications
You must be signed in to change notification settings - Fork 52
Home
Animesh edited this page Apr 1, 2024
·
28 revisions
Welcome to the ytify wiki!
The workings of the entire project will be documented here for future contributors & maintainers.
- It uses a basic txt formatting not json for efficiency.
- A new playlist data appears after every blank line.
- Each data item is separated by a line.
- The first item is playlist name.
- The second item is playlist id.
- The third item is playlist thumbnail id.
Here's an example implementation in js that converts the text to array to an array of objects.
fetch('https://raw.githubusercontent.com/wiki/n-ce/ytify/ytm_pls.md')
.then(res => res.text())
.then(text => text.split('\n'))
.then(data => {
const array = [];
for (let i = 0; i < data.length; i += 4)
array.push({
"type": "playlist",
"name": data[i + 1],
"uploaderName": "YouTube Music",
"url": '/playlists/' + data[i + 2],
"thumbnail": '/' + data[i + 3]
});
// do whatever with array
});