|
@@ -187,6 +187,15 @@
|
|
|
cancel
|
|
|
</i>
|
|
|
</quick-confirm>
|
|
|
+ <i
|
|
|
+ class="material-icons import-album-icon"
|
|
|
+ @click.prevent="importAlbum(slotProps.item)"
|
|
|
+ content="Import Album"
|
|
|
+ v-tippy
|
|
|
+ tabindex="0"
|
|
|
+ >
|
|
|
+ album
|
|
|
+ </i>
|
|
|
<i
|
|
|
class="material-icons tag-songs-icon"
|
|
|
@click.prevent="setTags(slotProps.item)"
|
|
@@ -264,7 +273,7 @@ export default {
|
|
|
{
|
|
|
name: "options",
|
|
|
displayName: "Options",
|
|
|
- properties: ["_id", "verified"],
|
|
|
+ properties: ["_id", "verified", "youtubeId"],
|
|
|
sortable: false,
|
|
|
hidable: false,
|
|
|
resizable: false,
|
|
@@ -598,6 +607,21 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ importAlbum(selectedRows) {
|
|
|
+ const youtubeIds = selectedRows.map(({ youtubeId }) => youtubeId);
|
|
|
+ this.socket.dispatch(
|
|
|
+ "songs.getSongsFromYoutubeIds",
|
|
|
+ youtubeIds,
|
|
|
+ res => {
|
|
|
+ if (res.status === "success") {
|
|
|
+ this.openModal({
|
|
|
+ modal: "importAlbum",
|
|
|
+ data: { songs: res.data.songs }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
setTags(selectedRows) {
|
|
|
this.openModal({
|
|
|
modal: "bulkActions",
|