Permalink
Browse files

Move preparing statements upstairs

  • Loading branch information...
1 parent f4f7856 commit 0651406b0d8f0e92ad623ec78e615b5d259a6863 @vslinko vslinko committed Nov 28, 2012
Showing with 20 additions and 20 deletions.
  1. +1 −1 package.json
  2. +19 −19 tio.js
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "tio",
- "version": "0.0.4",
+ "version": "0.0.5",
"description": "tines.io console player",
"keywords": ["tunes.io", "audio", "music", "player"],
"homepage": "https://github.com/rithis/tio",
View
38 tio.js
@@ -32,11 +32,29 @@ if (argv.help) {
optimist.showHelp();
process.exit();
} else if (argv.version) {
- console.log('0.0.4');
+ console.log('0.0.5');
process.exit();
}
+// preparing
+var player = spawn('play', [
+ '--no-show-progress',
+ '--volume', '.5',
+ '--type', 'mp3',
+ '-'
+]);
+var library = [];
+var libraryPath = argv.library;
+var currentTrack = null;
+var currentTrackMetadata = null;
+var fetchSince = new Date();
+var fetchUntil = new Date('2012-09-08');
+var downloadQueue = [];
+var currentDownloads = {};
+var quitScheduled = false;
+
+
// commander
var commander = function (command) {
switch (command) {
@@ -107,24 +125,6 @@ var redrawNowPlayingWindow = function () {
};
-// preparing
-var player = spawn('play', [
- '--no-show-progress',
- '--volume', '.5',
- '--type', 'mp3',
- '-'
-]);
-var library = [];
-var libraryPath = argv.library;
-var currentTrack = null;
-var currentTrackMetadata = null;
-var fetchSince = new Date();
-var fetchUntil = new Date('2012-09-08');
-var downloadQueue = [];
-var currentDownloads = {};
-var quitScheduled = false;
-
-
// actions
var syncLibrary = function () {
glob(libraryPath + '/*.mp3', function (err, matches) {

0 comments on commit 0651406

Please sign in to comment.