Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/public/js/common/playerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ app.factory('playerService', function(
document.querySelector('.player_favorite').classList.remove('active');

// mpris only supports linux
if(process.platform === "linux") {
if(process.platform === "linux" && mprisService) {
// tell mpris that we're now playing & send off the attributes for dbus to use.
mprisService.play("0", duration, trackObj.songThumbnail, trackObj.songTitle, trackObj.songUser);
}
Expand All @@ -212,7 +212,7 @@ app.factory('playerService', function(
/**
* linux mpris passthrough for media keys & desktop integration
*/
if(process.platform === "linux") {
if(process.platform === "linux" && mprisService) {
mprisService.play("0", duration, player.elThumb.src, player.elTitle.innerHTML, player.elUser.innerHTML);
}
};
Expand All @@ -228,7 +228,7 @@ app.factory('playerService', function(
/**
* linux mpris passthrough for media keys & desktop integration
*/
if(process.platform === "linux") {
if(process.platform === "linux" && mprisService) {
mprisService.pause();
}
};
Expand Down
2 changes: 1 addition & 1 deletion app/public/js/player/playerCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ app.controller('PlayerCtrl', function (
/**
* Add native media shortcuts for linux based systems
*/
if(process.platform === "linux") {
if(process.platform === "linux" && mprisService) {
// Set a default state
mprisService.playbackStatus = mprisService.playbackStatus || "Stopped";

Expand Down
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
"time-grunt": "^1.2.2",
"webpack": "^1.12.2"
},
"optionalDependencies": {
"dbus": "MarshallOfSound/node-dbus#linux-only",
"mpris-service": "MarshallOfSound/mpris-service"
},
"dependencies": {
"react": "^0.14.2",
"react-dom": "^0.14.2",
Expand Down
6 changes: 1 addition & 5 deletions tasks/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ module.exports = {
},
target: {
command: function() {
if("linux" === process.platform) {
return 'webpack -p && export PYTHON=/usr/bin/python2 && cd ./node_modules/mpris-service/node_modules/dbus && nw-gyp rebuild --target=0.12.3';
} else {
return 'webpack -p';
}
return 'webpack -p';
}
}
};