-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexport.html
More file actions
226 lines (168 loc) · 8.37 KB
/
export.html
File metadata and controls
226 lines (168 loc) · 8.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>DiscogsToSpotify</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152-precomposed.png" />
<!-- Imports ---------------------->
<!-- jQuery -->
<script src="js/jquery-1.12.0.js"></script>
<!-- Bootstrap JS -->
<script src="js/bootstrap.js"></script>
<!-- Export -->
<script src="js/export.js"></script>
<!-- Bootstrap CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/custom_style.css" rel="stylesheet">
<!-- Icons CSS -->
<link href="css/icons.css" rel="stylesheet">
</head>
<body>
<div class="container" style="margin:5%">
<div class="jumbotron" style="background-color:#282828;">
<div id="export">
<h1 style="color:#adafb2">Export your Discogs collection to a Spotify playlist</h1>
<br>
<div id="login">
<p>Logged out</p>
</div>
<div id="loggedin"></div>
<div class="container">
<div class="row">
<div class="col-sm-3" style="padding: 0px; padding-right: 15px; min-width: 200px; max-width: 269px">
<input style="width: 100%; max-width: 100%; float:left; margin-bottom:10px; border-radius: 24px;" name="user" id="user" type="text" class="form-control" placeholder="Discogs-Username" />
</div>
<div class="col-sm-4" style="padding: 0px; padding-right: 15px; min-width: 284px; max-width: 284px">
<button id="start" class="btn btn-large btn-success"><span class="icon-discogs-icon"></span> Get collection from Discogs</button>
</div>
<div class="col-sm-1" style="padding: 0px; padding-right: 15px; min-width: 45px; max-width: 45px">
<p>or</p>
</div>
<div class="col-sm-3" style="padding: 0px; min-width: 284px; max-width: 284px">
<button id="startWantlist" class="btn btn-large btn-default" style="width: 254px;"><span class="icon-discogs-icon"></span> Get wantlist from Discogs</button>
</div>
</div>
</div>
<br>
<div id="progressDiv" class="hide" style="margin-top:20px;">
<div id="progressbar" class="progress" style="height:30px; border-radius: 24px;">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="color:white; background-color:#1db954; width: 0%; min-width: 2em; padding-top:6px"><span id="progressNumber">0%</span>
</div>
</div>
</div>
<div id="waiting">
<p>Waiting for Discogs API...</p>
</div>
</div>
</div>
<div>
<div id="imageDiv" style="display: inline-block;"></div>
</div>
</div>
<!-- Modal: error -->
<div id="errorModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><span class="icon-notification"></span> Error</h4>
</div>
<div class="modal-body">
<p id="errorModalText" style="color:black"></p>
</div>
<div class="modal-footer">
<button id="errorOKButton" class="btn btn-large btn-danger" data-toggle="modal" data-target="#errorModal">OK</button>
</div>
</div>
</div>
</div>
<!-- Modal: collection fetched -->
<div id="collectionFetched" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Collection fetched</h4>
</div>
<div class="modal-body">
<p id="collectionFetchedText" style="color:black"></p>
</div>
<div class="modal-footer">
<button id="collectionFetchedButton" class="btn btn-large btn-success" data-toggle="modal" data-target="#collectionFetched"><span class="icon-Converted_file_4fe041e8"></span><span class="icon-spotify"></span> Create Playlist</button>
</div>
</div>
</div>
</div>
<!-- Modal: Playlist created -->
<div id="playlistCreated" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Playlist created</h4>
</div>
<div class="modal-body">
<p id="playlistCreatedText" style="color:black"></p>
</div>
<div class="modal-footer">
<button id="beginExportButton" class="btn btn-large btn-success" data-toggle="modal" data-target="#playlistCreated"><span class="glyphicon glyphicon-record" aria-hidden="true"></span> Fill with tracks!</button>
</div>
</div>
</div>
</div>
<!-- Modal: X Releases added -->
<div id="releasesAdded" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Tracks added to your playlist</h4>
</div>
<div class="modal-body">
<p id="releasesAddedText" style="color:black"></p>
</div>
<div class="modal-footer">
<button id="okButton" class="btn btn-large btn-success" data-toggle="modal" data-target="#releasesAdded">Ok</button>
</div>
</div>
</div>
</div>
<!-- Modal: No match -->
<div id="noMatch" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">No match on Spotify</h4>
</div>
<div class="modal-body">
<p id="noMatchText" style="color:black">Unfortunately, the Spotify Search API didn't return any results for some of the releases in your Discogs collection. This might happen because the artist doesn't want his songs on Spotify, or the release is unavailable in your country. It is also possible that a release has different titles on Discogs and Spotify, so maybe a manual search in your Spotify App will get you the correct result for the following releases:</p>
<div id="noMatchDiv"></div>
</div>
<div class="modal-footer">
<button id="closeButton" class="btn btn-large btn-success" data-toggle="modal" data-target="#noMatch">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal: Choose best match -->
<div id="bestMatch" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" id="bestMatchHeader">
<h4 class="modal-title">Choose the best match</h4>
</div>
<div class="modal-body">
<p style="color:black" id="bestMatchDetails">We found more than one possible match on Spotify. Please choose from the list below:</p>
<div id="matchfinder">
<div id="spotifyDiv">
</div>
</div>
</div>
<div class="modal-footer">
<button id="noMatchButton" class="btn btn-large btn-default" data-toggle="modal" data-target="#bestMatch" onClick="exportMultipleMatches()"></button>
</div>
</div>
</div>
</div>
</body>
</html>