diff --git a/.DS_Store b/.DS_Store
index 8a014b9f..efa4e3a3 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/app/.DS_Store b/app/.DS_Store
index ac01df14..8a91b0db 100644
Binary files a/app/.DS_Store and b/app/.DS_Store differ
diff --git a/app/js/ui/spotify.js b/app/js/ui/spotify.js
index f798529f..ae447527 100644
--- a/app/js/ui/spotify.js
+++ b/app/js/ui/spotify.js
@@ -104,6 +104,10 @@ function nowplaying(mode){
content = content.replace(regExp, "");
var regExp = new RegExp("{hz}", "g");
content = content.replace(regExp, "");
+ var regExp = new RegExp("{bitRate}", "g");
+ content = content.replace(regExp, "");
+ var regExp = new RegExp("{genre}", "g");
+ content = content.replace(regExp, "");
$("#textarea").val(content);
});
}else{
@@ -122,7 +126,7 @@ function nowplaying(mode){
var regExp = new RegExp("{song}", "g");
content = content.replace(regExp, arg.name);
var regExp = new RegExp("{album}", "g");
- content = content.replace(regExp, arg.album.name);
+ content = content.replace(regExp, arg.album);
var regExp = new RegExp("{artist}", "g");
content = content.replace(regExp, arg.artist);
var regExp = new RegExp("{url}", "g");
@@ -131,6 +135,10 @@ function nowplaying(mode){
content = content.replace(regExp, arg.composer);
var regExp = new RegExp("{hz}", "g");
content = content.replace(regExp, arg.sampleRate/1000+"kHz");
+ var regExp = new RegExp("{bitRate}", "g");
+ content = content.replace(regExp, arg.bitRate+"kbps");
+ var regExp = new RegExp("{genre}", "g");
+ content = content.replace(regExp, arg.genre);
$("#textarea").val(content);
})
}
diff --git a/app/main.js b/app/main.js
index f7954c7d..672eac94 100644
--- a/app/main.js
+++ b/app/main.js
@@ -401,7 +401,7 @@ ipc.on('itunes', (e, args) => {
if(platform=="darwin"){
const nowplaying = require("itunes-nowplaying-mac")
-nowplaying().then(function (value) {
+nowplaying.getRawData().then(function (value) {
mainWindow.webContents.send('itunes-np', value);
}).catch(function (error) {
// 非同期処理失敗。呼ばれない
diff --git a/app/node_modules/itunes-nowplaying-mac/dist/itunes.js b/app/node_modules/itunes-nowplaying-mac/dist/itunes.js
index b2f799a5..4499bf88 100644
--- a/app/node_modules/itunes-nowplaying-mac/dist/itunes.js
+++ b/app/node_modules/itunes-nowplaying-mac/dist/itunes.js
@@ -1,6 +1,7 @@
"use strict";
var itunes = Application("iTunes");
var track = itunes.currentTrack;
+
function run(argv) {
var state = itunes.playerState()
if (state != "playing" && state != "paused") {
diff --git a/app/setting.html b/app/setting.html
index d8f1b1af..5e47b9ec 100644
--- a/app/setting.html
+++ b/app/setting.html
@@ -244,7 +244,7 @@
テンプレート:{song}:曲名/{album}:アルバム名/{artist}:アーティスト名/{url}:各曲のSpotifyのURL
- iTunes NowPlayingでも{url}以外のテンプレートに従ってトゥートされます。また、作曲家{composer}/サンプルレート{hz}が有効です。
+ iTunes NowPlayingでも{url}以外のテンプレートに従ってトゥートされます。また、作曲家{composer}/サンプルレート{hz}/ビットレート{bitRate}/ジャンル{genre}が有効です。