Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Commit 107c490

Browse files
committed
adjust build process / add readme
1 parent 82dceda commit 107c490

18 files changed

+591
-417
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
/src/bower_components/
55
/node_modules/
66
/brackets-bower.log
7+
/src/vulcanized.html
8+
/src/vulcanized.js
9+
/src/PolySonic.html
10+
/src/PolySonic.js
11+
/src/PolySonic.css

Gruntfile.js

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ module.exports = function(grunt) {
33
// Project configuration.
44
grunt.initConfig({
55
pkg: grunt.file.readJSON('package.json'),
6+
copy: {
7+
main: {
8+
files: [
9+
{nonull: true, src: 'src/PolySonic.html', dest: 'build/index.html'},
10+
{nonull: true, src: 'src/background.js', dest: 'build/background.js'},
11+
{nonull: true, src: 'src/manifest.json', dest: 'build/manifest.json'},
12+
{expand: true, cwd: 'src/', nonull: true, src: '_locales/*/*.json', dest: 'build/'},
13+
{expand: true, cwd: 'src/', nonull: true, src: 'images/*', dest: 'build/'}
14+
]
15+
}
16+
},
617
vulcanize: {
718
default: {
819
options: {
@@ -11,14 +22,53 @@ module.exports = function(grunt) {
1122
strip: true
1223
},
1324
files: {
14-
'build/vulcanized.html': 'src/index.html'
25+
'src/PolySonic.html': 'src/index.html'
1526
},
1627
},
28+
},
29+
uglify: {
30+
options: {
31+
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
32+
},
33+
build: {
34+
src: 'src/PolySonic.js',
35+
dest: 'build/PolySonic.js'
36+
}
37+
},
38+
uncss: {
39+
main: {
40+
files: {
41+
'build/PolySonic.css': ['src/index.html']
42+
}
43+
}
44+
},
45+
htmlmin: {
46+
build: {
47+
options: {
48+
removeComments: true,
49+
collapseWhitespace: true
50+
},
51+
files: {
52+
'build/PolySonic.html' : 'src/PolySonic.html'
53+
}
54+
}
55+
},
56+
cssmin: {
57+
main: {
58+
files: [
59+
{expand: true, cwd: 'src/', src: ['PolySonic.html'], dest: 'src/', ext: '.css'}
60+
]
61+
}
1762
}
1863
});
1964
grunt.loadNpmTasks('grunt-vulcanize');
65+
/*grunt.loadNpmTasks('grunt-contrib-htmlmin');*/
66+
grunt.loadNpmTasks('grunt-contrib-uglify');
67+
/*grunt.loadNpmTasks('grunt-uncss');*/
68+
grunt.loadNpmTasks('grunt-contrib-copy');
69+
/*grunt.loadNpmTasks('grunt-contrib-cssmin');*/
2070

2171
// Default task(s).
22-
grunt.registerTask('default', ['vulcanize']);
72+
grunt.registerTask('default', ['vulcanize', 'uglify', 'copy']);
2373

2474
};

README.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# PolySonic
2+
HTML5 Subsonic client
3+
4+
<img src="https://lh3.googleusercontent.com/mmNqprtIDiGfJF4HN7-q3MLS50ZaeP6jXWFBF119tOG1jARxeBZh00pfuCbSIX39oGGEYptQ9A4=s640-h400-e365-rw">
5+
6+
<a href="https://chrome.google.com/webstore/detail/polysonic/dmijgonnbeadbncajpphnlidgjkgmblf" target="_blank">
7+
<img src="https://developer.chrome.com/webstore/images/ChromeWebStore_Badge_v2_206x58.png">
8+
</a>
9+
10+
currently testing 0.2.4 for bugs and it should be released soon!!!
11+
12+
features to come
13+
14+
- now playing indicator has been removed and replaced with a mini player that slides in from bottom of page
15+
16+
- app now correctly hides options users do not have role for (podcast administration, downloads)
17+
18+
- license date now counts down days till expiration
19+
20+
- app now manages it's own downloads. no more launching a chrome window when downloading (uses xmlHttpRequest and chrome file system API)
21+
22+
- more secure authentication method in place for api version 1.13.0
23+
24+
- more animations
25+
26+
Changelog
27+
28+
0.2.3
29+
30+
- redesigned search feature
31+
32+
- tooltips on buttons without labels
33+
34+
- other things (nothing exciting)
35+
36+
0.2.2
37+
38+
- UI enhancements
39+
40+
- bug fixes
41+
42+
- dynamic fab color now works for podcast. if art was downloaded before version 0.2.2 cache will have to be cleared. (in settings menu)
43+
44+
0.2.1.1
45+
46+
- hotfix for bug caused by bug fix
47+
48+
0.2.1
49+
50+
- bug fixes
51+
52+
0.2.0
53+
54+
- redesign list mode for album wall to better match material design standards
55+
56+
- performance tweaks
57+
58+
0.1.9.1
59+
60+
- fix for bug when playing album from details dialog fab would go off screen leaving player without play queue button
61+
62+
0.1.9
63+
64+
- Last FM scrobble support
65+
66+
- restyle system button bar to better match other material design apps
67+
68+
- minor performance changes
69+
70+
- artist list now has a dropdown to jump to artist starting a letter
71+
72+
0.1.8
73+
74+
- minor UI changes
75+
76+
- when loging in with a url ending with a forward slash the app will now trim the slash from end of string and connect as usual in place of throwing a error toast
77+
78+
- corrected error toast when app fails to connect to server at login
79+
80+
- fix error when clearing stored settings that caused bit rate not to default back to 320kbps
81+
82+
- option to playback saved playlists as well as save current play queue to a playlist for playback at a later time
83+
84+
0.1.7
85+
86+
- minor performance enhancement for album-art / album-wall
87+
88+
- configured with chrome.i18n api / localization support currently only US English configured
89+
90+
- fix issue with download button cause by 0.1.6
91+
92+
- changed close button on album details to a back button
93+
94+
0.1.6
95+
96+
- UI updates
97+
98+
- search disabled
99+
100+
- album wall now pulls a set number of albums at a time
101+
102+
- color thief now always enabled
103+
104+
- performance fixes
105+
106+
0.1.5
107+
108+
- update UI for album details
109+
110+
- improved Color Thief mode / now play fab on album details matches art if mode is enabled
111+
112+
- removed a transition in a attempt to fix audio stutter when animating between player and album wall
113+
114+
- remove function that stored scroller position. it is not needed with updates artist details and removal of transition
115+
116+
0.1.4
117+
118+
- performance fix when using Color Thief mode / must clear cache in settings
119+
120+
0.1.3.1
121+
122+
- typo fix
123+
124+
0.1.3
125+
- add support for changing number of songs returned in shuffle mode
126+
127+
- add color thief support. used to dynamically style app based off dominant color of currently playing album art - **WORK IN PROGRESS not recommended and disabled by default** more info here http://lokeshdhakar.com/projects/color-thief/
128+
129+
- all album art now fetched no larger then 550px greatly reducing the size of metadata stored in local storage // recommend going to settings and clearing cache and reload app after. this will ensure that all old art is cleared and new grabbed from server
130+
131+
0.1.2
132+
- Fix for musicFolderId filter not updating list when changed
133+
134+
- Fix bug making list display no results if musicFolderId was set to 0
135+
136+
- Change size of default query down to 20 from 40 in a attempt to help load art quicker / changeable in settings menu
137+
138+
- Enhancement to UI of play queue dialog
139+
140+
- Fix bug in lazy load that caused app not to get additional albums correctly
141+
142+
- Various wording & minor UI updates
143+
144+
- Enhancement to UI for search dialog
145+
146+
- Option to see amount of space taken up by metadata in settings menu
147+
148+
0.1.1
149+
150+
- support for musicFolderId filter
151+
152+
- autodetect api version

build/PolySonic.js

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

build/background.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
chrome.app.runtime.onLaunched.addListener(function() {
2-
chrome.app.window.create('vulcanized.html', {
2+
chrome.app.window.create('index.html', {
33
'id': 'PolySonic',
44
'frame': {
55
'type': 'none'
@@ -18,3 +18,22 @@ chrome.app.runtime.onLaunched.addListener(function() {
1818
}
1919
});
2020
});
21+
function sendMessage() {
22+
chrome.runtime.sendMessage({command: "play"}, function(response) {
23+
console.log(response.farewell);
24+
});
25+
}
26+
chrome.commands.onCommand.addListener(function (command) {
27+
if (command === "playPauseMediaKey") {
28+
//
29+
} else if (command === "nextTrackMediaKey") {
30+
//
31+
} else if (command === "lastTrackMediaKey") {
32+
//
33+
} else if (command === "MediaPlayPause") {
34+
//
35+
} else if (commane === "testKey") {
36+
sendMessage();
37+
}
38+
});
39+

build/images/icon_128.png

858 Bytes
Loading

build/index.html

Lines changed: 267 additions & 0 deletions
Large diffs are not rendered by default.

build/manifest.json

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,5 @@
3030
"directory"
3131
]
3232
}
33-
],
34-
35-
"commands": {
36-
37-
"playPauseMediaKey": {
38-
"suggested_key": {
39-
"default": "MediaPlayPause"
40-
},
41-
"description": "Play / Pause Music"
42-
},
43-
44-
"nextTrackMediaKey": {
45-
"suggested_key": {
46-
"default": "MediaNextTrack"
47-
},
48-
"description": "Skip to Next Track"
49-
},
50-
51-
"lastTrackMediaKey": {
52-
"suggested_key": {
53-
"default": "MediaPrevTrack"
54-
},
55-
"description": "Skip to Last Track"
56-
}
57-
}
33+
]
5834
}

