Skip to content

Commit

Permalink
bugfix - media title was not kept to url when streamTitle not present
Browse files Browse the repository at this point in the history
  • Loading branch information
angelnu committed Dec 20, 2016
1 parent ef29777 commit 4add291
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ How to build

Changelog
---------
### 1.1.3
* (Vegetto) bugfix - media title was not kept to url when streamTitle not present

### 1.1.2
* (Vegetto) Update npm dependencies in package.json to latest versions
Expand Down
2 changes: 1 addition & 1 deletion io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"common": {
"name": "chromecast",
"title": "Chromecast Adapter",
"version": "1.1.2",
"version": "1.1.3",
"license": "MIT",
"authors": ["Vegetto <[email protected]>"],
"desc": {
Expand Down
9 changes: 6 additions & 3 deletions lib/mediaInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,14 @@ module.exports = function (_adapter) {
StreamUrl: '&artist=BILLY%20IDOL&title=WHITE%20WEDDING&album=&duration=&songtype=S&overlay=&buycd=&website=&picture' }
*/
var parsed = icy.parse(metadata);
adapter.log.debug(JSON.stringify(parsed));
adapter.log.debug("ICY parsed metadata: " + JSON.stringify(parsed));

//Get title
that._media.metadata.title = parsed.StreamTitle;
//Get title (if any)
if (parsed.StreamTitle)
that._media.metadata.title = parsed.StreamTitle;

adapter.log.debug("Updated media data: " + JSON.stringify(metadata));

//If we got media info then call callback already
if (that._timeoutHandler) {
clearTimeout(that._timeoutHandler);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.chromecast",
"version": "1.1.2",
"version": "1.1.3",
"description": "ioBroker chromecast Adapter",
"author": {
"name": "Vegetto",
Expand Down
2 changes: 1 addition & 1 deletion widgets/chromecast.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
ioBroker.chromecast Widget-Set
version: "1.1.2"
version: "1.1.3"
Copyright 10.2015-2016 Vegetto<[email protected]>
-->
Expand Down
4 changes: 2 additions & 2 deletions widgets/chromecast/js/chromecast.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
ioBroker.chromecast Widget-Set
version: "1.1.2"
version: "1.1.3"
Copyright 10.2015-2016 Vegetto<[email protected]>
Expand Down Expand Up @@ -142,7 +142,7 @@ function registerForDeviceUpdates($widget, ioBrokerState){

// this code can be placed directly in chromecast.html
vis.binds.chromecast = {
version: "1.1.2",
version: "1.1.3",
showVersion: function () {
if (vis.binds.chromecast.version) {
console.log('Version chromecast: ' + vis.binds.chromecast.version);
Expand Down

0 comments on commit 4add291

Please sign in to comment.