Skip to content

Похожий плейлист #88

Discussion options

You must be logged in to vote
  // ...

  let Fresh = Source.getPlaylistTracks('', playlistId);
  let FreshCopy = Selector.sliceCopy(Fresh);
  Filter.replaceWithSimilar(Fresh, Source.getSavedTracks(), RecentTracks.get());
  Filter.matchExcept(Fresh, 'mix|club|radio|edit|live|karaoke');
  Filter.dedupTracks(Fresh);

  Filter.removeTracks(FreshCopy, Fresh, true);
  Filter.removeTracks(Fresh, FreshCopy);
  let tracks = [];
  Combiner.push(tracks, FreshCopy, Fresh);

  let playlist = Playlist.getById(playlistId);

  Playlist.saveAsNew({
    name: playlist.name + ' *',
    description: 'По мотивам ' + playlist.name,
    public: false,
    sourceCover: playlist.images[0].url,
    tracks: tracks,  
  }); 

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Bedmit
Comment options

@Chimildic
Comment options

@Bedmit
Comment options

@Chimildic
Comment options

Answer selected by Chimildic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants