Skip to content

Commit

Permalink
Added AirDay, AirTime, Runtime and Status to TV Shows
Browse files Browse the repository at this point in the history
Needed to modify the package.json to ensure the Xml2Js package was only
updating to the latest v0.2.x as there is a defect in 0.4.x where
malformed XML throws an exception. See this issue:
Leonidas-from-XIV/node-xml2js#118
  • Loading branch information
Shepless committed Mar 21, 2014
1 parent cbcdc43 commit e5ec107
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"node": ">=0.6.x <0.9"
},
"dependencies": {
"xml2js": "0.x",
"xml2js": "0.2.x",
"underscore": "1.x",
"node-zip": "0.x"
},
Expand Down
3 changes: 2 additions & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ class TVDB
done undefined, formattedResult

formatTvShow: (tvShow) ->
keyMapping = IMDB_ID: 'imdbId', zap2it_id: 'zap2itId', banner: 'banner', Overview: 'overview'
keyMapping = IMDB_ID: 'imdbId', zap2it_id: 'zap2itId', banner: 'banner', Overview: 'overview', Airs_DayOfWeek: 'airDay', Airs_Time: 'airTime',
Runtime: 'runtime', Status: 'status'
formattedTvShow =
id: tvShow.id,
genre: tvShow.Genre,
Expand Down
2 changes: 1 addition & 1 deletion test/tvdb-api.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe "tvdb", ->
dataFileUri = __dirname + "/data/series.single.xml"
tvdb.getInfoTvShow "id", (err, tvShow) ->
tvShow.id.should.equal "70327"
Object.getOwnPropertyNames(tvShow).length.should.equal 9
Object.getOwnPropertyNames(tvShow).length.should.equal 11
done()

describe "getInfoEpisode()", ->
Expand Down

0 comments on commit e5ec107

Please sign in to comment.