Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Yea, this will only import from youtube. Run in console on plug while running plug_p0ne.
- //Put the playlist object you got from Brinkie's script here (Replace "{}" with the text {"time":1416,"status":"ok","dubtr ... etc.)
- var playlistz = {}; /*<---- there*/
- // this script requires plug_p0ne
- var songsz = [];
- for (var x in playlistz.data) {
- if (playlistz.data[x].format === 1) {
- mediaLookup(["https://www.youtube.com/watch?v=" + playlistz.data[x].cid]).then(function(songs) {
- songsz.push(songs)
- });
- }
- }
- // wait a bit before running this after the above.
- createPlaylist("### import " + playlistz.meta.name, songsz.filter(function(a){return a}).map(function(s){
- s = s[0];
- var i = s.title.indexOf(" - ");
- if (i != -1) {
- s.author = s.title.substr(0, i);
- s.title = s.title.substr(i+3);
- } else {
- s.author = s.uploader.name || "?"
- }
- return {cid: s.cid, format: s.format, duration: s.duration, image: "https://i.ytimg.com/vi/"+s.cid+"/default.jpg",
- author: s.author, title: s.title, id: 0
- }
- }));
Add Comment
Please, Sign In to add comment