From 5f002578c9a691b1780d6a5d7531886a2e7ff113 Mon Sep 17 00:00:00 2001 From: Oskar Risberg Date: Thu, 13 Mar 2014 09:22:16 +0100 Subject: [PATCH] Added support for swedish subtitles --- css/app.css | 3 +++ images/swedish.png | Bin 0 -> 541 bytes js/frontend/player.js | 3 ++- js/frontend/providers/opensubtitles.js | 3 ++- js/frontend/providers/torrents.js | 2 +- js/frontend/providers/yifysubtitles.js | 3 ++- js/frontend/views/sidebar.js | 3 ++- sass/_moviedetails.scss | 1 + 8 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 images/swedish.png diff --git a/css/app.css b/css/app.css index 088be5e7..29140546 100644 --- a/css/app.css +++ b/css/app.css @@ -1740,6 +1740,9 @@ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-hunga sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-bulgarian { background-image: url(../images/bulgarian.png); } +sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-swedish { + background-image: url(../images/swedish.png); +} sidebar .play .movie-detail .side-content a.play-button { background: #286dc4; background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); diff --git a/images/swedish.png b/images/swedish.png new file mode 100644 index 0000000000000000000000000000000000000000..a7a31305a632354d4a79f778a92fadbbfefa15d3 GIT binary patch literal 541 zcmV+&0^)G*oJcnm@ z&(;`b1^`5P!PCtx#5jMr*Ojm&gAyP!0M;ooux%io9Cg!5cr`9cjEql@4$7QVV4w*P zMxabyUi;R0${mfSIdQp_U_JsYK&U^;BwA zg(F;i?YFj%f%|pEwPNG6I%|w>K7X?e1K>~Kch$Xw#^dwy3Y8^klDOnI#OxE=?YOkI z$G;hbECb_dwLXn&R{1kX9>Bw^p2y}ebJ1`xe!NVW-Rs^anrgSb?N-YaVlC%Q(}{0X zYNi#eqf$x6T1#rtVAk9dI%f;9XVd!tLns5P=PIkYW8iGm%xKTv?Ie}HY$}f%1vQ_ fWpTQ(9{~mcG0YkUacMpU00000NkvXXu0mjfVQ%fa literal 0 HcmV?d00001 diff --git a/js/frontend/player.js b/js/frontend/player.js index 47cfc29b..771b6cb5 100644 --- a/js/frontend/player.js +++ b/js/frontend/player.js @@ -97,7 +97,8 @@ window.SubtitleLanguages = { 'german' : 'Deutsch', 'hungarian' : 'Magyar', 'finnish' : 'Suomi', - 'bulgarian' : 'Български'}; + 'bulgarian' : 'Български', + 'swedish' : 'Svenska' }; // Handles the opening of the video player diff --git a/js/frontend/providers/opensubtitles.js b/js/frontend/providers/opensubtitles.js index 0c892435..e0ae2714 100644 --- a/js/frontend/providers/opensubtitles.js +++ b/js/frontend/providers/opensubtitles.js @@ -26,7 +26,8 @@ var xmlrpc = require('xmlrpc'), 'rus': 'Russian', 'ukr': 'Ukrainian', 'fin': 'Finnish', - 'bul': 'Bulgarian' }, + 'bul': 'Bulgarian', + 'swe': 'Swedish' }, token; diff --git a/js/frontend/providers/torrents.js b/js/frontend/providers/torrents.js index 4bb0dabb..69812c8d 100644 --- a/js/frontend/providers/torrents.js +++ b/js/frontend/providers/torrents.js @@ -3,7 +3,7 @@ App.getTorrentsCollection = function (options) { var url = 'http://subapi.com/'; var supportedLanguages = ['english', 'french', 'dutch', 'portuguese', 'romanian', 'spanish', 'turkish', 'brazilian', - 'italian', 'german', 'hungarian', 'russian', 'ukrainian', 'finnish', 'bulgarian']; + 'italian', 'german', 'hungarian', 'russian', 'ukrainian', 'finnish', 'bulgarian', 'swedish']; if (options.genre) { url += options.genre.toLowerCase() + '.json'; } else { diff --git a/js/frontend/providers/yifysubtitles.js b/js/frontend/providers/yifysubtitles.js index 7348a99b..4c26a143 100644 --- a/js/frontend/providers/yifysubtitles.js +++ b/js/frontend/providers/yifysubtitles.js @@ -21,7 +21,8 @@ var request = require('request'), 'russian' : 'Русский', 'ukrainian' : 'Українська', 'finnish' : 'Suomi', - 'bulgarian' : 'Български' }; + 'bulgarian' : 'Български', + 'swedish' : 'Svenska' }; App.findSubtitle = function (model, cb, isFallback) { var doRequest = function () { diff --git a/js/frontend/views/sidebar.js b/js/frontend/views/sidebar.js index fc20f1b0..66a680c8 100644 --- a/js/frontend/views/sidebar.js +++ b/js/frontend/views/sidebar.js @@ -127,7 +127,8 @@ App.View.Sidebar = Backbone.View.extend({ "german": "de", "hungarian": "hu", "finnish": "fi", - "bulgarian": "bg" } + "bulgarian": "bg", + "swedish": "sv" } var noSubForUser = true; for (as in avaliableSubs) { diff --git a/sass/_moviedetails.scss b/sass/_moviedetails.scss index 4e0d6c36..2b93d1c2 100644 --- a/sass/_moviedetails.scss +++ b/sass/_moviedetails.scss @@ -423,6 +423,7 @@ sidebar { &.flag-italian { background-image: url(../images/italian.png); } &.flag-hungarian { background-image: url(../images/hungarian.png); } &.flag-bulgarian { background-image: url(../images/bulgarian.png); } + &.flag-swedish { background-image: url(../images/swedish.png); } } } }