voluntary_music_metadata_enrichment 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/groups/show.js.coffee +2 -1
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/index.js.coffee +3 -2
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_releases/index_view.js.coffee +94 -15
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_releases/new_view.js.coffee +37 -2
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_tracks/index_view.js.coffee +94 -15
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_tracks/new_view.js.coffee +37 -2
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/years_in_review/index_view.js.coffee +6 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/videos/show.js.coffee +2 -0
- data/app/controllers/concerns/music_metadata_enrichment/artist_confirmation.rb +98 -132
- data/app/controllers/concerns/music_metadata_enrichment/track_confirmation.rb +45 -24
- data/app/controllers/library/music/year_in_review_release_flops_controller.rb +31 -0
- data/app/controllers/library/music/year_in_review_releases_controller.rb +24 -4
- data/app/controllers/library/music/year_in_review_track_flops_controller.rb +31 -0
- data/app/controllers/library/music/year_in_review_tracks_controller.rb +55 -24
- data/app/controllers/library/music/years_in_review_controller.rb +25 -3
- data/app/controllers/music_metadata_enrichment/application_controller.rb +4 -0
- data/app/controllers/music_metadata_enrichment/artists_controller.rb +14 -12
- data/app/controllers/music_metadata_enrichment/group_memberships_controller.rb +20 -0
- data/app/controllers/music_metadata_enrichment/group_year_in_review_releases_controller.rb +29 -0
- data/app/controllers/music_metadata_enrichment/group_year_in_review_tracks_controller.rb +27 -0
- data/app/controllers/music_metadata_enrichment/group_year_in_reviews_controller.rb +18 -0
- data/app/controllers/music_metadata_enrichment/groups_controller.rb +2 -0
- data/app/controllers/music_metadata_enrichment/releases_controller.rb +59 -57
- data/app/controllers/music_metadata_enrichment/tracks_controller.rb +37 -7
- data/app/controllers/music_metadata_enrichment/videos_controller.rb +4 -4
- data/app/controllers/voluntary/api/v1/music/releases_controller.rb +17 -0
- data/app/controllers/voluntary/api/v1/music/tracks_controller.rb +17 -0
- data/app/controllers/voluntary/api/v1/music/videos_controller.rb +31 -0
- data/app/controllers/voluntary/api/v1/music/year_in_reviews_controller.rb +94 -0
- data/app/helpers/library/music/year_in_review_releases_helper.rb +14 -0
- data/app/helpers/library/music/year_in_review_tracks_helper.rb +13 -0
- data/app/helpers/library/music/year_in_reviews_helper.rb +22 -0
- data/app/helpers/music_metadata_enrichment/lastfm_helper.rb +19 -0
- data/app/models/concerns/lastfm_request.rb +54 -0
- data/app/models/concerns/music_metadata_enrichment/group_year_in_review_music_entry.rb +14 -0
- data/app/models/concerns/year_in_review_music_entry.rb +3 -1
- data/app/models/concerns/year_in_review_music_release_base.rb +35 -0
- data/app/models/concerns/year_in_review_music_track_base.rb +37 -0
- data/app/models/music_artist.rb +106 -27
- data/app/models/music_metadata_enrichment/group.rb +14 -13
- data/app/models/music_metadata_enrichment/group_membership.rb +13 -0
- data/app/models/music_metadata_enrichment/group_year_in_review.rb +72 -0
- data/app/models/music_metadata_enrichment/group_year_in_review_release.rb +8 -0
- data/app/models/music_metadata_enrichment/group_year_in_review_track.rb +8 -0
- data/app/models/music_release.rb +224 -35
- data/app/models/music_track.rb +140 -28
- data/app/models/year_in_review_music.rb +193 -101
- data/app/models/year_in_review_music_release.rb +2 -20
- data/app/models/year_in_review_music_release_flop.rb +4 -0
- data/app/models/year_in_review_music_track.rb +2 -24
- data/app/models/year_in_review_music_track_flop.rb +4 -0
- data/app/views/library/music/index.html.erb +2 -2
- data/app/views/library/music/year_in_review_release_flops/create.js.erb +5 -0
- data/app/views/library/music/year_in_review_releases/_collection.html.erb +55 -41
- data/app/views/library/music/year_in_review_releases/_form.html.erb +2 -1
- data/app/views/library/music/year_in_review_releases/_multiple_form.html.erb +20 -6
- data/app/views/library/music/year_in_review_releases/_year_in_review_release.html.erb +35 -0
- data/app/views/library/music/year_in_review_releases/create.js.erb +9 -4
- data/app/views/library/music/year_in_review_releases/destroy.js.erb +2 -2
- data/app/views/library/music/year_in_review_releases/export.html.erb +2 -1
- data/app/views/library/music/year_in_review_releases/index.html.erb +4 -4
- data/app/views/library/music/year_in_review_track_flops/create.js.erb +5 -0
- data/app/views/library/music/year_in_review_tracks/_collection.html.erb +49 -38
- data/app/views/library/music/year_in_review_tracks/_form.html.erb +2 -1
- data/app/views/library/music/year_in_review_tracks/_multiple_form.html.erb +69 -42
- data/app/views/library/music/year_in_review_tracks/_year_in_review_track.html.erb +29 -0
- data/app/views/library/music/year_in_review_tracks/create.js.erb +9 -4
- data/app/views/library/music/year_in_review_tracks/destroy.js.erb +2 -2
- data/app/views/library/music/year_in_review_tracks/export.html.erb +1 -1
- data/app/views/library/music/year_in_review_tracks/index.html.erb +3 -3
- data/app/views/library/music/year_in_review_tracks/multiple_new.js.erb +5 -2
- data/app/views/library/music/years_in_review/_collection.html.erb +23 -6
- data/app/views/library/music/years_in_review/destroy.js.erb +1 -0
- data/app/views/library/music/years_in_review/index.html.erb +2 -2
- data/app/views/library/music/years_in_review/publish.js.erb +1 -0
- data/app/views/library/music/years_in_review/show.html.erb +3 -3
- data/app/views/music_metadata_enrichment/artists/_collection.html.erb +3 -3
- data/app/views/music_metadata_enrichment/group_artist_connections/import.html.erb +1 -1
- data/app/views/music_metadata_enrichment/group_memberships/_create_or_destroy.html.erb +9 -0
- data/app/views/music_metadata_enrichment/group_memberships/create.js.erb +5 -0
- data/app/views/music_metadata_enrichment/group_memberships/destroy.js.erb +5 -0
- data/app/views/music_metadata_enrichment/group_year_in_review_releases/index.html.erb +16 -0
- data/app/views/music_metadata_enrichment/group_year_in_review_tracks/index.html.erb +16 -0
- data/app/views/music_metadata_enrichment/group_year_in_reviews/index.html.erb +18 -0
- data/app/views/music_metadata_enrichment/group_year_in_reviews/show.html.erb +20 -0
- data/app/views/music_metadata_enrichment/groups/show.html.erb +7 -1
- data/app/views/music_metadata_enrichment/releases/_spotify_album_player.html.erb +3 -0
- data/app/views/music_metadata_enrichment/releases/announce.html.erb +3 -1
- data/app/views/music_metadata_enrichment/releases/by_name.html.erb +1 -1
- data/app/views/music_metadata_enrichment/releases/name.html.erb +2 -1
- data/app/views/music_metadata_enrichment/releases/name_confirmation.html.erb +2 -1
- data/app/views/music_metadata_enrichment/releases/show.html.erb +24 -0
- data/app/views/music_metadata_enrichment/shared/_artist_confirmation_form.html.erb +2 -1
- data/app/views/music_metadata_enrichment/shared/_new_artist_form.html.erb +2 -1
- data/app/views/music_metadata_enrichment/shared/_new_track_form.html.erb +2 -1
- data/app/views/music_metadata_enrichment/shared/_track_confirmation_form.html.erb +3 -2
- data/app/views/music_metadata_enrichment/tracks/show.html.erb +20 -2
- data/app/views/music_metadata_enrichment/videos/artist_confirmation.html.erb +1 -1
- data/app/views/music_metadata_enrichment/videos/show.html.erb +7 -1
- data/config/locales/resources/music_metadata_enrichment_group_memberships/en.yml +7 -0
- data/config/locales/resources/music_releases/en.yml +4 -0
- data/config/locales/resources/music_tracks/en.yml +8 -3
- data/config/locales/resources/year_in_review_music_release_flops/en.yml +4 -0
- data/config/locales/resources/year_in_review_music_releases/en.yml +6 -1
- data/config/locales/resources/year_in_review_music_track_flops/en.yml +4 -0
- data/config/locales/resources/year_in_review_music_tracks/en.yml +4 -0
- data/config/locales/resources/years_in_review_music/en.yml +8 -3
- data/config/routes.rb +30 -2
- data/config/routes/api.rb +32 -0
- data/db/migrate/20150106183434_add_product_music_metadata_enrichment.rb +3 -1
- data/db/migrate/20150120091801_create_music_metadata_enrichment_groups.rb +2 -2
- data/db/migrate/20150208120722_add_is_lp_to_music_releases.rb +5 -0
- data/db/migrate/20150209091856_year_in_review_music_releases_and_tracks_flops.rb +34 -0
- data/db/migrate/20150209151056_add_is_ambiguous_to_music_artists.rb +5 -0
- data/db/migrate/20150213170604_create_group_memberships.rb +11 -0
- data/db/migrate/20150214083714_create_group_year_in_review_music_releases_and_tracks.rb +77 -0
- data/db/migrate/20150215120545_add_matches_to_year_in_reviews_music.rb +6 -0
- data/db/migrate/20150215135051_add_spotify_album_id_to_music_releases.rb +8 -0
- data/db/migrate/20150220084746_add_state_to_year_in_review_music_entries.rb +7 -0
- data/lib/voluntary_music_metadata_enrichment/ability.rb +12 -3
- data/lib/voluntary_music_metadata_enrichment/concerns/model/user/has_music_library.rb +69 -34
- data/lib/voluntary_music_metadata_enrichment/version.rb +1 -1
- metadata +63 -64
- data/MIT-LICENSE +0 -20
- data/README.rdoc +0 -3
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTE4OWNjY2JlMGYxOGZiNDA3MjY0NjU1YjUzNjg3Y2ZmYzY5NjljZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YmRmYTI3MzFkMjkwYzQzYzM4NWE1ZGNhNWJlZGMyYTM3YmEwMDlhNQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGQ4OTliZDU3NzZhZmQ4YWJkMWIyZDVkNWQ5ZTA5ZWFiZmU1ZmQxOGY2YTU1
|
10
|
+
ZDExN2ExYTRmMzg2M2U5OWQ5MjFjYjI1MWQ3ZGQ5YmE5NGQyMzhlNzk2MGY0
|
11
|
+
MjI3OWQ3ZDZjYTA2ODk0ZmJmMmE4Yzg3MTdiYTgxOGUxMDgyNDk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YWM0Yzg5MDM2OGYwNDQ3MzE3NGYzYzY0MTdhZjU2NGI4NjQ5NjI0ODU0N2Ew
|
14
|
+
MDgxM2UwMTk4NzU5ZmViOWViZWJkMDY5NmM2MzQzOTM0MmU5YTI5YTBmNWE2
|
15
|
+
OWYzMzZiNDdiZTQyYWI5NzM5MDRjZDQyMDlhN2U3Mzk0NDMxNmU=
|
@@ -13,7 +13,8 @@ $(document).ready ->
|
|
13
13
|
|
14
14
|
$(document.body).on "ajax:beforeSend", ".destroy_music_library_artist_link", ->
|
15
15
|
$(this).find('.ajax_spinner').show()
|
16
|
-
|
16
|
+
|
17
17
|
new window.VoluntaryMusicMetadataEnrichment.Library.YearsInReview.IndexView(true)
|
18
18
|
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView()
|
19
|
-
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.
|
19
|
+
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView()
|
20
|
+
new window.Likes.List()
|
@@ -5,28 +5,107 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView =
|
|
5
5
|
constructor: ->
|
6
6
|
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.makeCollectionSortable()
|
7
7
|
|
8
|
+
$(document.body).on "click", ".play_album_button", (event) ->
|
9
|
+
target = null
|
10
|
+
|
11
|
+
if $(this).data('target') == undefined
|
12
|
+
target = '#bootstrap_modal'
|
13
|
+
else
|
14
|
+
target = $(this).data('target')
|
15
|
+
|
16
|
+
event.preventDefault()
|
17
|
+
|
18
|
+
iframe = '<iframe src="https://embed.spotify.com/?uri=spotify:album:' + $(this).data('spotify-album-id') + '" frameborder="0" allowtransparency="true" width="300" height="380"></iframe>'
|
19
|
+
|
20
|
+
if target == '#bootstrap_modal'
|
21
|
+
$(target).html(
|
22
|
+
'<div class="modal-header">' +
|
23
|
+
'<button type="button" id="close_bootstrap_modal_button" class="close" data-dismiss="modal" aria-hidden="true">×</button>' +
|
24
|
+
'<h3>Play Album</h3>' +
|
25
|
+
'</div>' +
|
26
|
+
'<div class="modal-body" style="overflow-y:none;">' +
|
27
|
+
iframe +
|
28
|
+
'</div>' +
|
29
|
+
'<div class="modal-footer">' +
|
30
|
+
'</div>'
|
31
|
+
)
|
32
|
+
$(target).modal('show')
|
33
|
+
else
|
34
|
+
$(target).html(iframe)
|
35
|
+
|
8
36
|
$(document.body).on "ajax:beforeSend", ".destroy_music_year_in_review_top_release_link", ->
|
9
37
|
$(this).find('.ajax_spinner').show()
|
10
38
|
|
39
|
+
$(document.body).on "ajax:beforeSend", ".create_music_year_in_review_flop_release_link", ->
|
40
|
+
$(this).find('.ajax_spinner').show()
|
41
|
+
|
11
42
|
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.NewView()
|
12
43
|
|
44
|
+
window.competitive_list_for_releases = new CompetitiveList id: '#competitive_list_for_releases', competitor_name_proc: (csv) ->
|
45
|
+
return '<iframe src="https://embed.spotify.com/?uri=spotify:album:' + csv.split(';')[0] + '" frameborder="0" allowtransparency="true" width="300" height="380"></iframe><br/>' + $("#competitor_#{csv.split(';')[1]}").find('.competitor_name').html()
|
46
|
+
|
13
47
|
@makeCollectionSortable: ->
|
14
|
-
$('#year_in_review_music_releases').
|
48
|
+
$('#year_in_review_music_releases').multisortable
|
15
49
|
start: (event, ui) =>
|
16
|
-
window.
|
17
|
-
window.last_position = $('#year_in_review_music_releases li:last').data('position')
|
50
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.showSpinnerForSelectedCompetitors()
|
18
51
|
|
19
52
|
update: (event, ui) =>
|
20
|
-
|
21
|
-
|
22
|
-
|
53
|
+
$('#year_in_review_music_releases').sortable('disable')
|
54
|
+
setTimeout (->
|
55
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.putPositions(ui.item.data('id'))
|
56
|
+
return
|
57
|
+
), 1000
|
58
|
+
|
59
|
+
@showSpinnerForSelectedCompetitors: ->
|
60
|
+
$.each $('#year_in_review_music_releases li.selected'), (index, element) ->
|
61
|
+
$(element).find('.sorting_spinner').show()
|
62
|
+
|
63
|
+
@hideSpinnerForSelectedCompetitors: ->
|
64
|
+
$.each $('#year_in_review_music_releases li.selected'), (index, element) ->
|
65
|
+
$(element).find('.sorting_spinner').hide()
|
23
66
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
67
|
+
@putPositions: (competitorId) ->
|
68
|
+
newPositionOfCompetitor = null
|
69
|
+
|
70
|
+
unless window.matches.length > 0 && $('#year_in_review_music_releases li.selected').length > 1
|
71
|
+
newPositionOfCompetitor = window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.resetPositions(competitorId)
|
72
|
+
|
73
|
+
if window.matches.length == 0
|
74
|
+
positions = {}
|
75
|
+
|
76
|
+
$.each $('#year_in_review_music_releases li.selected'), (index, element) ->
|
77
|
+
positions[$(element).data('position')] = $(element).data('id')
|
78
|
+
|
79
|
+
$.post('/users/current/library/music/year_in_review_music_releases/move', { _method: 'put', positions: positions }).always(=>
|
80
|
+
$('#year_in_review_music_releases').sortable('enable')
|
81
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.hideSpinnerForSelectedCompetitors()
|
82
|
+
)
|
83
|
+
else
|
84
|
+
if $('#year_in_review_music_releases li.selected').length == 1
|
85
|
+
window.competitive_list_for_releases.moveCompetitorToPosition competitorId, newPositionOfCompetitor, =>
|
86
|
+
$('#year_in_review_music_releases').sortable('enable')
|
87
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.hideSpinnerForSelectedCompetitors()
|
88
|
+
else
|
89
|
+
alert 'Dragging of multiple elements is not supported in round-robin tournament mode!'
|
90
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.cancelSorting()
|
91
|
+
$('#year_in_review_music_releases').sortable('enable')
|
92
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.IndexView.hideSpinnerForSelectedCompetitors()
|
93
|
+
|
94
|
+
@cancelSorting: ->
|
95
|
+
$wrapper = $('#year_in_review_music_releases')
|
96
|
+
|
97
|
+
$wrapper.find('li').sort((a, b) ->
|
98
|
+
+parseInt($(a).data('position')) - +parseInt($(b).data('position'))
|
99
|
+
).appendTo $wrapper
|
100
|
+
|
101
|
+
@resetPositions: (competitorId) ->
|
102
|
+
position = null
|
103
|
+
current_position = 1
|
104
|
+
|
105
|
+
$.each $('#year_in_review_music_releases li'), (index, element) ->
|
106
|
+
$(element).data('position', current_position)
|
107
|
+
$(element).find('.competitor_position').html(current_position)
|
108
|
+
position = current_position if $(element).data('id') == competitorId
|
109
|
+
current_position += 1
|
110
|
+
|
111
|
+
return position
|
@@ -8,6 +8,8 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.NewView = c
|
|
8
8
|
source: $(this).data('source')
|
9
9
|
minLength: 2
|
10
10
|
appendTo: '#year_in_review_music_release_artist_name_suggestions'
|
11
|
+
search: (event, ui) ->
|
12
|
+
$('#year_in_review_music_release_artist_id').val(null)
|
11
13
|
select: (event, ui) ->
|
12
14
|
$(this).val(ui.item.value)
|
13
15
|
$('#year_in_review_music_release_artist_id').val(ui.item.id)
|
@@ -20,12 +22,45 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewReleases.NewView = c
|
|
20
22
|
source: '/music/artists/' + $('#year_in_review_music_release_artist_id').val() + '/releases/autocomplete'
|
21
23
|
minLength: 2
|
22
24
|
appendTo: '#year_in_review_music_release_release_name_suggestions'
|
25
|
+
search: (event, ui) ->
|
26
|
+
$('#year_in_review_music_release_release_id').val(null)
|
23
27
|
select: (event, ui) ->
|
24
28
|
$(this).val(ui.item.value)
|
25
29
|
$('#year_in_review_music_release_release_id').val(ui.item.id)
|
26
30
|
|
27
31
|
return false;
|
28
32
|
else
|
29
|
-
alert 'Please select an artist!'
|
30
33
|
event.preventDefault()
|
31
|
-
return false
|
34
|
+
return false
|
35
|
+
|
36
|
+
$(document.body).on "click", "#add_release_button", (event) ->
|
37
|
+
event.preventDefault()
|
38
|
+
|
39
|
+
artist_id = $('#year_in_review_music_release_artist_id').val()
|
40
|
+
artist_id = if artist_id == null || artist_id == undefined || artist_id == '' then 0 else parseInt(artist_id)
|
41
|
+
artist_name = $('#year_in_review_music_release_artist_name').val()
|
42
|
+
artist_name = if artist_name == null || artist_name == undefined || artist_name == '' then '' else artist_name
|
43
|
+
release_id = $('#year_in_review_music_release_release_id').val()
|
44
|
+
release_id = if release_id == null || release_id == undefined || release_id == '' then 0 else parseInt(release_id)
|
45
|
+
release_name = $('#year_in_review_music_release_release_name').val()
|
46
|
+
release_name = if release_name == null || release_name == undefined || release_name == '' then '' else release_name
|
47
|
+
|
48
|
+
if artist_id == 0 && artist_name == ''
|
49
|
+
alert 'Please enter an artist name!'
|
50
|
+
return
|
51
|
+
|
52
|
+
if artist_id > 0 && release_name == ''
|
53
|
+
alert 'Please enter a release name'
|
54
|
+
return
|
55
|
+
|
56
|
+
if artist_id == 0
|
57
|
+
$('#new_year_in_review_music_release').attr(
|
58
|
+
'action', '/music/releases/artist_confirmation?music_artist[name]=' + artist_name
|
59
|
+
)
|
60
|
+
else if release_id == 0
|
61
|
+
$('#new_year_in_review_music_release').attr(
|
62
|
+
'action', '/music/releases/name_confirmation?music_release[name]=' + release_name + '&music_release[artist_id]=' + artist_id
|
63
|
+
)
|
64
|
+
|
65
|
+
$('#new_year_in_review_music_release').attr('method', 'get') if release_id == 0
|
66
|
+
$('#new_year_in_review_music_release').submit()
|
@@ -5,28 +5,107 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView = c
|
|
5
5
|
constructor: ->
|
6
6
|
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.makeCollectionSortable()
|
7
7
|
|
8
|
+
$(document.body).on "click", ".play_track_button", (event) ->
|
9
|
+
target = null
|
10
|
+
|
11
|
+
if $(this).data('target') == undefined
|
12
|
+
target = '#bootstrap_modal'
|
13
|
+
else
|
14
|
+
target = $(this).data('target')
|
15
|
+
|
16
|
+
event.preventDefault()
|
17
|
+
|
18
|
+
iframe = '<iframe src="https://embed.spotify.com/?uri=spotify:track:' + $(this).data('spotify-track-id') + '&view=coverart" frameborder="0" allowtransparency="true" width="300" height="80"></iframe>'
|
19
|
+
|
20
|
+
if target == '#bootstrap_modal'
|
21
|
+
$(target).html(
|
22
|
+
'<div class="modal-header">' +
|
23
|
+
'<button type="button" id="close_bootstrap_modal_button" class="close" data-dismiss="modal" aria-hidden="true">×</button>' +
|
24
|
+
'<h3>Play Track</h3>' +
|
25
|
+
'</div>' +
|
26
|
+
'<div class="modal-body" style="overflow-y:none;">' +
|
27
|
+
iframe +
|
28
|
+
'</div>' +
|
29
|
+
'<div class="modal-footer">' +
|
30
|
+
'</div>'
|
31
|
+
)
|
32
|
+
$(target).modal('show')
|
33
|
+
else
|
34
|
+
$(target).html(iframe)
|
35
|
+
|
8
36
|
$(document.body).on "ajax:beforeSend", ".destroy_music_year_in_review_top_track_link", ->
|
9
37
|
$(this).find('.ajax_spinner').show()
|
10
38
|
|
39
|
+
$(document.body).on "ajax:beforeSend", ".create_music_year_in_review_flop_track_link", ->
|
40
|
+
$(this).find('.ajax_spinner').show()
|
41
|
+
|
11
42
|
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.NewView()
|
12
43
|
|
44
|
+
window.competitive_list_for_tracks = new CompetitiveList id: '#competitive_list_for_tracks', competitor_name_proc: (csv) ->
|
45
|
+
return '<iframe src="https://embed.spotify.com/?uri=spotify:track:' + csv.split(';')[0] + '&view=coverart" frameborder="0" allowtransparency="true" width="300" height="80"></iframe><br/>' + $("#competitor_#{csv.split(';')[1]}").find('.competitor_name').html()
|
46
|
+
|
13
47
|
@makeCollectionSortable: ->
|
14
|
-
$('#year_in_review_music_tracks').
|
48
|
+
$('#year_in_review_music_tracks').multisortable
|
15
49
|
start: (event, ui) =>
|
16
|
-
window.
|
17
|
-
window.last_position = $('#year_in_review_music_tracks li:last').data('position')
|
50
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.showSpinnerForSelectedCompetitors()
|
18
51
|
|
19
52
|
update: (event, ui) =>
|
20
|
-
|
21
|
-
|
22
|
-
|
53
|
+
$('#year_in_review_music_tracks').sortable('disable')
|
54
|
+
setTimeout (->
|
55
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.putPositions(ui.item.data('id'))
|
56
|
+
return
|
57
|
+
), 1000
|
58
|
+
|
59
|
+
@showSpinnerForSelectedCompetitors: ->
|
60
|
+
$.each $('#year_in_review_music_tracks li.selected'), (index, element) ->
|
61
|
+
$(element).find('.sorting_spinner').show()
|
62
|
+
|
63
|
+
@hideSpinnerForSelectedCompetitors: ->
|
64
|
+
$.each $('#year_in_review_music_tracks li.selected'), (index, element) ->
|
65
|
+
$(element).find('.sorting_spinner').hide()
|
23
66
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
67
|
+
@putPositions: (competitorId) ->
|
68
|
+
newPositionOfCompetitor = null
|
69
|
+
|
70
|
+
unless window.matches.length > 0 && $('#year_in_review_music_tracks li.selected').length > 1
|
71
|
+
newPositionOfCompetitor = window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.resetPositions(competitorId)
|
72
|
+
|
73
|
+
if window.matches.length == 0
|
74
|
+
positions = {}
|
75
|
+
|
76
|
+
$.each $('#year_in_review_music_tracks li.selected'), (index, element) ->
|
77
|
+
positions[$(element).data('position')] = $(element).data('id')
|
78
|
+
|
79
|
+
$.post('/users/current/library/music/year_in_review_music_tracks/move', { _method: 'put', positions: positions }).always(=>
|
80
|
+
$('#year_in_review_music_tracks').sortable('enable')
|
81
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.hideSpinnerForSelectedCompetitors()
|
82
|
+
)
|
83
|
+
else
|
84
|
+
if $('#year_in_review_music_tracks li.selected').length == 1
|
85
|
+
window.competitive_list_for_tracks.moveCompetitorToPosition competitorId, newPositionOfCompetitor, =>
|
86
|
+
$('#year_in_review_music_tracks').sortable('enable')
|
87
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.hideSpinnerForSelectedCompetitors()
|
88
|
+
else
|
89
|
+
alert 'Dragging of multiple elements is not supported in round-robin tournament mode!'
|
90
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.cancelSorting()
|
91
|
+
$('#year_in_review_music_tracks').sortable('enable')
|
92
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.hideSpinnerForSelectedCompetitors()
|
93
|
+
|
94
|
+
@cancelSorting: ->
|
95
|
+
$wrapper = $('#year_in_review_music_tracks')
|
96
|
+
|
97
|
+
$wrapper.find('li').sort((a, b) ->
|
98
|
+
+parseInt($(a).data('position')) - +parseInt($(b).data('position'))
|
99
|
+
).appendTo $wrapper
|
100
|
+
|
101
|
+
@resetPositions: (competitorId) ->
|
102
|
+
position = null
|
103
|
+
current_position = 1
|
104
|
+
|
105
|
+
$.each $('#year_in_review_music_tracks li'), (index, element) ->
|
106
|
+
$(element).data('position', current_position)
|
107
|
+
$(element).find('.competitor_position').html(current_position)
|
108
|
+
position = current_position if $(element).data('id') == competitorId
|
109
|
+
current_position += 1
|
110
|
+
|
111
|
+
return position
|
@@ -8,6 +8,8 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.NewView = cla
|
|
8
8
|
source: $(this).data('source')
|
9
9
|
minLength: 2
|
10
10
|
appendTo: '#year_in_review_music_track_artist_name_suggestions'
|
11
|
+
search: (event, ui) ->
|
12
|
+
$('#year_in_review_music_track_artist_id').val(null)
|
11
13
|
select: (event, ui) ->
|
12
14
|
$(this).val(ui.item.value)
|
13
15
|
$('#year_in_review_music_track_artist_id').val(ui.item.id)
|
@@ -20,12 +22,45 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.NewView = cla
|
|
20
22
|
source: '/music/artists/' + $('#year_in_review_music_track_artist_id').val() + '/tracks/autocomplete'
|
21
23
|
minLength: 2
|
22
24
|
appendTo: '#year_in_review_music_track_track_name_suggestions'
|
25
|
+
search: (event, ui) ->
|
26
|
+
$('#year_in_review_music_track_track_id').val(null)
|
23
27
|
select: (event, ui) ->
|
24
28
|
$(this).val(ui.item.value)
|
25
29
|
$('#year_in_review_music_track_track_id').val(ui.item.id)
|
26
30
|
|
27
31
|
return false;
|
28
32
|
else
|
29
|
-
alert 'Please select an artist!'
|
30
33
|
event.preventDefault()
|
31
|
-
return false
|
34
|
+
return false
|
35
|
+
|
36
|
+
$(document.body).on "click", "#add_track_button", (event) ->
|
37
|
+
event.preventDefault()
|
38
|
+
|
39
|
+
artist_id = $('#year_in_review_music_track_artist_id').val()
|
40
|
+
artist_id = if artist_id == null || artist_id == undefined || artist_id == '' then 0 else parseInt(artist_id)
|
41
|
+
artist_name = $('#year_in_review_music_track_artist_name').val()
|
42
|
+
artist_name = if artist_name == null || artist_name == undefined || artist_name == '' then '' else artist_name
|
43
|
+
track_id = $('#year_in_review_music_track_track_id').val()
|
44
|
+
track_id = if track_id == null || track_id == undefined || track_id == '' then 0 else parseInt(track_id)
|
45
|
+
track_name = $('#year_in_review_music_track_track_name').val()
|
46
|
+
track_name = if track_name == null || track_name == undefined || track_name == '' then '' else track_name
|
47
|
+
|
48
|
+
if artist_id == 0 && artist_name == ''
|
49
|
+
alert 'Please enter an artist name!'
|
50
|
+
return
|
51
|
+
|
52
|
+
if artist_id > 0 && track_name == ''
|
53
|
+
alert 'Please enter a track name'
|
54
|
+
return
|
55
|
+
|
56
|
+
if artist_id == 0
|
57
|
+
$('#new_year_in_review_music_track').attr(
|
58
|
+
'action', '/music/tracks/artist_confirmation?music_artist[name]=' + artist_name
|
59
|
+
)
|
60
|
+
else if track_id == 0
|
61
|
+
$('#new_year_in_review_music_track').attr(
|
62
|
+
'action', '/music/tracks/name_confirmation?music_track[name]=' + track_name + '&music_track[artist_id]=' + artist_id
|
63
|
+
)
|
64
|
+
|
65
|
+
$('#new_year_in_review_music_track').attr('method', 'get') if track_id == 0
|
66
|
+
$('#new_year_in_review_music_track').submit()
|
@@ -31,6 +31,12 @@ window.VoluntaryMusicMetadataEnrichment.Library.YearsInReview.IndexView = class
|
|
31
31
|
alert 'Failed to load top tracks!'
|
32
32
|
)
|
33
33
|
event.preventDefault()
|
34
|
+
|
35
|
+
$(document.body).on "ajax:beforeSend", ".publish_music_year_in_review_link", ->
|
36
|
+
$(this).find('.ajax_spinner').show()
|
37
|
+
|
38
|
+
$(document.body).on "ajax:beforeSend", ".destroy_music_year_in_review_link", ->
|
39
|
+
$(this).find('.ajax_spinner').show()
|
34
40
|
|
35
41
|
$(document.body).on "ajax:beforeSend", "#new_music_year_in_review_form", ->
|
36
42
|
$("#years_in_review_spinner").show()
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module MusicMetadataEnrichment
|
2
2
|
module ArtistConfirmation
|
3
3
|
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
included do
|
6
|
+
helper_method :render_modal_javascript_response
|
7
|
+
end
|
6
8
|
|
7
9
|
def confirm_artist(from)
|
8
10
|
build_artist
|
@@ -13,147 +15,76 @@ module MusicMetadataEnrichment
|
|
13
15
|
if musicbrainz_artist
|
14
16
|
@artist.mbid = musicbrainz_artist.id
|
15
17
|
@artist.name = musicbrainz_artist.name
|
16
|
-
artist =
|
18
|
+
artist = MusicArtist.where(mbid: @artist.mbid).first
|
17
19
|
|
18
|
-
if
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: artist.id)
|
23
|
-
working_params[:group_id] = params[:group_id]
|
24
|
-
elsif params[:user_id].present?
|
25
|
-
MusicLibraryArtist.create(user_id: params[:user_id], artist_id: artist.id)
|
26
|
-
end
|
27
|
-
|
28
|
-
case from
|
29
|
-
when 'new_release' then redirect_to name_music_releases_path(working_params.merge(music_release: { artist_id: artist.id }))
|
30
|
-
when 'new_track' then redirect_to name_music_tracks_path(music_track: { artist_id: artist.id })
|
31
|
-
when 'new_video'
|
32
|
-
redirect_to track_name_music_tracks_path(working_params.merge(music_track: { artist_id: artist.id }))
|
33
|
-
end
|
34
|
-
elsif artist && from == 'new_group_artist_connection'
|
35
|
-
redirect_to creation_music_group_artists_path(
|
36
|
-
group_artist_connection: { group_id: params[:group_id], artist_id: artist.id }
|
37
|
-
)
|
38
|
-
elsif artist
|
39
|
-
flash[:notice] = I18n.t('music_releases.select_artist.wait_until_artist_metadata_import_completed')
|
20
|
+
if artist
|
21
|
+
@artist = artist
|
22
|
+
else
|
23
|
+
@artist.save
|
40
24
|
|
41
|
-
if params[:group_id].present?
|
42
|
-
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: artist.id)
|
43
|
-
redirect_to music_group_path(params[:group_id])
|
44
|
-
elsif params[:user_id].present?
|
45
|
-
MusicLibraryArtist.create(user_id: params[:user_id], artist_id: artist.id)
|
46
|
-
redirect_to user_music_library_path(params[:user_id])
|
47
|
-
else
|
48
|
-
redirect_to music_path
|
49
|
-
end
|
50
|
-
elsif @artist.save
|
51
25
|
if from == 'new_artist'
|
52
26
|
flash[:notice] = I18n.t('music_artists.name_confirmation.scheduled_metadata_import')
|
53
27
|
elsif ['new_release', 'new_track', 'new_video'].include?(from)
|
54
28
|
flash[:notice] = I18n.t('music_releases.artist_confirmation.artist_import_scheduled')
|
55
29
|
end
|
56
|
-
|
57
|
-
if params[:group_id].present?
|
58
|
-
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: @artist.id)
|
59
|
-
redirect_to music_group_path(params[:group_id])
|
60
|
-
elsif params[:user_id].present?
|
61
|
-
MusicLibraryArtist.create(user_id: params[:user_id], artist_id: @artist.id)
|
62
|
-
redirect_to user_music_library_path(params[:user_id])
|
63
|
-
elsif ['new_artist', 'new_release', 'new_track', 'new_video'].include?(from)
|
64
|
-
redirect_to music_path
|
65
|
-
elsif from == 'new_group_artist_connection'
|
66
|
-
redirect_to creation_music_group_artists_path(
|
67
|
-
group_artist_connection: { group_id: params[:group_id], artist_id: @artist.id }
|
68
|
-
)
|
69
|
-
end
|
70
|
-
else
|
71
|
-
render :new
|
72
30
|
end
|
31
|
+
|
32
|
+
redirect_after_artist_available(from)
|
73
33
|
else
|
74
34
|
flash[:alert] = I18n.t('music_artists.new.mbid_invalid')
|
75
35
|
|
76
36
|
if from == 'new_artist'
|
77
37
|
if params[:user_id].present?
|
78
|
-
|
38
|
+
@path = new_user_music_library_artist_path(params[:user_id])
|
79
39
|
else
|
80
|
-
|
40
|
+
@path = new_music_artist_path
|
81
41
|
end
|
82
42
|
elsif from == 'new_release'
|
83
43
|
if params[:group_id].present?
|
84
|
-
|
44
|
+
@path = new_music_group_release_path(params[:group_id])
|
85
45
|
else
|
86
|
-
|
46
|
+
@path = new_music_release_path
|
87
47
|
end
|
88
48
|
elsif from == 'new_track'
|
89
|
-
|
49
|
+
@path = new_music_track_path
|
90
50
|
elsif from == 'new_video'
|
91
51
|
if params[:group_id].present?
|
92
52
|
new_music_group_video_path(params[:group_id])
|
93
53
|
else
|
94
|
-
|
54
|
+
@path = new_music_video_path
|
95
55
|
end
|
96
56
|
elsif from == 'new_group_artist_connection'
|
97
|
-
|
57
|
+
@path = new_music_group_artist_path(params[:group_id])
|
98
58
|
end
|
99
59
|
end
|
100
60
|
elsif @artist.name.present?
|
101
|
-
|
102
|
-
@artists = MusicBrainz::Artist.search(@artist.name)
|
103
|
-
|
104
|
-
if @artists.nil?
|
105
|
-
sleep 5
|
106
|
-
else
|
107
|
-
break
|
108
|
-
end
|
109
|
-
end
|
61
|
+
@artists = MusicBrainz::Artist.search(@artist.name)
|
110
62
|
else
|
111
|
-
|
63
|
+
@template = :new
|
64
|
+
end
|
65
|
+
|
66
|
+
if @template.present? && !request.xhr?
|
67
|
+
render @template
|
68
|
+
elsif @path.present? && !request.xhr?
|
69
|
+
redirect_to @path
|
112
70
|
end
|
113
71
|
end
|
114
72
|
|
115
|
-
def create_artist(from, name_and_mbid)
|
116
|
-
@artist = MusicArtist.where(mbid: name_and_mbid.split(';').last).first
|
73
|
+
def create_artist(from, name_and_mbid, artist_not_found = false)
|
74
|
+
@artist = MusicArtist.where(mbid: name_and_mbid.split(';').last).first unless artist_not_found
|
117
75
|
|
118
|
-
|
119
|
-
if params[:group_id].present?
|
120
|
-
flash[:notice] = I18n.t('music_artists.create.group_connection_successful')
|
121
|
-
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: @artist.id)
|
122
|
-
redirect_to music_group_path(params[:group_id])
|
123
|
-
elsif params[:user_id].present?
|
124
|
-
flash[:notice] = I18n.t('music_artists.create.library_addition_successful')
|
125
|
-
MusicLibraryArtist.create(user_id: params[:user_id], artist_id: @artist.id)
|
126
|
-
redirect_to user_music_library_path(params[:user_id])
|
127
|
-
else
|
128
|
-
flash[:notice] = I18n.t('music_artists.create.already_created')
|
129
|
-
redirect_to music_artist_path(@artist.id)
|
130
|
-
end
|
131
|
-
else
|
76
|
+
unless @artist
|
132
77
|
@artist = MusicArtist.create(name: name_and_mbid.split(';').first, mbid: name_and_mbid.split(';').last)
|
133
78
|
|
134
|
-
if @artist.
|
79
|
+
if @artist.persisted?
|
135
80
|
if from == 'new_artist'
|
136
81
|
flash[:notice] = I18n.t('music_artists.create.scheduled_artist_for_import')
|
137
82
|
elsif ['new_release', 'new_track', 'new_video'].include? from
|
138
83
|
flash[:notice] = I18n.t('music_releases.select_artist.scheduled_artist_for_import')
|
139
84
|
end
|
140
|
-
|
141
|
-
if ['new_artist', 'new_release', 'new_track', 'new_video'].include? from
|
142
|
-
if params[:group_id].present?
|
143
|
-
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: @artist.id)
|
144
|
-
redirect_to music_group_path(params[:group_id])
|
145
|
-
else
|
146
|
-
redirect_to music_path
|
147
|
-
end
|
148
|
-
elsif from == 'new_group_artist_connection'
|
149
|
-
redirect_to creation_music_group_artists_path(
|
150
|
-
group_artist_connection: { group_id: params[:group_id], artist_id: @artist.id }
|
151
|
-
)
|
152
|
-
end
|
153
85
|
else
|
154
86
|
params[:music_artist][:name] = @artist.name
|
155
87
|
params[:music_artist][:mbid] = @artist.mbid
|
156
|
-
render :new
|
157
88
|
end
|
158
89
|
end
|
159
90
|
end
|
@@ -161,47 +92,82 @@ module MusicMetadataEnrichment
|
|
161
92
|
def artist_selection(from)
|
162
93
|
params[:music_artist] ||= {}
|
163
94
|
name_and_mbid = params[:music_artist].delete(:name_and_mbid)
|
164
|
-
artist = MusicArtist.where(mbid: name_and_mbid.split(';').last).first
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
elsif from == 'new_video'
|
182
|
-
redirect_to track_name_music_videos_path(
|
183
|
-
(params[:group_id].present? ? {group_id: params[:group_id]} : {}).merge(music_track: { artist_id: artist.id })
|
184
|
-
)
|
185
|
-
end
|
186
|
-
elsif artist
|
187
|
-
flash[:notice] = I18n.t('music_releases.select_artist.wait_until_artist_metadata_import_completed')
|
95
|
+
@artist = MusicArtist.where(mbid: name_and_mbid.split(';').last).first
|
96
|
+
create_artist(from, name_and_mbid, true) unless @artist
|
97
|
+
redirect_after_artist_available(from)
|
98
|
+
end
|
99
|
+
|
100
|
+
def build_artist
|
101
|
+
params[:music_artist] ||= {}
|
102
|
+
@artist = MusicArtist.new
|
103
|
+
@artist.name = params[:music_artist][:name]
|
104
|
+
@artist.mbid = params[:music_artist][:mbid]
|
105
|
+
end
|
106
|
+
|
107
|
+
def redirect_after_artist_available(from)
|
108
|
+
if !@artist.persisted?
|
109
|
+
render :new
|
110
|
+
elsif ['new_release', 'new_track', 'new_video'].include?(from) # && @artist.active?
|
111
|
+
working_params = {}
|
188
112
|
|
189
113
|
if params[:group_id].present?
|
190
114
|
MusicMetadataEnrichment::GroupArtistConnection.create(group_id: params[:group_id], artist_id: @artist.id)
|
191
|
-
|
115
|
+
working_params[:group_id] = params[:group_id]
|
116
|
+
elsif params[:user_id].present?
|
117
|
+
MusicLibraryArtist.create(user_id: params[:user_id], artist_id: @artist.id)
|
118
|
+
end
|
119
|
+
|
120
|
+
case from
|
121
|
+
when 'new_release'
|
122
|
+
if @artist.is_classical?
|
123
|
+
flash[:alert] = I18n.t('music_releases.artist_confirmation.classical_releases_not_supported')
|
124
|
+
|
125
|
+
@path = params[:group_id].present? ? music_group_path(params[:group_id]) : music_path
|
126
|
+
else
|
127
|
+
@path = name_music_releases_path(working_params.merge(music_release: { artist_id: @artist.id }))
|
128
|
+
end
|
129
|
+
when 'new_track' then
|
130
|
+
@path = name_music_tracks_path(music_track: { artist_id: @artist.id })
|
131
|
+
when 'new_video'
|
132
|
+
@path = track_name_music_videos_path(working_params.merge(music_track: { artist_id: @artist.id }))
|
192
133
|
else
|
193
|
-
|
134
|
+
if params[:group_id].present?
|
135
|
+
@path = music_group_path(params[:group_id])
|
136
|
+
elsif params[:user_id].present?
|
137
|
+
@path = user_music_library_path(params[:user_id])
|
138
|
+
else
|
139
|
+
@path = music_path
|
140
|
+
end
|
194
141
|
end
|
195
|
-
|
196
|
-
|
142
|
+
elsif from == 'new_group_artist_connection'
|
143
|
+
@path = creation_music_group_artists_path(
|
144
|
+
group_artist_connection: { group_id: params[:group_id], artist_id: @artist.id }
|
145
|
+
)
|
197
146
|
end
|
147
|
+
|
148
|
+
redirect_to @path unless @path.blank? || request.xhr?
|
198
149
|
end
|
199
150
|
|
200
|
-
def
|
201
|
-
|
202
|
-
|
203
|
-
@
|
204
|
-
|
151
|
+
def set_template_name_for_xhr_or_render
|
152
|
+
if @template.present? && !request.xhr?
|
153
|
+
render @template
|
154
|
+
elsif @template.blank? && @path.blank?
|
155
|
+
@template = action_name
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
def render_modal_javascript_response
|
160
|
+
@data ||= { year_in_review_music_id: params[:year_in_review_music_id] }
|
161
|
+
@method ||= :get
|
162
|
+
render(
|
163
|
+
partial: 'shared/modal_javascript_response.js',
|
164
|
+
locals: {
|
165
|
+
title: t("year_in_review_music_#{controller_name}.new.new_#{controller_name.singularize}"),
|
166
|
+
namespace: "music_metadata_enrichment/#{controller_name}/",
|
167
|
+
ajax_data: @data, ajax_method: @method
|
168
|
+
},
|
169
|
+
layout: false
|
170
|
+
)
|
205
171
|
end
|
206
172
|
end
|
207
173
|
end
|