Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkgroenen committed Feb 25, 2016
1 parent ed6be3e commit c45eacf
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 95 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/assets/mopidy-mopify-1.5.15.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/assets/mopidy-mopify-1.5.16.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="version" content="1.5.15">
<meta name="version" content="1.5.16">

<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/webfonts/ss-standard.css">

<link href="assets/images/favicon.ico" rel="icon" type="image/x-icon" />


<link rel="stylesheet" type="text/css" href="assets/css/mopidy-mopify-1.5.15.css" />
<link rel="stylesheet" type="text/css" href="assets/css/mopidy-mopify-1.5.16.css" />

<link rel="manifest" href="assets/manifest.json">
<link rel="apple-touch-icon" href="assets/images/musicicon-4x.png">
Expand Down Expand Up @@ -56,7 +56,7 @@

<!-- Grunt will handle this part -->

<script type="text/javascript" src="assets/mopidy-mopify-1.5.15.js"></script>
<script type="text/javascript" src="assets/mopidy-mopify-1.5.16.js"></script>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down
2 changes: 1 addition & 1 deletion mopidy_mopify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from mopidy import config, ext

__version__ = '1.5.15'
__version__ = '1.5.16'
__ext_name__ = 'mopify'
__verbosemode__ = False

Expand Down
2 changes: 1 addition & 1 deletion mopidy_mopify/static/debug/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="version" content="1.5.15">
<meta name="version" content="1.5.16">