build/vulcanized.html

Lines changed: 0 additions & 267 deletions
This file was deleted.

build/vulcanized.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
"grunt-contrib-nodeunit": "~0.4.1",
99
"grunt-contrib-uglify": "~0.5.0",
1010
"grunt-vulcanize": "^0.6.4"
11+
},
12+
"dependencies": {
13+
"grunt-contrib-copy": "^0.8.0",
14+
"grunt-contrib-cssmin": "^0.12.3",
15+
"grunt-uncss": "^0.4.3"
1116
}
1217
}

src/elements/subsonic/album-art.html.0.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Polymer('album-art', {
110110

111111
add2Playlist: function () {
112112
'use strict';
113+
this.app.playlist = this.app.playlist.concat(this.playlist);
113114
this.app.dataLoading = false;
114115
if (this.audio.paused) {
115116
this.app.playing = 0;
@@ -124,10 +125,6 @@ Polymer('album-art', {
124125
this.app.setFabColor(this.playlist[0]);
125126
}.bind(this));
126127
}
127-
var length = this.playlist.length;
128-
for (var i = 0; i < length; i++) {
129-
this.app.playlist.push(this.playlist[i]);
130-
}
131128
this.app.doToast(chrome.i18n.getMessage("added2Queue"));
132129
},
133130

0 commit comments

Comments
 (0)