diff --git a/package.json b/package.json index 9f8747c..5a999db 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ ], "name": "crunchyroll", "repository": "git://github.com/Deathspike/crunchyroll.js.git", - "version": "1.0.1", + "version": "1.0.2", "bin": { "crunchyroll": "./bin/crunchyroll" }, diff --git a/src/episode.js b/src/episode.js index e4b7d4c..694be5a 100644 --- a/src/episode.js +++ b/src/episode.js @@ -179,7 +179,7 @@ function _subtitle(config, player, filePath, done) { var format = subtitle.formats[config.format] ? config.format : 'ass'; subtitle.formats[format](data, function(err, decodedSubtitle) { if (err) return done(err); - fs.writeFile(filePath + '.' + format, decodedSubtitle, done); + fs.writeFile(filePath + '.' + format, '\ufeff' + decodedSubtitle, done); }); }); } diff --git a/src/subtitle/formats/ass.js b/src/subtitle/formats/ass.js index 0a1eab0..01628d8 100644 --- a/src/subtitle/formats/ass.js +++ b/src/subtitle/formats/ass.js @@ -31,9 +31,9 @@ module.exports = function(input, done) { function _event(events) { var format = 'Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text'; var items = [].concat(events.event).map(function(style) { - return _values(style.$, 'Dialogue: 0,{start},{end},{style},{name},' + + return _values(style.$, 'Dialogue: 0,{start},{end},{style},{name},' + '{margin_l},{margin_r},{margin_v},{effect},{text}'); - }); + }); return '[Events]\n' + 'Format: ' + format + '\n' + items.join('\n') + '\n';