Skip to content

Commit

Permalink
feat: 🎸 tracks CSV のカラムの並び順を変更した (#28)
Browse files Browse the repository at this point in the history
ただし tracks の取得が完全でない(50曲を超える場合)
  • Loading branch information
nikukyugamer authored Nov 28, 2023
1 parent 2d02794 commit 58bc6d1
Show file tree
Hide file tree
Showing 9 changed files with 419 additions and 419 deletions.
28 changes: 14 additions & 14 deletions app/services/export_to_csv/tracks_in_each_album_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ def album(album_name)
end

def track_ids(album)
# FIXME: 50曲を超える場合にはオフセットの設定が必要
album.tracks.map(&:id)
end

# TODO: CSV だと順番も重要だから人間の目に優しくしたい
def headers
%w[
disc_number
duration_ms
isrc
href
spotify_external_url
id
isrc
name
popularity
preview_url
duration_ms
disc_number
track_number
spotify_external_url
preview_url
api_href
]
end

Expand All @@ -66,7 +66,7 @@ def rows(track_ids)
disc_number = track.disc_number
duration_ms = track.duration_ms
isrc = track.external_ids['isrc']
href = track.href
api_href = track.href
spotify_external_url = track.external_urls['spotify']
id = track.id
name = track.name
Expand All @@ -75,16 +75,16 @@ def rows(track_ids)
track_number = track.track_number

rows << {
disc_number:,
duration_ms:,
isrc:,
href:,
spotify_external_url:,
id:,
isrc:,
name:,
popularity:,
duration_ms:,
disc_number:,
track_number:,
spotify_external_url:,
preview_url:,
track_number:
api_href:
}
end

Expand Down
102 changes: 51 additions & 51 deletions db/csv_files/tracks_s1.csv

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions db/csv_files/tracks_s2_1.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_s2_2.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_s3.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_s4.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_s5.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_tk.csv

Large diffs are not rendered by default.

102 changes: 51 additions & 51 deletions db/csv_files/tracks_tsumutoki.csv

Large diffs are not rendered by default.

0 comments on commit 58bc6d1

Please sign in to comment.