<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/webfonts/ss-standard.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ angular.module('mopify.account.settings', [
function SettingsController($scope, $rootScope, $timeout, $http, localStorageService, Settings, VersionManager, AutoUpdate, notifier) {
// bind settings with the $scope
Settings.bind($scope);
// Set default value
if ($scope.settings.pagetitle === undefined)
$scope.settings.pagetitle = true;
$scope.buttonactive = false;
$scope.autoupdate = false;
/**
Expand Down
6 changes: 5 additions & 1 deletion mopidy_mopify/static/debug/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ angular.module('mopify', [
'mopify.services.mopidy',
'mopify.services.versionmanager',
'mopify.services.autoupdate',
'mopify.services.settings',
'spotify',
'mopify.dashboard',
'mopify.search',
Expand Down Expand Up @@ -62,7 +63,8 @@ angular.module('mopify', [
'localStorageService',
'AutoUpdate',
'prompt',
function AppController($scope, $rootScope, $http, $location, $window, mopidyservice, notifier, VersionManager, localStorageService, AutoUpdate, prompt) {
'Settings',
function AppController($scope, $rootScope, $http, $location, $window, mopidyservice, notifier, VersionManager, localStorageService, AutoUpdate, prompt, Settings) {
var connectionStates = {
online: 'Online',
offline: 'Offline'
Expand Down Expand Up @@ -115,6 +117,8 @@ angular.module('mopify', [
* @param object track
*/
function updateTitle(track) {
if (!Settings.get('pagetitle', true))
return false;
if (track !== null && track !== undefined) {
if (track.name.indexOf('[loading]') > -1) {
mopidyservice.lookup(track.uri).then(function (result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ angular.module('mopify.widgets.directive.playlist', ['mopify.widgets.directive.s
*/
scope.play = function () {
if (scope.playlist.__model__ == 'Playlist') {
console.log(scope.playlist);
mopidyservice.playTrack(scope.playlist.tracks[0], scope.playlist.tracks);
} else {
mopidyservice.lookup(scope.playlist.uri).then(function (data) {
Expand Down
30 changes: 16 additions & 14 deletions mopidy_mopify/static/debug/src/app/directives/track.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,22 @@ angular.module('mopify.widgets.directive.track', [
templateUrl: 'directives/track.directive.tmpl.html',
link: function (scope, element, attrs) {
var uri = $routeParams.uri;
// Set scope.$id in track object
scope.track.id = scope.$id;
// Set custom http link property
if (scope.track.uri)
scope.track.http_uri = 'https://open.spotify.com/track/' + scope.track.uri.split(':')[2];
else
scope.track.http_uri = false;
scope.$evalAsync(function () {
// Set scope.$id in track object
scope.track.id = scope.$id;
// Set custom http link property
if (scope.track.uri)
scope.track.http_uri = 'https://open.spotify.com/track/' + scope.track.uri.split(':')[2];
else
scope.track.http_uri = false;
scope.selected = false;
scope.multipleselected = true;
scope.visible = true;
scope.showSaveTrack = false;
scope.trackAlreadySaved = false;
if (scope.surrounding === undefined)
scope.surrounding = scope.$parent.loadedTracks;
});
/**
* For some reason the scope.track.id get's replaced at some moment
* this $watch needs to keep track if this habbit and set the track's id
Expand All @@ -56,13 +65,6 @@ angular.module('mopify.widgets.directive.track', [
if (current === undefined && previous !== undefined)
scope.track.id = previous;
});
scope.selected = false;
scope.multipleselected = true;
scope.visible = true;
scope.showSaveTrack = false;
scope.trackAlreadySaved = false;
if (scope.surrounding === undefined)
scope.surrounding = scope.$parent.loadedTracks;
scope.artistsString = function () {
return util.artistsToString(scope.track.artists, true);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ angular.module('mopify.player.controls', [
}
});
};
$scope.stop = function () {
mopidyservice.stop();
$scope.stateIcon = 'ss-pause';
};
$scope.volumebarMouseClick = function (event, mobile) {
var layerX = event.layerX;
// Use event.currentTarget rather than event.target to make sure we
Expand Down Expand Up @@ -138,7 +142,7 @@ angular.module('mopify.player.controls', [
};
/**
* Open the volume overlay when on a mobile device
*
*
* @return {void}
*/
$scope.openVolumeOverlay = function () {
Expand All @@ -148,7 +152,7 @@ angular.module('mopify.player.controls', [
};
/**
* Close the volume overlay
*
*
* @return {void}
*/
$scope.closeVolumeOverlay = function () {
Expand Down Expand Up @@ -181,6 +185,14 @@ angular.module('mopify.player.controls', [
$scope.playpause();
}
});
hotkeys.add({
combo: 'ctrl+s',
description: 'Stop playback',
callback: function (event, hotkey) {
event.preventDefault();
$scope.stop();
}
});
hotkeys.add({
combo: 'ctrl+up',
description: 'Raise volume',
Expand Down
7 changes: 5 additions & 2 deletions mopidy_mopify/static/debug/src/app/services/mopidy.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ angular.module('mopify.services.mopidy', [
});
$rootScope.$broadcast('mopify:mopidystarted');
},
stop: function () {
shutdown: function () {
$rootScope.$broadcast('mopify:stoppingmopidy');
this.mopidy.close();
this.mopidy.off();
this.mopidy = null;
$rootScope.$broadcast('mopify:stoppedmopidy');
},
restart: function () {
this.stop();
this.shutdown();
this.start();
},
getPlaylists: function () {
Expand Down Expand Up @@ -335,6 +335,9 @@ angular.module('mopify.services.mopidy', [
pause: function () {
return wrapMopidyFunc('mopidy.playback.pause', this)();
},
stop: function () {
return wrapMopidyFunc('mopidy.playback.stop', this)();
},
previous: function () {
return wrapMopidyFunc('mopidy.playback.previous', this)();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ angular.module('mopify.services.settings', ['LocalStorageModule']).factory('Sett
};
/**
* Get a value from the storage, or return the defaltvalue if it doesn't exist.
* @param {string} key
* @param {string} defaultvalue
* @param {string} key
* @param {string} defaultvalue
*/
Settings.prototype.get = function (key, defaultvalue) {
return localStorageService.get(rootkey) !== null && localStorageService.get(rootkey)[key] !== undefined && localStorageService.get(rootkey)[key] !== '' ? localStorageService.get(rootkey)[key] : defaultvalue;
};
/**
* Save a (new) value
* @param {string} key
* @param {string} value
* @param {string} key
* @param {string} value
* @param {boolean} extend
*/
Settings.prototype.set = function (key, value, extend) {
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit c45eacf

Please sign in to comment.