Skip to content

Commit f833424

Browse files
committed
Sort for album's added_at field, resolves #141
1 parent b7a75ec commit f833424

9 files changed

Lines changed: 121 additions & 121 deletions

File tree

mopidy_spotmop/static/app-annotated.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34080,7 +34080,7 @@ angular.module('spotmop.library', [])
3408034080
label: 'Artist'
3408134081
},
3408234082
{
34083-
value: 'album.added_at',
34083+
value: 'added_at',
3408434084
label: 'Date added'
3408534085
}
3408634086
];
@@ -34093,7 +34093,7 @@ angular.module('spotmop.library', [])
3409334093
if( $rootScope.spotifyAuthorized ){
3409434094

3409534095
SpotifyService.getMyAlbums( userid )
34096-
.then( function( response ){
34096+
.then( function( response ){
3409734097
$scope.albums = response;
3409834098
});
3409934099
}

mopidy_spotmop/static/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34080,7 +34080,7 @@ angular.module('spotmop.library', [])
3408034080
label: 'Artist'
3408134081
},
3408234082
{
34083-
value: 'album.added_at',
34083+
value: 'added_at',
3408434084
label: 'Date added'
3408534085
}
3408634086
];
@@ -34093,7 +34093,7 @@ angular.module('spotmop.library', [])
3409334093
if( $rootScope.spotifyAuthorized ){
3409434094

3409534095
SpotifyService.getMyAlbums( userid )
34096-
.then( function( response ){
34096+
.then( function( response ){
3409734097
$scope.albums = response;
3409834098
});
3409934099
}

mopidy_spotmop/static/app.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mopidy_spotmop/static/app.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mopidy_spotmop/static/app/library/albums.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ <h3 class="name"><a ui-sref="browse.album({ uri: album.album.uri })" ng-bind="al
117117
</div>
118118
<div class="col w10">
119119
Added
120-
<span ng-show="settings.albums.sortField == 'album.added_at'">
120+
<span ng-show="settings.albums.sortField == 'added_at'">
121121
<i ng-show="!settings.albums.sortReverse" class="fa fa-caret-down"></i>
122122
<i ng-show="settings.albums.sortReverse" class="fa fa-caret-up"></i>
123123
</span>

mopidy_spotmop/static/app/library/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ angular.module('spotmop.library', [])
264264
label: 'Artist'
265265
},
266266
{
267-
value: 'album.added_at',
267+
value: 'added_at',
268268
label: 'Date added'
269269
}
270270
];
@@ -277,7 +277,7 @@ angular.module('spotmop.library', [])
277277
if( $rootScope.spotifyAuthorized ){
278278

279279
SpotifyService.getMyAlbums( userid )
280-
.then( function( response ){
280+
.then( function( response ){
281281
$scope.albums = response;
282282
});
283283
}

mopidy_spotmop/static/index.html

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
1-
<!DOCTYPE HTML>
2-
<html>
3-
<head>
4-
5-
<title>Spotmop</title>
6-
7-
<meta charset="utf-8" />
8-
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scaleable=no" name="viewport" />
9-
<meta name="mobile-web-app-capable" content="yes" >
10-
<meta name="apple-mobile-web-app-capable" content="yes" />
11-
<meta name="theme-color" content="#222222" />
12-
13-
<base href="#/" />
14-
15-
<script type="text/javascript" src="//www.google-analytics.com/analytics.js"></script>
16-
17-
<script src="app.min.js"></script>
18-
19-
<link rel="stylesheet" href="app.min.css"/>
20-
21-
<link rel="shortcut icon" type="image/ico" href="assets/favicon.ico" />
22-
<link rel="shortcut icon" type="image/x-icon" href="assets/favicon.ico" />
23-
<link rel="shortcut-icon" href="assets/favicon.ico" />
24-
25-
</head>
26-
<body>
27-
28-
<div id="app" ng-app="spotmop" ng-controller="ApplicationController" ng-class="{ smallScreen: smallScreen(), mediumScreen: mediumScreen(), touchDevice: isTouchMode() }" ng-swipe-right="showMenu()" ng-swipe-left="hideMenu()">
29-
30-
<div id="notifications"></div>
31-
32-
<div id="sidebar" class="animate" ng-swipe-right="showMenu()" ng-swipe-left="hideMenu()" >
33-
<div class="background-image" ng-if="!mediumScreen() && state().currentTlTrack.track.images.medium">
34-
<preloadedimage watch="true" class="image blur" url="{{ state().currentTlTrack.track.images.medium }}"></preloadedimage>
35-
</div>
36-
<div class="inner">
37-
<div class="search-form mobile-hide">
38-
<form ng-submit="searchSubmit( query )">
39-
<input type="text" name="query" placeholder="Search" class="query" ng-model="query" />
40-
<button class="submit" type="submit">
41-
<i class="fa fa-search"></i>
42-
</button>
43-
</form>
44-
</div>
45-
<ng-include src="'app/common/mainmenu.template.html'"></ng-include>
46-
</div>
47-
</div>
48-
49-
<div id="dropzones" class="animate fadereveal">
50-
<div class="dropzone queue droppable animate" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queue">
51-
<div class="liner default-content">
52-
<i class="si play white doublesize"></i>
53-
<div class="label">Add to queue</div>
54-
</div>
55-
<div class="liner hover-content animate fadereveal">
56-
<div class="dropzone add-to-queue droppable" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queue">
57-
<i class="si play doublesize white"></i>
58-
<div class="label">Add to queue</div>
59-
</div>
60-
<div class="dropzone add-to-queue-next droppable" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queuenext">
61-
<div class="label">... and play next</div>
62-
</div>
63-
</div>
64-
</div>
65-
<div class="dropzone library droppable animate" dropaccept='["track","tltrack","album","artist","playlist"]' droptype="library">
66-
<div class="liner">
67-
<i class="si music white doublesize"></i>
68-
<div class="label">Add to library</div>
69-
</div>
70-
</div>
71-
<div class="dropzone playlists droppable animate" dropaccept='["track","tltrack","album"]' droptype="playlist">
72-
<div class="liner default-content">
73-
<i class="si playlist white doublesize"></i>
74-
<div class="label">Add to playlist</div>
75-
</div>
76-
<div class="liner hover-content fadereveal">
77-
<div class="playlists-wrapper">
78-
<a ng-repeat="playlist in playlists()" class="menu-item droppable" ui-sref="library.playlist({ uri: {{ 'playlist.uri' }} })" dropaccept='["track","tltrack","album"]' droptype="playlist" data-uri="{{ playlist.uri }}">
79-
<span ng-bind="playlist.name"></span>
80-
</a>
81-
</div>
82-
</div>
83-
</div>
84-
</div>
85-
86-
<ng-include src="'app/player/template.html'" ng-controller="PlayerController"></ng-include>
87-
88-
<div id="body" class="body animate">
89-
<div ui-view></div>
90-
</div>
91-
92-
<contextmenu></contextmenu>
93-
<div class="drag-tracer"></div>
94-
95-
</div>
96-
97-
<script>
98-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
99-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
100-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
101-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
102-
ga('create', 'UA-64701652-3', 'auto');
103-
ga('send', 'pageview');
104-
</script>
105-
106-
</body>
107-
</html>
1+
<!DOCTYPE HTML>
2+
<html>
3+
<head>
4+
5+
<title>Spotmop</title>
6+
7+
<meta charset="utf-8" />
8+
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scaleable=no" name="viewport" />
9+
<meta name="mobile-web-app-capable" content="yes" >
10+
<meta name="apple-mobile-web-app-capable" content="yes" />
11+
<meta name="theme-color" content="#222222" />
12+
13+
<base href="#/" />
14+
15+
<script type="text/javascript" src="//www.google-analytics.com/analytics.js"></script>
16+
17+
<script src="app.min.js"></script>
18+
19+
<link rel="stylesheet" href="app.min.css"/>
20+
21+
<link rel="shortcut icon" type="image/ico" href="assets/favicon.ico" />
22+
<link rel="shortcut icon" type="image/x-icon" href="assets/favicon.ico" />
23+
<link rel="shortcut-icon" href="assets/favicon.ico" />
24+
25+
</head>
26+
<body>
27+
28+
<div id="app" ng-app="spotmop" ng-controller="ApplicationController" ng-class="{ smallScreen: smallScreen(), mediumScreen: mediumScreen(), touchDevice: isTouchMode() }" ng-swipe-right="showMenu()" ng-swipe-left="hideMenu()">
29+
30+
<div id="notifications"></div>
31+
32+
<div id="sidebar" class="animate" ng-swipe-right="showMenu()" ng-swipe-left="hideMenu()" >
33+
<div class="background-image" ng-if="!mediumScreen() && state().currentTlTrack.track.images.medium">
34+
<preloadedimage watch="true" class="image blur" url="{{ state().currentTlTrack.track.images.medium }}"></preloadedimage>
35+
</div>
36+
<div class="inner">
37+
<div class="search-form mobile-hide">
38+
<form ng-submit="searchSubmit( query )">
39+
<input type="text" name="query" placeholder="Search" class="query" ng-model="query" />
40+
<button class="submit" type="submit">
41+
<i class="fa fa-search"></i>
42+
</button>
43+
</form>
44+
</div>
45+
<ng-include src="'app/common/mainmenu.template.html'"></ng-include>
46+
</div>
47+
</div>
48+
49+
<div id="dropzones" class="animate fadereveal">
50+
<div class="dropzone queue droppable animate" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queue">
51+
<div class="liner default-content">
52+
<i class="si play white doublesize"></i>
53+
<div class="label">Add to queue</div>
54+
</div>
55+
<div class="liner hover-content animate fadereveal">
56+
<div class="dropzone add-to-queue droppable" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queue">
57+
<i class="si play doublesize white"></i>
58+
<div class="label">Add to queue</div>
59+
</div>
60+
<div class="dropzone add-to-queue-next droppable" dropaccept='["track","album","localtrack","localalbum","playlist"]' droptype="queuenext">
61+
<div class="label">... and play next</div>
62+
</div>
63+
</div>
64+
</div>
65+
<div class="dropzone library droppable animate" dropaccept='["track","tltrack","album","artist","playlist"]' droptype="library">
66+
<div class="liner">
67+
<i class="si music white doublesize"></i>
68+
<div class="label">Add to library</div>
69+
</div>
70+
</div>
71+
<div class="dropzone playlists droppable animate" dropaccept='["track","tltrack","album"]' droptype="playlist">
72+
<div class="liner default-content">
73+
<i class="si playlist white doublesize"></i>
74+
<div class="label">Add to playlist</div>
75+
</div>
76+
<div class="liner hover-content fadereveal">
77+
<div class="playlists-wrapper">
78+
<a ng-repeat="playlist in playlists()" class="menu-item droppable" ui-sref="library.playlist({ uri: {{ 'playlist.uri' }} })" dropaccept='["track","tltrack","album"]' droptype="playlist" data-uri="{{ playlist.uri }}">
79+
<span ng-bind="playlist.name"></span>
80+
</a>
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
86+
<ng-include src="'app/player/template.html'" ng-controller="PlayerController"></ng-include>
87+
88+
<div id="body" class="body animate">
89+
<div ui-view></div>
90+
</div>
91+
92+
<contextmenu></contextmenu>
93+
<div class="drag-tracer"></div>
94+
95+
</div>
96+
97+
<script>
98+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
99+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
100+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
101+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
102+
ga('create', 'UA-64701652-3', 'auto');
103+
ga('send', 'pageview');
104+
</script>
105+
106+
</body>
107+
</html>

src/app/library/albums.template.html

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ <h3 class="name"><a ui-sref="browse.album({ uri: album.album.uri })" ng-bind="al
117117
</div>
118118
<div class="col w10">
119119
Added
120-
<span ng-show="settings.albums.sortField == 'album.added_at'">
120+
<span ng-show="settings.albums.sortField == 'added_at'">
121121
<i ng-show="!settings.albums.sortReverse" class="fa fa-caret-down"></i>
122122
<i ng-show="settings.albums.sortReverse" class="fa fa-caret-up"></i>
123123
</span>

src/app/library/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ angular.module('spotmop.library', [])
264264
label: 'Artist'
265265
},
266266
{
267-
value: 'album.added_at',
267+
value: 'added_at',
268268
label: 'Date added'
269269
}
270270
];
@@ -277,7 +277,7 @@ angular.module('spotmop.library', [])
277277
if( $rootScope.spotifyAuthorized ){
278278

279279
SpotifyService.getMyAlbums( userid )
280-
.then( function( response ){
280+
.then( function( response ){
281281
$scope.albums = response;
282282
});
283283
}

0 commit comments

Comments
 (0)