From a1f5604e77e99c05c0ade8a9c24781312d7eaa90 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 21 Jun 2021 21:01:19 +0300 Subject: [PATCH 001/168] use git describe --- gulpfile.js | 12 ++++++------ package.json | 2 +- src/app/templates/about.tpl | 2 +- yarn.lock | 14 +++++++++----- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9238d7634d..57a61cb54a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,7 +19,7 @@ const gulp = require('gulp'), currentPlatform = require('nw-builder/lib/detectCurrentPlatform.js'), yargs = require('yargs'), nib = require('nib'), - git = require('git-rev'), + git = require('git-describe'), zip = require('gulp-zip'), fs = require('fs'), path = require('path'), @@ -446,15 +446,15 @@ gulp.task('nwjs', () => { // create .git.json (used in 'About') gulp.task('injectgit', () => { - return Promise.all([promiseCallback(git.branch), promiseCallback(git.long)]) + return git.gitDescribe() .then( (gitInfo) => new Promise((resolve, reject) => { fs.writeFile( '.git.json', JSON.stringify({ - branch: gitInfo[0], - commit: gitInfo[1] + commit: gitInfo.hash.substr(1), + semver: gitInfo.semverString, }), (error) => { return error ? reject(error) : resolve(gitInfo); @@ -463,8 +463,8 @@ gulp.task('injectgit', () => { }) ) .then((gitInfo) => { - console.log('Branch:', gitInfo[0]); - console.log('Commit:', gitInfo[1].substr(0, 8)); + console.log('Hash:', gitInfo.hash.substr(1)); + console.log('Raw:', gitInfo.raw); }) .catch((error) => { console.log(error); diff --git a/package.json b/package.json index f602c9683e..7da135f0fa 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ }, "devDependencies": { "del": "^3.x.x", - "git-rev": "^0.2.1", + "git-describe": "^4.0", "gulp": "^4.0.2", "gulp-filter": "^5.1.0", "gulp-gzip": "^1.4.2", diff --git a/src/app/templates/about.tpl b/src/app/templates/about.tpl index ec2178bb01..7138a358dc 100644 --- a/src/app/templates/about.tpl +++ b/src/app/templates/about.tpl @@ -8,7 +8,7 @@
id="changelog"><%= App.settings.version %> "<%= App.settings.releaseName %>" Beta <% if(App.git) { %> - - <%= App.git.branch %> (<%= App.git.commit.slice(0,8) %>) + - <%= App.git.semver %> (<%= App.git.commit %>) <% } %>     <%= i18n.__("Report an issue") %>
diff --git a/yarn.lock b/yarn.lock index 57ed55ad04..fbe183fcd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2656,10 +2656,14 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-rev@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/git-rev/-/git-rev-0.2.1.tgz#8ccbd2092b345bc2c9149548396df549646ca63f" - integrity sha1-jMvSCSs0W8LJFJVIOW31SWRspj8= +git-describe@^4.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/git-describe/-/git-describe-4.0.4.tgz#f3d55bce309becf6dc27fed535d380a621967e8c" + integrity sha512-L1X9OO1e4MusB4PzG9LXeXCQifRvyuoHTpuuZ521Qyxn/B0kWHWEOtsT4LsSfSNacZz0h4ZdYDsDG7f+SrA3hg== + dependencies: + lodash "^4.17.11" + optionalDependencies: + semver "^5.6.0" glob-base@^0.3.0: version "0.3.0" @@ -4306,7 +4310,7 @@ lodash@3.x.x, lodash@^3.5.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= -lodash@^4.12.0, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.19, lodash@~4.17.4: +lodash@^4.12.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.19, lodash@~4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== From a530f89f7aa918499db8dc59066948b7826e63fd Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 21 Jun 2021 21:29:27 +0300 Subject: [PATCH 002/168] name files by release --- gulpfile.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 57a61cb54a..243f0ecf26 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -95,6 +95,15 @@ const parseReqDeps = () => { }); }; +const curVersion = () => { + if (fs.existsSync('./.git.json')) { + const gitData = require('./.git.json'); + return gitData.semver; + } else { + return pkJson.version; + } +}; + // console.log for thenable promises const log = () => { console.log.apply(console, arguments); @@ -245,7 +254,7 @@ gulp.task('compresszip', () => { return gulp .src(sources + '/**') .pipe( - zip(pkJson.name + '-' + pkJson.version + '_' + platform + '.zip') + zip(pkJson.name + '-' + curVersion() + '_' + platform + '.zip') ) .pipe(gulp.dest(releasesDir)) .on('end', () => { @@ -275,7 +284,7 @@ gulp.task('compressUpdater', () => { console.log('Packaging updater for: %s', platform); return gulp .src(path.join('build', updateFile)) - .pipe(zip('update-' + pkJson.version + '_' + platform + '.zip')) + .pipe(zip('update-' + curVersion() + '_' + platform + '.zip')) .pipe(gulp.dest(releasesDir)) .on('end', () => { console.log( @@ -572,7 +581,7 @@ gulp.task('deb', () => { nwVersion, platform, pkJson.name, - pkJson.version, + curVersion(), releasesDir ]); @@ -681,12 +690,12 @@ gulp.task('prepareUpdater:win', () => { path.join( process.cwd(), releasesDir, - pkJson.name + '-' + pkJson.version + '-' + platform + '-Setup.exe' + pkJson.name + '-' + curVersion() + '-' + platform + '-Setup.exe' ) ) .pipe(gulpRename('update.exe')) .pipe(gulp.dest(path.join(process.cwd(), releasesDir))) - .pipe(zip('update-' + pkJson.version + '_' + platform + '.zip')) + .pipe(zip('update-' + curVersion() + '_' + platform + '.zip')) .pipe(gulp.dest(releasesDir)) .on('end', () => { console.log( From ed3b1910bb7716dc827a473a0d815080c56571e3 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 21 Jun 2021 21:48:40 +0300 Subject: [PATCH 003/168] checkout --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea7dc9183a..380ac8175e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,9 +17,9 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: - fetch-depth: 1 + fetch-depth: 0 - name: Prepare NSIS if: matrix.os == 'windows-latest' From af69fea9a0ac4a5d216c92c3dec031739fe66e22 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 21 Jun 2021 22:23:39 +0300 Subject: [PATCH 004/168] win fix --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 243f0ecf26..a88cf645aa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -690,7 +690,7 @@ gulp.task('prepareUpdater:win', () => { path.join( process.cwd(), releasesDir, - pkJson.name + '-' + curVersion() + '-' + platform + '-Setup.exe' + pkJson.name + '-' + pkJson.version + '-' + platform + '-Setup.exe' ) ) .pipe(gulpRename('update.exe')) From 27f4c0679d5a68891ba91371e427731c1e1ee2bd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 27 Jun 2021 12:14:06 +0300 Subject: [PATCH 005/168] Streamer fix (#2224) --- src/app/lib/streamer.js | 68 ++++++++------------------------ src/app/lib/views/main_window.js | 2 +- 2 files changed, 17 insertions(+), 53 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 0b03979827..bc9f7f8fd6 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -154,67 +154,32 @@ }.bind(this)); }, - // kill the streamer stop: function() { if (this.torrent) { + const removedPeers = []; + // update ratio AdvSettings.set('totalDownloaded', Settings.totalDownloaded + this.torrent.downloaded); AdvSettings.set('totalUploaded', Settings.totalUploaded + this.torrent.uploaded); - if (Settings.activateSeedbox) { - this.torrent.pause(); - // complete pause torrent, stop download data - const removedPeers = []; - for (const id in this.torrent._peers) { - // collect peers, need to do this before calling removePeer! - removedPeers.push(this.torrent._peers[id].addr); + this.torrent.pause(); - this.torrent.removePeer(id); - } - if(removedPeers.length > 0) { - // store removed peers, so we can re-add them when resuming - this.torrent.pctRemovedPeers = removedPeers; - } - - if (this.torrent._xsRequests) { - this.torrent._xsRequests.forEach(req => { - req.abort(); - }); - } - } else { - this.torrent.destroy(); + for (const id in this.torrent._peers) { + // collect peers, need to do this before calling removePeer! + removedPeers.push(this.torrent._peers[id].addr); + this.torrent.removePeer(id); } - } - - if (this.video) { - this.video.pause(); - this.video.src = ''; - this.video.load(); - this.video = null; - } - - this.torrent = null; - this.torrentModel = null; - this.stateModel = null; - this.streamInfo = null; - this.subtitleReady = false; - this.canPlay = false; - this.stopped = true; - clearInterval(this.updateStatsInterval); - this.updateStatsInterval = null; - - App.vent.off('subtitle:downloaded'); - App.SubtitlesServer.stop(); - win.info('Streaming cancelled'); - }, - stopFS: function() { - if (this.torrent) { - // update ratio - AdvSettings.set('totalDownloaded', Settings.totalDownloaded + this.torrent.downloaded); - AdvSettings.set('totalUploaded', Settings.totalUploaded + this.torrent.uploaded); + if(removedPeers.length > 0) { + // store removed peers, so we can re-add them when resuming + this.torrent.pctRemovedPeers = removedPeers; + } - this.torrent.destroy(); + if (this.torrent._xsRequests) { + this.torrent._xsRequests.forEach(req => { + req.abort(); + }); + } } if (this.video) { @@ -779,7 +744,6 @@ App.vent.on('stream:loadExistTorrents', streamer.initExistTorrents.bind(streamer)); App.vent.on('stream:start', streamer.start.bind(streamer)); App.vent.on('stream:stop', streamer.stop.bind(streamer)); - App.vent.on('stream:stopFS', streamer.stopFS.bind(streamer)); App.vent.on('stream:download', streamer.download.bind(streamer)); App.vent.on('stream:serve_subtitles', streamer.serveSubtitles.bind(streamer)); })(window.App); diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 1af76aa6cf..7b2943c276 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -539,7 +539,7 @@ showFileSelector: function(fileModel) { App.vent.trigger('about:close'); - App.vent.trigger('stream:stopFS'); + App.vent.trigger('stream:stop'); App.vent.trigger('player:close'); this.showChildView( 'FileSelector', From 0c99cf25e4c42d7ccb9ece188f407607963cad8f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 27 Jun 2021 13:56:18 +0300 Subject: [PATCH 006/168] Update streamer.js --- src/app/lib/streamer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index bc9f7f8fd6..9cbcc9c5ab 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -238,9 +238,10 @@ if (!torrent) { torrent = App.WebTorrent.add(uri, { - path: path, + path : path, maxConns : 10, dht : true, + secure : Settings.protocolEncryption || false, announce : Settings.trackers.forced, tracker : Settings.trackers.forced }); From e959568ba290549a40935c0668769c1344446743 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 27 Jun 2021 16:47:55 +0300 Subject: [PATCH 007/168] Streamer fix (#2225) --- src/app/app.js | 7 ++-- src/app/lib/streamer.js | 64 +++++++++++++++++++++++++++++++- src/app/lib/views/main_window.js | 2 +- 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index 5078512037..c3ccb73c3d 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -95,10 +95,11 @@ App.advsettings = AdvSettings; App.settings = Settings; App.WebTorrent = new WebTorrent({ maxConns: parseInt(Settings.connectionLimit, 10) || 55, - tracker: { - announce: Settings.trackers.forced - }, dht: true, + secure: Settings.protocolEncryption || false, + tracker: { + announce: Settings.trackers.forced + } }); App.plugins = {}; diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 9cbcc9c5ab..418a6b0c0f 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -156,12 +156,73 @@ stop: function() { if (this.torrent) { - const removedPeers = []; + // update ratio + AdvSettings.set('totalDownloaded', Settings.totalDownloaded + this.torrent.downloaded); + AdvSettings.set('totalUploaded', Settings.totalUploaded + this.torrent.uploaded); + + if (Settings.activateSeedbox) { + const removedPeers = []; + this.torrent.pause(); + + for (const id in this.torrent._peers) { + // collect peers, need to do this before calling removePeer! + removedPeers.push(this.torrent._peers[id].addr); + this.torrent.removePeer(id); + } + + if(removedPeers.length > 0) { + // store removed peers, so we can re-add them when resuming + this.torrent.pctRemovedPeers = removedPeers; + } + + if (this.torrent._xsRequests) { + this.torrent._xsRequests.forEach(req => { + req.abort(); + }); + } + } else { + this.torrent.destroy(); + App.WebTorrent.destroy(); + App.WebTorrent = new WebTorrent({ + maxConns : parseInt(Settings.connectionLimit, 10) || 55, + dht : true, + secure : Settings.protocolEncryption || false, + tracker : { + announce: Settings.trackers.forced + } + }); + } + } + + if (this.video) { + this.video.pause(); + this.video.src = ''; + this.video.load(); + this.video = null; + } + + this.torrent = null; + this.torrentModel = null; + this.stateModel = null; + this.streamInfo = null; + this.subtitleReady = false; + this.canPlay = false; + this.stopped = true; + clearInterval(this.updateStatsInterval); + this.updateStatsInterval = null; + + App.vent.off('subtitle:downloaded'); + App.SubtitlesServer.stop(); + win.info('Streaming cancelled'); + }, + stopFS: function() { + if (this.torrent) { // update ratio AdvSettings.set('totalDownloaded', Settings.totalDownloaded + this.torrent.downloaded); AdvSettings.set('totalUploaded', Settings.totalUploaded + this.torrent.uploaded); + const removedPeers = []; this.torrent.pause(); for (const id in this.torrent._peers) { @@ -745,6 +806,7 @@ App.vent.on('stream:loadExistTorrents', streamer.initExistTorrents.bind(streamer)); App.vent.on('stream:start', streamer.start.bind(streamer)); App.vent.on('stream:stop', streamer.stop.bind(streamer)); + App.vent.on('stream:stopFS', streamer.stopFS.bind(streamer)); App.vent.on('stream:download', streamer.download.bind(streamer)); App.vent.on('stream:serve_subtitles', streamer.serveSubtitles.bind(streamer)); })(window.App); diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 7b2943c276..1af76aa6cf 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -539,7 +539,7 @@ showFileSelector: function(fileModel) { App.vent.trigger('about:close'); - App.vent.trigger('stream:stop'); + App.vent.trigger('stream:stopFS'); App.vent.trigger('player:close'); this.showChildView( 'FileSelector', From d504c315df9243befb94e51dea18c7808c2d19f8 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 15 Mar 2020 00:42:24 +0300 Subject: [PATCH 008/168] add locale param to providers --- src/app/butter-provider/movie.js | 12 ++++++++---- src/app/butter-provider/tv.js | 9 ++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index cc5b2e3594..cef52d956d 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -7,7 +7,7 @@ class MovieApi extends Generic { constructor(args) { super(args); - this.language = args.language; + this.language = args.language || 'en'; } _formatForPopcorn(movies) { @@ -32,10 +32,11 @@ class MovieApi extends Generic { trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, torrents: - movie.torrents['en'] !== null - ? movie.torrents['en'] + movie.torrents[this.language] !== null + ? movie.torrents[this.language] : movie.torrents[Object.keys(movie.torrents)[0]], - langs: movie.torrents + langs: movie.torrents, + locale: movie.locale || null, }); } }); @@ -56,6 +57,9 @@ class MovieApi extends Generic { limit: '50' }; + if (this.language) { + params.locale = this.language; + } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index f5423f7d9f..a1671798cd 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -31,6 +31,9 @@ class TVApi extends Generic { limit: '50' }; + if (this.language) { + params.locale = this.language; + } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } @@ -56,7 +59,11 @@ class TVApi extends Generic { } detail(torrent_id, old_data, debug) { - const uri = `show/${torrent_id}`; + const params = {}; + if (this.language) { + params.locale = this.language; + } + const uri = `show/${torrent_id}?` + new URLSearchParams(params); return this._get(0, uri).then(data => { console.log(data._id); From 0da623b98a28067d547f6eb3588e3ec29ef96a00 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 15 Mar 2020 00:47:53 +0300 Subject: [PATCH 009/168] send language to provider --- src/app/database.js | 3 +++ src/app/lib/providers/generic.js | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/src/app/database.js b/src/app/database.js index 427ef0dbed..1d6efdd7f5 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -408,6 +408,9 @@ var Database = { if (Settings.version === false) { window.__isNewInstall = true; } + if (Settings.language) { + App.Providers.updateLanguage(Settings.language); + } if (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer || Settings.proxyServer) { App.Providers.updateConnection(Settings.customMoviesServer, Settings.customSeriesServer, Settings.customAnimeServer, Settings.proxyServer); diff --git a/src/app/lib/providers/generic.js b/src/app/lib/providers/generic.js index ba2a2c19eb..4392169a45 100644 --- a/src/app/lib/providers/generic.js +++ b/src/app/lib/providers/generic.js @@ -27,6 +27,14 @@ } } + function updateProviderLanguage (language) { + for (let provider in cache) { + if (cache[provider] && cache[provider].hasOwnProperty('language')) { + cache[provider].language = language; + } + } + } + function delProvider(name) { if (cache[name]) { win.info('Delete provider cache', name); @@ -109,6 +117,7 @@ App.Providers.delete = delProvider; App.Providers.install = installProvider; App.Providers.updateConnection = updateProviderConnection; + App.Providers.updateLanguage = updateProviderLanguage; App.Providers.getFromRegistry = getProviderFromRegistry; })(window.App); From e289cf20cb6d93d37613761ac8c20779a1397c14 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 19 Jan 2020 15:31:04 +0300 Subject: [PATCH 010/168] localize settings --- src/app/lib/views/settings_container.js | 3 +++ src/app/settings.js | 6 +++++ src/app/templates/settings-container.tpl | 33 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index f5208a6759..eb0511217d 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -268,6 +268,7 @@ AdvSettings.set('lastTab', App.currentview); } /* falls through */ + case 'translateTitle': case 'watchedCovers': case 'defaultFilters': case 'theme': @@ -297,7 +298,9 @@ case 'torColSearchMore': case 'showSeedboxOnDlInit': case 'nativeWindowFrame': + case 'translatePosters': case 'translateSynopsis': + case 'translateEpisodes': case 'showAdvancedSettings': case 'alwaysOnTop': case 'traktSyncOnStart': diff --git a/src/app/settings.js b/src/app/settings.js index 41a53169d9..3d13c9ec98 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -115,6 +115,12 @@ Settings.postersWidth = Settings.postersMinWidth; Settings.postersJump = [134, 154, 174, 194, 214, 234, 254, 274, 294]; Settings.bigPicture = 100; +//Localisation +Settings.translateTitle = 'translated-origin'; +Settings.translatePosters = true; +Settings.translateSynopsis = true; +Settings.translateEpisodes = true; + //Playback Settings.alwaysFullscreen = false; Settings.playNextEpisodeAuto = false; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 504bcf9814..1654f98cc1 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -205,6 +205,39 @@ +
+
<%= i18n.__("Localisation") %>
+
+ + + + + + > + + + + + > + + + + + > + + +
+
+
<%= i18n.__("Subtitles") %>
From 691a4d3ea75c4b692750a4d5f2f91a577dd639ec Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 19 Jan 2020 19:21:34 +0300 Subject: [PATCH 011/168] apply locales --- src/app/lib/views/browser/item.js | 31 +++++++++++++ src/app/lib/views/movie_detail.js | 31 +++++++++++++ src/app/lib/views/show_detail.js | 65 ++++++++++++++++++++++++++-- src/app/styl/views/browser/item.styl | 10 +++++ src/app/templates/browser/item.tpl | 5 ++- src/app/templates/movie-detail.tpl | 8 ++-- src/app/templates/show-detail.tpl | 8 ++-- 7 files changed, 146 insertions(+), 12 deletions(-) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 33dec578f2..13e450db62 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -33,6 +33,7 @@ initialize: function () { this.setModelStates(); this.isAprilFools(); + this.localizeTexts(); }, onAttach: function () { @@ -48,6 +49,29 @@ }); }, + localizeTexts: function () { + var title = this.model.get('title'); + var locale = this.model.get('locale'); + + let title1 = title; + let title2; + if (locale && locale.title) { + if (Settings.translateTitle === 'translated-origin') { + title1 = locale.title; + title2 = title; + } + if (Settings.translateTitle === 'origin-translated') { + title2 = locale.title; + } + if (Settings.translateTitle === 'translated') { + title1 = locale.title; + } + } + + this.model.set('title1', title1); + this.model.set('title2', title2); + }, + hoverItem: function (e) { if (e.pageX !== prevX || e.pageY !== prevY) { $('.item.selected').removeClass('selected'); @@ -166,6 +190,13 @@ this.model.set('getmetarunned', true); } + if (Settings.translatePosters) { + var locale = this.model.get('locale'); + if (locale && locale.poster) { + poster = locale.poster; + } + } + var setImage = function (img) { if (this.ui.cover.css) { this.ui.cover.css('background-image', 'url(' + img + ')').addClass('fadein'); diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 13b0f83aed..a79b7049a5 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -71,6 +71,10 @@ App.vent.on('shortcuts:movies', _this.initKeyboardShortcuts); App.vent.on('change:quality', healthButton.render, this); + // init fields in model + this.model.set('displayTitle', ''); + this.model.set('displaySynopsis', ''); + this.localizeTexts(); }, toggleShowQuality: function(e) { @@ -133,6 +137,7 @@ App.MovieDetailView = this; + this.localizeTexts(); this.hideUnused(); this.loadImages(); this.loadComponents(); @@ -145,6 +150,23 @@ this.showCast(); } }, + localizeTexts: function() { + const locale = this.model.get('locale'); + let title = this.model.get('title'); + if (Settings.translateTitle === 'translated-origin' || Settings.translateTitle === 'translated') { + if (locale && locale.title) { + title = locale.title; + } + } + let synopsis = this.model.get('synopsis'); + if (Settings.translateSynopsis) { + if (locale && locale.synopsis) { + synopsis = locale.synopsis; + } + } + this.model.set('displayTitle', title); + this.model.set('displaySynopsis', synopsis); + }, loadComponents: function() { // play control var playctrl = this.getRegion('PlayControl'); @@ -201,6 +223,15 @@ this.model.get('backdrop') || this.model.get('poster') || nobg; + + if (Settings.translatePosters) { + var locale = this.model.get('locale'); + if (locale) { + p = locale.poster ? locale.poster : p; + b = locale.backdrop ? locale.backdrop : b; + } + } + loadImage(p, 'poster'); loadImage(b, 'backdrop'); }, diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index a17a57edec..c57bf3bd34 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -66,6 +66,11 @@ healthButton = new Common.HealthButton('.health-icon', this.retrieveTorrentHealth.bind(this)); //Handle keyboard shortcuts when other views are appended or removed + // init fields in model + this.model.set('displayTitle', ''); + this.model.set('displaySynopsis', ''); + this.model.set('localizeEpisode', this.localizeEpisode); + this.localizeTexts(); //If a child was removed from above this view App.vent.on('viewstack:pop', function () { @@ -166,6 +171,15 @@ if (!backdrop) { backdrop = images.banner || nobg; } + + if (Settings.translatePosters) { + var locale = this.model.get('locale'); + if (locale) { + poster = locale.poster ? locale.poster : poster; + backdrop = locale.backdrop ? locale.backdrop : backdrop; + } + } + var posterCache = new Image(); posterCache.src = poster; posterCache.onload = function () { @@ -229,7 +243,51 @@ $('#watch-now').prop('disabled', true); } }, - + localizeTexts: function () { + const locale = this.model.get('locale'); + let title = this.model.get('title'); + if (Settings.translateTitle === 'translated-origin' || Settings.translateTitle === 'translated') { + if (locale && locale.title) { + title = locale.title; + } + } + let synopsis = this.model.get('synopsis'); + if (Settings.translateSynopsis) { + if (locale && locale.synopsis) { + synopsis = locale.synopsis; + } + } + this.model.set('displayTitle', title); + this.model.set('displaySynopsis', synopsis); + }, + localizeEpisode: function (episode) { + let title = episode.title; + let listTitle = episode.title; + let overview = episode.overview; + if (Settings.translateEpisodes && episode.locale) { + if (Settings.translateSynopsis && episode.locale.overview) { + overview = episode.locale.overview; + } + if (episode.locale.title) { + if (Settings.translateTitle === 'translated-origin') { + title = episode.locale.title; + listTitle = episode.locale.title + ' (' + episode.title + ')'; + } + if (Settings.translateTitle === 'origin-translated') { + listTitle = episode.title + ' (' + episode.locale.title + ')'; + } + if (Settings.translateTitle === 'translated') { + title = episode.locale.title; + listTitle = episode.locale.title; + } + } + } + return { + title, + listTitle, + overview, + }; + }, selectNextEpisode: function () { var episodesSeen = []; @@ -602,13 +660,14 @@ var first_aired = selectedEpisode.first_aired ? moment.unix(selectedEpisode.first_aired).locale(Settings.language).format('LLLL') : ''; var synopsis = $('.sdoi-synopsis'); var startStreaming = $('.startStreaming'); + var localize = this.localizeEpisode(selectedEpisode); $('.tab-episode.active').removeClass('active'); $elem.addClass('active'); $('.sdoi-number').text(i18n.__('Season %s', selectedEpisode.season) + ', ' + i18n.__('Episode %s', selectedEpisode.episode)); - $('.sdoi-title').text(selectedEpisode.title); + $('.sdoi-title').text(localize.title); $('.sdoi-date').text(i18n.__('Aired Date') + ': ' + first_aired); - synopsis.text(selectedEpisode.overview); + synopsis.text(localize.overview); //pull the scroll always to top synopsis.scrollTop(0); diff --git a/src/app/styl/views/browser/item.styl b/src/app/styl/views/browser/item.styl index 177818be7f..705cdd9396 100644 --- a/src/app/styl/views/browser/item.styl +++ b/src/app/styl/views/browser/item.styl @@ -146,6 +146,16 @@ white-space: nowrap padding-bottom: 2px + .title2 + font-size: 0.85em + color: $Text1 + height: auto; + margin: -2px 0 3px; + overflow: hidden + text-overflow: ellipsis + white-space: nowrap + padding-bottom: 2px + .year font-size: 0.85em color: $Text4 diff --git a/src/app/templates/browser/item.tpl b/src/app/templates/browser/item.tpl index 662ec6a99c..6535abcdb0 100644 --- a/src/app/templates/browser/item.tpl +++ b/src/app/templates/browser/item.tpl @@ -30,7 +30,10 @@
-

20){ %> title="<%= title %>" data-toggle="tooltip" data-placement="auto bottom" <% } %> ><%= title %>

+

20){ %> title="<%= title1 %>" data-toggle="tooltip" data-placement="auto bottom" <% } %> ><%= title1 %>

+<% if (typeof title2 !== 'undefined' && title2 !== '') {%> +

20){ %> title="<%= title2 %>" data-toggle="tooltip" data-placement="auto bottom" <% } %> ><%= title2 %>

+<%} %>

<% if (typeof year !== 'undefined') {%> <%= year %> diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 0ffc4f1ef0..635c18884b 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -1,10 +1,10 @@ <% if(typeof health === "undefined"){ health = false; }; -if(typeof synopsis === "undefined"){ synopsis = "Synopsis not available."; }; +if(typeof synopsis === "undefined"){ synopsis = "Synopsis not available."; }; if(typeof runtime === "undefined"){ runtime = "N/A"; }; if (genre) { for(var i = 0; i < genre.length; i++) { - genre[i] = i18n.__(genre[i].capitalizeEach()).toLowerCase(); + genre[i] = i18n.__(genre[i].capitalizeEach()).toLowerCase(); } } else { var genre = [undefined]; @@ -23,7 +23,7 @@ if (genre) {

-
<%= title %>
+
<%= displayTitle %>
<%= year %>
@@ -57,7 +57,7 @@ if (genre) {
-
<%= synopsis %>
+
<%= displaySynopsis %>
diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 0c3d9fdbf4..919cb7cbad 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -9,7 +9,7 @@
-
<%= synopsis %>
+
<%= displaySynopsis %>
<%=i18n.__("Add to bookmarks") %>
@@ -72,9 +72,9 @@ <%=episodeData.episode %> <% if (Settings.activateSeedbox) { %> -
<%=episodeData.title %>
+
<%=localizeEpisode(episodeData).listTitle %>
<% } else { %> -
<%=episodeData.title %>
+
<%=localizeEpisode(episodeData).listTitle %>
<% } %>
From 79a8c3b95dbc97c15b5991f630ba3a52d5ecde87 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 4 Apr 2020 22:14:36 +0300 Subject: [PATCH 012/168] move init provider language --- src/app/database.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/database.js b/src/app/database.js index 1d6efdd7f5..024cb1faeb 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -408,9 +408,6 @@ var Database = { if (Settings.version === false) { window.__isNewInstall = true; } - if (Settings.language) { - App.Providers.updateLanguage(Settings.language); - } if (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer || Settings.proxyServer) { App.Providers.updateConnection(Settings.customMoviesServer, Settings.customSeriesServer, Settings.customAnimeServer, Settings.proxyServer); @@ -430,6 +427,9 @@ var Database = { // set hardware settings and usefull stuff return AdvSettings.setup(); }) + .then(function () { + App.Providers.updateLanguage(Settings.language); + }) .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); From ac93b1e2105f98cf781ac3971f26c41fcba9b201 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 5 Apr 2020 01:00:12 +0300 Subject: [PATCH 013/168] fix init language --- src/app/language.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/language.js b/src/app/language.js index 2948582eba..662c2484c4 100644 --- a/src/app/language.js +++ b/src/app/language.js @@ -6,6 +6,7 @@ var setLanguage = function (preferredLanguage) { var lang = App.Localization.detectLocale(); i18n.setLocale(lang); AdvSettings.set('language', lang); + Settings.language = lang; } else { i18n.setLocale(preferredLanguage); } From 3c99d6e57da8bc2151c4cb08e48ef98850732e5a Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 8 Mar 2021 00:58:59 +0300 Subject: [PATCH 014/168] support contentLocale (contentLanguage) --- src/app/butter-provider/movie.js | 8 ++++++-- src/app/butter-provider/tv.js | 7 +++++++ src/app/database.js | 2 +- src/app/lib/providers/generic.js | 5 ++++- src/app/lib/views/settings_container.js | 6 ++++++ src/app/settings.js | 1 + src/app/templates/settings-container.tpl | 16 ++++++++++++++++ 7 files changed, 41 insertions(+), 4 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index cef52d956d..48fbb30653 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -8,6 +8,7 @@ class MovieApi extends Generic { super(args); this.language = args.language || 'en'; + this.contentLanguage = args.contentLanguage || this.language; } _formatForPopcorn(movies) { @@ -32,8 +33,8 @@ class MovieApi extends Generic { trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, torrents: - movie.torrents[this.language] !== null - ? movie.torrents[this.language] + movie.torrents[this.contentLanguage] !== null + ? movie.torrents[this.contentLanguage] : movie.torrents[Object.keys(movie.torrents)[0]], langs: movie.torrents, locale: movie.locale || null, @@ -60,6 +61,9 @@ class MovieApi extends Generic { if (this.language) { params.locale = this.language; } + if (this.language !== this.contentLanguage) { + params.contentLocale = this.contentLanguage; + } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index a1671798cd..6d925fb1c2 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -9,6 +9,7 @@ class TVApi extends Generic { super(args); this.language = args.language; + this.contentLanguage = args.contentLanguage || this.language; try { this.tvdb = new TVDB('7B95D15E1BE1D75A'); @@ -34,6 +35,9 @@ class TVApi extends Generic { if (this.language) { params.locale = this.language; } + if (this.language !== this.contentLanguage) { + params.contentLocale = this.contentLanguage; + } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } @@ -63,6 +67,9 @@ class TVApi extends Generic { if (this.language) { params.locale = this.language; } + if (this.language !== this.contentLanguage) { + params.contentLocale = this.contentLanguage; + } const uri = `show/${torrent_id}?` + new URLSearchParams(params); return this._get(0, uri).then(data => { diff --git a/src/app/database.js b/src/app/database.js index 024cb1faeb..7e31b1642b 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -428,7 +428,7 @@ var Database = { return AdvSettings.setup(); }) .then(function () { - App.Providers.updateLanguage(Settings.language); + App.Providers.updateLanguage(Settings.language, Settings.contentLanguage || Settings.language); }) .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); diff --git a/src/app/lib/providers/generic.js b/src/app/lib/providers/generic.js index 4392169a45..f89ceb1855 100644 --- a/src/app/lib/providers/generic.js +++ b/src/app/lib/providers/generic.js @@ -27,11 +27,14 @@ } } - function updateProviderLanguage (language) { + function updateProviderLanguage (language, contentLanguage) { for (let provider in cache) { if (cache[provider] && cache[provider].hasOwnProperty('language')) { cache[provider].language = language; } + if (cache[provider] && cache[provider].hasOwnProperty('contentLanguage')) { + cache[provider].contentLanguage = contentLanguage; + } } } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index eb0511217d..879c017888 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -284,6 +284,9 @@ App.vent.trigger('updatePostersSizeStylesheet'); }); break; + case 'contentLanguage': + value = $('option:selected', field).val(); + break; case 'language': value = $('option:selected', field).val(); i18n.setLocale(value); @@ -434,6 +437,9 @@ case 'protocolEncryption': this.alertMessageSuccess(true); break; + case 'contentLanguage': + App.Providers.updateLanguage(Settings.language, value || Settings.language); + break; case 'vpnEnabled': case 'language': case 'watchedCovers': diff --git a/src/app/settings.js b/src/app/settings.js index 3d13c9ec98..6868125958 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -97,6 +97,7 @@ Settings.customMoviesServer = ''; Settings.customSeriesServer = ''; Settings.customAnimeServer = ''; Settings.proxyServer = ''; +Settings.contentLanguage = ''; // User interface Settings.language = ''; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 1654f98cc1..74111f4ca4 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -610,6 +610,22 @@
+ + +
From 9a18e8deb7b492604ee0e730d3816fa7915a46bf Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 17 Mar 2021 10:54:21 +0300 Subject: [PATCH 015/168] add restart notify --- src/app/lib/views/settings_container.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 879c017888..fb8a033064 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -439,6 +439,7 @@ break; case 'contentLanguage': App.Providers.updateLanguage(Settings.language, value || Settings.language); + this.alertMessageSuccess(true); break; case 'vpnEnabled': case 'language': From 7c7525fec86d2b77773cd30253b2691c81df57d2 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 17 Mar 2021 16:49:33 +0300 Subject: [PATCH 016/168] move to localization block --- src/app/templates/settings-container.tpl | 33 ++++++++++++------------ 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 74111f4ca4..16e1562baa 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -235,6 +235,23 @@ > + + + +
@@ -610,22 +627,6 @@ - - - From f75102c76d79654f8efacfa82f3e80c9e3c2a36f Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 27 Mar 2021 19:16:36 +0300 Subject: [PATCH 017/168] remove translateSynopsis duplicate --- src/app/templates/settings-container.tpl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 16e1562baa..96f9991419 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -93,10 +93,6 @@ > - - > - - > From cb27af79f6f7d5920c846f3f2c5489ecb7b6b315 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 29 Mar 2021 16:17:07 +0300 Subject: [PATCH 018/168] fix on default server --- src/app/butter-provider/movie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 48fbb30653..ffbe5d4986 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -33,7 +33,7 @@ class MovieApi extends Generic { trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, torrents: - movie.torrents[this.contentLanguage] !== null + movie.torrents[this.contentLanguage] ? movie.torrents[this.contentLanguage] : movie.torrents[Object.keys(movie.torrents)[0]], langs: movie.torrents, From 76781f53291d0d2f4711043a613eba828a27c45c Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 14 Jun 2021 23:52:35 +0300 Subject: [PATCH 019/168] no default --- src/app/butter-provider/movie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index ffbe5d4986..3f2ae171c8 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -7,7 +7,7 @@ class MovieApi extends Generic { constructor(args) { super(args); - this.language = args.language || 'en'; + this.language = args.language; this.contentLanguage = args.contentLanguage || this.language; } From 16c05fbbb77975c659bb102d752ea618986bf5d8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 27 Jun 2021 18:09:49 +0300 Subject: [PATCH 020/168] Update streamer.js --- src/app/lib/streamer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 418a6b0c0f..b561ec2fe7 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -181,7 +181,6 @@ }); } } else { - this.torrent.destroy(); App.WebTorrent.destroy(); App.WebTorrent = new WebTorrent({ maxConns : parseInt(Settings.connectionLimit, 10) || 55, From 3da2b995012768ed33294d316b120bc20407ea56 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 4 Jul 2021 01:20:55 +0300 Subject: [PATCH 021/168] Update torrent trackers --- src/app/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/settings.js b/src/app/settings.js index 41a53169d9..7297cab28d 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -75,7 +75,6 @@ Settings.trackers = { 'udp://tracker.tiny-vps.com:6969', 'udp://tracker.openbittorrent.com:1337', 'udp://tracker.leechers-paradise.org:6969', - 'udp://p4p.arenabg.ch:1337', 'udp://p4p.arenabg.com:1337', 'udp://tracker.internetwarriors.net:1337', 'udp://9.rarbg.to:2710', @@ -87,6 +86,7 @@ Settings.trackers = { 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', 'udp://tracker.uw0.xyz:6969', + 'udp://retracker.lanta-net.ru:2710', 'wss://tracker.openwebtorrent.com', 'wss://tracker.btorrent.xyz' ] From e62c80739357b966d8ed3ff5955893fa0d384dfc Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 4 Jul 2021 01:38:39 +0300 Subject: [PATCH 022/168] Update settings.js --- src/app/settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/settings.js b/src/app/settings.js index 7297cab28d..998f4f6669 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -62,6 +62,12 @@ Settings.providers = { uri: [ ] }, + anime: { + order: 3, + name: 'Anime', + uri: [ + ] + }, subtitle: 'OpenSubtitles', metadata: 'Trakttv', tvst: 'TVShowTime', From b4813bb61faf50faea84c545859bf55415cb28b1 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 8 Jul 2021 22:40:00 +0300 Subject: [PATCH 023/168] select context or first if not exist --- src/app/butter-provider/movie.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 3f2ae171c8..7b65194a45 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -16,6 +16,10 @@ class MovieApi extends Generic { movies.forEach(movie => { if (movie.torrents) { + const curLang = movie.torrents[this.contentLanguage] + ? this.contentLanguage : Object.keys(movie.torrents)[0]; + let langs = {}; + langs[curLang] = movie.torrents[curLang]; results.push({ type: 'movie', imdb_id: movie.imdb_id, @@ -32,11 +36,8 @@ class MovieApi extends Generic { synopsis: movie.synopsis, trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, - torrents: - movie.torrents[this.contentLanguage] - ? movie.torrents[this.contentLanguage] - : movie.torrents[Object.keys(movie.torrents)[0]], - langs: movie.torrents, + torrents: movie.torrents[curLang], + langs: langs, locale: movie.locale || null, }); } From 66a625c1241a000fe387e7c256fbd18b4a2998f0 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 8 Jul 2021 23:47:07 +0300 Subject: [PATCH 024/168] fix settings --- src/app/templates/settings-container.tpl | 35 ++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 96f9991419..c8df78295c 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -204,6 +204,23 @@
<%= i18n.__("Localisation") %>
+ + + +
From 491347c22a0a1d86ef94f347485813e7d3588180 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:37:28 +0300 Subject: [PATCH 025/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index c8df78295c..ed6e120241 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -220,7 +220,6 @@
- - + + > + + > - > - - - > - - - From f6a8f83ade4e0f4aab59b26bbb83e3fe55fa31a0 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:51:58 +0300 Subject: [PATCH 026/168] Remove TVShow Time (#2232) --- src/app/bootstrap.js | 42 ++---------------------- src/app/database.js | 3 -- src/app/lib/views/main_window.js | 9 ----- src/app/lib/views/settings_container.js | 24 -------------- src/app/settings.js | 8 ----- src/app/templates/settings-container.tpl | 24 -------------- 6 files changed, 2 insertions(+), 108 deletions(-) diff --git a/src/app/bootstrap.js b/src/app/bootstrap.js index d59fc9511f..707e4e6596 100644 --- a/src/app/bootstrap.js +++ b/src/app/bootstrap.js @@ -14,43 +14,7 @@ return files .map(function(file) { - if (!file.match(/\.js$/) || file.match(/generic.js$/) || file.match(/tvshowtime.js$/)) { - return null; - } - - win.info('loading local provider', file); - - var q = Q.defer(); - - var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); - - script.type = 'text/javascript'; - script.src = 'lib/providers/' + file; - - script.onload = function() { - win.info('loaded', file); - q.resolve(file); - }; - - head.appendChild(script); - - return q.promise; - }) - .filter(function(q) { - return q; - }); - } - - function loadLocalProvidersDelayed() { - var appPath = ''; - var providerPath = './src/app/lib/providers/'; - - var files = fs.readdirSync(providerPath); - - return files - .map(function(file) { - if (!file.match(/tvshowtime.js$/)) { + if (!file.match(/\.js$/) || file.match(/generic.js$/)) { return null; } @@ -125,9 +89,7 @@ function loadProvidersDelayed() { return Q.all( - loadLocalProvidersDelayed() - .concat(loadNpmProviders()) - .concat(loadLegacyNpmProviders()) + loadNpmProviders().concat(loadLegacyNpmProviders()) ); } diff --git a/src/app/database.js b/src/app/database.js index 7e31b1642b..4c8a33379d 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -433,9 +433,6 @@ var Database = { .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); - App.TVShowTime = App.Config.getProviderForType('tvst'); - App.TVShowTime.restoreToken(); - // check update var updater = new App.Updater(); diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 1af76aa6cf..9d26db21ef 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -170,11 +170,6 @@ ) ); - App.vent.on( - 'system:tvstAuthenticated', - _.bind(this.tvstAuthenticated, this) - ); - // Stream events App.vent.on('stream:started', _.bind(this.streamStarted, this)); App.vent.on('stream:ready', _.bind(this.streamReady, this)); @@ -558,10 +553,6 @@ ); }, - tvstAuthenticated: function() { - win.info('TVShow Time: authenticated'); - }, - streamStarted: function(stateModel) { // People wanted to keep the active // modal (tvshow/movie) detail open when diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index fb8a033064..270d39cb8e 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -39,8 +39,6 @@ 'click .modal-overlay, .modal-close': 'closeModal', 'click #authTrakt': 'connectTrakt', 'click #unauthTrakt': 'disconnectTrakt', - 'click #connect-with-tvst': 'connectWithTvst', - 'click #disconnect-tvst': 'disconnectTvst', 'click #authOpensubtitles': 'connectOpensubtitles', 'click #unauthOpensubtitles': 'disconnectOpensubtitles', 'click .reset-tvshow': 'resettvshow', @@ -613,28 +611,6 @@ this.render(); }, - connectWithTvst: function () { - var self = this; - - $('#connect-with-tvst > i').css('visibility', 'hidden'); - $('.tvst-loading-spinner').show(); - - App.vent.on('system:tvstAuthenticated', function () { - $('.tvst-loading-spinner').hide(); - self.render(); - }); - App.TVShowTime.authenticate(function (activateUri) { - nw.Shell.openExternal(activateUri); - }); - }, - - disconnectTvst: function () { - var self = this; - App.TVShowTime.disconnect(function () { - self.render(); - }); - }, - connectOpensubtitles: function (e) { var self = this, usn = $('#opensubtitlesUsername').val(), diff --git a/src/app/settings.js b/src/app/settings.js index 534e5804e4..251e5d1623 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -34,10 +34,6 @@ var Settings = { client_secret: 'f55b0a53c63af683588b47f6de94226b7572a6f83f40bd44c58a7c83fe1f2cb1' }, - tvshowtime: { - client_id: 'iM2Vxlwr93imH7nwrTEZ', - client_secret: 'ghmK6ueMJjQLHBwsaao1tw3HUF7JVp_GQTwDwhCn' - }, fanart: { api_key: 'ce4bba4b3cc473306c6cddb4e1cb0da4' }, @@ -70,7 +66,6 @@ Settings.providers = { }, subtitle: 'OpenSubtitles', metadata: 'Trakttv', - tvst: 'TVShowTime', torrentCache: 'TorrentCache' }; @@ -173,9 +168,6 @@ Settings.traktLastActivities = false; Settings.traktSyncOnStart = true; Settings.traktPlayback = true; -// TVShow Time -Settings.tvstAccessToken = ''; - // OpenSubtitles Settings.opensubtitlesAutoUpload = true; Settings.opensubtitlesAuthenticated = false; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index ed6e120241..1ef25c88c0 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -440,30 +440,6 @@ <% } %> - <% if(App.TVShowTime) { %> -
-
TVShow Time
-
-
"> - <% if(App.TVShowTime.authenticated) { %> - - <%= i18n.__("You are currently connected to %s", "TVShow Time") %>. - <%= i18n.__("Disconnect account") %> - - <% } else { %> - -
-    - <%= i18n.__("Connect To %s", "TVShow Time") %> -
- -
- <% } %> -
-
-
- <% } %> -
OpenSubtitles
From e73db421923bdf81b3fddb6e85187baabaf31e86 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:52:19 +0300 Subject: [PATCH 027/168] Delete tvshowtime.js --- src/app/lib/providers/tvshowtime.js | 144 ---------------------------- 1 file changed, 144 deletions(-) delete mode 100644 src/app/lib/providers/tvshowtime.js diff --git a/src/app/lib/providers/tvshowtime.js b/src/app/lib/providers/tvshowtime.js deleted file mode 100644 index d8f94ce7d4..0000000000 --- a/src/app/lib/providers/tvshowtime.js +++ /dev/null @@ -1,144 +0,0 @@ -(function (App) { - 'use strict'; - - var PT_VERSION = Settings.version, - API_ENDPOINT = URI('https://api.tvtime.com/v1'), - API_CLIENT_ID = Settings.tvshowtime.client_id, - API_CLIENT_SECRET = Settings.tvshowtime.client_secret; - - function TVShowTime() { - App.Providers.CacheProviderV2.call(this, 'tvst'); - this.restoreToken(); - } - // Inherit the Cache Provider - inherits(TVShowTime, App.Providers.CacheProviderV2); - - TVShowTime.prototype.config = { - name: 'TVShowTime' - }; - - // Try to restore token from settings and auth to tvst api - TVShowTime.prototype.restoreToken = function () { - var tvstAccessToken = AdvSettings.get('tvstAccessToken'); - - if (tvstAccessToken !== '') { - this.authenticated = true; - App.vent.trigger('system:tvstAuthenticated'); - this._credentials = { - token: tvstAccessToken - }; - - } else { - this.authenticated = false; - this._credentials = { - token: '' - }; - } - }; - - TVShowTime.prototype.post = function (endpoint, postVariables) { - var defer = Q.defer(); - - postVariables = postVariables || {}; - - var requestUri = API_ENDPOINT.clone() - .segment(endpoint); - - request.post(requestUri.toString(), { - form: postVariables - }, function (err, res, body) { - if (err || !body || res.statusCode >= 400) { - defer.reject(err); - } else { - defer.resolve(body); - } - }); - - return defer.promise; - }; - - TVShowTime.prototype.authenticate = function (callback) { - var self = this; - this - .post('oauth/device/code', { - 'client_id': API_CLIENT_ID - }) - .then(function (data) { - data = Common.sanitize(JSON.parse(data)); - if (data.result === 'OK') { - var activateUri = data.verification_url + '?user_code=' + data.user_code; - self.oauthAuthorizing = setInterval(function () { - self.post('oauth/access_token', { - 'client_id': API_CLIENT_ID, - 'client_secret': API_CLIENT_SECRET, - 'code': data.device_code - }).then(function (data) { - data = JSON.parse(data); - if (data.result === 'OK') { - clearInterval(self.oauthAuthorizing); - self._credentials.token = data.access_token; - self.authenticated = true; - App.vent.trigger('system:tvstAuthenticated'); - // Store the credentials (hashed ofc) - AdvSettings.set('tvstAccessToken', data.access_token); - } - }); - }, (data.interval + 1) * 1000); - callback(activateUri); - } - }); - }; - - - TVShowTime.prototype.disconnect = function (callback) { - this.authenticated = false; - AdvSettings.set('tvstAccessToken', ''); - callback(); - }; - - - TVShowTime.prototype.checkin = function (show) { - this - .post('checkin', { - 'show_id': show.tvdb_id, - 'season_number': show.season, - 'number': show.episode, - 'access_token': this._credentials.token - }) - .then(function (data) { - //console.log(data); - }); - }; - - TVShowTime.prototype.checkout = function (show) { - this - .post('checkout', { - 'show_id': show.tvdb_id, - 'season_number': show.season, - 'number': show.episode, - 'access_token': this._credentials.token - }) - .then(function (data) { - //console.log(data); - }); - }; - - function onShowWatched(show, channel) { - if (App.TVShowTime.authenticated) { - App.TVShowTime.checkin(show); - } - } - - function onShowUnWatched(show, channel) { - if (App.TVShowTime.authenticated) { - App.TVShowTime.checkout(show); - } - } - - App.vent.on('show:watched', onShowWatched); - App.vent.on('show:unwatched', onShowUnWatched); - - App.Providers.TVShowTime = TVShowTime; - App.Providers.install(TVShowTime); - -})(window.App); From 353d5c420da5936ed592ca7ad1d8b1318b27a600 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 01:04:14 +0300 Subject: [PATCH 028/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 270d39cb8e..520bb41064 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -439,8 +439,12 @@ App.Providers.updateLanguage(Settings.language, value || Settings.language); this.alertMessageSuccess(true); break; - case 'vpnEnabled': case 'language': + $('.nav-hor.left li:first').click(); + App.vent.trigger('settings:show'); + this.alertMessageSuccess(true); + break; + case 'vpnEnabled': case 'watchedCovers': case 'defaultFilters': $('.nav-hor.left li:first').click(); From 6940218d17b5badb43f3a2ab1e2ccc9120de4518 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 01:17:10 +0300 Subject: [PATCH 029/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 1ef25c88c0..f91c9f87bb 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -225,7 +225,7 @@

<%= i18n.__("Title translation") %>

From 8f46855af6d8c6ff0d14a317e69f536e7d8d5b05 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 01:21:31 +0300 Subject: [PATCH 030/168] Update en.json --- src/app/language/en.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 13b3133bbb..efc73fac08 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -554,5 +554,15 @@ "Allows connecting to peers that use PE/MSE. Will in most cases increase the number of connectable peers but might also result in increased CPU usage": "Allows connecting to peers that use PE/MSE. Will in most cases increase the number of connectable peers but might also result in increased CPU usage", "Show the Seedbox when adding a new download": "Show the Seedbox when adding a new download", "Download added": "Download added", - "Change API Server": "Change API Server" + "Change API Server": "Change API Server", + "Localisation": "Localisation", + "Preferred Content Language": "Preferred Content Language", + "Same as interface": "Same as interface", + "Title translation": "Title translation", + "Translated - Original": "Translated - Original", + "Original - Translated": "Original - Translated", + "Translated only": "Translated only", + "Original only": "Original only", + "Translate Posters": "Translate Posters", + "Translate Episode Titles": "Translate Episode Titles" } From 076d4dc387c58d2dcb4d9c1482c226fed749c251 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:53:19 +0300 Subject: [PATCH 031/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 520bb41064..c0c70d3244 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -442,7 +442,9 @@ case 'language': $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); - this.alertMessageSuccess(true); + if (!Settings.contentLanguage) { + this.alertMessageSuccess(true); + } break; case 'vpnEnabled': case 'watchedCovers': From 120467ba6faedb940e8c40bb6275cc3fcd693c4d Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 9 Jul 2021 15:52:28 +0300 Subject: [PATCH 032/168] update settings --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7da135f0fa..d0720c5fce 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "bootstrap": "^3.4.1", "butter-provider": "0.11.0", "butter-sanitize": "^0.1.1", - "butter-settings-popcorntime.app": "0.0.5", + "butter-settings-popcorntime.app": "0.0.6", "chromecast-api": "0.3.4", "defer-request": "0.0.3", "dlnacasts2": "0.2.0", diff --git a/yarn.lock b/yarn.lock index fbe183fcd3..8fb4f1a083 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1007,10 +1007,10 @@ butter-sanitize@^0.1.1: dependencies: sanitizer "^0.1.3" -butter-settings-popcorntime.app@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/butter-settings-popcorntime.app/-/butter-settings-popcorntime.app-0.0.5.tgz#0eb3539801af67a84dd993a62a4143fefdb575eb" - integrity sha512-LyOZxHV+g9tDXGgWh2JoDIbyhgjE3288mtdvzUzpS63+W/mZQgX7zRjfzmwzebvZRvIuRuKSY1FxOVWhf4cJEw== +butter-settings-popcorntime.app@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/butter-settings-popcorntime.app/-/butter-settings-popcorntime.app-0.0.6.tgz#4f43e3a658f90d00a991566a59e18d37fe1ba3d2" + integrity sha512-fmboxwTi9X6yPUu3jc64hOIlSm42EWAag2WV/9D9AO/B2FaL96qXuDwp+5U1U6iQ3qtti3lxNRWTUuUdkYduOw== bytes@^3.0.0: version "3.1.0" From cf86cd75fadb8ef97594637b22c14241e41a2004 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 9 Jul 2021 20:20:44 +0300 Subject: [PATCH 033/168] addEnglish option --- src/app/butter-provider/movie.js | 10 +++++----- src/app/butter-provider/tv.js | 10 +++++----- src/app/database.js | 2 +- src/app/lib/providers/generic.js | 5 ++++- src/app/lib/views/settings_container.js | 4 +++- src/app/settings.js | 3 ++- src/app/styl/views/settings_container.styl | 1 + src/app/templates/settings-container.tpl | 4 ++++ 8 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 7b65194a45..fd517a8ee5 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -9,6 +9,7 @@ class MovieApi extends Generic { this.language = args.language; this.contentLanguage = args.contentLanguage || this.language; + this.addEnglish = args.addEnglish || true; } _formatForPopcorn(movies) { @@ -59,11 +60,10 @@ class MovieApi extends Generic { limit: '50' }; - if (this.language) { - params.locale = this.language; - } - if (this.language !== this.contentLanguage) { - params.contentLocale = this.contentLanguage; + params.locale = this.language; + params.contentLocale = this.contentLanguage; + if (this.addEnglish && params.contentLocale !== 'en') { + params.contentLocale += ',en'; } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index 6d925fb1c2..f6661d8213 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -10,6 +10,7 @@ class TVApi extends Generic { this.language = args.language; this.contentLanguage = args.contentLanguage || this.language; + this.addEnglish = args.addEnglish || true; try { this.tvdb = new TVDB('7B95D15E1BE1D75A'); @@ -32,11 +33,10 @@ class TVApi extends Generic { limit: '50' }; - if (this.language) { - params.locale = this.language; - } - if (this.language !== this.contentLanguage) { - params.contentLocale = this.contentLanguage; + params.locale = this.language; + params.contentLocale = this.contentLanguage; + if (this.addEnglish && params.contentLocale !== 'en') { + params.contentLocale += ',en'; } if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); diff --git a/src/app/database.js b/src/app/database.js index 4c8a33379d..8bdb614a6b 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -428,7 +428,7 @@ var Database = { return AdvSettings.setup(); }) .then(function () { - App.Providers.updateLanguage(Settings.language, Settings.contentLanguage || Settings.language); + App.Providers.updateLanguage(Settings.language, Settings.contentLanguage || Settings.language, Settings.addEnglish); }) .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); diff --git a/src/app/lib/providers/generic.js b/src/app/lib/providers/generic.js index f89ceb1855..8fd6d0cffe 100644 --- a/src/app/lib/providers/generic.js +++ b/src/app/lib/providers/generic.js @@ -27,7 +27,7 @@ } } - function updateProviderLanguage (language, contentLanguage) { + function updateProviderLanguage (language, contentLanguage, addEnglish = true) { for (let provider in cache) { if (cache[provider] && cache[provider].hasOwnProperty('language')) { cache[provider].language = language; @@ -35,6 +35,9 @@ if (cache[provider] && cache[provider].hasOwnProperty('contentLanguage')) { cache[provider].contentLanguage = contentLanguage; } + if (cache[provider] && cache[provider].hasOwnProperty('addEnglish')) { + cache[provider].addEnglish = addEnglish; + } } } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index c0c70d3244..bd29b7e804 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -294,6 +294,7 @@ case 'separateDownloadsDir': case 'continueSeedingOnStart': case 'protocolEncryption': + case 'addEnglish': case 'vpnEnabled': case 'coversShowRating': case 'torColSearchMore': @@ -436,7 +437,8 @@ this.alertMessageSuccess(true); break; case 'contentLanguage': - App.Providers.updateLanguage(Settings.language, value || Settings.language); + case 'addEnglish': + App.Providers.updateLanguage(Settings.language, value || Settings.language, Settings.addEnglish); this.alertMessageSuccess(true); break; case 'language': diff --git a/src/app/settings.js b/src/app/settings.js index 251e5d1623..e777f3fbce 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -98,10 +98,11 @@ Settings.customMoviesServer = ''; Settings.customSeriesServer = ''; Settings.customAnimeServer = ''; Settings.proxyServer = ''; -Settings.contentLanguage = ''; // User interface Settings.language = ''; +Settings.contentLanguage = ''; +Settings.addEnglish = true; Settings.nativeWindowFrame = nw.App.manifest.window.frame; Settings.translateSynopsis = true; Settings.coversShowRating = true; diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index d5dbf61fa6..349fc5c709 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -67,6 +67,7 @@ color $SettingsText2 font-size 12px + #addEnglish, #downloadsDir, #protocolEnc &:hover + em diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index f91c9f87bb..d903a730e8 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -219,6 +219,10 @@
+   + > + +   <%= i18n.__("We currently have good collections for only a few languages. If you can help with filling the database in your language, then contact us.") %> -   - > - -   <%= i18n.__("We currently have good collections for only a few languages. If you can help with filling the database in your language, then contact us.") %> + + + > +
From 8713808601b03625d6e876732f51d0879c15162d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 11 Jul 2021 00:35:41 +0300 Subject: [PATCH 036/168] Update en.json --- src/app/language/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index eca4434e51..7ea18ec36c 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -565,5 +565,6 @@ "Original only": "Original only", "Translate Posters": "Translate Posters", "Translate Episode Titles": "Translate Episode Titles", - "Only show content available in the preferred language": "Only show content available in the preferred language" + "Only show content available in the preferred language": "Only show content available in the preferred language", + "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers" } From 72adb5b77508760fe844bb87269ca5529b3df37e Mon Sep 17 00:00:00 2001 From: Daniel Bayley Date: Sat, 10 Jul 2021 22:11:58 +0100 Subject: [PATCH 037/168] Fix Homebrew Cask --- README.md | 18 ++++++------ casks/popcorn-time-beta.rb | 28 ------------------ casks/popcorn-time.rb | 59 ++++++++++++++++++++++++++++---------- 3 files changed, 52 insertions(+), 53 deletions(-) delete mode 100644 casks/popcorn-time-beta.rb diff --git a/README.md b/README.md index 66902c6f35..86d686df3c 100644 --- a/README.md +++ b/README.md @@ -36,19 +36,17 @@ Download and install: ### MacOS: -Easily install Popcorn Time via _[Homebrew](https://brew.sh) ([Cask](https://github.com/Homebrew/homebrew-cask#homebrew-cask)):_ - * **Latest release**: - `brew tap popcorn-official/popcorn-desktop https://github.com/popcorn-official/popcorn-desktop.git` - `brew install --cask popcorn-time` - * Or **latest dev build (for testers)**: - `brew tap popcorn-official/popcorn-desktop https://github.com/popcorn-official/popcorn-desktop.git` - `brew install --cask popcorn-time-beta` - +Easily install Popcorn Time via _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_ + ~~~ rb + brew tap popcorn-official/popcorn-desktop https://github.com/popcorn-official/popcorn-desktop.git + brew install --cask popcorn-time + ~~~ + Also, if you keep a [_Brewfile_](https://github.com/Homebrew/homebrew-bundle#usage), you can add something like this: ~~~ rb - repo = 'popcorn-official/popcorn-desktop' + repo = "popcorn-official/popcorn-desktop" tap repo, "https://github.com/#{repo}.git" - cask 'popcorn-time' + cask "popcorn-time" ~~~ Update from _zip_ file: diff --git a/casks/popcorn-time-beta.rb b/casks/popcorn-time-beta.rb deleted file mode 100644 index b806d4f516..0000000000 --- a/casks/popcorn-time-beta.rb +++ /dev/null @@ -1,28 +0,0 @@ -cask "popcorn-time-beta" do - version :latest - sha256 :no_check - - ci = "https://ci.popcorntime.app/job/Popcorn-Time-Desktop" - url "#{ci}/lastSuccessfulBuild/artifact/build/Popcorn-Time-0.4.5_osx64.zip" - appcast ci, configuration: "Latest successful build" - name "Popcorn Time" - desc "Watch movies and TV shows instantly" - homepage "https://popcorntime.app/" - - auto_updates true - conflicts_with cask: "popcorn-time" - - app "Popcorn-Time.app" - - bundle_id = "com.nw-builder.popcorn-time" - uninstall quit: bundle_id - - zap trash: [ - "~/Library/Preferences/#{bundle_id}.plist", - "~/Library/Application Support/Popcorn-Time", - "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/#{bundle_id}.sfl*", - "~/Library/Application Support/configstore/popcorn-time.json", - "~/Library/Saved Application State/#{bundle_id}.savedState", - "~/Library/Caches/Popcorn-Time", - ] -end diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index 757e2e2693..f799ea4f17 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -1,27 +1,56 @@ cask "popcorn-time" do - version "0.4.5" - sha256 "045dbe37d06e24ed7129dddd922648caaba712dee24685fb3cb1f4782f03ead5" + version "0.4.5-43,g4fc2f4e4" + sha256 "e266ec6eaae91211f18de96d468c6250912904bf14086e5f8cd23331d6c0db5c" - url "https://get.popcorntime.app/build/Popcorn-Time-#{version}.pkg" - appcast "https://github.com/popcorn-official/popcorn-desktop/releases.atom" - name "Popcorn Time" - desc "Watch movies and TV shows instantly" - homepage "https://popcorntime.app/" + server = "popcorn-ru.tk" + homepage = "http://#{server}" + zip = "Popcorn-Time-#{version.tr("-,", "+.")}_osx64.zip" + + url "#{homepage}/build/#{zip}" + name token.titlecase + desc "BitTorrent client that includes an integrated media player" + homepage homepage + + zip.sub! version, "([0-9]+(?:\\.[0-9]+)+)" + + livecheck do + url "#{homepage}/build" + strategy :page_match + regex Regexp.new zip + end auto_updates true - conflicts_with cask: "popcorn-time-beta" - pkg "Popcorn-Time-#{version}.pkg" + app "Popcorn-Time.app" + + app_support = "#{Dir.home}/Library/Application Support" + + postflight do + require "securerandom" + + db = "#{app_support}/Popcorn-Time/Default/data/settings.db" + + %w[Movies Series].each do |medium| + setting = { + key: "custom#{medium}Server", + value: "https://#{server}/", + _id: SecureRandom.alphanumeric, + } + settings = File.read(db).lines + + next if settings.grep(/#{setting[:key]}/).any? + + `echo '#{setting.to_json}' >> '#{db}'` + end + end - bundle_id = "com.nw-builder.popcorn-time" - uninstall quit: bundle_id, - delete: "#{appdir}/Popcorn-Time.app" + uninstall quit: bundle_id = "com.nw-builder.popcorn-time" zap trash: [ + "#{app_support}/Popcorn-Time", "~/Library/Preferences/#{bundle_id}.plist", - "~/Library/Application Support/Popcorn-Time", - "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/#{bundle_id}.sfl*", - "~/Library/Application Support/configstore/popcorn-time.json", + "#{app_support}/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/#{bundle_id}.sfl*", + "#{app_support}/configstore/popcorn-time.json", "~/Library/Saved Application State/#{bundle_id}.savedState", "~/Library/Caches/Popcorn-Time", ] From 51d819b184c9fe4393cbaf975ff91ebc178ee981 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 11 Jul 2021 14:03:29 +0300 Subject: [PATCH 038/168] Target release version with Homebrew Cask (#2236) --- casks/popcorn-time.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index f799ea4f17..468b7198e9 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -1,10 +1,10 @@ cask "popcorn-time" do - version "0.4.5-43,g4fc2f4e4" - sha256 "e266ec6eaae91211f18de96d468c6250912904bf14086e5f8cd23331d6c0db5c" + version "0.4.5" + sha256 "cacf8ed13b427bceb481ba88ff97ff297f7e9e0487f1411f8d20ff87dd674ddb" server = "popcorn-ru.tk" homepage = "http://#{server}" - zip = "Popcorn-Time-#{version.tr("-,", "+.")}_osx64.zip" + zip = "Popcorn-Time-#{version.tr("-,", "+.")}-Mac.zip" url "#{homepage}/build/#{zip}" name token.titlecase From 866d70cdccdab77b13fc32c6a76f6b2328488e61 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 15:40:59 +0300 Subject: [PATCH 039/168] fix select file --- src/app/lib/streamer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index b561ec2fe7..e2e413568e 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -462,18 +462,20 @@ if (!fileName) { for (let i in torrent.files) { if (fileSize < torrent.files[i].length) { + fileIndex = i; fileSize = torrent.files[i].length; fileName = torrent.files[i].path; } } } - for (var f in torrent.files) { // Add selection - var file = torrent.files[f]; + for (let f in torrent.files) { // Add selection + let file = torrent.files[f]; // we use endsWith, not equals because from server may return without first directory if (file.path.endsWith(fileName)) { fileIndex = f; fileSize = file.length; + fileName = file.path; file.select(); } else { // file.deselect(); @@ -481,10 +483,10 @@ } return { - name: path.basename(torrent.files[fileIndex].path), + name: path.basename(fileName), size: fileSize, index: fileIndex, - path: path.join(torrent.path, torrent.files[fileIndex].path) + path: path.join(torrent.path, fileName) }; }, From f4ea6385dee9453a633448dc954339aa29c84906 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 15:41:49 +0300 Subject: [PATCH 040/168] language selector for movies --- src/app/butter-provider/movie.js | 5 ++-- src/app/butter-provider/yts.js | 27 +++++++++-------- src/app/lib/views/play_control.js | 9 +++++- src/app/lib/views/quality-selector.js | 42 +++++++++++++++------------ 4 files changed, 49 insertions(+), 34 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 05e34cd3a2..9b4902e34c 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -19,8 +19,6 @@ class MovieApi extends Generic { if (movie.torrents) { const curLang = movie.torrents[this.contentLanguage] ? this.contentLanguage : Object.keys(movie.torrents)[0]; - let langs = {}; - langs[curLang] = movie.torrents[curLang]; results.push({ type: 'movie', imdb_id: movie.imdb_id, @@ -38,7 +36,8 @@ class MovieApi extends Generic { trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, torrents: movie.torrents[curLang], - langs: langs, + langs: movie.torrents, + defaultAudio: curLang, locale: movie.locale || null, }); } diff --git a/src/app/butter-provider/yts.js b/src/app/butter-provider/yts.js index 3a29c12eed..c10f313b79 100644 --- a/src/app/butter-provider/yts.js +++ b/src/app/butter-provider/yts.js @@ -15,6 +15,18 @@ class YTSApi extends Generic { if (movies) { movies.forEach(movie => { if (movie.torrents) { + let torrents = movie.torrents.reduceRight(function (torrents, torrent) { + torrents[torrent.quality] = { + url: torrent.url, + magnet: `magnet:?xt=urn:btih:${torrent.hash}`, + size: torrent.size_bytes, + filesize: torrent.size, + seed: torrent.seeds, + peer: torrent.peers + }; + return torrents; + }, {}); + let curLang = movie.language.replace('cn', 'zh-cn'); results.push({ type: 'movie', imdb_id: movie.imdb_code, @@ -31,18 +43,9 @@ class YTSApi extends Generic { synopsis: movie.description_full, trailer: 'https://www.youtube.com/watch?v=' + movie.yt_trailer_code || false, certification: movie.mpa_rating, - torrents: movie.torrents.reduceRight(function (torrents, torrent) { - torrents[torrent.quality] = { - url: torrent.url, - magnet: `magnet:?xt=urn:btih:${torrent.hash}`, - size: torrent.size_bytes, - filesize: torrent.size, - seed: torrent.seeds, - peer: torrent.peers - }; - return torrents; - }, {}), - langs: {[movie.language.replace('cn', 'zh-cn')]: {}} + torrents: torrents, + defaultAudio: curLang, + langs: {[curLang]: torrents} }); } }); diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index e74511d9bf..620105556a 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -34,7 +34,9 @@ this.model.get('title') ); if (!this.model.get('langs')) { - this.model.set('langs', { en: undefined }); + this.model.set('langs', { en: this.model.get('torrents') }); + } else { + this.model.set('torrents', this.model.get('langs')[this.model.get('defaultAudio')]); } App.vent.on('sub:lang', this.switchSubtitle.bind(this)); @@ -211,6 +213,11 @@ $('#audio-dropdown .flag.toggle').attr('title', App.Localization.nativeName(lang) + '
(' + App.Localization.name(lang).replace(/\(|\)/g, '') + ')').tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); } console.info('Audios: ' + lang); + + if (this.getRegion('qualitySelector').currentView) { + this.model.set('torrents', audios[lang]); + this.getRegion('qualitySelector').currentView.updateTorrents(audios[lang]); + } }, downloadTorrent: function() { diff --git a/src/app/lib/views/quality-selector.js b/src/app/lib/views/quality-selector.js index 4b7a45a969..60569b4a1f 100644 --- a/src/app/lib/views/quality-selector.js +++ b/src/app/lib/views/quality-selector.js @@ -11,14 +11,30 @@ }, collator: new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}), initialize: function () { - var self = this; + this.updateTorrents(this.model.get('torrents')); + }, + + onAttach: function () { + this.initQuality(); + }, - var required = this.model.get('required'); - var torrents = this.model.get('torrents'); + initQuality: function() { + var selectedKey = null; + for (let [key, torrent] of Object.entries(this.model.get('sortedTorrents'))) { + if (!torrent) { + continue; + } + if (!selectedKey || this.collator.compare(key, Settings[this.model.get('defaultQualityKey')]) <= 0) { + selectedKey = key; + } + } + this.selectQuality(selectedKey); + }, + updateTorrents: function (torrents) { let keys = Object.keys(torrents).sort(this.collator.compare); let sortedTorrents = {}; - for (let key of required) { + for (let key of this.model.get('required')) { sortedTorrents[key] = false; } for (let key of keys) { @@ -29,20 +45,10 @@ sortedTorrents[key] = torrents[key]; } + console.log(sortedTorrents); this.model.set('sortedTorrents', sortedTorrents); - }, - - onAttach: function () { - var selectedKey = null; - for (let [key, torrent] of Object.entries(this.model.get('sortedTorrents'))) { - if (!torrent) { - continue; - } - if (!selectedKey || this.collator.compare(key, Settings[this.model.get('defaultQualityKey')]) <= 0) { - selectedKey = key; - } - } - this.selectQuality(selectedKey); + this.render(); + this.initQuality(); }, selectNext: function () { @@ -77,7 +83,7 @@ $(this.ui.list).find('div').removeClass('active'); $(this.ui.list).find('div:contains("'+key+'")').addClass('active'); console.log('Select quality: ', key); - var torrents = this.model.get('torrents'); + var torrents = this.model.get('sortedTorrents'); var callback = this.model.get('selectCallback'); callback(torrents[key], key); }, From 0c39e42ac875ffc73bdd65c87b4b787b6395e315 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 16:04:22 +0300 Subject: [PATCH 041/168] remove unused function --- src/app/lib/views/movie_detail.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index a79b7049a5..a2119166ea 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -256,18 +256,6 @@ } }, - handleAnime: function() { - var id = this.model.get('imdb_id'); - if (id && id.indexOf('mal') === -1) { - return; - } - - $( - '.movie-imdb-link, .rating-container, .magnet-link, .health-icon' - ).hide(); - $('.dot').css('opacity', 0); - }, - getMetaData: function () { curSynopsis.vstatus = false; var imdb = this.model.get('imdb_id'), From 331c4413d1923f49114425c51f34c4f390e7c3ad Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 17:24:26 +0300 Subject: [PATCH 042/168] fix git.json for correct package --- dist/linux/exec_basefile.sh | 2 +- dist/windows/updater_makensis.nsi | 2 +- dist/windows/updater_package.sh | 2 +- gulpfile.js | 10 +++++----- src/app/app.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/linux/exec_basefile.sh b/dist/linux/exec_basefile.sh index 2e61e0006c..5d709eb37f 100644 --- a/dist/linux/exec_basefile.sh +++ b/dist/linux/exec_basefile.sh @@ -55,7 +55,7 @@ current="1: Copy files" echo " - Copying files to ~/.Butter" mkdir -p "$HOME/.Butter" -cp -r locales node_modules src .git.json CHANGELOG.md icudtl.dat libffmpegsumo.so LICENSE.txt nw.pak package.nw package.json Butter README.md "$HOME/.Butter" &> /dev/null && error=0 || error=1 +cp -r locales node_modules src git.json CHANGELOG.md icudtl.dat libffmpegsumo.so LICENSE.txt nw.pak package.nw package.json Butter README.md "$HOME/.Butter" &> /dev/null && error=0 || error=1 #move icon mkdir -p "$HOME/.local/share/icons" diff --git a/dist/windows/updater_makensis.nsi b/dist/windows/updater_makensis.nsi index 455cc9e0ce..9bf6dafd2f 100644 --- a/dist/windows/updater_makensis.nsi +++ b/dist/windows/updater_makensis.nsi @@ -348,7 +348,7 @@ Section File "..\..\package.json" File "..\..\build\${APP_NAME}\${ARCH}\${APP_LAUNCHER}" File "..\..\CHANGELOG.md" - File /nonfatal "..\..\.git.json" + File /nonfatal "..\..\git.json" ;Set output path to InstallDir SetOutPath "\\?\$INSTDIR\node_modules" diff --git a/dist/windows/updater_package.sh b/dist/windows/updater_package.sh index fae2e9ef64..09ce4437a0 100644 --- a/dist/windows/updater_package.sh +++ b/dist/windows/updater_package.sh @@ -27,7 +27,7 @@ if [ "${POP_NEW_NW}" = "TRUE" ]; then fi cp "${basedir}/package.json" "${outdir}" -cp "${basedir}/.git.json" "${outdir}" +cp "${basedir}/git.json" "${outdir}" cd ${outdir} vers=$(sed -n "s|\s*\"version\"\:\ \"\(.*\)\"\,|\1|p" "${basedir}/package.json") diff --git a/gulpfile.js b/gulpfile.js index a88cf645aa..352a0f6820 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -96,8 +96,8 @@ const parseReqDeps = () => { }; const curVersion = () => { - if (fs.existsSync('./.git.json')) { - const gitData = require('./.git.json'); + if (fs.existsSync('./git.json')) { + const gitData = require('./git.json'); return gitData.semver; } else { return pkJson.version; @@ -427,7 +427,7 @@ gulp.task('nwjs', () => { './README.md', './CHANGELOG.md', './LICENSE.txt', - './.git.json' + './git.json' ]; // add node_modules nw.options.files = nw.options.files.concat(requiredDeps); @@ -453,14 +453,14 @@ gulp.task('nwjs', () => { }); }); -// create .git.json (used in 'About') +// create git.json (used in 'About') gulp.task('injectgit', () => { return git.gitDescribe() .then( (gitInfo) => new Promise((resolve, reject) => { fs.writeFile( - '.git.json', + 'git.json', JSON.stringify({ commit: gitInfo.hash.substr(1), semver: gitInfo.semverString, diff --git a/src/app/app.js b/src/app/app.js index c3ccb73c3d..ebf4cfdf33 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -104,7 +104,7 @@ App.WebTorrent = new WebTorrent({ App.plugins = {}; -fs.readFile('./.git.json', 'utf8', function (err, json) { +fs.readFile('./git.json', 'utf8', function (err, json) { if (!err) { App.git = JSON.parse(json); } From fe03191d350f6952d498e5e236b54fe9bd37ebab Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 18:14:43 +0300 Subject: [PATCH 043/168] movie watched button --- src/app/styl/views/show_detail.styl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 55fd9b8238..412172b8fa 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -259,12 +259,12 @@ opacity: 1 .sha-watched - float: right + float: left cursor: pointer padding-left: 24px - right: 45px + margin-left: 20px color: #FFF - position: absolute + position: relative font-family: $MainFont font-smoothing: antialiased font-size: 12px From 73e06658809f785a2abf3178962c0e91b56cb917 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 19:25:56 +0300 Subject: [PATCH 044/168] refactor lang dropdown --- src/app/lib/views/lang_dropdown.js | 11 +++++++---- src/app/lib/views/play_control.js | 10 ---------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/app/lib/views/lang_dropdown.js b/src/app/lib/views/lang_dropdown.js index 85160ac037..1950d0747c 100644 --- a/src/app/lib/views/lang_dropdown.js +++ b/src/app/lib/views/lang_dropdown.js @@ -57,11 +57,14 @@ setLang: function (value) { this.model.set('selected', value); - if (value !== 'none') { - this.ui.selected.removeClass().addClass('flag toggle selected-lang').addClass(value.substr(0,2)); - } else { - this.ui.selected.removeClass().addClass('flag toggle selected-lang').addClass(value); + const langClass = value === 'none' ? value : value.substr(0,2); + this.ui.selected.removeClass().addClass('flag toggle selected-lang').addClass(langClass); + let title = App.Localization.nativeName(value); + if (langClass !== 'none' && langClass !== 'en') { + title += ' (' + App.Localization.name(value).replace(/\(|\)/g, '') + ')'; } + this.ui.selected.attr('title', title) + .tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); App.vent.trigger(this.type + ':lang', value); }, diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index 620105556a..12926398c7 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -193,11 +193,6 @@ lang = 'none'; } this.subtitle_selected = lang; - if (lang === 'en') { - $('#subs-dropdown .flag.toggle').attr('title', App.Localization.nativeName(lang)).tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); - } else { - $('#subs-dropdown .flag.toggle').attr('title', App.Localization.nativeName(lang) + '
(' + App.Localization.name(lang).replace(/\(|\)/g, '') + ')').tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); - } console.info('Subtitles: ' + this.subtitle_selected); }, @@ -207,11 +202,6 @@ lang = 'none'; } this.audio_selected = lang; - if (lang === 'en') { - $('#audio-dropdown .flag.toggle').attr('title', App.Localization.nativeName(lang)).tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); - } else { - $('#audio-dropdown .flag.toggle').attr('title', App.Localization.nativeName(lang) + '
(' + App.Localization.name(lang).replace(/\(|\)/g, '') + ')').tooltip({delay: {show: 800, hide: 100}, html: true}).tooltip('fixTitle'); - } console.info('Audios: ' + lang); if (this.getRegion('qualitySelector').currentView) { From 6c9e35574b8f35f02ce2146d34f14753c16246ac Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 11 Jul 2021 19:27:42 +0300 Subject: [PATCH 045/168] display lang selector in shows --- src/app/lib/views/show_detail.js | 42 ++++++++++++++++++++++++++++- src/app/styl/views/show_detail.styl | 14 +++++++--- src/app/templates/show-detail.tpl | 10 +++++-- 3 files changed, 59 insertions(+), 7 deletions(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index c57bf3bd34..5572665f86 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -37,6 +37,8 @@ }, regions: { + subDropdown: '#subs-dropdown', + audioDropdown: '#audio-dropdown', qualitySelector: '#quality-selector', }, @@ -61,7 +63,7 @@ initialize: function () { _this = this; - this.renameUntitled(); + this.views = {}; healthButton = new Common.HealthButton('.health-icon', this.retrieveTorrentHealth.bind(this)); @@ -94,7 +96,9 @@ _this.initKeyboardShortcuts(); }); + App.vent.on('audio:lang', this.switchAudio.bind(this)); var torrents = {}; + this.renameUntitled(); _.each(this.model.get('episodes'), function (value, currentEpisode) { if (!torrents[value.season]) { torrents[value.season] = {}; @@ -155,6 +159,7 @@ this.ui.bookmarkIcon.removeClass('selected'); } + //this.loadAudioDropdown(); this.getRegion('qualitySelector').empty(); $('.star-container-tv,.shmi-imdb,.magnet-icon').tooltip(); var noimg = 'images/posterholder.png'; @@ -397,6 +402,40 @@ AdvSettings.set('ratingStars', $('.number-container-tv').hasClass('hidden')); }, + switchAudio: function(lang) { + console.info('Audios: ' + lang); + }, + + loadDropdown: function(type, attrs) { + this.views[type] && this.views[type].destroy(); + this.views[type] = new App.View.LangDropdown({ + model: new App.Model.Lang(Object.assign({ type: type }, attrs)) + }); + var types = type + 'Dropdown'; + this.getRegion(types).show(this.views[type]); + }, + + loadAudioDropdown: function() { + return this.loadDropdown('audio', { + title: i18n.__('Audio Language'), + selected: 'ru', + values: { + en: 'xxx', + de: 'xxx', + ru: 'xxx', + } + }); + }, + + // loadSubDropdown: function() { + // return this.loadDropdown('sub', { + // title: i18n.__('Subtitle'), + // selected: this.model.get('defaultSubtitle'), + // hasNull: true, + // values: this.model.get('subtitle') + // }); + // }, + toggleWatched: function (e) { var edata = e.currentTarget.id.split('-'); setTimeout(function () { @@ -853,6 +892,7 @@ onBeforeDestroy: function () { this.unbindKeyboardShortcuts(); + App.vent.off('audio:lang'); App.vent.off('show:watched:' + this.model.id); App.vent.off('show:unwatched:' + this.model.id); } diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 412172b8fa..1505afa62a 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -172,8 +172,14 @@ float: left position: relative width: calc(100% - 198px) - height: 20px - margin-top: -5px + height: 35px + margin-top: -15px + padding-right 45px + + display: flex + flex-direction: row + justify-content: space-between + white-space: nowrap .sha-bookmark float: left @@ -184,7 +190,7 @@ font-family: $MainFont font-smoothing: antialiased font-size: 12px - line-height: 17px + line-height: 35px &:before content: "\f004" font-family: "Font Awesome 5 Free" @@ -268,7 +274,7 @@ font-family: $MainFont font-smoothing: antialiased font-size: 12px - line-height: 17px + line-height: 35px display: none &:before diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 919cb7cbad..8db8a9587a 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -43,8 +43,14 @@
<%= displaySynopsis %>
-
<%=i18n.__("Add to bookmarks") %>
-
<%=i18n.__("Mark as Seen") %>
+
+
<%=i18n.__("Add to bookmarks") %>
+
<%=i18n.__("Mark as Seen") %>
+
+
From a25d6cbad8075b50865b23b3510ca8ef1bd2f2f5 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 12 Jul 2021 01:01:29 +0300 Subject: [PATCH 046/168] load episodes --- src/app/butter-provider/tv.js | 67 ++++------------------------- src/app/lib/views/show_detail.js | 49 ++++++++++++--------- src/app/styl/views/show_detail.styl | 14 +++++- src/app/templates/show-detail.tpl | 6 +++ 4 files changed, 55 insertions(+), 81 deletions(-) diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index d0c99dfd96..65b4ebb888 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -11,16 +11,6 @@ class TVApi extends Generic { this.language = args.language; this.contentLanguage = args.contentLanguage || this.language; this.contentLangOnly = args.contentLangOnly || false; - - try { - this.tvdb = new TVDB('7B95D15E1BE1D75A'); - this.tvdb.getLanguages().then(langlist => (this.TVDBLangs = langlist)); - } catch (err) { - this.TVDBLangs = false; - console.warn( - 'Something went wrong with TVDB, overviews can\'t be translated.' - ); - } } extractIds(items) { @@ -63,63 +53,22 @@ class TVApi extends Generic { } detail(torrent_id, old_data, debug) { + return this.contentOnLang(torrent_id, this.contentLanguage); + } + + contentOnLang(torrent_id, lang) { const params = {}; if (this.language) { params.locale = this.language; } - if (this.language !== this.contentLanguage) { - params.contentLocale = this.contentLanguage; + if (this.language !== lang) { + params.contentLocale = lang; } const uri = `show/${torrent_id}?` + new URLSearchParams(params); return this._get(0, uri).then(data => { - console.log(data._id); - if (this.translate && this.language !== 'en') { - let langAvailable; - for (let x = 0; x < this.TVDBLangs.length; x++) { - if (this.TVDBLangs[x].abbreviation.indexOf(this.language) > -1) { - langAvailable = true; - break; - } - } - - if (!langAvailable) { - return sanitize(data); - } else { - const reqTimeout = setTimeout(() => sanitize(data), 2000); - - console.info( - `Request to TVApi: '${old_data.title}' - ${this.language}` - ); - return this.tvdb - .getSeriesAllById(old_data.tvdb_id) - .then(localization => { - clearTimeout(reqTimeout); - - data = Object.assign(data, { - synopsis: localization.Overview - }); - - for (let i = 0; i < localization.Episodes.length; i++) { - for (let j = 0; j < data.episodes.length; j++) { - if ( - localization.Episodes[i].id.toString() === - data.episodes[j].tvdb_id.toString() - ) { - data.episodes[j].overview = - localization.Episodes[i].Overview; - break; - } - } - } - - return sanitize(data); - }) - .catch(err => sanitize(data)); - } - } else { - return sanitize(data); - } + return data; + return sanitize(data); }); } } diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 5572665f86..572e870f60 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -97,21 +97,11 @@ }); App.vent.on('audio:lang', this.switchAudio.bind(this)); - var torrents = {}; - this.renameUntitled(); - _.each(this.model.get('episodes'), function (value, currentEpisode) { - if (!torrents[value.season]) { - torrents[value.season] = {}; - } - torrents[value.season][value.episode] = value; - }); - this.model.set('torrents', torrents); - this.model.set('seasonCount', Object.keys(torrents).length); + this.initTorrents(this.model.get('episodes')); }, - renameUntitled: function () { - var episodes = this.model.get('episodes'); - for (var i = 0; i < episodes.length; i++) { + initTorrents: function (episodes) { + for (let i = 0; i < episodes.length; i++) { if (!episodes[i].title) { episodes[i].title = 'Untitled'; } @@ -122,6 +112,15 @@ episodes[i].first_aired = 'Unknown'; } } + let torrents = {}; + _.each(episodes, function (value, currentEpisode) { + if (!torrents[value.season]) { + torrents[value.season] = {}; + } + torrents[value.season][value.episode] = value; + }); + this.model.set('torrents', torrents); + this.model.set('seasonCount', Object.keys(torrents).length); }, initKeyboardShortcuts: function () { @@ -159,7 +158,7 @@ this.ui.bookmarkIcon.removeClass('selected'); } - //this.loadAudioDropdown(); + this.loadAudioDropdown(); this.getRegion('qualitySelector').empty(); $('.star-container-tv,.shmi-imdb,.magnet-icon').tooltip(); var noimg = 'images/posterholder.png'; @@ -402,7 +401,18 @@ AdvSettings.set('ratingStars', $('.number-container-tv').hasClass('hidden')); }, - switchAudio: function(lang) { + switchAudio: async function(lang) { + if (lang === this.model.get('contextLocale')) { + return; + } + $('.spinner').show(); + const provider = this.model.get('providers').torrent; + const data = await provider.contentOnLang(this.model.get('imdb_id'), lang); + this.model.set('contextLocale', data.contextLocale); + this.model.set('episodes', data.episodes); + this.initTorrents(data.episodes); + this.render(); + this.onAttach(); console.info('Audios: ' + lang); }, @@ -418,15 +428,12 @@ loadAudioDropdown: function() { return this.loadDropdown('audio', { title: i18n.__('Audio Language'), - selected: 'ru', - values: { - en: 'xxx', - de: 'xxx', - ru: 'xxx', - } + selected: this.model.get('contextLocale'), + values: _.object(_.map(this.model.get('exist_translations'), (item) => [item, 'data'])), }); }, + // TODO: for subtitles // loadSubDropdown: function() { // return this.loadDropdown('sub', { // title: i18n.__('Subtitle'), diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 1505afa62a..47b967b9fd 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -545,6 +545,18 @@ .sd-seasons[style*="display: none"] + .sd-episodes ul a div max-width: calc(60vw - 100px) - .show-details.active + > .spinner + position: fixed; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5) center center no-repeat; + pointer-events: all; + z-index: 1; + + .loading-container + margin: 180px auto 0px + opacity: .8; + +.show-details.active filter: brightness(50%) blur(4px) pointer-events: none diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 8db8a9587a..389ce83e10 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -55,6 +55,12 @@
+
+
+
+
+
+
<%= i18n.__("Seasons") %>
From 3e27b995462d4db14a44eaa4168121fbf1768ca7 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 12 Jul 2021 01:02:31 +0300 Subject: [PATCH 047/168] fix es verion in lint --- .jshintrc | 2 +- src/app/styl/views/show_detail.styl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.jshintrc b/.jshintrc index 438cc7edc8..b5e2806ef5 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,7 +27,7 @@ "loopfunc" : true, "indent" : 4, "newcap" : false, - "esversion" : 6, + "esversion" : 8, // Globals "globals": { diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 47b967b9fd..23b46b1dd2 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -557,6 +557,6 @@ margin: 180px auto 0px opacity: .8; -.show-details.active + .show-details.active filter: brightness(50%) blur(4px) pointer-events: none From d9e0026fc663f85efc83ed455652f56ca297dbad Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 12 Jul 2021 02:27:20 +0300 Subject: [PATCH 048/168] fix --- src/app/butter-provider/tv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index 65b4ebb888..a4b97a5991 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -53,7 +53,7 @@ class TVApi extends Generic { } detail(torrent_id, old_data, debug) { - return this.contentOnLang(torrent_id, this.contentLanguage); + return this.contentOnLang(torrent_id, old_data.contextLocale); } contentOnLang(torrent_id, lang) { From b1fdadbd96ffc494babfd89218dd80b879b23cc8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 12 Jul 2021 20:32:51 +0300 Subject: [PATCH 049/168] Update show_detail.styl --- src/app/styl/views/show_detail.styl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 23b46b1dd2..7acfe4c895 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -181,6 +181,12 @@ justify-content: space-between white-space: nowrap + .dropdowns-container + margin: -10px -30px 0 0 + + #audio-dropdown .lang-dropdown + background: none + .sha-bookmark float: left cursor: pointer @@ -190,7 +196,7 @@ font-family: $MainFont font-smoothing: antialiased font-size: 12px - line-height: 35px + line-height: 37px &:before content: "\f004" font-family: "Font Awesome 5 Free" @@ -274,7 +280,7 @@ font-family: $MainFont font-smoothing: antialiased font-size: 12px - line-height: 35px + line-height: 37px display: none &:before From 8977a35cbe8737d98a3753ddd8e5588bc3a1bf09 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 12 Jul 2021 20:47:20 +0300 Subject: [PATCH 050/168] support all in content locales --- src/app/butter-provider/movie.js | 11 +++-------- src/app/butter-provider/tv.js | 5 +---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 9b4902e34c..9c88ee4db0 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -17,8 +17,6 @@ class MovieApi extends Generic { movies.forEach(movie => { if (movie.torrents) { - const curLang = movie.torrents[this.contentLanguage] - ? this.contentLanguage : Object.keys(movie.torrents)[0]; results.push({ type: 'movie', imdb_id: movie.imdb_id, @@ -35,9 +33,9 @@ class MovieApi extends Generic { synopsis: movie.synopsis, trailer: movie.trailer !== null ? movie.trailer : false, certification: movie.certification, - torrents: movie.torrents[curLang], + torrents: movie.torrents[movie.contextLocale], langs: movie.torrents, - defaultAudio: curLang, + defaultAudio: movie.contextLocale, locale: movie.locale || null, }); } @@ -60,10 +58,7 @@ class MovieApi extends Generic { }; params.locale = this.language; - params.contentLocale = this.contentLanguage; - if (!this.contentLangOnly && params.contentLocale !== 'en') { - params.contentLocale += ',en'; - } + params.contentLocale = this.contentLangOnly ? this.contentLanguage : 'all'; if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index a4b97a5991..72dc128206 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -24,10 +24,7 @@ class TVApi extends Generic { }; params.locale = this.language; - params.contentLocale = this.contentLanguage; - if (!this.contentLangOnly && params.contentLocale !== 'en') { - params.contentLocale += ',en'; - } + params.contentLocale = this.contentLangOnly ? this.contentLanguage : 'all'; if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } From 432c257e2edaedf074608f696da85136454cb830 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 13 Jul 2021 09:02:16 +0300 Subject: [PATCH 051/168] show-all option --- src/app/butter-provider/movie.js | 6 +++++- src/app/butter-provider/tv.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 9c88ee4db0..387b575ed7 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -58,7 +58,11 @@ class MovieApi extends Generic { }; params.locale = this.language; - params.contentLocale = this.contentLangOnly ? this.contentLanguage : 'all'; + params.contentLocale = this.contentLanguage; + if (!this.contentLangOnly) { + params.showAll = 1; + } + if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index 72dc128206..4eac24b69f 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -24,7 +24,11 @@ class TVApi extends Generic { }; params.locale = this.language; - params.contentLocale = this.contentLangOnly ? this.contentLanguage : 'all'; + params.contentLocale = this.contentLanguage; + if (!this.contentLangOnly) { + params.showAll = 1; + } + if (filters.keywords) { params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); } From c9c2f54e6c740032102a6e24133786593f7c1c37 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 16 Jul 2021 23:22:56 +0300 Subject: [PATCH 052/168] Update about.tpl --- src/app/templates/about.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/about.tpl b/src/app/templates/about.tpl index 7138a358dc..a2d7b6b617 100644 --- a/src/app/templates/about.tpl +++ b/src/app/templates/about.tpl @@ -8,7 +8,7 @@ From 0b64b381a57f9d8b9430bb97ff55c8380e9b111f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Jul 2021 06:42:27 +0000 Subject: [PATCH 053/168] Bump urijs from 1.19.6 to 1.19.7 Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.6 to 1.19.7. - [Release notes](https://github.com/medialize/URI.js/releases) - [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md) - [Commits](https://github.com/medialize/URI.js/compare/v1.19.6...v1.19.7) --- updated-dependencies: - dependency-name: urijs dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d0720c5fce..25c11fb3e0 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "trakt.tv-matcher": "7.x.x", "trakt.tv-ondeck": "7.x.x", "underscore": "1.12.1", - "urijs": "1.19.6", + "urijs": "1.19.7", "video.js": "4.11.4", "videojs-youtube": "1.2.10", "webtorrent": "git+https://github.com/popcorn-time-ru/webtorrent/#pt-fork", diff --git a/yarn.lock b/yarn.lock index 8fb4f1a083..f7969cc25b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7332,10 +7332,10 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urijs@1.19.6, urijs@^1.19.1: - version "1.19.6" - resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.6.tgz#51f8cb17ca16faefb20b9a31ac60f84aa2b7c870" - integrity sha512-eSXsXZ2jLvGWeLYlQA3Gh36BcjF+0amo92+wHPyN1mdR8Nxf75fuEuYTd9c0a+m/vhCjRK0ESlE9YNLW+E1VEw== +urijs@1.19.7, urijs@^1.19.1: + version "1.19.7" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.7.tgz#4f594e59113928fea63c00ce688fb395b1168ab9" + integrity sha512-Id+IKjdU0Hx+7Zx717jwLPsPeUqz7rAtuVBRLLs+qn+J2nf9NGITWVCxcijgYxBqe83C7sqsQPs6H1pyz3x9gA== urix@^0.1.0: version "0.1.0" From f8040af72d40818c26b99fad32f23a26f350e18f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 23 Jul 2021 22:37:21 +0300 Subject: [PATCH 054/168] Update app.js --- src/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.js b/src/app/app.js index ebf4cfdf33..bef235a357 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -307,7 +307,7 @@ win.on('restore', function () { // Now this function is used via global keys (cmd+q and alt+f4) function close() { - $('.spinner').show(); + win.hide(); // If the WebTorrent is destroyed, that means the user has already clicked the close button. // Try to let the WebTorrent destroy from that closure. Even if it fails, the window will close. From e1253828e866a3cd5c09b5c3b1d43cd5b373f490 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 24 Jul 2021 22:48:36 +0300 Subject: [PATCH 055/168] Add source link --- src/app/lib/views/movie_detail.js | 45 +++++++++++++++++++++++++-- src/app/lib/views/play_control.js | 1 + src/app/lib/views/quality-selector.js | 1 - src/app/lib/views/show_detail.js | 23 ++++++++++++++ src/app/styl/views/movie_detail.styl | 2 +- src/app/styl/views/show_detail.styl | 2 +- src/app/templates/movie-detail.tpl | 1 + src/app/templates/show-detail.tpl | 1 + 8 files changed, 71 insertions(+), 5 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index a2119166ea..e261eebcf6 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -25,6 +25,7 @@ 'click .close-icon': 'closeDetails', 'click .movie-imdb-link': 'openIMDb', 'mousedown .magnet-link': 'openMagnet', + 'mousedown .source-link': 'openSource', 'click .rating-container': 'switchRating', 'click .show-cast': 'showCast', 'click .showall-cast': 'showallCast', @@ -70,13 +71,27 @@ App.vent.on('shortcuts:movies', _this.initKeyboardShortcuts); - App.vent.on('change:quality', healthButton.render, this); + App.vent.on('change:quality', _this.onChangeQuality.bind(_this)); // init fields in model this.model.set('displayTitle', ''); this.model.set('displaySynopsis', ''); this.localizeTexts(); }, + onChangeQuality: function (quality) { + this.toggleSourceLink(quality); + healthButton.render(); + }, + + toggleSourceLink: function(quality) { + const torrents = this.model.get('torrents'); + if (torrents[quality].source) { + $('.source-link').show(); + } else { + $('.source-link').hide(); + } + }, + toggleShowQuality: function(e) { if ($(e.currentTarget).hasClass('disabled')) { return; @@ -128,6 +143,7 @@ $('.q1080').removeClass('active'); } + this.toggleSourceLink(quality); win.debug('about to render health button'); healthButton.render(); }, @@ -242,7 +258,7 @@ if (!this.model.get('torrents')) { // no torrents - $('.magnet-link, .health-icon').hide(); + $('.magnet-link, .health-icon, .source-link').hide(); } if (!this.model.get('rating')) { @@ -409,6 +425,31 @@ } else { nw.Shell.openExternal(magnetLink); } + }, + + openSource: function(e) { + var torrent = this.model.get('torrents')[this.model.get('quality')], + sourceLink; + + if (torrent.source) { + // Movies + sourceLink = torrent.source.replace(/\&/g, '&'); + } else { + return; + } + if (e.button === 2) { + //if right click on magnet link + var clipboard = nw.Clipboard.get(); + clipboard.set(sourceLink, 'text'); //copy link to clipboard + $('.notification_alert') + .text(i18n.__('The source link was copied to the clipboard')) + .fadeIn('fast') + .delay(2500) + .fadeOut('fast'); + } else { + nw.Shell.openExternal(sourceLink); + } } + }); })(window.App); diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index 12926398c7..bbc9f75556 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -72,6 +72,7 @@ setQuality: function(torrent, key) { _this.model.set('quality', key); + App.vent.trigger('change:quality', key); }, hideUnused: function() { diff --git a/src/app/lib/views/quality-selector.js b/src/app/lib/views/quality-selector.js index 60569b4a1f..2328e60db3 100644 --- a/src/app/lib/views/quality-selector.js +++ b/src/app/lib/views/quality-selector.js @@ -45,7 +45,6 @@ sortedTorrents[key] = torrents[key]; } - console.log(sortedTorrents); this.model.set('sortedTorrents', sortedTorrents); this.render(); this.initQuality(); diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 572e870f60..e032f31e88 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -28,6 +28,7 @@ 'click .tab-episode': 'clickEpisode', 'click .shmi-imdb': 'openIMDb', 'mousedown .magnet-icon': 'openMagnet', + 'mousedown .source-icon': 'openSource', 'dblclick .tab-episode': 'dblclickEpisode', 'click .playerchoicemenu li a': 'selectPlayer', 'click .shmi-rating': 'switchRating', @@ -395,6 +396,17 @@ } }, + openSource: function (e) { + var torrentUrl = $('.startStreaming').attr('data-source'); + if (e.button === 2) { //if right click on magnet link + var clipboard = nw.Clipboard.get(); + clipboard.set(torrentUrl, 'text'); //copy link to clipboard + $('.notification_alert').text(i18n.__('The magnet link was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + } else { + nw.Shell.openExternal(torrentUrl); + } + }, + switchRating: function () { $('.number-container-tv').toggleClass('hidden'); $('.star-container-tv').toggleClass('hidden'); @@ -733,11 +745,13 @@ var downloadButton = $('#download-torrent'); startStreaming.attr('data-file', torrent.file || ''); startStreaming.attr('data-torrent', torrent.url); + startStreaming.attr('data-source', torrent.source); startStreaming.attr('data-quality', key); downloadButton.attr('data-torrent', torrent.url); downloadButton.attr('data-file', torrent.file || ''); _this.resetTorrentHealth(); + _this.toggleSourceLink(); }, toggleQuality: function (e) { @@ -881,6 +895,15 @@ healthButton.render(); }, + toggleSourceLink: function () { + const sourceURL = $('.startStreaming').attr('data-source'); + if (sourceURL) { + $('.source-icon').show(); + } else { + $('.source-icon').hide(); + } + }, + selectPlayer: function (e) { var player = $(e.currentTarget).parent('li').attr('id').replace('player-', ''); _this.model.set('device', player); diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index e6fdaca2b5..03c4fadd0e 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -197,7 +197,7 @@ &.Excellent color: #2ad942 - .magnet-link + .magnet-link, .source-link position: relative font-size: 13px float: right diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 7acfe4c895..3d6303bda1 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -467,7 +467,7 @@ &.Excellent color: #2ad942 - .magnet-icon + .magnet-icon, .source-icon font-size: 13px color: #DDD diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 635c18884b..4297e6b204 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -54,6 +54,7 @@ if (genre) {
" class="fa fa-circle health-icon <%= health %>">
" class="fa fa-magnet magnet-link">
+
" class="fa fa-external-link-alt source-link">
diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 389ce83e10..02de975f2a 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -106,6 +106,7 @@
From 81ad89610dd23cd0a5bfe169d95ddfdca3685118 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 25 Jul 2021 13:45:04 +0300 Subject: [PATCH 056/168] update time lib and some improovement with time zones and locale --- .jshintrc | 5 +- package.json | 2 +- src/app/.jshintrc | 2 +- src/app/database.js | 2 - src/app/global.js | 4 ++ src/app/language.js | 3 ++ src/app/lib/providers/watchlist.js | 80 ++++++++++-------------------- src/app/lib/views/seedbox.js | 2 +- src/app/lib/views/show_detail.js | 2 +- src/app/styl/views/seedbox.styl | 5 -- src/app/templates/seedbox.tpl | 2 +- yarn.lock | 10 ++-- 12 files changed, 44 insertions(+), 75 deletions(-) diff --git a/.jshintrc b/.jshintrc index b5e2806ef5..efa8eff54e 100644 --- a/.jshintrc +++ b/.jshintrc @@ -21,7 +21,6 @@ "quotmark" : "single", "trailing" : true, "sub" : true, - "trailing" : true, "undef" : true, "laxbreak" : true, "loopfunc" : true, @@ -56,7 +55,7 @@ "inherits": true, "Q": true, "os": true, - "moment": true, + "dayjs": true, "crypt": true, "semver": true, "fs": true, @@ -75,7 +74,6 @@ "url": true, "tls": true, "http": true, - "request": true, "querystring": true, "URI": true, "child": true, @@ -91,7 +89,6 @@ "Backbone": true, "Marionette": true, "Mousetrap": true, - "_": true, "request": true, "videojs": true, "vjs": true, diff --git a/package.json b/package.json index 25c11fb3e0..b9020016ab 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "butter-sanitize": "^0.1.1", "butter-settings-popcorntime.app": "0.0.6", "chromecast-api": "0.3.4", + "dayjs": "^1.10.6", "defer-request": "0.0.3", "dlnacasts2": "0.2.0", "edit-json-file": "^1.4.1", @@ -71,7 +72,6 @@ "lodash": "^4.17.19", "memoizee": "0.x.x", "mkdirp": "*", - "moment": ">=2.22.2", "mousetrap": "~1.6.2", "mv": "2.x.x", "nedb": "1.8.0", diff --git a/src/app/.jshintrc b/src/app/.jshintrc index d3ff22f0e6..2dc7935a45 100644 --- a/src/app/.jshintrc +++ b/src/app/.jshintrc @@ -54,7 +54,7 @@ "inherits": true, "Q": true, "os": true, - "moment": true, + "dayjs": true, "crypt": true, "semver": true, "fs": true, diff --git a/src/app/database.js b/src/app/database.js index f0e2ff47b4..403d4694c9 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -5,8 +5,6 @@ var Datastore = require('nedb'), var startupTime = window.performance.now(); console.debug('Database path: ' + data_path); -process.env.TZ = 'America/New_York'; // set same api tz - db.bookmarks = new Datastore({ filename: path.join(data_path, 'data/bookmarks.db'), autoload: true diff --git a/src/app/global.js b/src/app/global.js index 23aab7d922..256d2aac91 100644 --- a/src/app/global.js +++ b/src/app/global.js @@ -6,6 +6,7 @@ var _ = require('underscore'), // Machine readable os = require('os'), moment = require('moment'), + dayjs = require('dayjs'), crypt = require('crypto'), semver = require('semver'), // Files @@ -47,3 +48,6 @@ var _ = require('underscore'), extPlayerlst = '', // setting default filters status curSetDefaultFilters = false; + +dayjs.extend(require('dayjs/plugin/relativeTime')); +dayjs.extend(require('dayjs/plugin/localizedFormat')); diff --git a/src/app/language.js b/src/app/language.js index 662c2484c4..01e65697a7 100644 --- a/src/app/language.js +++ b/src/app/language.js @@ -22,6 +22,9 @@ var setLanguage = function (preferredLanguage) { $el.text(i18n.__(key)); } }); + + require('dayjs/locale/' + Settings.language); + dayjs.locale(Settings.language); }; App.Localization.nativeName = function (lang) { diff --git a/src/app/lib/providers/watchlist.js b/src/app/lib/providers/watchlist.js index de9ea79aa8..a0679bce92 100644 --- a/src/app/lib/providers/watchlist.js +++ b/src/app/lib/providers/watchlist.js @@ -61,60 +61,32 @@ return Promise.all( items.map(function(item) { if (item.next_episode) { - if ( - moment(item.next_episode.first_aired) - .fromNow() - .indexOf('in') !== -1 - ) { - console.log( - '"%s" is not released yet, not showing', - item.show.title + - ' ' + - item.next_episode.season + - 'x' + - item.next_episode.number - ); - } else { - var show = item.show; - show.type = 'show'; - show.episode = item.next_episode.number; - show.season = item.next_episode.season; - show.episode_title = item.next_episode.title; - show.episode_id = item.next_episode.ids.tvdb; - show.episode_aired = item.next_episode.first_aired; - show.imdb_id = item.show.ids.imdb; - show.tvdb_id = item.show.ids.tvdb; - show.rating = item.show.rating; - show.title = item.show.title; - show.trailer = item.show.trailer; - show.unseen = item.unseen; - - itemList.push(show); - } - } else { - if (item.movie) { - if ( - moment(item.movie.released) - .fromNow() - .indexOf('in') !== -1 - ) { - console.log( - '"%s" is not released yet, not showing', - item.movie.title - ); - } else { - var movie = item.movie; - movie.type = 'movie'; - movie.listed_at = item.listed_at; - movie.imdb_id = item.movie.ids.imdb; - movie.rating = item.movie.rating; - movie.title = item.movie.title; - movie.trailer = item.movie.trailer; - movie.year = item.movie.year; - - itemList.push(movie); - } - } + var show = item.show; + show.type = 'show'; + show.episode = item.next_episode.number; + show.season = item.next_episode.season; + show.episode_title = item.next_episode.title; + show.episode_id = item.next_episode.ids.tvdb; + show.episode_aired = item.next_episode.first_aired; + show.imdb_id = item.show.ids.imdb; + show.tvdb_id = item.show.ids.tvdb; + show.rating = item.show.rating; + show.title = item.show.title; + show.trailer = item.show.trailer; + show.unseen = item.unseen; + + itemList.push(show); + } else if (item.movie) { + var movie = item.movie; + movie.type = 'movie'; + movie.listed_at = item.listed_at; + movie.imdb_id = item.movie.ids.imdb; + movie.rating = item.movie.rating; + movie.title = item.movie.title; + movie.trailer = item.movie.trailer; + movie.year = item.movie.year; + + itemList.push(movie); } }) ) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 08cef2c344..16050d8a0e 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -377,7 +377,7 @@ torrent.name ? $('.seedbox-infos-title').text(torrent.name) : $('.seedbox-infos-title').text(i18n.__('connecting')); $('.seedbox-downloaded').text(' ' + formatBytes(torrent.downloaded)); $('.seedbox-uploaded').text(' ' + formatBytes(torrent.uploaded)); - try { $('.seedbox-infos-date').text(stats.ctime); } catch(err) {} + try { $('.seedbox-infos-date').text(dayjs(stats.ctime).fromNow()); } catch(err) {} $('.progress-bar').css('width', (torrent.progress * 100).toFixed(2) + '%'); $('.progress-percentage>span').text((torrent.progress * 100).toFixed(2) + '%'); if (torrent.progress >= 1) { diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 572e870f60..ac8c252810 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -703,7 +703,7 @@ }); _this.getRegion('qualitySelector').show(qualitySelector); - var first_aired = selectedEpisode.first_aired ? moment.unix(selectedEpisode.first_aired).locale(Settings.language).format('LLLL') : ''; + var first_aired = selectedEpisode.first_aired ? dayjs.unix(selectedEpisode.first_aired).locale(Settings.language).format('LLLL') : ''; var synopsis = $('.sdoi-synopsis'); var startStreaming = $('.startStreaming'); var localize = this.localizeEpisode(selectedEpisode); diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 7d8182da7a..1f22dacc2d 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -240,11 +240,6 @@ margin-bottom: 10px color: $ShowText2 - .seedbox-infos-date - overflow: hidden - white-space: nowrap - text-overflow: ellipsis - .seedbox-infos-synopsis color: $ShowText1 font-size: 13px diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 27dc8922ee..317991a0bb 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -22,7 +22,7 @@
-
+
diff --git a/yarn.lock b/yarn.lock index f7969cc25b..a9f0baff9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1683,6 +1683,11 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= +dayjs@^1.10.6: + version "1.10.6" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.6.tgz#288b2aa82f2d8418a6c9d4df5898c0737ad02a63" + integrity sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw== + debug@*, debug@4, debug@^4.0.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -4699,11 +4704,6 @@ module-not-found-error@^1.0.0: resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0" integrity sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA= -moment@>=2.22.2: - version "2.29.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" - integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== - mousetrap@~1.6.2: version "1.6.5" resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.5.tgz#8a766d8c272b08393d5f56074e0b5ec183485bf9" From a44a4a4ee7ed7343340d12f76fe227467050588a Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 18:59:23 +0300 Subject: [PATCH 057/168] Update movie-detail.tpl --- src/app/templates/movie-detail.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 4297e6b204..8995a62622 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -54,7 +54,7 @@ if (genre) {
" class="fa fa-circle health-icon <%= health %>">
" class="fa fa-magnet magnet-link">
-
" class="fa fa-external-link-alt source-link">
+
" class="fas fa-link source-link">
From 778784680eab5c1a4890cbd0480b4596c75fbfe5 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 18:59:52 +0300 Subject: [PATCH 058/168] Update show-detail.tpl --- src/app/templates/show-detail.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 02de975f2a..af74828350 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -106,7 +106,7 @@
From 94b4317d92002238ea8c0b619b26563d59b2d538 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:02:06 +0300 Subject: [PATCH 059/168] Update movie_detail.styl --- src/app/styl/views/movie_detail.styl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index 03c4fadd0e..04cd069755 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -197,7 +197,7 @@ &.Excellent color: #2ad942 - .magnet-link, .source-link + .magnet-link position: relative font-size: 13px float: right @@ -208,6 +208,17 @@ color: #FFF transition: all .5s + .source-link + position: relative + font-size: 13px + float: right + margin-right: 12px + color: #DDD + cursor: pointer + &:hover + color: #FFF + transition: all .5s + .overview position: relative height: 55% From e3aeac00c892f3679d2a85ce36e13b7864a04a2f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:12:37 +0300 Subject: [PATCH 060/168] Update show_detail.styl --- src/app/styl/views/show_detail.styl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 3d6303bda1..ef34a93f1b 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -449,7 +449,7 @@ margin-top: -6px &>div - padding: 5px 2px + padding: 5px 3px cursor: pointer position: relative @@ -467,7 +467,7 @@ &.Excellent color: #2ad942 - .magnet-icon, .source-icon + .magnet-icon font-size: 13px color: #DDD @@ -475,6 +475,15 @@ color: #FFF transition: all .5s + .source-icon + font-size: 13px + color: #DDD + margin-right: 2px + + &:hover + color: #FFF + transition: all .5s + .sdoi-aired font-size: 12px line-height: 15px From edd9df9e6451289fee4da2ee0713af38556543a6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:26:23 +0300 Subject: [PATCH 061/168] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 1f22dacc2d..7d8182da7a 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -240,6 +240,11 @@ margin-bottom: 10px color: $ShowText2 + .seedbox-infos-date + overflow: hidden + white-space: nowrap + text-overflow: ellipsis + .seedbox-infos-synopsis color: $ShowText1 font-size: 13px From 3d31c7b756eee95a3f9e75a89f5512bb2efbe6af Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 25 Jul 2021 19:27:40 +0300 Subject: [PATCH 062/168] fix --- src/app/global.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/global.js b/src/app/global.js index 256d2aac91..912d980d64 100644 --- a/src/app/global.js +++ b/src/app/global.js @@ -5,7 +5,6 @@ var _ = require('underscore'), Q = require('q'), // Machine readable os = require('os'), - moment = require('moment'), dayjs = require('dayjs'), crypt = require('crypto'), semver = require('semver'), From 6ffc782bbcfd7b1401ef018c431c6a00e415742d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:40:51 +0300 Subject: [PATCH 063/168] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 7d8182da7a..cbac392e6d 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -251,7 +251,7 @@ line-height: 18px text-align: justify margin-top: 10px - padding: 2px 15px 5px 0 + padding: 4px 15px 5px 0 height: calc(100vh - 334px) scrollable() From e696ea80dfebc5a77df8545e14a782b01f1dcbdb Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:48:52 +0300 Subject: [PATCH 064/168] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index cbac392e6d..0d5a05ade2 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -241,6 +241,7 @@ color: $ShowText2 .seedbox-infos-date + margin-left: 5px overflow: hidden white-space: nowrap text-overflow: ellipsis From dffba09bb6a1e25c43b57259c9f35536084414fd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:55:07 +0300 Subject: [PATCH 065/168] Update seedbox.js --- src/app/lib/views/seedbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 16050d8a0e..fd43ba3e40 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -377,7 +377,7 @@ torrent.name ? $('.seedbox-infos-title').text(torrent.name) : $('.seedbox-infos-title').text(i18n.__('connecting')); $('.seedbox-downloaded').text(' ' + formatBytes(torrent.downloaded)); $('.seedbox-uploaded').text(' ' + formatBytes(torrent.uploaded)); - try { $('.seedbox-infos-date').text(dayjs(stats.ctime).fromNow()); } catch(err) {} + try { $('.seedbox-infos-date').text(i18n.__('added') + ' ' + dayjs(stats.ctime).fromNow()); } catch(err) {} $('.progress-bar').css('width', (torrent.progress * 100).toFixed(2) + '%'); $('.progress-percentage>span').text((torrent.progress * 100).toFixed(2) + '%'); if (torrent.progress >= 1) { From 11c7fad76122acd6cc938ba0fdeed92e297a6924 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:56:12 +0300 Subject: [PATCH 066/168] Update en.json --- src/app/language/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 7ea18ec36c..2b8b8a71ec 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -566,5 +566,6 @@ "Translate Posters": "Translate Posters", "Translate Episode Titles": "Translate Episode Titles", "Only show content available in the preferred language": "Only show content available in the preferred language", - "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers" + "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", + "added": "added" } From f9e7284b2f03c110f210d8ed4a0c171341eab83d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 25 Jul 2021 22:31:20 +0300 Subject: [PATCH 067/168] Fix Source link tooltip --- src/app/language/en.json | 3 ++- src/app/lib/views/play_control.js | 2 +- src/app/lib/views/show_detail.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 2b8b8a71ec..5331aac243 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -567,5 +567,6 @@ "Translate Episode Titles": "Translate Episode Titles", "Only show content available in the preferred language": "Only show content available in the preferred language", "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", - "added": "added" + "added": "added", + "Source link": "Source link" } diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index bbc9f75556..3aec1f50f7 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -135,7 +135,7 @@ }, setUiStates: function() { - $('.star-container,.movie-imdb-link,.q720,input,.magnet-link,.show-cast').tooltip({ + $('.star-container,.movie-imdb-link,.q720,input,.magnet-link,.source-link,.show-cast').tooltip({ html: true }); diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index dbd487c1cd..3aa593bd84 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -161,7 +161,7 @@ this.loadAudioDropdown(); this.getRegion('qualitySelector').empty(); - $('.star-container-tv,.shmi-imdb,.magnet-icon').tooltip(); + $('.star-container-tv,.shmi-imdb,.magnet-icon,.source-icon').tooltip(); var noimg = 'images/posterholder.png'; var nobg = 'images/bg-header.jpg'; var images = this.model.get('images'); From 2dae745513517766b57c436821b9ec76429d578b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 26 Jul 2021 00:28:59 +0300 Subject: [PATCH 068/168] Update show_detail.js --- src/app/lib/views/show_detail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 3aa593bd84..82359679e3 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -401,7 +401,7 @@ if (e.button === 2) { //if right click on magnet link var clipboard = nw.Clipboard.get(); clipboard.set(torrentUrl, 'text'); //copy link to clipboard - $('.notification_alert').text(i18n.__('The magnet link was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + $('.notification_alert').text(i18n.__('The source link was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); } else { nw.Shell.openExternal(torrentUrl); } From e75f493a3e636649c418926714d9a58562ff05a6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 26 Jul 2021 00:30:35 +0300 Subject: [PATCH 069/168] Update en.json --- src/app/language/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 5331aac243..504c640843 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -568,5 +568,6 @@ "Only show content available in the preferred language": "Only show content available in the preferred language", "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", "added": "added", - "Source link": "Source link" + "Source link": "Source link", + "The source link was copied to the clipboard": "The source link was copied to the clipboard" } From 78f3d473b6e6037af68e84ee0adbd25b3054bc33 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 26 Jul 2021 15:54:01 +0300 Subject: [PATCH 070/168] Add Source link for YTS provider --- src/app/butter-provider/yts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/butter-provider/yts.js b/src/app/butter-provider/yts.js index c10f313b79..fb27b5d75c 100644 --- a/src/app/butter-provider/yts.js +++ b/src/app/butter-provider/yts.js @@ -19,6 +19,7 @@ class YTSApi extends Generic { torrents[torrent.quality] = { url: torrent.url, magnet: `magnet:?xt=urn:btih:${torrent.hash}`, + source: movie.url, size: torrent.size_bytes, filesize: torrent.size, seed: torrent.seeds, From 19b09b47fa949d0cbd257c2b8a0d57923f8e549f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:59:27 +0300 Subject: [PATCH 071/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 32655a5174..d77d6f5c08 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -487,6 +487,7 @@ if (AdvSettings.get('startScreen') === 'Torrent-collection') { $('select[name=start_screen]').change(); } + scrollPos = value ? scrollPos + 40 : scrollPos - 40; break; case 'moviesTabEnable': App.vent.trigger('favorites:list'); @@ -526,6 +527,7 @@ if (AdvSettings.get('startScreen') === 'Seedbox') { $('select[name=start_screen]').change(); } + scrollPos = value ? scrollPos + 40 : scrollPos - 40; break; case 'separateDownloadsDir': if (value) { From cd6adf8445ece612dadba518b82e102e4a748aa7 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 3 Aug 2021 12:54:39 +0300 Subject: [PATCH 072/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index d77d6f5c08..2a92183f6b 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -536,8 +536,13 @@ fs.mkdir(torrent_cache_dir2, function (err) {}); } } - /* falls through */ + scrollPos = value ? scrollPos + 40 : scrollPos - 40; + $('.nav-hor.left li:first').click(); + App.vent.trigger('settings:show'); + break; case 'deleteTmpOnClose': + scrollPos = !value ? scrollPos + 40 : scrollPos - 40; + /* falls through */ case 'activateTempf': case 'multipleExtSubtitles': case 'torColSearchMore': From 9de18af6da954b2d1ac7679344a07e340cef23d1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 3 Aug 2021 13:16:05 +0300 Subject: [PATCH 073/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 2a92183f6b..4af294a934 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -411,6 +411,7 @@ syncSetting: function (setting, value) { let scrollPos = that.$el.scrollTop(); + let scrollPosOffset = 0; switch (setting) { case 'coversShowRating': if (value) { @@ -487,7 +488,7 @@ if (AdvSettings.get('startScreen') === 'Torrent-collection') { $('select[name=start_screen]').change(); } - scrollPos = value ? scrollPos + 40 : scrollPos - 40; + value ? scrollPosOffset++ : scrollPosOffset--; break; case 'moviesTabEnable': App.vent.trigger('favorites:list'); @@ -527,7 +528,7 @@ if (AdvSettings.get('startScreen') === 'Seedbox') { $('select[name=start_screen]').change(); } - scrollPos = value ? scrollPos + 40 : scrollPos - 40; + value ? scrollPosOffset++ : scrollPosOffset--; break; case 'separateDownloadsDir': if (value) { @@ -536,12 +537,12 @@ fs.mkdir(torrent_cache_dir2, function (err) {}); } } - scrollPos = value ? scrollPos + 40 : scrollPos - 40; + value ? scrollPosOffset++ : scrollPosOffset--; $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; case 'deleteTmpOnClose': - scrollPos = !value ? scrollPos + 40 : scrollPos - 40; + !value ? scrollPosOffset++ : scrollPosOffset--; /* falls through */ case 'activateTempf': case 'multipleExtSubtitles': @@ -573,6 +574,9 @@ default: } if (that.$el.scrollTop() !== scrollPos) { + if (scrollPosOffset) { + scrollPos = scrollPos + scrollPosOffset * 40; + } that.$el.scrollTop(scrollPos); } }, From 2233c7f0a884979d826feb5286d1ce118f45790e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 3 Aug 2021 13:43:49 +0300 Subject: [PATCH 074/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 4af294a934..8c292a3e22 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -537,12 +537,16 @@ fs.mkdir(torrent_cache_dir2, function (err) {}); } } - value ? scrollPosOffset++ : scrollPosOffset--; + if (Settings.deleteTmpOnClose) { + value ? scrollPosOffset++ : scrollPosOffset--; + } $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; case 'deleteTmpOnClose': - !value ? scrollPosOffset++ : scrollPosOffset--; + if (!Settings.separateDownloadsDir) { + !value ? scrollPosOffset++ : scrollPosOffset--; + } /* falls through */ case 'activateTempf': case 'multipleExtSubtitles': From be69c7e7ca21222a24a5cfcf92fa64a3a6cd00d1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 4 Aug 2021 21:58:14 +0300 Subject: [PATCH 075/168] Sourcelink tooltip fix --- src/app/language/en.json | 1 - src/app/lib/views/movie_detail.js | 6 +++--- src/app/lib/views/show_detail.js | 2 +- src/app/templates/movie-detail.tpl | 2 +- src/app/templates/show-detail.tpl | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 504c640843..2d5e2b9df9 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -568,6 +568,5 @@ "Only show content available in the preferred language": "Only show content available in the preferred language", "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", "added": "added", - "Source link": "Source link", "The source link was copied to the clipboard": "The source link was copied to the clipboard" } diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index e261eebcf6..449b20f34f 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -84,9 +84,9 @@ }, toggleSourceLink: function(quality) { - const torrents = this.model.get('torrents'); - if (torrents[quality].source) { - $('.source-link').show(); + const sourceURL = this.model.get('torrents')[this.model.get('quality')].source; + if (sourceURL) { + $('.source-link').show().attr('data-original-title', sourceURL.split('//').pop().split('/')[0]); } else { $('.source-link').hide(); } diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 82359679e3..325d28a30a 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -898,7 +898,7 @@ toggleSourceLink: function () { const sourceURL = $('.startStreaming').attr('data-source'); if (sourceURL) { - $('.source-icon').show(); + $('.source-icon').show().attr('data-original-title', sourceURL.split('//').pop().split('/')[0]); } else { $('.source-icon').hide(); } diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 8995a62622..d77e72ff92 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -54,7 +54,7 @@ if (genre) {
" class="fa fa-circle health-icon <%= health %>">
" class="fa fa-magnet magnet-link">
-
" class="fas fa-link source-link">
+
diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index af74828350..dc84df833d 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -106,7 +106,7 @@
From d1b4481eb19f3bfb8e690b557a3dde3e1315db5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Aug 2021 23:20:33 +0000 Subject: [PATCH 076/168] Bump tar from 4.4.8 to 4.4.15 Bumps [tar](https://github.com/npm/node-tar) from 4.4.8 to 4.4.15. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.8...v4.4.15) --- updated-dependencies: - dependency-name: tar dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b9020016ab..be525ad1bc 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "send": "0.16.x", "socks-proxy-agent": "^5.0.0", "srt-to-vtt": "^1.1", - "tar": "4.4.8", + "tar": "4.4.15", "torrentcollection4": "0.0.9", "trakt.tv": "7.x.x", "trakt.tv-images": "5.x.x", diff --git a/yarn.lock b/yarn.lock index a9f0baff9a..c61d944107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4659,7 +4659,7 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.3.4, minipass@^2.6.0, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -4667,7 +4667,7 @@ minipass@^2.3.4, minipass@^2.6.0, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.1: +minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -6833,18 +6833,18 @@ tar-stream@^1.1.2, tar-stream@^1.5.0: to-buffer "^1.1.1" xtend "^4.0.0" -tar@4.4.8: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== +tar@4.4.15: + version "4.4.15" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" + integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== dependencies: chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" + minipass "^2.8.6" + minizlib "^1.2.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" - yallist "^3.0.2" + yallist "^3.0.3" "temp@github:adam-lynch/node-temp#remove_tmpdir_dep": version "0.8.3" @@ -7849,7 +7849,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 607cb831b3c384bf2d3bc900c9ce72b7602133eb Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 10 Aug 2021 19:26:42 +0300 Subject: [PATCH 077/168] Add Max Download / Upload speed options (#2265) --- src/app/app.js | 10 ++++++---- src/app/language/en.json | 3 ++- src/app/lib/streamer.js | 10 ++++++---- src/app/lib/views/main_window.js | 12 ++++++++++++ src/app/lib/views/settings_container.js | 13 +++++++++++++ src/app/settings.js | 2 ++ src/app/templates/settings-container.tpl | 11 ++++++++--- 7 files changed, 49 insertions(+), 12 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index bef235a357..d22a56980b 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -94,10 +94,12 @@ App.db = Database; App.advsettings = AdvSettings; App.settings = Settings; App.WebTorrent = new WebTorrent({ - maxConns: parseInt(Settings.connectionLimit, 10) || 55, - dht: true, - secure: Settings.protocolEncryption || false, - tracker: { + maxConns : parseInt(Settings.connectionLimit, 10) || 55, + downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, + uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, + dht : true, + secure : Settings.protocolEncryption || false, + tracker : { announce: Settings.trackers.forced } }); diff --git a/src/app/language/en.json b/src/app/language/en.json index 2d5e2b9df9..e4ccc997b1 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -568,5 +568,6 @@ "Only show content available in the preferred language": "Only show content available in the preferred language", "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", "added": "added", - "The source link was copied to the clipboard": "The source link was copied to the clipboard" + "The source link was copied to the clipboard": "The source link was copied to the clipboard", + "Max. Down / Up Speed": "Max. Down / Up Speed" } diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index e2e413568e..14e655938f 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -183,10 +183,12 @@ } else { App.WebTorrent.destroy(); App.WebTorrent = new WebTorrent({ - maxConns : parseInt(Settings.connectionLimit, 10) || 55, - dht : true, - secure : Settings.protocolEncryption || false, - tracker : { + maxConns : parseInt(Settings.connectionLimit, 10) || 55, + downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, + uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, + dht : true, + secure : Settings.protocolEncryption || false, + tracker : { announce: Settings.trackers.forced } }); diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 9d26db21ef..dd47d344fe 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -287,6 +287,18 @@ $('link#theme').attr('href', 'themes/' + Settings.theme + '.css'); + // initialize WebTorrent + App.WebTorrent = new WebTorrent({ + maxConns : parseInt(Settings.connectionLimit, 10) || 55, + downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, + uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, + dht : true, + secure : Settings.protocolEncryption || false, + tracker : { + announce: Settings.trackers.forced + } + }); + // focus win. also handles AlwaysOnTop App.vent.trigger('window:focus'); diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 8c292a3e22..b468a70958 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -340,6 +340,17 @@ case 'maxActiveTorrents': value = field.val(); break; + case 'downloadLimit': + case 'uploadLimit': + var nvalue = field.val().replace(/[^0-9|-]/gi, ''); + if (nvalue <= 0) { + nvalue = ''; + } else { + nvalue = nvalue + ' KB/s'; + } + field.val(nvalue); + value = nvalue; + break; case 'bigPicture': var nvalue = field.val().replace(/[^0-9]/gi, ''); if (nvalue === '') { @@ -435,6 +446,8 @@ } break; case 'protocolEncryption': + case 'downloadLimit': + case 'uploadLimit': this.alertMessageSuccess(true); break; case 'contentLanguage': diff --git a/src/app/settings.js b/src/app/settings.js index fc460f3905..d748bdaf17 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -177,6 +177,8 @@ Settings.opensubtitlesPassword = ''; // Advanced options Settings.connectionLimit = 55; +Settings.downloadLimit = ''; +Settings.uploadLimit = ''; Settings.streamPort = 0; // 0 = Random Settings.protocolEncryption = false; Settings.tmpLocation = path.join(os.tmpdir(), Settings.projectName); diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 6b04117f96..952c460780 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -628,8 +628,9 @@ -

<%= i18n.__("Port to stream on") %>

-    <%= i18n.__("0 = Random") %> +

<%= i18n.__("Max. Down / Up Speed") %>

+ +

<%= i18n.__("Overall Ratio") %>

@@ -639,7 +640,11 @@ return ratio; } %> -    <%= Common.fileSize(Settings.totalDownloaded) %><%= Common.fileSize(Settings.totalUploaded) %> +     <%= Common.fileSize(Settings.totalDownloaded) %><%= Common.fileSize(Settings.totalUploaded) %> +
+ +

<%= i18n.__("Port to stream on") %>

+    <%= i18n.__("0 = Random") %>
<% if (Settings.activateSeedbox && (!Settings.deleteTmpOnClose || Settings.separateDownloadsDir)) { %> From cc015bc08eb5fccc53ed9867407ef71cefbfcff2 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 10 Aug 2021 22:31:44 +0300 Subject: [PATCH 078/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 952c460780..e636aa228a 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -184,7 +184,7 @@

<%= i18n.__("UI Scaling") %>

-    <%= i18n.__("25% - 400%") %> +    <%= i18n.__("25% - 400%") %>
> @@ -620,12 +620,12 @@ <% if (Settings.activateSeedbox) { %>

<%= i18n.__("Active Torrents Limit") %>

- +
<% } %>

<%= i18n.__("Connection Limit") %>

- +

<%= i18n.__("Max. Down / Up Speed") %>

From 2be89f7715d0d4ba05bee0e255e2b3177b9ad507 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 10 Aug 2021 22:41:40 +0300 Subject: [PATCH 079/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index e636aa228a..af08f21f22 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -249,7 +249,7 @@
- * <%= i18n.__("Translations depend on availability. Also some options might not be supported by some API servers") %> + * <%= i18n.__("Translations depend on availability. Some options also might not be supported by all API servers") %>
From c5d38112b13aec410d334cacf2b90ac059a0305e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 10 Aug 2021 22:42:20 +0300 Subject: [PATCH 080/168] Update en.json --- src/app/language/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index e4ccc997b1..70998e9825 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -566,7 +566,7 @@ "Translate Posters": "Translate Posters", "Translate Episode Titles": "Translate Episode Titles", "Only show content available in the preferred language": "Only show content available in the preferred language", - "Translations depend on availability. Also some options might not be supported by some API servers": "Translations depend on availability. Also some options might not be supported by some API servers", + "Translations depend on availability. Some options also might not be supported by all API servers": "Translations depend on availability. Some options also might not be supported by all API servers", "added": "added", "The source link was copied to the clipboard": "The source link was copied to the clipboard", "Max. Down / Up Speed": "Max. Down / Up Speed" From 369709eb513c3a8aa3e2359a4cc9305b70173f4e Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 11 Aug 2021 10:59:56 +0300 Subject: [PATCH 081/168] update webtorrent and fix speed limit --- src/app/database.js | 8 +- src/app/lib/views/main_window.js | 12 - src/app/lib/views/settings_container.js | 20 +- yarn.lock | 372 +++++++++++++++--------- 4 files changed, 246 insertions(+), 166 deletions(-) diff --git a/src/app/database.js b/src/app/database.js index 403d4694c9..0afc12c6da 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -422,12 +422,11 @@ var Database = { .then(function () { // set app language window.setLanguage(Settings.language); + // set content language + App.Providers.updateLanguage(Settings.language, Settings.contentLanguage || Settings.language, Settings.contentLangOnly); // set hardware settings and usefull stuff return AdvSettings.setup(); }) - .then(function () { - App.Providers.updateLanguage(Settings.language, Settings.contentLanguage || Settings.language, Settings.contentLangOnly); - }) .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); @@ -445,6 +444,9 @@ var Database = { // enable secure after load options require('webtorrent/lib/peer.js').enableSecure(); } + App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * 1024 || -1); + App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * 1024 || -1); + App.WebTorrent.maxConns = parseInt(Settings.connectionLimit, 10) || 55; }) .catch(function (err) { win.error('Error starting up', err); diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index dd47d344fe..9d26db21ef 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -287,18 +287,6 @@ $('link#theme').attr('href', 'themes/' + Settings.theme + '.css'); - // initialize WebTorrent - App.WebTorrent = new WebTorrent({ - maxConns : parseInt(Settings.connectionLimit, 10) || 55, - downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, - uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, - dht : true, - secure : Settings.protocolEncryption || false, - tracker : { - announce: Settings.trackers.forced - } - }); - // focus win. also handles AlwaysOnTop App.vent.trigger('window:focus'); diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index b468a70958..bdf5e1699a 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -342,17 +342,17 @@ break; case 'downloadLimit': case 'uploadLimit': - var nvalue = field.val().replace(/[^0-9|-]/gi, ''); - if (nvalue <= 0) { - nvalue = ''; + let numvalue = field.val().replace(/[^0-9|-]/gi, ''); + if (numvalue <= 0) { + numvalue = ''; } else { - nvalue = nvalue + ' KB/s'; + numvalue = numvalue + ' KB/s'; } - field.val(nvalue); - value = nvalue; + field.val(numvalue); + value = numvalue; break; case 'bigPicture': - var nvalue = field.val().replace(/[^0-9]/gi, ''); + let nvalue = field.val().replace(/[^0-9]/gi, ''); if (nvalue === '') { nvalue = AdvSettings.get('bigPicture'); } else if (nvalue < 25) { @@ -446,9 +446,13 @@ } break; case 'protocolEncryption': + this.alertMessageSuccess(true); + break; case 'downloadLimit': + App.WebTorrent.throttleDownload(parseInt(value, 10) * 1024 || -1); + break; case 'uploadLimit': - this.alertMessageSuccess(true); + App.WebTorrent.throttleUpload(parseInt(value, 10) * 1024 || -1); break; case 'contentLanguage': case 'contentLangOnly': diff --git a/yarn.lock b/yarn.lock index c61d944107..1c721b3cff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -158,10 +158,10 @@ accord@^0.26.3: uglify-js "^2.7.0" when "^3.7.7" -addr-to-ip-port@^1.0.1, addr-to-ip-port@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/addr-to-ip-port/-/addr-to-ip-port-1.5.1.tgz#bfada13fd6aeeeac19f1e9f7d84b4bbab45e5208" - integrity sha512-bA+dyydTNuQtrEDJ0g9eR7XabNhvrM5yZY0hvTbNK3yvoeC73ZqMES6E1cEqH9WPxs4uMtMsOjfwS4FmluhsAA== +addr-to-ip-port@^1.0.1, addr-to-ip-port@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/addr-to-ip-port/-/addr-to-ip-port-1.5.4.tgz#9542b1c6219fdb8c9ce6cc72c14ee880ab7ddd88" + integrity sha512-ByxmJgv8vjmDcl3IDToxL2yrWFrRtFpZAToY0f46XFXl8zS081t7El5MXIodwm7RC6DhHBRoOSMLFSPKCtHukg== adm-zip@0.4.16: version "0.4.16" @@ -684,17 +684,15 @@ beeper@^1.1.0: resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" integrity sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak= -bencode@^2.0.0, bencode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/bencode/-/bencode-2.0.1.tgz#667a6a31c5e038d558608333da6b7c94e836c85b" - integrity sha512-2uhEl8FdjSBUyb69qDTgOEeeqDTa+n3yMQzLW0cOzNf1Ow5bwcg3idf+qsWisIKRH8Bk8oC7UXL8irRcPA8ZEQ== - dependencies: - safe-buffer "^5.1.1" +bencode@^2.0.0, bencode@^2.0.1, bencode@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/bencode/-/bencode-2.0.2.tgz#e79305ed3e3ab89843cbedc9574fccc067fd3bfe" + integrity sha512-0ilVjnE2diLdbec/3KN14SP0KE85wh8v/FceNRMbAB2ioc3yTj9tgqdoK9tFEH++TZ10JreTS29qTwg7+SpTiQ== -bep53-range@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bep53-range/-/bep53-range-1.1.0.tgz#a009311710c955d27eb3a30cf329e8c139693d27" - integrity sha512-yGQTG4NtwTciX0Bkgk1FqQL4p+NiCQKpTSFho2lrxvUkXIlzyJDwraj8aYxAxRZMnnOhRr7QlIBoMRPEnIR34Q== +bep53-range@^1.0.0, bep53-range@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bep53-range/-/bep53-range-1.1.1.tgz#20fd125b00a413254a77d42f63a43750ca7e64ac" + integrity sha512-ct6s33iiwRCUPp9KXnJ4QMWDgHIgaw36caK/5XEQ9L8dCzSQlJt1Vk6VmHh1VD4AlGCAI4C2zmtfItifBBPrhQ== better-curry@1.x.x: version "1.6.0" @@ -735,10 +733,10 @@ bitfield@^4.0.0: resolved "https://registry.yarnpkg.com/bitfield/-/bitfield-4.0.0.tgz#3094123c870030dc6198a283d779639bd2a8e256" integrity sha512-jtuSG9CQr5yoHFuvhgf50+DH8Aezl3C/mMSfqdG4DqP7Kqe34uBUtCEHPN9oWaldTm96/i7y5e778SnM5ES4rw== -bittorrent-dht@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/bittorrent-dht/-/bittorrent-dht-10.0.0.tgz#01de59bb03ed86a8847cb533134925d236d7f565" - integrity sha512-mrM18HMabvd3n/hQa4PYe942nWvBsJCBQb5PfT9kUJLlspNPGiulZYSCgWs7+XarS7nufYrGEp07f9eKTKIrgw== +bittorrent-dht@^10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/bittorrent-dht/-/bittorrent-dht-10.0.2.tgz#30db8e465991ea2190eddd85087a8d63e4f60310" + integrity sha512-V7+V6ZCfxHtn/wvaRuUvxucJhocb8StgKurQJUdHboVjNGWjALVG+VAYuZqz5iN+/j4vmd4GwqjR1ixYCMkyVA== dependencies: bencode "^2.0.0" debug "^4.1.1" @@ -748,37 +746,37 @@ bittorrent-dht@^10.0.0: lru "^3.1.0" randombytes "^2.0.5" record-cache "^1.0.2" - simple-sha1 "^3.0.0" + simple-sha1 "^3.1.0" -bittorrent-lsd@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bittorrent-lsd/-/bittorrent-lsd-1.1.0.tgz#64f7fa5a277e0236af6c03d475065f2bb3fc6ade" - integrity sha512-j9F+bDt1R//+kLfeSgkmc1A3x0u70gjb/FXaRgTtw+V3wIeYjOekiIlmsXf1SNKuxU5YHDkNL8CFNHx+MfSPSw== +bittorrent-lsd@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bittorrent-lsd/-/bittorrent-lsd-1.1.1.tgz#427044bfcc05d0c2f286b6d1db70a91c04daa0c9" + integrity sha512-dWxU2Mr2lU6jzIKgZrTsXgeXDCIcYpR1b6f2n89fn7juwPAYbNU04OgWjcQPLiNliY0filsX5CQAWntVErpk+Q== dependencies: chrome-dgram "^3.0.6" debug "^4.2.0" -bittorrent-peerid@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/bittorrent-peerid/-/bittorrent-peerid-1.3.3.tgz#b8dc79e421f8136d2ffd0b163a18e9d70da09949" - integrity sha512-tSh9HdQgwyEAfo1jzoGEis6o/zs4CcdRTchG93XVl5jct+DCAN90M5MVUV76k2vJ9Xg3GAzLB5NLsY/vnVTh6w== +bittorrent-peerid@^1.3.2, bittorrent-peerid@^1.3.3: + version "1.3.4" + resolved "https://registry.yarnpkg.com/bittorrent-peerid/-/bittorrent-peerid-1.3.4.tgz#81c1597a06a1d424a6ddd1bb196eead98c250d01" + integrity sha512-Xzk1FJFHmsc9H8IKFtDUkfAZIT1HW8r6UqajfZBBxWmpA1v7FsPO8xPFtnFzCqcXlPN3yi8dDmlqZCemyB7P8w== -"bittorrent-protocol@git+https://github.com/popcorn-time-ru/bittorrent-protocol/#pe-mse-update": - version "3.3.1" - resolved "git+https://github.com/popcorn-time-ru/bittorrent-protocol/#72df72b52c6babbe2c3559f4c158f723c0187bf6" +bittorrent-protocol@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/bittorrent-protocol/-/bittorrent-protocol-3.4.3.tgz#a4c1818c35e7cfbaed816654d402ce723f19f693" + integrity sha512-FNQMWrVptQlOxT5+s4M8QO6yWv67WwquUwpg+0dMcPj2UjwGt+XP3U/jVPg16PxxOBz0N371L+Qe7H2LdALC9Q== dependencies: bencode "^2.0.1" bitfield "^4.0.0" - buffer-xor "^2.0.2" debug "^4.3.1" randombytes "^2.1.0" rc4 "^0.1.5" readable-stream "^3.6.0" - simple-sha1 "^3.0.0" + simple-sha1 "^3.1.0" speedometer "^1.1.0" unordered-array-remove "^1.0.2" -bittorrent-tracker@^9.0.0, bittorrent-tracker@^9.1.0: +bittorrent-tracker@^9.1.0: version "9.17.0" resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.17.0.tgz#8b4b6f6a49efa9023267c3ca22e1a5f63216fc1f" integrity sha512-ErpOx8AAUW8eLwxnEHp15vs0LDJECLADHISEBM+HXclG3J2/9kMBJ31IjwlB8kUNigknSwm8odAThjJEeyL1yA== @@ -808,6 +806,36 @@ bittorrent-tracker@^9.0.0, bittorrent-tracker@^9.1.0: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +bittorrent-tracker@^9.17.4: + version "9.17.4" + resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.17.4.tgz#663f51064a924e945cb6ca19a0c293aca258128b" + integrity sha512-ykhdVQHtLfn4DYSJUQD/zFAbP8YwnF6nGlj2SBnCY4xkW5bhwXPeFZUhryAtdITl0qNL/FpmFOamBZfxIwkbxg== + dependencies: + bencode "^2.0.1" + bittorrent-peerid "^1.3.3" + bn.js "^5.2.0" + chrome-dgram "^3.0.6" + compact2string "^1.4.1" + debug "^4.1.1" + ip "^1.1.5" + lru "^3.1.0" + minimist "^1.2.5" + once "^1.4.0" + queue-microtask "^1.2.3" + random-iterate "^1.0.1" + randombytes "^2.1.0" + run-parallel "^1.2.0" + run-series "^1.1.9" + simple-get "^4.0.0" + simple-peer "^9.11.0" + simple-websocket "^9.1.0" + string2compact "^1.3.0" + unordered-array-remove "^1.0.2" + ws "^7.4.5" + optionalDependencies: + bufferutil "^4.0.3" + utf-8-validate "^5.0.5" + bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -833,7 +861,7 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^5.1.1: +bn.js@^5.1.1, bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -963,13 +991,6 @@ buffer-indexof@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== -buffer-xor@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" - integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== - dependencies: - safe-buffer "^5.1.1" - buffer@^5.1.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -986,7 +1007,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -bufferutil@^4.0.1: +bufferutil@^4.0.1, bufferutil@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== @@ -1032,6 +1053,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cache-chunk-store@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/cache-chunk-store/-/cache-chunk-store-3.2.2.tgz#19bb55d61252cd2174da4686548d52bc2dd44120" + integrity sha512-2lJdWbgHFFxcSth9s2wpId3CR3v1YC63KjP4T9WhpW7LWlY7Hiiei3QwwqzkWqlJTfR8lSy9F5kRQECeyj+yQA== + dependencies: + lru "^3.1.0" + queue-microtask "^1.2.3" + cacheable-lookup@^5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" @@ -1423,7 +1452,7 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -compact2string@^1.2.0, compact2string@^1.4.1: +compact2string@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/compact2string/-/compact2string-1.4.1.tgz#8d34929055f8300a13cfc030ad1832e2e53c2e25" integrity sha512-3D+EY5nsRhqnOwDxveBv5T8wGo4DEvYxjDtPGmdOX+gfr5gE92c2RC0w2wa+xEefm07QuVqqcF3nZJUZ92l/og== @@ -1559,24 +1588,24 @@ create-error-class@^3.0.0: dependencies: capture-stack-trace "^1.0.0" -create-torrent@^4.4.4: - version "4.7.0" - resolved "https://registry.yarnpkg.com/create-torrent/-/create-torrent-4.7.0.tgz#ba5d52d41e7621d0d61c895c8026d3fb22aa4333" - integrity sha512-Pb3XjZNKdCs0Nk46yFKb82y+a3xRQeMvGi1AlJfIV40y/iwkgBqzS5EfqdnakEOvh2jzTOx3v8QxZpkz4hPzyw== +create-torrent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/create-torrent/-/create-torrent-5.0.1.tgz#a09e47af1af347b57fae7bd9ea67025df5cd121d" + integrity sha512-fVvg1YYSogo3TlU1WFeTt937nhGQlf5KtB6M2HyDa/U02dbeMBE2AY9PcPlMufXNQoM/UCO28y26EmuApM7ZmA== dependencies: - bencode "^2.0.1" + bencode "^2.0.2" block-stream2 "^2.1.0" filestream "^5.0.0" is-file "^1.0.0" junk "^3.1.0" minimist "^1.2.5" - multistream "^4.0.1" + multistream "^4.1.0" once "^1.4.0" piece-length "^2.0.1" - queue-microtask "^1.2.2" + queue-microtask "^1.2.3" readable-stream "^3.6.0" - run-parallel "^1.1.10" - simple-sha1 "^3.0.1" + run-parallel "^1.2.0" + simple-sha1 "^3.1.0" cross-spawn@^5.0.1: version "5.1.0" @@ -1688,7 +1717,7 @@ dayjs@^1.10.6: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.6.tgz#288b2aa82f2d8418a6c9d4df5898c0737ad02a63" integrity sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw== -debug@*, debug@4, debug@^4.0.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1: +debug@*, debug@4: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -1709,6 +1738,13 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -2331,6 +2367,11 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-fifo@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.0.0.tgz#9bc72e6860347bb045a876d1c5c0af11e9b984e7" + integrity sha512-4VEXmjxLj7sbs8J//cn2qhRap50dGzF5n8fjay8mau+Jn4hxSeR3xPFwxMaQq/pDaq7+KQk0PAbC2+nWDkJrmQ== + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -2535,7 +2576,7 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-chunk-store@^2.0.2: +fs-chunk-store@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/fs-chunk-store/-/fs-chunk-store-2.0.3.tgz#21e51f1833a84a07cb5e911d058dae084030375a" integrity sha512-qQi93nHX3880gtoQPt1hKQcuYBNVfCbMk8OVRDqR0cJ0riheELW25ry9yl7pII8E9gOAONTGKBD5N/zGHFSVQg== @@ -2770,7 +2811,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -2782,6 +2823,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -3308,12 +3361,12 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -immediate-chunk-store@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/immediate-chunk-store/-/immediate-chunk-store-2.1.1.tgz#4b9f001beaab38d62e4aae630ec7ffb98be805ce" - integrity sha512-y5AxkxqpPTj2dkaAEkDnrMuSX4JNicXHD6yTpLfFnflVejL6yJpzf27obrnlf2PSSQiWUf3735Y9tJEjxvqnoA== +immediate-chunk-store@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/immediate-chunk-store/-/immediate-chunk-store-2.2.0.tgz#f56d30ecc7171f6cfcf632b0eb8395a89f92c03c" + integrity sha512-1bHBna0hCa6arRXicu91IiL9RvvkbNYLVq+mzWdaLGZC3hXvX4doh8e1dLhMKez5siu63CYgO5NrGJbRX5lbPA== dependencies: - queue-microtask "^1.2.0" + queue-microtask "^1.2.3" immediate@~3.0.5: version "3.0.6" @@ -3404,15 +3457,10 @@ ip@^1.0.1, ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -"ipaddr.js@>= 0.1.5": - version "2.0.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.0.tgz#77ccccc8063ae71ab65c55f21b090698e763fc6e" - integrity sha512-S54H9mIj0rbxRIyrDMEuuER86LdlgUg9FSeZ8duQb6CUG2iRrA36MYVQBSprTF/ZeAwvyQ5mDGuNvIPM0BIl3w== - -ipaddr.js@^1.0.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +"ipaddr.js@>= 0.1.5", ipaddr.js@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" + integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== irregular-plurals@^1.0.0: version "1.4.0" @@ -4098,6 +4146,11 @@ liftoff@^3.1.0: rechoir "^0.6.2" resolve "^1.1.7" +limiter@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/limiter/-/limiter-1.1.5.tgz#8f92a25b3b16c6131293a0cc834b4a838a2aa7c2" + integrity sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA== + load-ip-set@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/load-ip-set/-/load-ip-set-2.2.1.tgz#9496ab8aa14ebf81aeb7c8bb38e7abdf50af3563" @@ -4393,12 +4446,12 @@ magnet-uri@^5.1.3: bep53-range "^1.0.0" thirty-two "^1.0.2" -magnet-uri@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/magnet-uri/-/magnet-uri-6.1.1.tgz#e05de8db0224436ae4e8eb3d1085bec9b488347e" - integrity sha512-TUyzaLB36TqqIHzgvkMrlZUPN6mfoLX/+2do5YJH3gjBQL2auEtivT+99npIiA77YepJ6pYA/AzWhboXTAAm0w== +magnet-uri@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/magnet-uri/-/magnet-uri-6.2.0.tgz#10f7be050bf23452df210838239b118463c3eeff" + integrity sha512-O9AgdDwT771fnUj0giPYu/rACpz8173y8UXCSOdLITjOVfBenZ9H9q3FqQmveK+ORUMuD+BkKNSZP8C3+IMAKQ== dependencies: - bep53-range "^1.0.0" + bep53-range "^1.1.0" thirty-two "^1.0.2" make-dir@^1.0.0: @@ -4508,12 +4561,12 @@ memoizee@0.x.x, memoizee@^0.4.5: next-tick "^1.1.0" timers-ext "^0.1.7" -memory-chunk-store@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/memory-chunk-store/-/memory-chunk-store-1.3.2.tgz#3bde573c957c0260d8116e6e2c0ce62ff2032894" - integrity sha512-EBcbwpdQlzT5aNV0FTT+RAfh1cGEssjiCcRGcTk57mKsnZlRMOtH4Cfk/AqQnkz8xP2dUF+/lgpmErSGwwE1FA== +memory-chunk-store@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/memory-chunk-store/-/memory-chunk-store-1.3.5.tgz#700f712415895600bc5466007333efa19f1de07c" + integrity sha512-E1Xc1U4ifk/FkC2ZsWhCaW1xg9HbE/OBmQTLe2Tr9c27YPSLbW7kw1cnb3kQWD1rDtErFJHa7mB9EVrs7aTx9g== dependencies: - queue-microtask "^1.2.2" + queue-microtask "^1.2.3" meow@^3.3.0: version "3.7.0" @@ -4772,7 +4825,7 @@ multimatch@^2.0.0: arrify "^1.0.0" minimatch "^3.0.0" -multistream@^4.0.1, multistream@^4.1.0: +multistream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== @@ -5328,18 +5381,18 @@ parse-torrent@^5.8.2: simple-sha1 "^2.0.0" uniq "^1.0.1" -parse-torrent@^9.1.1: - version "9.1.3" - resolved "https://registry.yarnpkg.com/parse-torrent/-/parse-torrent-9.1.3.tgz#9b4bc8dca243b356bf449938d6d38a259a2a707c" - integrity sha512-/Yr951CvJM8S6TjMaqrsmMxeQEAjDeCX+MZ3hGXXc7DG2wqzp/rzOsHtDzIVqN6NsFRCqy6wYLF/W7Sgvq7bXw== +parse-torrent@^9.1.4: + version "9.1.4" + resolved "https://registry.yarnpkg.com/parse-torrent/-/parse-torrent-9.1.4.tgz#1fc8a8accd76c7cd6c858061bb7b679288dc2065" + integrity sha512-NSlG8ewolqfcEWevUUsrpvxzVWYGaKWwPHMcXTAV2qYYo6pPugVOacQXt8uDlEYh23Ituz+A9pAZK5YaXTV8Pg== dependencies: - bencode "^2.0.1" + bencode "^2.0.2" blob-to-buffer "^1.2.9" get-stdin "^8.0.0" - magnet-uri "^6.0.0" - queue-microtask "^1.2.2" + magnet-uri "^6.2.0" + queue-microtask "^1.2.3" simple-get "^4.0.0" - simple-sha1 "^3.0.1" + simple-sha1 "^3.1.0" parse5-htmlparser2-tree-adapter@^6.0.1: version "6.0.1" @@ -5659,11 +5712,16 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== -queue-microtask@^1.2.0, queue-microtask@^1.2.2, queue-microtask@^1.2.3: +queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue-tick@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.0.tgz#011104793a3309ae86bfeddd54e251dc94a36725" + integrity sha512-ULWhjjE8BmiICGn3G8+1L9wFpERNxkf8ysxkAer4+TFdRefDaXOCV5m92aMB9FtBVmn/8sETXLXY6BfW7hyaWQ== + quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -5852,9 +5910,9 @@ rechoir@^0.6.2: resolve "^1.1.6" record-cache@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/record-cache/-/record-cache-1.1.0.tgz#f8a467a691a469584b26e88d36b18afdb3932037" - integrity sha512-u8rbtLEJV7HRacl/ZYwSBFD8NFyB3PfTTfGLP37IW3hftQCwu6z4Q2RLyxo1YJUNRTEzJfpLpGwVuEYdaIkG9Q== + version "1.1.1" + resolved "https://registry.yarnpkg.com/record-cache/-/record-cache-1.1.1.tgz#ba3088a489f50491a4af7b14d410822c394fb811" + integrity sha512-L5hZlgWc7CmGbztnemQoKE1bLu9rtI2skOB0ttE4C5+TVszLE8Rd0YLTROSgvXKLAqPumS/soyN5tJW5wJLmJQ== recursive-readdir-sync@^1.0.6: version "1.0.6" @@ -6143,14 +6201,14 @@ rimraf@~2.4.0: dependencies: glob "^6.0.1" -run-parallel-limit@^1.0.6: +run-parallel-limit@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== dependencies: queue-microtask "^1.2.2" -run-parallel@^1.1.10, run-parallel@^1.1.2, run-parallel@^1.1.6, run-parallel@^1.1.9, run-parallel@^1.2.0: +run-parallel@^1.1.2, run-parallel@^1.1.6, run-parallel@^1.1.9, run-parallel@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== @@ -6162,11 +6220,16 @@ run-series@^1.1.8, run-series@^1.1.9: resolved "https://registry.yarnpkg.com/run-series/-/run-series-1.1.9.tgz#15ba9cb90e6a6c054e67c98e1dc063df0ecc113a" integrity sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g== -rusha@^0.8.1, rusha@^0.8.13: +rusha@^0.8.1: version "0.8.13" resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.13.tgz#9a084e7b860b17bff3015b92c67a6a336191513a" integrity sha1-mghOe4YLF7/zAVuSxnpqM2GRUTo= +rusha@^0.8.13: + version "0.8.14" + resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.14.tgz#a977d0de9428406138b7bb90d3de5dcd024e2f68" + integrity sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA== + safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -6369,7 +6432,7 @@ simple-sha1@^2.0.0: dependencies: rusha "^0.8.1" -simple-sha1@^3.0.0, simple-sha1@^3.0.1: +simple-sha1@^3.0.1, simple-sha1@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/simple-sha1/-/simple-sha1-3.1.0.tgz#40cac8436dfaf9924332fc46a5c7bca45f656131" integrity sha512-ArTptMRC1v08H8ihPD6l0wesKvMfF9e8XL5rIHPanI7kGOsSsbY514MwVu6X1PITHCTB2F08zB7cyEbfc4wQjg== @@ -6377,7 +6440,7 @@ simple-sha1@^3.0.0, simple-sha1@^3.0.1: queue-microtask "^1.2.2" rusha "^0.8.13" -simple-websocket@^9.0.0: +simple-websocket@^9.0.0, simple-websocket@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/simple-websocket/-/simple-websocket-9.1.0.tgz#91cbb39eafefbe7e66979da6c639109352786a7f" integrity sha512-8MJPnjRN6A8UCp1I+H/dSFyjwJhp6wta4hsVRhjf8w9qBHRzxYt14RaOcjvQnhD1N4yKOddEjflwMnQM4VtXjQ== @@ -6516,6 +6579,14 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== +speed-limiter@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/speed-limiter/-/speed-limiter-1.0.2.tgz#e4632f476a1d25d32557aad7bd089b3a0d948116" + integrity sha512-Ax+TbUOho84bWUc3AKqWtkIvAIVws7d6QI4oJkgH4yQ5Yil+lR3vjd/7qd51dHKGzS5bFxg0++QwyNRN7s6rZA== + dependencies: + limiter "^1.1.5" + streamx "^2.10.3" + speedometer@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-1.1.0.tgz#a30b13abda45687a1a76977012c060f2ac8a7934" @@ -6662,6 +6733,14 @@ streamfilter@^1.0.5: dependencies: readable-stream "^2.0.2" +streamx@^2.10.3: + version "2.11.1" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.11.1.tgz#f13c1f49cd88e8bb659a9e939f6d4094dfe52f1a" + integrity sha512-GG/cBcuwhKEu2MxJIdlFnrstgtwERx0yX0tjZUVFHmmq65ROrCEAVrfoYbNQnXdq76rH0Y/SuO9VcgW+ZPkeMQ== + dependencies: + fast-fifo "^1.0.0" + queue-tick "^1.0.0" + string-length@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" @@ -6686,13 +6765,13 @@ string-width@^2.0.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string2compact@^1.2.5, string2compact@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string2compact/-/string2compact-1.3.0.tgz#22d946127b082d1203c51316af60117a337423c3" - integrity sha512-004ulKKANDuQilQsNxy2lisrpMG0qUJxBU+2YCEF7KziRyNR0Nredm2qk0f1V82nva59H3y9GWeHXE63HzGRFw== +string2compact@^1.3.0, string2compact@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/string2compact/-/string2compact-1.3.2.tgz#c9d11a13f368404b8025425cc53f9916de1d0b8b" + integrity sha512-3XUxUgwhj7Eqh2djae35QHZZT4mN3fsO7kagZhSGmhhlrQagVvWSFuuFIWnpxFS0CdTB2PlQcaL16RDi14I8uw== dependencies: addr-to-ip-port "^1.0.1" - ipaddr.js "^1.0.1" + ipaddr.js "^2.0.0" string_decoder@^1.1.1: version "1.3.0" @@ -7043,16 +7122,16 @@ to-utf-8@^1.2.0: peek-stream "^1.1.1" stream-splicer "^1.3.1" -torrent-discovery@^9.4.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.0.tgz#e6b5f8244e6ea0c48efbcfc88792e033d15e6f56" - integrity sha512-+YW9JGbO5bCuDw9YYW//p4iVLV0aP4C+AYrNQjL/+dSNPUtD1ufK1V8UZERt6rIoeNGhutkSVyeO4Fid9Tjxjg== +torrent-discovery@^9.4.4: + version "9.4.4" + resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.4.tgz#6bc964030127cdf95fcaccadbff1038876a44af4" + integrity sha512-psD/QcqSevMouHFbPKz4V9X5u2HuR/SaxeIp2T/JAduHKmDoq/pgxMQiAe/4DlhDgSCIAYWEB2xKP0dUTInBpQ== dependencies: - bittorrent-dht "^10.0.0" - bittorrent-lsd "^1.0.0" - bittorrent-tracker "^9.0.0" - debug "^4.0.0" - run-parallel "^1.1.2" + bittorrent-dht "^10.0.2" + bittorrent-lsd "^1.1.1" + bittorrent-tracker "^9.17.4" + debug "^4.3.2" + run-parallel "^1.2.0" torrent-piece@^2.0.1: version "2.0.1" @@ -7384,19 +7463,19 @@ ut_metadata@^3.5.2: debug "^4.2.0" simple-sha1 "^3.0.1" -ut_pex@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ut_pex/-/ut_pex-2.0.1.tgz#30d3cc19ee32f9513b06ed2b03851ba508566da1" - integrity sha512-kI1/y1IhbuTqjyVqekSZCd3afPQTpdIRCrON1WXc9jGdcIAaze3FAoZ1ssYJmGBuJbdg7LQO42daJGCaoRXl+A== +ut_pex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/ut_pex/-/ut_pex-3.0.2.tgz#cd794d4fe02ebfa82704d41854c76c8d8187eea0" + integrity sha512-3xM88t+AVU5GR0sIY3tmRMLUS+YKiwStc7U7+ZFQ+UHQpX7BjVJOomhmtm0Bs+8R2n812Dt2ymXm01EqDrOOpQ== dependencies: - bencode "^2.0.0" - compact2string "^1.2.0" - string2compact "^1.2.5" + bencode "^2.0.2" + compact2string "^1.4.1" + string2compact "^1.3.2" -utf-8-validate@^5.0.2: - version "5.0.4" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.4.tgz#72a1735983ddf7a05a43a9c6b67c5ce1c910f9b8" - integrity sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q== +utf-8-validate@^5.0.2, utf-8-validate@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== dependencies: node-gyp-build "^4.2.0" @@ -7405,10 +7484,10 @@ util-deprecate@1.0.2, util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -utp-native@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/utp-native/-/utp-native-2.4.0.tgz#7010de2134e9d767be0ec34e817c3300592befc0" - integrity sha512-jKwpFiEaDUuNH5S4vVk/+waAX+yA6f3Lw4flqOROH1ZE/jcT4mh0/hjIGSuPP9j9RbQcsBG6Fu6LaFk4ojXFxw== +utp-native@^2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/utp-native/-/utp-native-2.5.3.tgz#7c04c2a8c2858716555a77d10adb9819e3119b25" + integrity sha512-sWTrWYXPhhWJh+cS2baPzhaZc89zwlWCfwSthUjGhLkZztyPhcQllo+XVVCbNGi7dhyRlxkWxN4NKU6FbA9Y8w== dependencies: napi-macros "^2.0.0" node-gyp-build "^4.2.0" @@ -7633,30 +7712,31 @@ webtorrent-health@1.x.x: parse-torrent "^5.8.2" "webtorrent@git+https://github.com/popcorn-time-ru/webtorrent/#pt-fork": - version "0.118.0" - resolved "git+https://github.com/popcorn-time-ru/webtorrent/#4d23d8c9a652dfc00ce27c655674dced4c7b3b39" + version "1.3.9" + resolved "git+https://github.com/popcorn-time-ru/webtorrent/#e33d8bab846d14e41fa26a5dbd011c0ead94ce51" dependencies: - addr-to-ip-port "^1.5.1" + addr-to-ip-port "^1.5.4" bitfield "^4.0.0" - bittorrent-dht "^10.0.0" - bittorrent-protocol "git+https://github.com/popcorn-time-ru/bittorrent-protocol/#pe-mse-update" + bittorrent-dht "^10.0.2" + bittorrent-protocol "^3.4.3" + cache-chunk-store "^3.2.2" chrome-net "^3.3.4" chunk-store-stream "^4.3.0" cpus "^1.0.3" - create-torrent "^4.4.4" - debug "^4.3.1" + create-torrent "^5.0.1" + debug "^4.3.2" end-of-stream "^1.4.4" escape-html "^1.0.3" - fs-chunk-store "^2.0.2" + fs-chunk-store "^2.0.3" http-node "github:feross/http-node#webtorrent" - immediate-chunk-store "^2.1.1" + immediate-chunk-store "^2.2.0" load-ip-set "^2.2.1" lt_donthave "^1.0.1" - memory-chunk-store "^1.3.2" + memory-chunk-store "^1.3.5" mime "^2.5.2" multistream "^4.1.0" package-json-versionify "^1.0.4" - parse-torrent "^9.1.1" + parse-torrent "^9.1.4" pump "^3.0.0" queue-microtask "^1.2.3" random-iterate "^1.0.1" @@ -7665,22 +7745,23 @@ webtorrent-health@1.x.x: readable-stream "^3.6.0" render-media "^4.1.0" run-parallel "^1.2.0" - run-parallel-limit "^1.0.6" + run-parallel-limit "^1.1.0" simple-concat "^1.0.1" simple-get "^4.0.0" simple-peer "^9.11.0" - simple-sha1 "^3.0.1" + simple-sha1 "^3.1.0" + speed-limiter "^1.0.2" speedometer "^1.1.0" stream-to-blob "^2.0.1" stream-to-blob-url "^3.0.2" stream-with-known-length-to-buffer "^1.0.4" - torrent-discovery "^9.4.0" + torrent-discovery "^9.4.4" torrent-piece "^2.0.1" unordered-array-remove "^1.0.2" ut_metadata "^3.5.2" - ut_pex "^2.0.1" + ut_pex "^3.0.2" optionalDependencies: - utp-native "^2.2.1" + utp-native "^2.5.3" whatwg-fetch@>=0.10.0: version "3.6.2" @@ -7763,11 +7844,16 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -ws@^7.2.1, ws@^7.3.0, ws@^7.4.2: +ws@^7.2.1: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +ws@^7.3.0, ws@^7.4.2, ws@^7.4.5: + version "7.5.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" + integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== + xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" From 76f9fe04c767b2c344442f666258fbbcb4cc1012 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 08:23:41 +0000 Subject: [PATCH 082/168] Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1c721b3cff..851183e74a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5444,9 +5444,9 @@ path-key@^2.0.0, path-key@^2.0.1: integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-root-regex@^0.1.0: version "0.1.2" From 97f97a34a1fd001d98eb62e201137a631f9c1f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 08:24:09 +0000 Subject: [PATCH 083/168] Bump url-parse from 1.5.1 to 1.5.3 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1c721b3cff..75f1db5242 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7436,9 +7436,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.1.9: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + version "1.5.3" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" + integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From cce4aa8c76cb97b90c0ef36ea3e671a51b699d08 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 14 Aug 2021 17:27:31 +0300 Subject: [PATCH 084/168] Update settings-container.tpl --- src/app/lib/views/settings_container.js | 2 -- src/app/styl/views/settings_container.styl | 7 +++++++ src/app/templates/settings-container.tpl | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index bdf5e1699a..6819bb1663 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -345,8 +345,6 @@ let numvalue = field.val().replace(/[^0-9|-]/gi, ''); if (numvalue <= 0) { numvalue = ''; - } else { - numvalue = numvalue + ' KB/s'; } field.val(numvalue); value = numvalue; diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index 5a05635d07..0b7c5089a7 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -515,6 +515,13 @@ &:after opacity: 1 + input[type="text"] + &#downloadLimit + width: 78px + &#uploadLimit + width: 78px + margin-left: 7px + .settings-label &:before content: '\f0c8' diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index af08f21f22..1806dc3758 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -629,8 +629,8 @@

<%= i18n.__("Max. Down / Up Speed") %>

- - + +    KB/s

<%= i18n.__("Overall Ratio") %>

@@ -640,7 +640,7 @@ return ratio; } %> -     <%= Common.fileSize(Settings.totalDownloaded) %><%= Common.fileSize(Settings.totalUploaded) %> +    <%= Common.fileSize(Settings.totalDownloaded) %><%= Common.fileSize(Settings.totalUploaded) %>

<%= i18n.__("Port to stream on") %>

From 971e442b72d62d64e5c4603714534251c3c1f749 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 14 Aug 2021 18:51:09 +0300 Subject: [PATCH 085/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 6819bb1663..f2b5f77e6a 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -464,12 +464,6 @@ this.alertMessageSuccess(true); } break; - case 'vpnEnabled': - case 'watchedCovers': - case 'defaultFilters': - $('.nav-hor.left li:first').click(); - App.vent.trigger('settings:show'); - break; case 'alwaysOnTop': win.setAlwaysOnTop(value); break; @@ -563,9 +557,13 @@ !value ? scrollPosOffset++ : scrollPosOffset--; } /* falls through */ + case 'vpnEnabled': + case 'watchedCovers': + case 'defaultFilters': case 'activateTempf': case 'multipleExtSubtitles': case 'torColSearchMore': + case 'httpApiEnabled': $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; From e4ab967995a953dfc6045af126367d4657ba6c1c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 14 Aug 2021 18:51:58 +0300 Subject: [PATCH 086/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 1806dc3758..b2f2968582 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -403,12 +403,12 @@ - <% if(App.Trakt) { %> + <% if (App.Trakt) { %>
Trakt.tv
"> - <% if(App.Trakt.authenticated) { %> + <% if (App.Trakt.authenticated) { %> <%= i18n.__("You are currently connected to %s", "Trakt.tv") %>. <%= i18n.__("Disconnect account") %> @@ -451,7 +451,7 @@
OpenSubtitles
- <% if(Settings.opensubtitlesAuthenticated) { %> + <% if (Settings.opensubtitlesAuthenticated) { %> <%= i18n.__("You are currently connected to %s", "OpenSubtitles") %>. <%= i18n.__("Disconnect account") %> @@ -518,6 +518,7 @@ > +<% if (Settings.httpApiEnabled) { %>

<%= i18n.__("Local IP Address") %>

@@ -548,6 +549,7 @@
+<% } %>
@@ -608,7 +610,7 @@
<%= i18n.__("Connection") %>
- <% if(Settings.tvshow) { %> + <% if (Settings.tvshow) { %>

<%= i18n.__("TV Show API Endpoint") %>

From e1d37a05532e802a2e1654c14f7e4cbaea7aec4f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 14 Aug 2021 19:09:58 +0300 Subject: [PATCH 087/168] Update settings.js --- src/app/settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/settings.js b/src/app/settings.js index d748bdaf17..cab7568d31 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -159,8 +159,8 @@ Settings.multipleExtSubtitles = false; // More options Settings.httpApiEnabled = false; Settings.httpApiPort = 8008; -Settings.httpApiUsername = 'butter'; -Settings.httpApiPassword = 'butter'; +Settings.httpApiUsername = 'popcorn'; +Settings.httpApiPassword = 'popcorn'; // Trakt.tv Settings.traktStatus = false; From 1a74bde40a3b758e1c6806b91c1c9c2620c3fd81 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 16 Aug 2021 23:38:09 +0300 Subject: [PATCH 088/168] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index b2f2968582..ad74539242 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -554,12 +554,12 @@
-
<%= i18n.__("API Server") %>
+
<%= i18n.__("API Server(s)") %>
-

<%= i18n.__("Custom Movies Server") %>

- +

<%= i18n.__("Movies API Server") %>

+ <% if (Settings.customServers && Settings.customServers.movie) { for (var i = 0; i < Settings.customServers.movie.length; ++i) { @@ -574,8 +574,8 @@
-

<%= i18n.__("Custom Series Server") %>

- +

<%= i18n.__("Series API Server") %>

+ <% if (Settings.customServers && Settings.customServers.tvshow) { for (var i = 0; i < Settings.customServers.tvshow.length; ++i) { @@ -590,8 +590,8 @@
-

<%= i18n.__("Custom Anime Server") %>

- +

<%= i18n.__("Anime API Server") %>

+ <% if (Settings.customServers && Settings.customServers.anime) { for (var i = 0; i < Settings.customServers.anime.length; ++i) { From cdf383b306f2be9f991df5dc31fee73188321824 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 16 Aug 2021 23:40:20 +0300 Subject: [PATCH 089/168] Update en.json --- src/app/language/en.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 70998e9825..f5e0e62592 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -464,7 +464,7 @@ "Cache Folder Button": "Cache Folder Button", "Enable remote control": "Enable remote control", "Server": "Server", - "API Server": "API Server", + "API Server(s)": "API Server(s)", "Proxy Server": "Proxy Server", "Remember to Export your Database before updating in case its necessary to restore your Favorites, marked as watched or settings": "Remember to Export your Database before updating in case its necessary to restore your Favorites, marked as watched or settings", "Update Now": "Update Now", @@ -515,9 +515,9 @@ "No anime found...": "No anime found...", "Search in %s": "Search in %s", "Show 'Search on Torrent Collection' in search": "Show 'Search on Torrent Collection' in search", - "Custom Movies Server": "Custom Movies Server", - "Custom Series Server": "Custom Series Server", - "Custom Anime Server": "Custom Anime Server", + "Movies API Server": "Movies API Server", + "Series API Server": "Series API Server", + "Anime API Server": "Anime API Server", "The image url was copied to the clipboard": "The image url was copied to the clipboard", "Popcorn Time currently supports": "Popcorn Time currently supports", "There is also support for Chromecast, AirPlay & DLNA devices.": "There is also support for Chromecast, AirPlay & DLNA devices.", From 0772e543f130519f988315d02835d0c8a25292f7 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 17 Aug 2021 21:22:16 +0300 Subject: [PATCH 090/168] update webtorrent --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index be525ad1bc..3943e1468d 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "urijs": "1.19.7", "video.js": "4.11.4", "videojs-youtube": "1.2.10", - "webtorrent": "git+https://github.com/popcorn-time-ru/webtorrent/#pt-fork", + "webtorrent": "^1.4.0", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 297437f021..ecdada7c5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7711,9 +7711,10 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -"webtorrent@git+https://github.com/popcorn-time-ru/webtorrent/#pt-fork": - version "1.3.9" - resolved "git+https://github.com/popcorn-time-ru/webtorrent/#e33d8bab846d14e41fa26a5dbd011c0ead94ce51" +webtorrent@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.4.0.tgz#f875f2132a4028382f2f28475ef787fa7c22e95f" + integrity sha512-dnlSkPiRsk2I9pIoSdG0Zw6d6bWNkYpSoix3bu3eQRNk5xRd+7F1/K7y+tMv/svuGV9nj1aY3N8xSK5OSTyMSg== dependencies: addr-to-ip-port "^1.5.4" bitfield "^4.0.0" From 3877e205790cfd10b615e26781c0a8400d11187c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 18 Aug 2021 19:07:34 +0300 Subject: [PATCH 091/168] Improve unreachable API error message (it will now show all APIs tried if multiple are set instead of just the first one) --- src/app/lib/views/browser/list.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/lib/views/browser/list.js b/src/app/lib/views/browser/list.js index fe97dbad38..2fe42bdfce 100644 --- a/src/app/lib/views/browser/list.js +++ b/src/app/lib/views/browser/list.js @@ -108,21 +108,24 @@ var errorURL; switch (App.currentview) { case 'movies': - errorURL = App.Config.getProviderForType('movie')[0].apiURL[0]; + errorURL = App.Config.getProviderForType('movie')[0].apiURL.slice(0); break; case 'shows': - errorURL = App.Config.getProviderForType('tvshow')[0].apiURL[0]; + errorURL = App.Config.getProviderForType('tvshow')[0].apiURL.slice(0); break; case 'anime': - errorURL = App.Config.getProviderForType('anime')[0].apiURL[0]; + errorURL = App.Config.getProviderForType('anime')[0].apiURL.slice(0); break; default: errorURL = ''; } - var dspURL = errorURL.slice(-1) === '/' ? errorURL.replace(/http:\/\/|https:\/\//g, '').slice(0, -1) : errorURL.replace(/http:\/\/|https:\/\//g, ''); + errorURL.forEach(function(e, index) { + errorURL[index] = '' + e.replace(/http:\/\/|https:\/\/|\/$/g, '') + ''; + }); + errorURL = errorURL.join(', ').replace(/,(?=[^,]*$)/, ' &'); return ErrorView.extend({ retry: true, - error: i18n.__('The remote ' + App.currentview + ' API failed to respond, please check %s and try again later', '' + dspURL + '') + error: i18n.__('The remote ' + App.currentview + ' API failed to respond, please check %s and try again later', errorURL) }); } else if (this.collection.state !== 'loading') { return ErrorView.extend({ From f17bb2c95bb404c94bf410a940ece6947d7fc102 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 21 Aug 2021 23:14:29 +0300 Subject: [PATCH 092/168] Update torrent trackers --- src/app/settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/settings.js b/src/app/settings.js index cab7568d31..58e6507d6c 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -84,12 +84,12 @@ Settings.trackers = { 'udp://tracker.cyberia.is:6969', 'udp://tracker.torrent.eu.org:451', 'udp://open.stealth.si:80', + 'udp://opentor.org:2710', 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', 'udp://tracker.uw0.xyz:6969', 'udp://retracker.lanta-net.ru:2710', - 'wss://tracker.openwebtorrent.com', - 'wss://tracker.btorrent.xyz' + 'wss://tracker.openwebtorrent.com' ] }; From b18fa37d31c473ba5f4d9eef7747aa055b9d35f7 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 22 Aug 2021 16:20:35 +0300 Subject: [PATCH 093/168] Add multiple units for the Max Download / Upload speed options (#2274) --- src/app/app.js | 4 ++-- src/app/database.js | 4 ++-- src/app/lib/streamer.js | 4 ++-- src/app/lib/views/settings_container.js | 13 ++++++++-- src/app/settings.js | 1 + src/app/styl/views/settings_container.styl | 28 ++++++++++++++++++++++ src/app/templates/settings-container.tpl | 14 ++++++++++- 7 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index d22a56980b..4b49c298be 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -95,8 +95,8 @@ App.advsettings = AdvSettings; App.settings = Settings; App.WebTorrent = new WebTorrent({ maxConns : parseInt(Settings.connectionLimit, 10) || 55, - downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, - uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, + downloadLimit: parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, + uploadLimit : parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, dht : true, secure : Settings.protocolEncryption || false, tracker : { diff --git a/src/app/database.js b/src/app/database.js index 0afc12c6da..472960a2d0 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -444,8 +444,8 @@ var Database = { // enable secure after load options require('webtorrent/lib/peer.js').enableSecure(); } - App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * 1024 || -1); - App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * 1024 || -1); + App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1); + App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1); App.WebTorrent.maxConns = parseInt(Settings.connectionLimit, 10) || 55; }) .catch(function (err) { diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 14e655938f..fd6d5a324a 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -184,8 +184,8 @@ App.WebTorrent.destroy(); App.WebTorrent = new WebTorrent({ maxConns : parseInt(Settings.connectionLimit, 10) || 55, - downloadLimit: parseInt(Settings.downloadLimit, 10) * 1024 || -1, - uploadLimit : parseInt(Settings.uploadLimit, 10) * 1024 || -1, + downloadLimit: parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, + uploadLimit : parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, dht : true, secure : Settings.protocolEncryption || false, tracker : { diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index f2b5f77e6a..1a93c82a11 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -271,6 +271,7 @@ case 'defaultFilters': case 'theme': case 'delSeedboxCache': + case 'maxLimitMult': value = $('option:selected', field).val(); break; case 'poster_size': @@ -447,10 +448,18 @@ this.alertMessageSuccess(true); break; case 'downloadLimit': - App.WebTorrent.throttleDownload(parseInt(value, 10) * 1024 || -1); + App.WebTorrent.throttleDownload(parseInt(value, 10) * parseInt(Settings.maxLimitMult, 10) || -1); break; case 'uploadLimit': - App.WebTorrent.throttleUpload(parseInt(value, 10) * 1024 || -1); + App.WebTorrent.throttleUpload(parseInt(value, 10) * parseInt(Settings.maxLimitMult, 10) || -1); + break; + case 'maxLimitMult': + if (Settings.downloadLimit) { + App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * parseInt(value, 10) || -1); + } + if (Settings.uploadLimit) { + App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * parseInt(value, 10) || -1); + } break; case 'contentLanguage': case 'contentLangOnly': diff --git a/src/app/settings.js b/src/app/settings.js index 58e6507d6c..850861fcd1 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -179,6 +179,7 @@ Settings.opensubtitlesPassword = ''; Settings.connectionLimit = 55; Settings.downloadLimit = ''; Settings.uploadLimit = ''; +Settings.maxLimitMult = 1024; Settings.streamPort = 0; // 0 = Random Settings.protocolEncryption = false; Settings.tmpLocation = path.join(os.tmpdir(), Settings.projectName); diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index 0b7c5089a7..89f246f450 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -295,6 +295,34 @@ padding-left: 4px padding-right: 8px + select + padding-left 10px + border 0 !important + -webkit-appearance none + height 30px + line-height 24px + margin-top -9px + background-color $InputBoxBg + cursor pointer + color $InputBoxText + font-family $Font, $AlternateFont + font-size 13px + outline 0 + padding-right 10px + width: 62px + + .dropdown-arrow + width 0 + height 0 + border-left 4px solid transparent + border-right 4px solid transparent + border-top 5px solid $Text2 + top 12px + margin-left -13px + position relative + float none + cursor pointer + .reset-tvAPI font-size: 13px color: $SettingsText2 diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index ad74539242..a72ba79207 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -632,7 +632,19 @@

<%= i18n.__("Max. Down / Up Speed") %>

-    KB/s +    + <% + var limit_mult = { + "1024": "KB/s", + "1048576": "MB/s" + }; + var select_default_mult = ""; + for(var key in limit_mult) { + select_default_mult += ""; + } + %> + +

<%= i18n.__("Overall Ratio") %>

From dc87cd906944e3ca828faf0354fb5432976849f5 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 22 Aug 2021 18:46:59 +0300 Subject: [PATCH 094/168] Allow decimals for the Max Download / Upload speed options (#2275) --- src/app/app.js | 4 ++-- src/app/database.js | 4 ++-- src/app/lib/streamer.js | 4 ++-- src/app/lib/views/settings_container.js | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index 4b49c298be..269fb820cd 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -95,8 +95,8 @@ App.advsettings = AdvSettings; App.settings = Settings; App.WebTorrent = new WebTorrent({ maxConns : parseInt(Settings.connectionLimit, 10) || 55, - downloadLimit: parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, - uploadLimit : parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, + downloadLimit: parseInt(parseFloat(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1, + uploadLimit : parseInt(parseFloat(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1, dht : true, secure : Settings.protocolEncryption || false, tracker : { diff --git a/src/app/database.js b/src/app/database.js index 472960a2d0..ecf465a7f3 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -444,8 +444,8 @@ var Database = { // enable secure after load options require('webtorrent/lib/peer.js').enableSecure(); } - App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1); - App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1); + App.WebTorrent.throttleDownload(parseInt(parseFloat(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1); + App.WebTorrent.throttleUpload(parseInt(parseFloat(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1); App.WebTorrent.maxConns = parseInt(Settings.connectionLimit, 10) || 55; }) .catch(function (err) { diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index fd6d5a324a..ffbc2ef85e 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -184,8 +184,8 @@ App.WebTorrent.destroy(); App.WebTorrent = new WebTorrent({ maxConns : parseInt(Settings.connectionLimit, 10) || 55, - downloadLimit: parseInt(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, - uploadLimit : parseInt(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10) || -1, + downloadLimit: parseInt(parseFloat(Settings.downloadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1, + uploadLimit : parseInt(parseFloat(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1, dht : true, secure : Settings.protocolEncryption || false, tracker : { diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 1a93c82a11..b37e705722 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -343,7 +343,7 @@ break; case 'downloadLimit': case 'uploadLimit': - let numvalue = field.val().replace(/[^0-9|-]/gi, ''); + let numvalue = field.val().replace(/[^0-9|.-]/gi, '').replace(/^([^.]*\.)|\./g, '$1'); if (numvalue <= 0) { numvalue = ''; } @@ -448,17 +448,17 @@ this.alertMessageSuccess(true); break; case 'downloadLimit': - App.WebTorrent.throttleDownload(parseInt(value, 10) * parseInt(Settings.maxLimitMult, 10) || -1); + App.WebTorrent.throttleDownload(parseInt(parseFloat(value, 10) * parseInt(Settings.maxLimitMult, 10)) || -1); break; case 'uploadLimit': - App.WebTorrent.throttleUpload(parseInt(value, 10) * parseInt(Settings.maxLimitMult, 10) || -1); + App.WebTorrent.throttleUpload(parseInt(parseFloat(value, 10) * parseInt(Settings.maxLimitMult, 10)) || -1); break; case 'maxLimitMult': if (Settings.downloadLimit) { - App.WebTorrent.throttleDownload(parseInt(Settings.downloadLimit, 10) * parseInt(value, 10) || -1); + App.WebTorrent.throttleDownload(parseInt(parseFloat(Settings.downloadLimit, 10) * parseInt(value, 10)) || -1); } if (Settings.uploadLimit) { - App.WebTorrent.throttleUpload(parseInt(Settings.uploadLimit, 10) * parseInt(value, 10) || -1); + App.WebTorrent.throttleUpload(parseInt(parseFloat(Settings.uploadLimit, 10) * parseInt(value, 10)) || -1); } break; case 'contentLanguage': From 2643c470ba9a2ae60c2622ea1f5694430529beed Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 23 Aug 2021 12:15:51 +0300 Subject: [PATCH 095/168] Update settings.js --- src/app/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/settings.js b/src/app/settings.js index 850861fcd1..2e001e0c95 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -189,7 +189,7 @@ Settings.deleteTmpOnClose = true; Settings.separateDownloadsDir = false; Settings.delSeedboxCache = 'ask'; Settings.continueSeedingOnStart = false; -Settings.vpnEnabled = true; +Settings.vpnEnabled = false; Settings.maxActiveTorrents = 5; Settings.automaticUpdating = true; Settings.UpdateSeed = false; From 759b380f1168a5f1e97cb8c9d1e55801b742351f Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 29 Aug 2021 16:17:28 +0300 Subject: [PATCH 096/168] update all libs --- yarn.lock | 482 ++++++++++++++++++++++++++---------------------------- 1 file changed, 231 insertions(+), 251 deletions(-) diff --git a/yarn.lock b/yarn.lock index ecdada7c5b..581def70a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,14 @@ "@fortawesome/fontawesome-free@^5.14.0": - version "5.15.3" - resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a" - integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w== + version "5.15.4" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" + integrity sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg== + +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz#0300943770e04231041a51bd39f0439b5c7ab4f0" + integrity sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -78,16 +83,16 @@ defer-to-connect "^1.0.1" "@szmarczak/http-timer@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" - integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== dependencies: defer-to-connect "^2.0.0" "@types/cacheable-request@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" - integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== + version "6.0.2" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" + integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA== dependencies: "@types/http-cache-semantics" "*" "@types/keyv" "*" @@ -95,14 +100,14 @@ "@types/responselike" "*" "@types/http-cache-semantics@*": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" - integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== "@types/keyv@*": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" - integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.2.tgz#5d97bb65526c20b6e0845f6b0d2ade4f28604ee5" + integrity sha512-/FvAK2p4jQOaJ6CGDHJTqZcUtbZe820qIeTg7o0Shg7drB4JHeL+V/dhSaly7NXx6u8eSee+r7coT+yuJEvDLg== dependencies: "@types/node" "*" @@ -112,9 +117,9 @@ integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== "@types/node@*", "@types/node@>=13.7.0": - version "15.0.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.1.tgz#ef34dea0881028d11398be5bf4e856743e3dc35a" - integrity sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA== + version "16.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.5.tgz#96142b243977b03d99c338fdb09241d286102711" + integrity sha512-E7SpxDXoHEpmZ9C1gSqwadhE6zPRtf3g0gJy9Y51DsImnR5TcDs3QEiV/3Q7zOM8LWaZp5Gph71NK6ElVMG1IQ== "@types/responselike@*", "@types/responselike@^1.0.0": version "1.0.0" @@ -123,6 +128,11 @@ dependencies: "@types/node" "*" +"@types/semver@^7.3.8": + version "7.3.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59" + integrity sha512-D/2EJvAlCEtYFEYmmlGwbGXuK886HzyCc3nZX/tkFTQdEU8jZDAgiv08P162yB17y4ZXZoq7yFAnW4GDBb9Now== + "@vpnht/sdk@^1.0.10": version "1.1.2" resolved "https://registry.yarnpkg.com/@vpnht/sdk/-/sdk-1.1.2.tgz#9c421586041277ab3f586090fbd75cdba8eaa029" @@ -168,7 +178,7 @@ adm-zip@0.4.16: resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== -agent-base@6: +agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -756,7 +766,7 @@ bittorrent-lsd@^1.1.1: chrome-dgram "^3.0.6" debug "^4.2.0" -bittorrent-peerid@^1.3.2, bittorrent-peerid@^1.3.3: +bittorrent-peerid@^1.3.3: version "1.3.4" resolved "https://registry.yarnpkg.com/bittorrent-peerid/-/bittorrent-peerid-1.3.4.tgz#81c1597a06a1d424a6ddd1bb196eead98c250d01" integrity sha512-Xzk1FJFHmsc9H8IKFtDUkfAZIT1HW8r6UqajfZBBxWmpA1v7FsPO8xPFtnFzCqcXlPN3yi8dDmlqZCemyB7P8w== @@ -776,45 +786,16 @@ bittorrent-protocol@^3.4.3: speedometer "^1.1.0" unordered-array-remove "^1.0.2" -bittorrent-tracker@^9.1.0: - version "9.17.0" - resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.17.0.tgz#8b4b6f6a49efa9023267c3ca22e1a5f63216fc1f" - integrity sha512-ErpOx8AAUW8eLwxnEHp15vs0LDJECLADHISEBM+HXclG3J2/9kMBJ31IjwlB8kUNigknSwm8odAThjJEeyL1yA== - dependencies: - bencode "^2.0.1" - bittorrent-peerid "^1.3.2" - bn.js "^5.1.1" - chrome-dgram "^3.0.4" - compact2string "^1.4.1" - debug "^4.1.1" - ip "^1.1.5" - lru "^3.1.0" - minimist "^1.2.5" - once "^1.4.0" - queue-microtask "^1.2.2" - random-iterate "^1.0.1" - randombytes "^2.1.0" - run-parallel "^1.1.9" - run-series "^1.1.8" - simple-get "^4.0.0" - simple-peer "^9.7.1" - simple-websocket "^9.0.0" - string2compact "^1.3.0" - unordered-array-remove "^1.0.2" - ws "^7.3.0" - optionalDependencies: - bufferutil "^4.0.1" - utf-8-validate "^5.0.2" - -bittorrent-tracker@^9.17.4: - version "9.17.4" - resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.17.4.tgz#663f51064a924e945cb6ca19a0c293aca258128b" - integrity sha512-ykhdVQHtLfn4DYSJUQD/zFAbP8YwnF6nGlj2SBnCY4xkW5bhwXPeFZUhryAtdITl0qNL/FpmFOamBZfxIwkbxg== +bittorrent-tracker@^9.1.0, bittorrent-tracker@^9.17.4: + version "9.18.0" + resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.18.0.tgz#d15716ebf35144da95732fefa9727ec880f6a3f2" + integrity sha512-bZhW94TOExkRhn9g67SLWjGfT6seSlT//+oG7+AFve0wQP6DMNSnu7ued6McsTMaL+XivNFCE9YVWPbQ4moTYA== dependencies: bencode "^2.0.1" bittorrent-peerid "^1.3.3" bn.js "^5.2.0" chrome-dgram "^3.0.6" + clone "^1.0.2" compact2string "^1.4.1" debug "^4.1.1" ip "^1.1.5" @@ -829,6 +810,7 @@ bittorrent-tracker@^9.17.4: simple-get "^4.0.0" simple-peer "^9.11.0" simple-websocket "^9.1.0" + socks "^1.1.9" string2compact "^1.3.0" unordered-array-remove "^1.0.2" ws "^7.4.5" @@ -861,7 +843,7 @@ bluebird@^3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^5.1.1, bn.js@^5.2.0: +bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -982,9 +964,9 @@ buffer-fill@^1.0.0: integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer-indexof@^1.0.0: version "1.1.1" @@ -1007,7 +989,7 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -bufferutil@^4.0.1, bufferutil@^4.0.3: +bufferutil@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== @@ -1080,16 +1062,16 @@ cacheable-request@^6.0.0: responselike "^1.0.2" cacheable-request@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" - integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== dependencies: clone-response "^1.0.2" get-stream "^5.1.0" http-cache-semantics "^4.0.0" keyv "^4.0.0" lowercase-keys "^2.0.0" - normalize-url "^4.1.0" + normalize-url "^6.0.1" responselike "^2.0.0" call-bind@^1.0.0, call-bind@^1.0.2: @@ -1192,16 +1174,16 @@ charset-detector@0.0.2: resolved "https://registry.yarnpkg.com/charset-detector/-/charset-detector-0.0.2.tgz#1cd5ddaf56e83259c6ef8e906ccf06f75fe9a1b2" integrity sha1-HNXdr1boMlnG746QbM8G91/pobI= -cheerio-select@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.4.0.tgz#3a16f21e37a2ef0f211d6d1aa4eff054bb22cdc9" - integrity sha512-sobR3Yqz27L553Qa7cK6rtJlMDbiKPdNywtR95Sj/YgfpLfy0u6CGJuaBKe5YE/vTc23SCRKxWSdlon/w6I/Ew== +cheerio-select@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.5.0.tgz#faf3daeb31b17c5e1a9dabcee288aaf8aafa5823" + integrity sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg== dependencies: - css-select "^4.1.2" - css-what "^5.0.0" + css-select "^4.1.3" + css-what "^5.0.1" domelementtype "^2.2.0" domhandler "^4.2.0" - domutils "^2.6.0" + domutils "^2.7.0" cheerio@^0.22.0: version "0.22.0" @@ -1226,16 +1208,17 @@ cheerio@^0.22.0: lodash.some "^4.4.0" cheerio@^1.0.0-rc.3: - version "1.0.0-rc.6" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.6.tgz#a5ae81ab483aeefa1280c325543c601145506240" - integrity sha512-hjx1XE1M/D5pAtMgvWwE21QClmAEeGHOIDfycgmndisdNgI6PE1cGRQkMGBcsbUbmEQyWu5PJLUcAOjtQS8DWw== + version "1.0.0-rc.10" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" + integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== dependencies: - cheerio-select "^1.3.0" - dom-serializer "^1.3.1" - domhandler "^4.1.0" + cheerio-select "^1.5.0" + dom-serializer "^1.3.2" + domhandler "^4.2.0" htmlparser2 "^6.1.0" parse5 "^6.0.1" parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" chokidar@^2.0.0: version "2.1.8" @@ -1261,7 +1244,7 @@ chownr@^1.0.1, chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== -chrome-dgram@^3.0.2, chrome-dgram@^3.0.4, chrome-dgram@^3.0.6: +chrome-dgram@^3.0.2, chrome-dgram@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/chrome-dgram/-/chrome-dgram-3.0.6.tgz#2288b5c7471f66f073691206d36319dda713cf55" integrity sha512-bqBsUuaOiXiqxXt/zA/jukNJJ4oaOtc7ciwqJpZVEaaXwwxqgI2/ZdG02vXYWUhHGziDlvGMQWk0qObgJwVYKA== @@ -1382,7 +1365,7 @@ clone-stats@^1.0.0: resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= -clone@^1.0.0: +clone@^1.0.0, clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= @@ -1490,9 +1473,9 @@ concat-stream@^1.4.8, concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@ typedarray "^0.0.6" config-chain@^1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -1532,9 +1515,9 @@ consume-until@^1.0.0: buffer-indexof "^1.0.0" convert-source-map@^1.1.1, convert-source-map@^1.2.0, convert-source-map@^1.5.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== dependencies: safe-buffer "~5.1.1" @@ -1644,10 +1627,10 @@ css-parse@~2.0.0: dependencies: css "^2.0.0" -css-select@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.2.tgz#8b52b6714ed3a80d8221ec971c543f3b12653286" - integrity sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw== +css-select@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== dependencies: boolbase "^1.0.0" css-what "^5.0.0" @@ -1670,10 +1653,10 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== -css-what@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.0.tgz#f0bf4f8bac07582722346ab243f6a35b512cfc47" - integrity sha512-qxyKHQvgKwzwDWC/rGbT821eJalfupxYW2qbSJSAtdSTimsr/MlaGONoNLllaUPZWf8QnbcKM/kPVYUQuEKAFA== +css-what@^5.0.0, css-what@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" + integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== css@^2.0.0: version "2.2.4" @@ -1717,10 +1700,10 @@ dayjs@^1.10.6: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.6.tgz#288b2aa82f2d8418a6c9d4df5898c0737ad02a63" integrity sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw== -debug@*, debug@4: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== +debug@*, debug@4, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== dependencies: ms "2.1.2" @@ -1738,13 +1721,6 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -1916,13 +1892,12 @@ dns-packet@^1.3.1: ip "^1.1.0" safe-buffer "^5.0.1" -dns-packet@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-4.2.0.tgz#3fd6f5ff5a4ec3194ed0b15312693ffe8776b343" - integrity sha512-bn1AKpfkFbm0MIioOMHZ5qJzl2uypdBwI4nYNsqvhjsegBhcKJUlCrMPWLx6JEezRjxZmxhtIz/FkBEur2l8Cw== +dns-packet@^5.2.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.0.tgz#9a0f66118d3be176b828b911a842b0b1a4bdfd4f" + integrity sha512-Nce7YLu6YCgWRvOmDBsJMo9M5/jV3lEZ5vUWnWXYmwURvPylHvq7nkDWhNmk1ZQoZZOP7oQh/S0lSxbisKOfHg== dependencies: - ip "^1.1.5" - safe-buffer "^5.1.1" + "@leichtgewicht/ip-codec" "^2.0.1" dns-txt@^2.0.2: version "2.0.2" @@ -1939,13 +1914,13 @@ dom-serializer@0: domelementtype "^2.0.1" entities "^2.0.0" -dom-serializer@^1.0.1, dom-serializer@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.1.tgz#d845a1565d7c041a95e5dab62184ab41e3a519be" - integrity sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q== +dom-serializer@^1.0.1, dom-serializer@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== dependencies: domelementtype "^2.0.1" - domhandler "^4.0.0" + domhandler "^4.2.0" entities "^2.0.0" dom-serializer@~0.1.0: @@ -1980,7 +1955,7 @@ domhandler@^2.3.0: dependencies: domelementtype "1" -domhandler@^4.0.0, domhandler@^4.1.0, domhandler@^4.2.0: +domhandler@^4.0.0, domhandler@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== @@ -2003,10 +1978,10 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -domutils@^2.5.2, domutils@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.6.0.tgz#2e15c04185d43fb16ae7057cb76433c6edb938b7" - integrity sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA== +domutils@^2.5.2, domutils@^2.6.0, domutils@^2.7.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== dependencies: dom-serializer "^1.0.1" domelementtype "^2.2.0" @@ -2271,11 +2246,11 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: homedir-polyfill "^1.0.1" ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + version "1.5.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.5.0.tgz#e93b97ae0cb23f8370380f6107d2d2b7887687ad" + integrity sha512-+ONcYoWj/SoQwUofMr94aGu05Ou4FepKi7N7b+O8T4jVfyIsZQV1/xeS8jpaBzF0csAk0KLXoHCxU7cKYZjo1Q== dependencies: - type "^2.0.0" + type "^2.5.0" extend-shallow@^1.1.2: version "1.1.4" @@ -2383,9 +2358,9 @@ fast-levenshtein@^1.0.0: integrity sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk= faye-websocket@0.x.x: - version "0.11.3" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== dependencies: websocket-driver ">=0.5.1" @@ -2703,11 +2678,12 @@ getpass@^0.1.1: assert-plus "^1.0.0" git-describe@^4.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/git-describe/-/git-describe-4.0.4.tgz#f3d55bce309becf6dc27fed535d380a621967e8c" - integrity sha512-L1X9OO1e4MusB4PzG9LXeXCQifRvyuoHTpuuZ521Qyxn/B0kWHWEOtsT4LsSfSNacZz0h4ZdYDsDG7f+SrA3hg== + version "4.1.0" + resolved "https://registry.yarnpkg.com/git-describe/-/git-describe-4.1.0.tgz#0c50fa1ec5ead55932b6e875b2299b17ce5e07d3" + integrity sha512-NM7JSseVK4Z0r505+2TIrgPQKPvqbOowHP73IY5y69v/t/PmoMleJdij1vTO3qVm1qSvqb6342p1MYSxsnV8QA== dependencies: - lodash "^4.17.11" + "@types/semver" "^7.3.8" + lodash "^4.17.21" optionalDependencies: semver "^5.6.0" @@ -2811,19 +2787,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -2961,9 +2925,9 @@ graceful-fs-extra@^2.0.0: proxyquire "^1.4.0" graceful-fs@^4.0.0, graceful-fs@^4.1.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== graceful-ncp@^3.0.0: version "3.0.0" @@ -3178,7 +3142,7 @@ has-symbol-support-x@^1.4.1: resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.1: +has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== @@ -3190,6 +3154,13 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -3331,9 +3302,9 @@ http2-wrapper@^1.0.0-beta.5.2: resolve-alpn "^1.0.0" i18n@0.x.x: - version "0.13.2" - resolved "https://registry.yarnpkg.com/i18n/-/i18n-0.13.2.tgz#3886678fe7cbbed45bac2ce53b8144c788a1c1b5" - integrity sha512-PB65bHhQESMBIl/xVNChEAzoxZ5W6FrZ1H9Ma/YcPeSfE7VS9b0sqwBPusa0CfzSKUPSl+uMhRIgyv3jkE7XNw== + version "0.13.3" + resolved "https://registry.yarnpkg.com/i18n/-/i18n-0.13.3.tgz#5820f48d87a77cf14e064719bee9bc682ed550eb" + integrity sha512-QDmY2joBdKxj3wvk2LKyvZkjwGHta882kYHwEvx1WbwiPAet49kEU7cxzGfnrtWrfh4+7I07kBc0ZSjSlhnKyQ== dependencies: debug "^4.1.1" make-plural "^6.2.2" @@ -3343,9 +3314,9 @@ i18n@0.x.x: sprintf-js "^1.1.2" iconv-lite@0.x.x, iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" @@ -3452,7 +3423,7 @@ ip-set@^2.1.0: dependencies: ip "^1.1.5" -ip@^1.0.1, ip@^1.1.0, ip@^1.1.5: +ip@^1.0.1, ip@^1.1.0, ip@^1.1.4, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -3490,11 +3461,12 @@ is-accessor-descriptor@^1.0.0: kind-of "^6.0.0" is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" @@ -3526,9 +3498,9 @@ is-ci@^1.0.10: ci-info "^1.5.0" is-core-module@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.3.0.tgz#d341652e3408bca69c4671b79a0954a3d349f887" - integrity sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw== + version "2.6.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" + integrity sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ== dependencies: has "^1.0.3" @@ -3547,9 +3519,11 @@ is-data-descriptor@^1.0.0: kind-of "^6.0.0" is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-descriptor@^0.1.0: version "0.1.6" @@ -3750,12 +3724,12 @@ is-redirect@^1.0.0: integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= is-regex@^1.0.4: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" - integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== dependencies: call-bind "^1.0.2" - has-symbols "^1.0.1" + has-tostringtag "^1.0.0" is-relative@^1.0.0: version "1.0.0" @@ -3865,14 +3839,13 @@ jquery@^3.5.1: integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw== js-beautify@^1.7.5: - version "1.13.13" - resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.13.13.tgz#756907d1728f329f2b84c42efd56ad17514620bf" - integrity sha512-oH+nc0U5mOAqX8M5JO1J0Pw/7Q35sAdOsM5W3i87pir9Ntx6P/5Gx1xLNoK+MGyvHk4rqqRCE4Oq58H6xl2W7A== + version "1.14.0" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.0.tgz#2ce790c555d53ce1e3d7363227acf5dc69024c2d" + integrity sha512-yuck9KirNSCAwyNJbqW+BxJqJ0NLJ4PwBUzQQACl5O3qHMBXVkXb/rD0ilh/Lat/tn88zSZ+CAHOlk0DsY7GuQ== dependencies: config-chain "^1.1.12" editorconfig "^0.15.3" glob "^7.1.3" - mkdirp "^1.0.4" nopt "^5.0.0" jsbn@~0.1.0: @@ -3898,15 +3871,15 @@ jshint-stylish@^2.2.1: text-table "^0.2.0" jshint@^2.9.6: - version "2.12.0" - resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.12.0.tgz#52e75bd058d587ef81a0e2f95e5cf18eb5dc5c37" - integrity sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA== + version "2.13.1" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.13.1.tgz#16bbbecdbb4564d3758d9de4f24926f8c7f8f835" + integrity sha512-vymzfR3OysF5P774x6zYv0bD4EpH6NWRxpq54wO9mA9RuY49yb1teKSICkLx2Ryx+mfzlVVNNbTBtsRtg78t7g== dependencies: cli "~1.0.0" console-browserify "1.1.x" exit "0.1.x" htmlparser2 "3.8.x" - lodash "~4.17.19" + lodash "~4.17.21" minimatch "~3.0.2" shelljs "0.3.x" strip-json-comments "1.0.x" @@ -4174,9 +4147,9 @@ load-json-file@^1.0.0: strip-bom "^2.0.0" localforage@^1.3.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.9.0.tgz#f3e4d32a8300b362b4634cc4e066d9d00d2f09d1" - integrity sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g== + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== dependencies: lie "3.1.1" @@ -4368,7 +4341,7 @@ lodash@3.x.x, lodash@^3.5.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= -lodash@^4.12.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.19, lodash@~4.17.4: +lodash@^4.12.0, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.8.0, lodash@~4.17.21, lodash@~4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4653,17 +4626,17 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@1.47.0: - version "1.47.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" - integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.30" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" - integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== dependencies: - mime-db "1.47.0" + mime-db "1.49.0" mime@1.4.1: version "1.4.1" @@ -4740,7 +4713,7 @@ mkdirp-classic@^0.5.2: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@*, mkdirp@^1.0.4, mkdirp@~1.0.4: +mkdirp@*, mkdirp@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -4808,11 +4781,11 @@ multicast-dns@^6.0.1: thunky "^1.0.2" multicast-dns@^7.2.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.2.tgz#5731da04f47d1e435ac457e5ac7b4b39d866a5a1" - integrity sha512-XqSMeO8EWV/nOXOpPV8ztIpNweVfE1dSpz6SQvDPp71HD74lMXjt4m/mWB1YBMG0kHtOodxRWc5WOb/UNN1A5g== + version "7.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.3.tgz#cbd07571dda41807b36f71067681f19e85ccc2cd" + integrity sha512-TzxgGSLRLB7tqAlzjgd2x2ZE0cDsGFq4rs9W4yE5xp+7hlRXeUQGtXZsTGfGw2FwWB45rfe8DtXMYBpZGMLUng== dependencies: - dns-packet "^4.0.0" + dns-packet "^5.2.2" thunky "^1.0.2" multimatch@^2.0.0: @@ -4853,9 +4826,9 @@ mv@2.x.x: rimraf "~2.4.0" nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== nanomatch@^1.2.9: version "1.2.13" @@ -4896,9 +4869,9 @@ nedb@1.8.0: underscore "~1.4.4" needle@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz#24dbb55f2509e2324b4a99d61f413982013ccdbe" - integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== + version "2.9.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.9.0.tgz#c680e401f99b6c3d8d1f315756052edf3dc3bdff" + integrity sha512-UBLC4P8w9to3rAhWOQYXIXzTUio9yVnDzIeKxfGbF+Hngy+2bXTqqFK+6nF42EAQKfJdezXK6vzMsefUa1Y3ag== dependencies: debug "^3.2.6" iconv-lite "^0.4.4" @@ -5025,6 +4998,11 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + now-and-later@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" @@ -5265,9 +5243,9 @@ p-cancelable@^1.0.0: integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== p-cancelable@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.0.tgz#4d51c3b91f483d02a0d300765321fca393d758dd" - integrity sha512-HAZyB3ZodPo+BDpb4/Iu7Jv4P6cSazBz9ZM0ChhEXp70scx834aWCEjQRwgt41UzzejUAPdbqqONfRWTPYrPAQ== + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== p-defer@^1.0.0: version "1.0.0" @@ -5526,13 +5504,12 @@ plist@^1.2.0: xmldom "0.1.x" plist@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.2.tgz#74bbf011124b90421c22d15779cee60060ba95bc" - integrity sha512-MSrkwZBdQ6YapHy87/8hDU8MnIcyxBKjeF+McXnr5A9MtffPewTs7G3hlpodT5TacyfIyFTaJEhh3GGcmasTgQ== + version "3.0.4" + resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.4.tgz#a62df837e3aed2bb3b735899d510c4f186019cbe" + integrity sha512-ksrr8y9+nXOxQB2osVNqrgvX/XQPOXaU4BQMKjYq8PvaY1U18mo+fKgBSwzK+luSyinOuPae956lSVcBwxlAMg== dependencies: base64-js "^1.5.1" xmlbuilder "^9.0.7" - xmldom "^0.5.0" plugin-error@^0.1.2: version "0.1.2" @@ -5608,9 +5585,9 @@ proto-list@~1.2.1: integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= protobufjs@^6.8.8: - version "6.11.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.0.tgz#b890a2d3f64c62f0395e1e000d39ff91634bafb7" - integrity sha512-i4usrGD86mtOLnoTwUsVXphDY7yHM2rDiV3JU4Ix43BOtHi0DHy5rSCciX8MRHSYHaxnoc0TcpwEBlrNUAxvQQ== + version "6.11.2" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" + integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -6104,9 +6081,9 @@ requires-port@^1.0.0: integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-alpn@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.1.2.tgz#30b60cfbb0c0b8dc897940fe13fe255afcdd4d28" - integrity sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA== + version "1.2.0" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.0.tgz#058bb0888d1cd4d12474e9a4b6eb17bdd5addc44" + integrity sha512-e4FNQs+9cINYMO5NMFc6kOUCdohjqFPSgMuwuZAOUWqrfWsen+Yjy5qZFkV5K7VO7tFSLKcUL97olkED7sCBHA== resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" @@ -6208,24 +6185,19 @@ run-parallel-limit@^1.1.0: dependencies: queue-microtask "^1.2.2" -run-parallel@^1.1.2, run-parallel@^1.1.6, run-parallel@^1.1.9, run-parallel@^1.2.0: +run-parallel@^1.1.2, run-parallel@^1.1.6, run-parallel@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" -run-series@^1.1.8, run-series@^1.1.9: +run-series@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-series/-/run-series-1.1.9.tgz#15ba9cb90e6a6c054e67c98e1dc063df0ecc113a" integrity sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g== -rusha@^0.8.1: - version "0.8.13" - resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.13.tgz#9a084e7b860b17bff3015b92c67a6a336191513a" - integrity sha1-mghOe4YLF7/zAVuSxnpqM2GRUTo= - -rusha@^0.8.13: +rusha@^0.8.1, rusha@^0.8.13: version "0.8.14" resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.14.tgz#a977d0de9428406138b7bb90d3de5dcd024e2f68" integrity sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA== @@ -6412,7 +6384,7 @@ simple-glob@~0.2.0: lodash.flatten "^4.4.0" lodash.union "^4.6.0" -simple-peer@^9.11.0, simple-peer@^9.7.1: +simple-peer@^9.11.0: version "9.11.0" resolved "https://registry.yarnpkg.com/simple-peer/-/simple-peer-9.11.0.tgz#e8d27609c7a610c3ddd75767da868e8daab67571" integrity sha512-qvdNu/dGMHBm2uQ7oLhQBMhYlrOZC1ywXNCH/i8I4etxR1vrjCnU6ZSQBptndB1gcakjo2+w4OHo7Sjza1SHxg== @@ -6440,7 +6412,7 @@ simple-sha1@^3.0.1, simple-sha1@^3.1.0: queue-microtask "^1.2.2" rusha "^0.8.13" -simple-websocket@^9.0.0, simple-websocket@^9.1.0: +simple-websocket@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/simple-websocket/-/simple-websocket-9.1.0.tgz#91cbb39eafefbe7e66979da6c639109352786a7f" integrity sha512-8MJPnjRN6A8UCp1I+H/dSFyjwJhp6wta4hsVRhjf8w9qBHRzxYt14RaOcjvQnhD1N4yKOddEjflwMnQM4VtXjQ== @@ -6458,10 +6430,15 @@ single-line-log@^1.0.1: dependencies: string-width "^1.0.1" +smart-buffer@^1.0.13: + version "1.1.15" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" + integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= + smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== snapdragon-node@^2.0.1: version "2.1.1" @@ -6494,14 +6471,22 @@ snapdragon@^0.8.1: use "^3.1.0" socks-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60" - integrity sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" + integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== dependencies: - agent-base "6" + agent-base "^6.0.2" debug "4" socks "^2.3.3" +socks@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" + integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= + dependencies: + ip "^1.1.4" + smart-buffer "^1.0.13" + socks@^2.3.3: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" @@ -6575,9 +6560,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" - integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + version "3.0.10" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b" + integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA== speed-limiter@^1.0.2: version "1.0.2" @@ -7209,6 +7194,11 @@ trim-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= +tslib@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7226,7 +7216,7 @@ type@^1.0.1: resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== -type@^2.0.0: +type@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== @@ -7472,7 +7462,7 @@ ut_pex@^3.0.2: compact2string "^1.4.1" string2compact "^1.3.2" -utf-8-validate@^5.0.2, utf-8-validate@^5.0.5: +utf-8-validate@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== @@ -7712,9 +7702,9 @@ webtorrent-health@1.x.x: parse-torrent "^5.8.2" webtorrent@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.4.0.tgz#f875f2132a4028382f2f28475ef787fa7c22e95f" - integrity sha512-dnlSkPiRsk2I9pIoSdG0Zw6d6bWNkYpSoix3bu3eQRNk5xRd+7F1/K7y+tMv/svuGV9nj1aY3N8xSK5OSTyMSg== + version "1.5.4" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.4.tgz#0f43968196414ece3e6e07687ce6a62215018a8b" + integrity sha512-XXvOHlCskDgDjFoId0YrTebQQ/11rIJIm0MQqkBPctSA+RPrRDDooJa8yHAsVP+Aa2PtoxrKPSHr9RFDq+46aQ== dependencies: addr-to-ip-port "^1.5.4" bitfield "^4.0.0" @@ -7845,15 +7835,10 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -ws@^7.2.1: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@^7.3.0, ws@^7.4.2, ws@^7.4.5: - version "7.5.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" - integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== +ws@^7.2.1, ws@^7.4.2, ws@^7.4.5: + version "7.5.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9" + integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg== xdg-basedir@^3.0.0: version "3.0.0" @@ -7895,11 +7880,6 @@ xmldom@0.1.x: resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== -xmldom@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.5.0.tgz#193cb96b84aa3486127ea6272c4596354cb4962e" - integrity sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA== - xmlrpc@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/xmlrpc/-/xmlrpc-1.3.2.tgz#26b2ea347848d028aac7e7514b5351976de3e83d" From d7a5bc1c8154ad92863786f526c88ad4d4021778 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:45:06 +0300 Subject: [PATCH 097/168] Bump WebTorrent in package.json --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3943e1468d..1a90d2ae2b 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "urijs": "1.19.7", "video.js": "4.11.4", "videojs-youtube": "1.2.10", - "webtorrent": "^1.4.0", + "webtorrent": "^1.5.4", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 581def70a3..75ed164227 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7701,7 +7701,7 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -webtorrent@^1.4.0: +webtorrent@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.4.tgz#0f43968196414ece3e6e07687ce6a62215018a8b" integrity sha512-XXvOHlCskDgDjFoId0YrTebQQ/11rIJIm0MQqkBPctSA+RPrRDDooJa8yHAsVP+Aa2PtoxrKPSHr9RFDq+46aQ== From 7a20bb143abe62441441eadf48f68a12ef3928be Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 29 Aug 2021 17:09:12 +0300 Subject: [PATCH 098/168] update some libs --- package.json | 13 +++---- yarn.lock | 106 ++++++++++++++++++++++----------------------------- 2 files changed, 52 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index 1a90d2ae2b..a50ed89479 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "defer-request": "0.0.3", "dlnacasts2": "0.2.0", "edit-json-file": "^1.4.1", - "es6-object-assign": "^1.0.1", "flag-icon-css": "^3.5.0", "i18n": "0.x.x", "iconv-lite": "0.x.x", @@ -81,11 +80,11 @@ "querystring": "^0.2.0", "readdirp": "2.x.x", "request": "2.88.x", - "rimraf": "2.x.x", + "rimraf": "^3.0.0", "sanitizer": "0.x.x", - "semver": "5.x.x", - "send": "0.16.x", - "socks-proxy-agent": "^5.0.0", + "semver": "^5.7.1", + "send": "^0.17.1", + "socks-proxy-agent": "^6.0.0", "srt-to-vtt": "^1.1", "tar": "4.4.15", "torrentcollection4": "0.0.9", @@ -93,8 +92,8 @@ "trakt.tv-images": "5.x.x", "trakt.tv-matcher": "7.x.x", "trakt.tv-ondeck": "7.x.x", - "underscore": "1.12.1", - "urijs": "1.19.7", + "underscore": "^1.13.0", + "urijs": "^1.19.7", "video.js": "4.11.4", "videojs-youtube": "1.2.10", "webtorrent": "^1.5.4", diff --git a/yarn.lock b/yarn.lock index 75ed164227..5952d0bd65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2129,11 +2129,6 @@ es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-object-assign@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw= - es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -3249,15 +3244,16 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== dependencies: depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" http-headers@^3.0.1: version "3.0.2" @@ -3379,16 +3375,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - ini@^1.3.4, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -4638,12 +4629,7 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.49.0" -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -mime@^1.3.4: +mime@1.6.0, mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -4757,6 +4743,11 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -5745,7 +5736,7 @@ randombytes@^2.0.3, randombytes@^2.0.5, randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@^1.0.3, range-parser@^1.2.1, range-parser@~1.2.0: +range-parser@^1.0.3, range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== @@ -6152,7 +6143,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.2: +rimraf@^2.2.8, rimraf@^2.5.2: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -6258,7 +6249,7 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -"semver@2 || 3 || 4 || 5", semver@5.x.x, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -6268,10 +6259,10 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -send@0.16.x: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== +send@^0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== dependencies: debug "2.6.9" depd "~1.1.2" @@ -6280,12 +6271,12 @@ send@0.16.x: escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" + range-parser "~1.2.1" + statuses "~1.5.0" server-destroy@^1.0.1: version "1.0.1" @@ -6314,10 +6305,10 @@ set-value@^3.0.1: dependencies: is-plain-object "^2.0.4" -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== shebang-command@^1.2.0: version "1.2.0" @@ -6470,14 +6461,14 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socks-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" - integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== +socks-proxy-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.0.0.tgz#9f8749cdc05976505fa9f9a958b1818d0e60573b" + integrity sha512-FIgZbQWlnjVEQvMkylz64/rUggGtrKstPnx8OZyYFG0tAFR8CSBtpXxSwbFLHyeXFn/cunFL7MpuSOvDSOPo9g== dependencies: agent-base "^6.0.2" - debug "4" - socks "^2.3.3" + debug "^4.3.1" + socks "^2.6.1" socks@^1.1.9: version "1.1.10" @@ -6487,7 +6478,7 @@ socks@^1.1.9: ip "^1.1.4" smart-buffer "^1.0.13" -socks@^2.3.3: +socks@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== @@ -6643,16 +6634,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2": +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" @@ -7107,6 +7093,11 @@ to-utf-8@^1.2.0: peek-stream "^1.1.1" stream-splicer "^1.3.1" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + torrent-discovery@^9.4.4: version "9.4.4" resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.4.tgz#6bc964030127cdf95fcaccadbff1038876a44af4" @@ -7260,17 +7251,12 @@ unc-path-regex@^0.1.2: resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= -underscore@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" - integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== - "underscore@>=1.3.3 <=1.8.3", "underscore@>=1.4.0 <=1.8.3": version "1.8.3" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= -underscore@>=1.8.3: +underscore@>=1.8.3, underscore@^1.13.0: version "1.13.1" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== @@ -7401,7 +7387,7 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urijs@1.19.7, urijs@^1.19.1: +urijs@^1.19.1, urijs@^1.19.7: version "1.19.7" resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.7.tgz#4f594e59113928fea63c00ce688fb395b1168ab9" integrity sha512-Id+IKjdU0Hx+7Zx717jwLPsPeUqz7rAtuVBRLLs+qn+J2nf9NGITWVCxcijgYxBqe83C7sqsQPs6H1pyz3x9gA== From a9a1fb080a8a69cc7928d898ca7d43739d8104be Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 29 Aug 2021 18:44:02 +0300 Subject: [PATCH 099/168] update nedb and use promise version --- package.json | 2 +- src/app/database.js | 81 ++++++++++++++++----------------------------- yarn.lock | 42 +++++++++++------------ 3 files changed, 49 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index a50ed89479..4494af51bc 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "mkdirp": "*", "mousetrap": "~1.6.2", "mv": "2.x.x", - "nedb": "1.8.0", + "nedb-promises": "^5.0.0", "node-tvdb": "^4.1.0", "opensubtitles-api": "^5.1.2", "q": "2.0.3", diff --git a/src/app/database.js b/src/app/database.js index ecf465a7f3..d4e962bf34 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -1,4 +1,4 @@ -var Datastore = require('nedb'), +var Datastore = require('nedb-promises'), db = {}, TTL = 1000 * 60 * 60 * 24; @@ -26,18 +26,6 @@ db.watched = new Datastore({ autoload: true }); -function promisifyDatastore(datastore) { - datastore.insert = Q.denodeify(datastore.insert, datastore); - datastore.update = Q.denodeify(datastore.update, datastore); - datastore.remove = Q.denodeify(datastore.remove, datastore); -} - -promisifyDatastore(db.bookmarks); -promisifyDatastore(db.settings); -promisifyDatastore(db.tvshows); -promisifyDatastore(db.movies); -promisifyDatastore(db.watched); - // Create unique indexes for the various id's for shows and movies db.tvshows.ensureIndex({ fieldName: 'imdb_id', @@ -72,19 +60,6 @@ var extractMovieIds = function (items) { return _.pluck(items, 'movie_id'); }; -// This utilizes the exec function on nedb to turn function calls into promises -var promisifyDb = function (obj) { - return Q.Promise(function (resolve, reject) { - obj.exec(function (error, result) { - if (error) { - return reject(error); - } else { - return resolve(result); - } - }); - }); -}; - var Database = { addMovie: function (data) { return db.movies.insert(data); @@ -97,9 +72,9 @@ var Database = { }, getMovie: function (imdb_id) { - return promisifyDb(db.movies.findOne({ + return db.movies.findOne({ imdb_id: imdb_id - })); + }); }, addBookmark: function (imdb_id, type) { @@ -140,11 +115,11 @@ var Database = { query.type = data.type; } - return promisifyDb(db.bookmarks.find(query).skip(offset).limit(byPage)); + return db.bookmarks.find(query).skip(offset).limit(byPage); }, getAllBookmarks: function () { - return promisifyDb(db.bookmarks.find({})) + return db.bookmarks.find({}) .then(function (data) { var bookmarks = []; if (data) { @@ -172,7 +147,7 @@ var Database = { win.warn('This shouldn\'t be called'); - return Q(); + return Promise.resolve(); }, markMovieAsNotWatched: function (data) { @@ -185,9 +160,9 @@ var Database = { }, getMoviesWatched: function () { - return promisifyDb(db.watched.find({ + return db.watched.find({ type: 'movie' - })); + }); }, /******************************* @@ -204,9 +179,9 @@ var Database = { }, markEpisodeAsWatched: function (data) { - return promisifyDb(db.watched.find({ + return db.watched.find({ tvdb_id: data.tvdb_id.toString() - })) + }) .then(function (response) { if (response.length === 0) { App.watchedShows.push(data.imdb_id.toString()); @@ -233,9 +208,9 @@ var Database = { }, markEpisodeAsNotWatched: function (data) { - return promisifyDb(db.watched.find({ + return db.watched.find({ tvdb_id: data.tvdb_id.toString() - })) + }) .then(function (response) { if (response.length === 1) { App.watchedShows.splice(App.watchedShows.indexOf(data.imdb_id.toString()), 1); @@ -255,12 +230,12 @@ var Database = { }, checkEpisodeWatched: function (data) { - return promisifyDb(db.watched.find({ + return db.watched.find({ tvdb_id: data.tvdb_id.toString(), imdb_id: data.imdb_id.toString(), season: data.season.toString(), episode: data.episode.toString() - })) + }) .then(function (data) { return (data !== null && data.length > 0); }); @@ -269,15 +244,15 @@ var Database = { // return an array of watched episode for this // tvshow getEpisodesWatched: function (tvdb_id) { - return promisifyDb(db.watched.find({ + return db.watched.find({ tvdb_id: tvdb_id.toString() - })); + }); }, getAllEpisodesWatched: function () { - return promisifyDb(db.watched.find({ + return db.watched.find({ type: 'episode' - })); + }); }, // Used in bookmarks @@ -291,26 +266,26 @@ var Database = { getTVShow: function (data) { win.warn('this isn\'t used anywhere'); - return promisifyDb(db.tvshows.findOne({ + return db.tvshows.findOne({ _id: data.tvdb_id - })); + }); }, // Used in bookmarks getTVShowByImdb: function (imdb_id) { - return promisifyDb(db.tvshows.findOne({ + return db.tvshows.findOne({ imdb_id: imdb_id - })); + }); }, getSetting: function (data) { - return promisifyDb(db.settings.findOne({ + return db.settings.findOne({ key: data.key - })); + }); }, getSettings: function () { - return promisifyDb(db.settings.find({})); + return db.settings.find({}); }, getUserInfo: function () { @@ -329,7 +304,7 @@ var Database = { App.watchedShows = extractIds(data); }); - return Q.all([bookmarks, movies, episodes]); + return Promise.all([bookmarks, movies, episodes]); }, // format: {key: key_name, value: settings_value} @@ -370,7 +345,7 @@ var Database = { fs.unlinkSync(path.join(data_path, 'data/settings.db')); - return Q.Promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { var req = indexedDB.deleteDatabase(App.Config.cache.name); req.onsuccess = function () { resolve(); @@ -395,7 +370,7 @@ var Database = { .then(Database.getSettings) .then(function (data) { if (data !== null) { - for (var key in data) { + for (let key in data) { Settings[data[key].key] = data[key].value; } } else { diff --git a/yarn.lock b/yarn.lock index 5952d0bd65..bcb971fecd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -65,6 +65,20 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= +"@seald-io/binary-search-tree@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@seald-io/binary-search-tree/-/binary-search-tree-1.0.2.tgz#9f0e5cec5e0acf97f1b495f2f6d3476ddb6a94ed" + integrity sha512-+pYGvPFAk7wUR+ONMOlc6A+LUN4kOCFwyPLjyaeS7wVibADPHWYJNYsNtyIAwjF1AXQkuaXElnIc4XjKt55QZA== + +"@seald-io/nedb@^2.0.3": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@seald-io/nedb/-/nedb-2.0.4.tgz#d3c0534889b81ba1dc43cbde8721312eee13c648" + integrity sha512-QMSMJemcCIVhbcwVg/oASV74Qudl6ex6c1U8IwckxIvFub1TwRQcchMva30qBUIrNGrLgKXM3c+lgwfdlGa55w== + dependencies: + "@seald-io/binary-search-tree" "^1.0.2" + async "0.2.10" + localforage "^1.9.0" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -719,13 +733,6 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== -binary-search-tree@0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/binary-search-tree/-/binary-search-tree-0.2.5.tgz#7dbb3b210fdca082450dad2334c304af39bdc784" - integrity sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q= - dependencies: - underscore "~1.4.4" - binary-search@^1.3.4: version "1.3.6" resolved "https://registry.yarnpkg.com/binary-search/-/binary-search-1.3.6.tgz#e32426016a0c5092f0f3598836a1c7da3560565c" @@ -4137,7 +4144,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -localforage@^1.3.0: +localforage@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== @@ -4848,16 +4855,12 @@ ncp@^2.0.0, ncp@~2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -nedb@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/nedb/-/nedb-1.8.0.tgz#0e3502cd82c004d5355a43c9e55577bd7bd91d88" - integrity sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg= +nedb-promises@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nedb-promises/-/nedb-promises-5.0.0.tgz#22ad56718808caa71a64afeaab4353a746f4d758" + integrity sha512-PZ+V+1RScHr3mZHflAMMkx35naGHKVVGtqLwdK2aado7uN2HcIcubiaVlE/X8BTa34RnIHmusVM+VeTj/pnfew== dependencies: - async "0.2.10" - binary-search-tree "0.2.5" - localforage "^1.3.0" - mkdirp "~0.5.1" - underscore "~1.4.4" + "@seald-io/nedb" "^2.0.3" needle@^2.5.0: version "2.9.0" @@ -7261,11 +7264,6 @@ underscore@>=1.8.3, underscore@^1.13.0: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== -underscore@~1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= - undertaker-registry@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" From e4137523b778f4afc1bbeefb9cf3314b79e9a038 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 29 Aug 2021 19:01:17 +0300 Subject: [PATCH 100/168] one more unused lib --- package.json | 1 - yarn.lock | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/package.json b/package.json index a50ed89479..95e5ad019f 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "butter-settings-popcorntime.app": "0.0.6", "chromecast-api": "0.3.4", "dayjs": "^1.10.6", - "defer-request": "0.0.3", "dlnacasts2": "0.2.0", "edit-json-file": "^1.4.1", "flag-icon-css": "^3.5.0", diff --git a/yarn.lock b/yarn.lock index 5952d0bd65..a634d34f4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1781,14 +1781,6 @@ default-resolution@^2.0.0: resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= -defer-request@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/defer-request/-/defer-request-0.0.3.tgz#1eea78e7daad8815309a7319c494dfd24262e23a" - integrity sha1-Hup459qtiBUwmnMZxJTf0kJi4jo= - dependencies: - q "^1.4.1" - request "^2.79.0" - defer-to-connect@^1.0.1: version "1.1.3" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" @@ -5660,11 +5652,6 @@ q@2.0.3: pop-iterate "^1.0.1" weak-map "^1.0.5" -q@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -6030,7 +6017,7 @@ request-promise-native@^1.0.8: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@2.88.x, request@^2.79.0, request@^2.88.0: +request@2.88.x, request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== From 3ac5d25f48f37766010bc835b42ac63a57f5e575 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 29 Aug 2021 19:28:59 +0300 Subject: [PATCH 101/168] Add Magnet link button in the loading screen --- src/app/lib/views/player/loading.js | 22 +++++++++++++++++++++- src/app/styl/views/loading.styl | 12 ++++++++++++ src/app/templates/loading.tpl | 3 ++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/player/loading.js b/src/app/lib/views/player/loading.js index 4005417abd..89bc9795e8 100644 --- a/src/app/lib/views/player/loading.js +++ b/src/app/lib/views/player/loading.js @@ -56,6 +56,7 @@ 'mousedown .title': 'copytoclip', 'mousedown .text_filename': 'copytoclip', 'mousedown .text_streamurl': 'copytoclip', + 'mousedown .magnet-icon': 'openMagnet', 'click .playing-progressbar': 'seekStreaming' }, @@ -161,7 +162,7 @@ $('#header').addClass('header-shadow'); App.LoadingView = this; this.initKeyboardShortcuts(); - $('.minimize-icon,#maxic,.open-button,.title,.text_filename,.text_streamurl,.show-pcontrols').tooltip({ + $('.minimize-icon,#maxic,.open-button,.title,.text_filename,.text_streamurl,.show-pcontrols,.magnet-icon').tooltip({ html: true, delay: { 'show': 800, @@ -337,6 +338,25 @@ App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.tmpLocation) : nw.Shell.openItem(Settings.tmpLocation); }, + openMagnet: function (e) { + const torrent = this.model.get('streamInfo').attributes.torrentModel.attributes.torrent; + if (torrent.magnetURI) { + var magnetLink = torrent.magnetURI.replace(/\&/g, '&'); + magnetLink = magnetLink.split('&tr=')[0] + _.union(decodeURIComponent(magnetLink).replace(/\/announce/g, '').split('&tr=').slice(1), Settings.trackers.forced.toString().replace(/\/announce/g, '').split(',')).map(t => `&tr=${t}/announce`).join(''); + if (e.button === 2) { + var clipboard = nw.Clipboard.get(); + clipboard.set(magnetLink, 'text'); //copy link to clipboard + $('.notification_alert') + .text(i18n.__('Copied to clipboard')) + .fadeIn('fast') + .delay(2500) + .fadeOut('fast'); + } else { + nw.Shell.openExternal(magnetLink); + } + } + }, + remainingTime: function () { var streamInfo = this.model.get('streamInfo'); var timeLeft = streamInfo.get('time_left'); diff --git a/src/app/styl/views/loading.styl b/src/app/styl/views/loading.styl index 60478bfdac..8cba094c6a 100644 --- a/src/app/styl/views/loading.styl +++ b/src/app/styl/views/loading.styl @@ -270,6 +270,18 @@ top 12px font-size 12px + .magnet-icon + float right + cursor pointer + transition opacity .2s + opacity 0.4 + + &:hover + opacity 1 + + &:active + opacity 1 + .loading-info width auto height auto diff --git a/src/app/templates/loading.tpl b/src/app/templates/loading.tpl index 8e0a6f2f87..95bcf2fa01 100644 --- a/src/app/templates/loading.tpl +++ b/src/app/templates/loading.tpl @@ -68,7 +68,8 @@
-    ()
+    () + ">


<%= i18n.__("Download") %>:  <%= Common.fileSize(0) %>/s
From af6fdaf5a4b7802869ae1f099c15a3118c237c42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:28:39 +0000 Subject: [PATCH 102/168] Bump tar from 4.4.15 to 4.4.18 Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.18. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-tar/compare/v4.4.15...v4.4.18) --- updated-dependencies: - dependency-name: tar dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 10bfbf1251..c7aae5a96d 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "send": "^0.17.1", "socks-proxy-agent": "^6.0.0", "srt-to-vtt": "^1.1", - "tar": "4.4.15", + "tar": "4.4.18", "torrentcollection4": "0.0.9", "trakt.tv": "7.x.x", "trakt.tv-images": "5.x.x", diff --git a/yarn.lock b/yarn.lock index 92b668a4bc..01acac9a7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1246,7 +1246,7 @@ chokidar@^2.0.0: optionalDependencies: fsevents "^1.2.7" -chownr@^1.0.1, chownr@^1.1.1: +chownr@^1.0.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -2573,7 +2573,7 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -4670,7 +4670,7 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -4678,7 +4678,7 @@ minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -4703,7 +4703,7 @@ mkdirp@*, mkdirp@~1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@~0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.4, mkdirp@^0.5.5, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -6183,7 +6183,7 @@ rusha@^0.8.1, rusha@^0.8.13: resolved "https://registry.yarnpkg.com/rusha/-/rusha-0.8.14.tgz#a977d0de9428406138b7bb90d3de5dcd024e2f68" integrity sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -6873,18 +6873,18 @@ tar-stream@^1.1.2, tar-stream@^1.5.0: to-buffer "^1.1.1" xtend "^4.0.0" -tar@4.4.15: - version "4.4.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" - integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== +tar@4.4.18: + version "4.4.18" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.18.tgz#a565090fdcf786ee08ed14b1739179451b3cc476" + integrity sha512-ZuOtqqmkV9RE1+4odd+MhBpibmCxNP6PJhH/h2OqNuotTX7/XHPZQJv2pKvWMplFH9SIZZhitehh6vBH6LO8Pg== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" "temp@github:adam-lynch/node-temp#remove_tmpdir_dep": version "0.8.3" @@ -7887,7 +7887,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 707617ead31ba3f4ac44deb7a10a72aff1bc9600 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 2 Sep 2021 21:56:41 +0300 Subject: [PATCH 103/168] fix file path in windows --- src/app/lib/streamer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index ffbc2ef85e..a25df0c3bf 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -473,8 +473,10 @@ for (let f in torrent.files) { // Add selection let file = torrent.files[f]; + // windows specific fix + let path = file.path.replace(/\\/g, '/'); // we use endsWith, not equals because from server may return without first directory - if (file.path.endsWith(fileName)) { + if (path.endsWith(fileName)) { fileIndex = f; fileSize = file.length; fileName = file.path; From c637bb5549a78fe2b11572ff87f1c013f1923659 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 3 Sep 2021 21:41:52 +0300 Subject: [PATCH 104/168] update wt --- package.json | 2 +- yarn.lock | 56 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c7aae5a96d..719e1a784c 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "urijs": "^1.19.7", "video.js": "4.11.4", "videojs-youtube": "1.2.10", - "webtorrent": "^1.5.4", + "webtorrent": "^1.5.5", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 01acac9a7a..f7cda5503d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -793,7 +793,7 @@ bittorrent-protocol@^3.4.3: speedometer "^1.1.0" unordered-array-remove "^1.0.2" -bittorrent-tracker@^9.1.0, bittorrent-tracker@^9.17.4: +bittorrent-tracker@^9.1.0: version "9.18.0" resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.18.0.tgz#d15716ebf35144da95732fefa9727ec880f6a3f2" integrity sha512-bZhW94TOExkRhn9g67SLWjGfT6seSlT//+oG7+AFve0wQP6DMNSnu7ued6McsTMaL+XivNFCE9YVWPbQ4moTYA== @@ -825,6 +825,38 @@ bittorrent-tracker@^9.1.0, bittorrent-tracker@^9.17.4: bufferutil "^4.0.3" utf-8-validate "^5.0.5" +bittorrent-tracker@^9.18.2: + version "9.18.2" + resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.18.2.tgz#208f27d69bfb81ccb620655557f8778636bf0e6e" + integrity sha512-r4v+gIi/aQP4h0rvx7WVjnEFvu7Vw2ePPFzoyQjdPfyoJaV/JTdD3kFTZBaVO/Egj5y2O2Y+bTCdPIgD2MzT+A== + dependencies: + bencode "^2.0.1" + bittorrent-peerid "^1.3.3" + bn.js "^5.2.0" + chrome-dgram "^3.0.6" + clone "^1.0.2" + compact2string "^1.4.1" + debug "^4.1.1" + ip "^1.1.5" + lru "^3.1.0" + minimist "^1.2.5" + once "^1.4.0" + queue-microtask "^1.2.3" + random-iterate "^1.0.1" + randombytes "^2.1.0" + run-parallel "^1.2.0" + run-series "^1.1.9" + simple-get "^4.0.0" + simple-peer "^9.11.0" + simple-websocket "^9.1.0" + socks "^2.0.0" + string2compact "^1.3.0" + unordered-array-remove "^1.0.2" + ws "^7.4.5" + optionalDependencies: + bufferutil "^4.0.3" + utf-8-validate "^5.0.5" + bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -6468,7 +6500,7 @@ socks@^1.1.9: ip "^1.1.4" smart-buffer "^1.0.13" -socks@^2.6.1: +socks@^2.0.0, socks@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== @@ -7088,14 +7120,14 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -torrent-discovery@^9.4.4: - version "9.4.4" - resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.4.tgz#6bc964030127cdf95fcaccadbff1038876a44af4" - integrity sha512-psD/QcqSevMouHFbPKz4V9X5u2HuR/SaxeIp2T/JAduHKmDoq/pgxMQiAe/4DlhDgSCIAYWEB2xKP0dUTInBpQ== +torrent-discovery@^9.4.5: + version "9.4.6" + resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.6.tgz#b7e1262a77d14242aaf52eec382f6a142f49e2ae" + integrity sha512-11FlrGmDvgD3RJhZLrC749yyqS7tKx3gXWbYN7xayVYsAcc6f8lQRQQIOF7TBgJE4f0e+ZS8dsct++aOlxFjRw== dependencies: bittorrent-dht "^10.0.2" bittorrent-lsd "^1.1.1" - bittorrent-tracker "^9.17.4" + bittorrent-tracker "^9.18.2" debug "^4.3.2" run-parallel "^1.2.0" @@ -7672,10 +7704,10 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -webtorrent@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.4.tgz#0f43968196414ece3e6e07687ce6a62215018a8b" - integrity sha512-XXvOHlCskDgDjFoId0YrTebQQ/11rIJIm0MQqkBPctSA+RPrRDDooJa8yHAsVP+Aa2PtoxrKPSHr9RFDq+46aQ== +webtorrent@^1.5.5: + version "1.5.5" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.5.tgz#af09e0ac660ac16fea1c838fdd00e56b57f9fc21" + integrity sha512-YAEtWZxxf8N6DvdLgt79fQlIXSJU0G61YEkcWyBA+aopQGV0vCAMp1N/ifKIFt760pgKV+qzwRSbVP+/lBJ08g== dependencies: addr-to-ip-port "^1.5.4" bitfield "^4.0.0" @@ -7717,7 +7749,7 @@ webtorrent@^1.5.4: stream-to-blob "^2.0.1" stream-to-blob-url "^3.0.2" stream-with-known-length-to-buffer "^1.0.4" - torrent-discovery "^9.4.4" + torrent-discovery "^9.4.5" torrent-piece "^2.0.1" unordered-array-remove "^1.0.2" ut_metadata "^3.5.2" From 0042c881b2975b8a1c3baa51a0b84b4be03f7d1a Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 5 Sep 2021 20:19:53 +0300 Subject: [PATCH 105/168] Update streamer.js --- src/app/lib/streamer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index a25df0c3bf..514fe7cf8d 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -475,8 +475,9 @@ let file = torrent.files[f]; // windows specific fix let path = file.path.replace(/\\/g, '/'); + let name = fileName.replace(/\\/g, '/'); // we use endsWith, not equals because from server may return without first directory - if (path.endsWith(fileName)) { + if (path.endsWith(name)) { fileIndex = f; fileSize = file.length; fileName = file.path; From 65a67dc5661248472ff1cd4f560e9054b7f2560d Mon Sep 17 00:00:00 2001 From: Daniel Bayley Date: Mon, 6 Sep 2021 21:55:45 +0100 Subject: [PATCH 106/168] Fix Homebrew Cask --- casks/popcorn-time.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index 468b7198e9..bb2e303dd1 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -4,19 +4,17 @@ server = "popcorn-ru.tk" homepage = "http://#{server}" - zip = "Popcorn-Time-#{version.tr("-,", "+.")}-Mac.zip" + zip = "Popcorn-Time-#{version}-Mac.zip" url "#{homepage}/build/#{zip}" name token.titlecase desc "BitTorrent client that includes an integrated media player" homepage homepage - zip.sub! version, "([0-9]+(?:\\.[0-9]+)+)" - livecheck do url "#{homepage}/build" strategy :page_match - regex Regexp.new zip + regex Regexp.new zip.sub version, "([0-9]+(?:\\.[0-9]+)+)" end auto_updates true From 44c6548fa1219a5b6db12685aadb92222a73acf6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 12 Sep 2021 00:27:48 +0300 Subject: [PATCH 107/168] Update seedbox.tpl --- src/app/templates/seedbox.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 317991a0bb..4db52c060e 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -20,8 +20,8 @@
- +
From 24f3f39c0d08014381c05e730599de2a423bff44 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 12 Sep 2021 00:49:59 +0300 Subject: [PATCH 108/168] Update show_detail.js --- src/app/lib/views/show_detail.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 325d28a30a..6027268e4f 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -567,7 +567,6 @@ episode: episode }; - var episodes = []; var episodes_data = []; //var selected_quality = $(e.currentTarget).attr('data-quality'); @@ -635,25 +634,24 @@ auto_id: parseInt(season) * 100 + parseInt(episode), auto_play_data: episodes_data }); - console.log('Playing next episode automatically:', AdvSettings.get('playNextEpisodeAuto')); _this.unbindKeyboardShortcuts(); App.vent.trigger('stream:start', torrentStart); }, downloadTorrent: function(e) { - const torrent = $(e.currentTarget).attr('data-torrent'); - const file = $(e.currentTarget).attr('data-file'); - App.vent.trigger('stream:download', torrent, this.model.get('title'), file); - if (Settings.showSeedboxOnDlInit) { - App.previousview = App.currentview; - App.currentview = 'Seedbox'; - App.vent.trigger('seedbox:show'); - $('.filter-bar').find('.active').removeClass('active'); - $('#filterbar-seedbox').addClass('active'); - $('#nav-filters').hide(); - } else { - $('.notification_alert').stop().text(i18n.__('Download added')).fadeIn('fast').delay(1500).fadeOut('fast'); - } + const torrent = $(e.currentTarget).attr('data-torrent'); + const file = $(e.currentTarget).attr('data-file'); + App.vent.trigger('stream:download', torrent, this.model.get('title'), file); + if (Settings.showSeedboxOnDlInit) { + App.previousview = App.currentview; + App.currentview = 'Seedbox'; + App.vent.trigger('seedbox:show'); + $('.filter-bar').find('.active').removeClass('active'); + $('#filterbar-seedbox').addClass('active'); + $('#nav-filters').hide(); + } else { + $('.notification_alert').stop().text(i18n.__('Download added')).fadeIn('fast').delay(1500).fadeOut('fast'); + } }, closeDetails: function (e) { From bdf8c63e10b8595456ce40e532865bf61cd0fa83 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 12 Sep 2021 00:53:57 +0300 Subject: [PATCH 109/168] Update streamer.js --- src/app/lib/streamer.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 514fe7cf8d..5f6517b7c4 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -7,26 +7,18 @@ this.torrent = null; // Torrent Backbone Model this.torrentModel = null; - // State Backbone Model this.stateModel = null; - - // Stream Info Backbone Model, which keeps showing ratio/download/upload info. - // See models/stream_info.js + // Stream Info Backbone Model, which keeps showing ratio/download/upload info - See models/stream_info.js this.streamInfo = null; - // Interval controller for StreamInfo view, which keeps showing ratio/download/upload info. - // See models/stream_info.js + // Interval controller for StreamInfo view, which keeps showing ratio/download/upload info - See models/stream_info.js this.updateStatsInterval = null; // video dummy element this.video = null; - // Boolean to indicate if subtitles are already downloaded and ready to use this.subtitleReady = false; - // Boolean to indicate if the video file is ready this.canPlay = false; - - // Boolean to indicate if the process was interrupted this.stopped = true; }; @@ -109,9 +101,7 @@ }); }, - // wrapper for handling a torrent start: function(model) { - // if webtorrent is created/running, we stop/destroy it if (App.WebTorrent.destroyed) { this.stop(); } @@ -581,7 +571,6 @@ this.stopped = false; this.torrentModel = model; this.streamInfo = new App.Model.StreamInfo(); - this.stateModel = new Backbone.Model({ state: 'connecting', backdrop: this.torrentModel.get('backdrop'), @@ -594,7 +583,7 @@ }, watchState: function () { - if (this.stopped) { + if (this.stopped) { return; } if (!this.torrent) { From 9a10181a212f661defaa77898aa32c7e8136f06a Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 12 Sep 2021 18:21:52 +0300 Subject: [PATCH 110/168] Add downloading the subtitles and cover image to the Download function --- src/app/lib/streamer.js | 84 ++++++++++++++----------------- src/app/lib/subtitle/generic.js | 3 +- src/app/lib/views/play_control.js | 23 ++------- src/app/lib/views/show_detail.js | 10 ++-- 4 files changed, 47 insertions(+), 73 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 5f6517b7c4..94eb76d4f2 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -21,6 +21,8 @@ this.canPlay = false; // Boolean to indicate if the process was interrupted this.stopped = true; + // Boolean to indicate if Watch now or just Download + this.downloadOnly = false; }; WebTorrentStreamer.prototype = { @@ -101,47 +103,32 @@ }); }, - start: function(model) { + start: function(model, state) { if (App.WebTorrent.destroyed) { this.stop(); } - this.setModels(model); + this.setModels(model, state); + const location = this.downloadOnly && App.settings.separateDownloadsDir ? App.settings.downloadsLocation : App.settings.tmpLocation; - this.fetchTorrent(this.torrentModel.get('torrent'), App.settings.tmpLocation).then(function (torrent) { - this.torrentModel.set('torrent', this.torrent = torrent); - this.linkTransferStatus(); - this.handleTorrent(torrent); - this.handleStreamInfo(); - this.watchState(); - this.saveCoverToFile(); - return this.createServer(); - }.bind(this)).then(this.waitForBuffer.bind(this)).catch(this.handleErrors.bind(this)); - }, - - download: function(torrent, mediaName = '', fileName = '') { - // if webtorrent is created/running, we stop/destroy it - if (App.WebTorrent.destroyed) { - this.stop(); - } - - // handles magnet and hosted torrents - const uri = Common.getTorrentUri(torrent); - const parseTorrent = require('parse-torrent'); - var infoHash = ''; - try { infoHash = parseTorrent(uri).infoHash; } catch (err) {} - - if (this.torrent && this.torrent.infoHash === infoHash) { - return; - } - - if (mediaName) { - App.plugins.mediaName.setMediaName(infoHash, mediaName); + if (!this.downloadOnly) { + this.fetchTorrent(this.torrentModel.get('torrent'), location, model.get('title')).then(function (torrent) { + this.torrentModel.set('torrent', this.torrent = torrent); + this.linkTransferStatus(); + this.handleTorrent(torrent); + this.handleStreamInfo(); + this.watchState(); + this.saveCoverToFile(location); + return this.createServer(); + }.bind(this)).then(this.waitForBuffer.bind(this)).catch(this.handleErrors.bind(this)); + } else { + this.fetchTorrent(this.torrentModel.get('torrent'), location, model.get('title')).then(function (torrent) { + this.torrentModel.set('torrent', torrent); + this.handleTorrent(torrent); + this.saveCoverToFile(location); + return; + }.bind(this)); } - const location = App.settings.separateDownloadsDir ? App.settings.downloadsLocation : App.settings.tmpLocation; - this.fetchTorrent(uri, location).then(function (torrent) { - this.selectFile(torrent, fileName); - }.bind(this)); }, stop: function() { @@ -263,7 +250,7 @@ }, // fire webtorrent and resolve the torrent - fetchTorrent: function(torrentInfo, path) { + fetchTorrent: function(torrentInfo, path, mediaName) { return new Promise(function (resolve, reject) { // handles magnet and hosted torrents @@ -273,6 +260,8 @@ try { infoHash = parseTorrent(uri).infoHash; } catch (err) {} var torrent; + App.plugins.mediaName.setMediaName(infoHash, mediaName); + for(const t of App.WebTorrent.torrents) { if (t.infoHash === infoHash) { torrent = t; @@ -567,8 +556,9 @@ }.bind(this)); }, - setModels: function (model) { + setModels: function (model, state) { this.stopped = false; + this.downloadOnly = state === 'downloadOnly' ? true : false; this.torrentModel = model; this.streamInfo = new App.Model.StreamInfo(); this.stateModel = new Backbone.Model({ @@ -579,7 +569,11 @@ show_controls: false, streamInfo: this.streamInfo }); - App.vent.trigger('stream:started', this.stateModel); + if (!this.downloadOnly) { + App.vent.trigger('stream:started', this.stateModel); + } else { + this.stopped = true; + } }, watchState: function () { @@ -625,7 +619,7 @@ } }, - saveCoverToFile: function () { + saveCoverToFile: function (location) { if (this.torrentModel && this.torrentModel.get('type') === 'movie' && this.torrentModel.get('cover') && this.torrentModel.get('torrent').name) { const request = require('request'); let url = this.torrentModel.get('cover'); @@ -633,13 +627,13 @@ if (err || buffer.length < 1000) { return; } - fs.writeFileSync(path.join(App.settings.tmpLocation, this.torrentModel.get('torrent').name) + '/cover.jpg', buffer); + fs.writeFileSync(path.join(location, this.torrentModel.get('torrent').name) + '/cover.jpg', buffer); }); } }, onSubtitlesFound: function (subs) { - if (this.stopped) { + if (this.stopped && !this.downloadOnly) { return; } @@ -698,7 +692,8 @@ // download the subtitle App.vent.trigger('subtitle:download', { url: subtitles[defaultSubtitle], - path: this.torrentModel.get('video_file').path + path: this.torrentModel.get('video_file').path, + lang: this.torrentModel.get('defaultSubtitle') }); } } else { @@ -728,7 +723,7 @@ }, handleSubtitles: function () { - if (this.stopped) { + if (this.stopped && !this.downloadOnly) { return; } // set default subtitle language (passed by a view or settings) @@ -759,7 +754,7 @@ }, buildSubtitleQuery: function () { - if (this.stopped) { + if (this.stopped && !this.downloadOnly) { return; } @@ -802,6 +797,5 @@ App.vent.on('stream:start', streamer.start.bind(streamer)); App.vent.on('stream:stop', streamer.stop.bind(streamer)); App.vent.on('stream:stopFS', streamer.stopFS.bind(streamer)); - App.vent.on('stream:download', streamer.download.bind(streamer)); App.vent.on('stream:serve_subtitles', streamer.serveSubtitles.bind(streamer)); })(window.App); diff --git a/src/app/lib/subtitle/generic.js b/src/app/lib/subtitle/generic.js index 0350f224eb..3bf73a464f 100644 --- a/src/app/lib/subtitle/generic.js +++ b/src/app/lib/subtitle/generic.js @@ -23,13 +23,12 @@ var downloadFromUrl = function (data) { return new Promise(function (resolve, reject) { - var streamInfo = App.LoadingView.model.get('streamInfo'); var vpath = data.path; // video file path var vext = path.extname(vpath); // video extension var vname = path.basename(vpath).substring(0, path.basename(vpath).lastIndexOf(vext)); // video file name var folder = path.dirname(vpath); // cwd var furl = data.url; // subtitle url - var fpath = path.join(folder, vname + '.' + streamInfo.get('defaultSubtitle').substr(0,2)); // subtitle local path, no extension + var fpath = path.join(folder, vname + '.' + data.lang); // subtitle local path, no extension request.get(furl).on('response', function (response) { var rtype = (response.headers['content-type'] || '').split(';')[0].trim(); // response type diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index 3aec1f50f7..88540e13f3 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -212,24 +212,7 @@ }, downloadTorrent: function() { - var providers = this.model.get('providers'); - var quality = this.model.get('quality'); - var defaultTorrent = this.model.get('torrents')[quality]; - - var filters = { - quality: quality, - lang: this.audio_selected - }; - - const torrent = providers.torrent.resolveStream - ? providers.torrent.resolveStream( - defaultTorrent, - filters, - this.model.attributes - ) - : defaultTorrent; - - App.vent.trigger('stream:download', torrent, this.model.get('title') /*mediaName*/); + this.startStreaming('downloadOnly'); if (Settings.showSeedboxOnDlInit) { App.previousview = App.currentview; App.currentview = 'Seedbox'; @@ -242,7 +225,7 @@ } }, - startStreaming: function() { + startStreaming: function(state) { var providers = this.model.get('providers'); var quality = this.model.get('quality'); var defaultTorrent = this.model.get('torrents')[quality]; @@ -274,7 +257,7 @@ cover: this.model.get('cover') }); - App.vent.trigger('stream:start', torrentStart); + App.vent.trigger('stream:start', torrentStart, state); }, playTrailer: function() { diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 6027268e4f..8fa7157c87 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -544,7 +544,7 @@ } }, - startStreaming: function (e) { + startStreaming: function (e, state) { if (e.type) { e.preventDefault(); } @@ -572,7 +572,7 @@ //var selected_quality = $(e.currentTarget).attr('data-quality'); var auto_play = false; var images = this.model.get('images'); - if (AdvSettings.get('playNextEpisodeAuto') && this.model.get('imdb_id').indexOf('mal') === -1) { + if (state !== 'downloadOnly' && AdvSettings.get('playNextEpisodeAuto') && this.model.get('imdb_id').indexOf('mal') === -1) { _.each(this.model.get('episodes'), function (value) { var epaInfo = { id: parseInt(value.season) * 100 + parseInt(value.episode), @@ -635,13 +635,11 @@ auto_play_data: episodes_data }); _this.unbindKeyboardShortcuts(); - App.vent.trigger('stream:start', torrentStart); + App.vent.trigger('stream:start', torrentStart, state); }, downloadTorrent: function(e) { - const torrent = $(e.currentTarget).attr('data-torrent'); - const file = $(e.currentTarget).attr('data-file'); - App.vent.trigger('stream:download', torrent, this.model.get('title'), file); + this.startStreaming(e, 'downloadOnly'); if (Settings.showSeedboxOnDlInit) { App.previousview = App.currentview; App.currentview = 'Seedbox'; From b4dd0bd7497ad41b320a8e00ff8fb224dec1311d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 23 Sep 2021 19:06:11 +0300 Subject: [PATCH 111/168] Update quality-selector.tpl --- src/app/templates/quality-selector.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/quality-selector.tpl b/src/app/templates/quality-selector.tpl index 34bd14dea2..86aacfff56 100644 --- a/src/app/templates/quality-selector.tpl +++ b/src/app/templates/quality-selector.tpl @@ -3,7 +3,7 @@ <% if (!torrent) { %>
<%=key %>
<% } else { %> -
<%=key %>
+
<%=key %>
<% } %> <% }) %>
From f5487e20eba7a2e94dccd4758c150692d815f7ec Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 23 Sep 2021 19:23:16 +0300 Subject: [PATCH 112/168] Update play_control.js --- src/app/lib/views/play_control.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index 88540e13f3..cf5f3e94d0 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -17,7 +17,8 @@ 'click .playerchoicehelp': 'showPlayerList', 'click .watched-toggle': 'toggleWatched', 'click #subs-dropdown': 'hideTooltips', - 'click #audio-dropdown': 'hideTooltips' + 'click #audio-dropdown': 'hideTooltips', + 'click #quality-selector': 'hideTooltips' }, regions: { subDropdown: '#subs-dropdown', @@ -185,7 +186,7 @@ }, hideTooltips: function () { - $('#subs-dropdown .flag.toggle, #audio-dropdown .flag.toggle').tooltip('hide'); + $('#subs-dropdown .flag.toggle, #audio-dropdown .flag.toggle, #quality-selector .qselect').tooltip('hide'); }, switchSubtitle: function(lang) { From 56a65ff5c0803af28733e51d831ce16690faeba2 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 6 Jul 2021 10:10:29 +0300 Subject: [PATCH 113/168] copypaste to parametrize --- src/app/bootstrap.js | 2 +- src/app/butter-provider/movie.js | 7 ++++ src/app/butter-provider/tv.js | 7 ++++ src/app/lib/views/browser/filter_bar.js | 49 ++++++------------------ src/app/templates/browser/filter-bar.tpl | 21 ++++++++++ 5 files changed, 48 insertions(+), 38 deletions(-) diff --git a/src/app/bootstrap.js b/src/app/bootstrap.js index 707e4e6596..cbcb70a0c8 100644 --- a/src/app/bootstrap.js +++ b/src/app/bootstrap.js @@ -49,7 +49,7 @@ function loadProvidersJSON(fn) { return pkJson.providers.map(function(providerPath) { - win.info('loading npm', providerPath); + win.info('loading json', providerPath); return loadFromNPM(`./${providerPath}`, fn); }); } diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 387b575ed7..7714073eb3 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -85,6 +85,13 @@ class MovieApi extends Generic { detail(torrent_id, old_data, debug) { return new Promise((resolve, reject) => resolve(old_data)); } + + filters() { + return { + genres: App.Config.genres, + sorters: App.Config.sorters, + }; + } } MovieApi.prototype.config = { diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index 4eac24b69f..8216f0f94c 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -72,6 +72,13 @@ class TVApi extends Generic { return sanitize(data); }); } + + filters() { + return { + genres: App.Config.genres_tv, + sorters: App.Config.sorters_tv, + }; + } } TVApi.prototype.config = { diff --git a/src/app/lib/views/browser/filter_bar.js b/src/app/lib/views/browser/filter_bar.js index e5f4727e8c..1bcdbc5fa4 100644 --- a/src/app/lib/views/browser/filter_bar.js +++ b/src/app/lib/views/browser/filter_bar.js @@ -2,6 +2,7 @@ 'use strict'; App.View.FilterBar = Marionette.View.extend({ + template: '#filter-bar-tpl', className: 'filter-bar', ui: { searchForm: '.search form', @@ -126,9 +127,13 @@ break; } - try { - this.fixFilter(); - } catch (e) {} + $('#nav-filters .filter').each(function(i, item) { + $(item).find('.active').removeClass('active'); + const value = $(item).find('.value'); + const li = $(item).find('li a[data-value="' + value.data('value') + '"]'); + li.addClass('active'); + value.text(li.text()); + }); }, rightclick_search: function(e) { e.preventDefault(); @@ -224,30 +229,6 @@ focusSearch: function() { this.$('.search input').focus(); }, - fixFilter: function() { - $('.genres .active').removeClass('active'); - $('.sorters .active').removeClass('active'); - $('.types .active').removeClass('active'); - $('.ratings .active').removeClass('active'); - - var genre = $('.genres .value').data('value'); - var sorter = $('.sorters .value').data('value'); - var type = $('.types .value').data('value'); - var rating = $('.ratings .value').data('value'); - - $('.genres li') - .find('[data-value="' + genre + '"]') - .addClass('active'); - $('.sorters li') - .find('[data-value="' + sorter + '"]') - .addClass('active'); - $('.types li') - .find('[data-value="' + type + '"]') - .addClass('active'); - $('.ratings li') - .find('[data-value="' + rating + '"]') - .addClass('active'); - }, search: function(e) { App.vent.trigger('about:close'); App.vent.trigger('torrentCollection:close'); @@ -325,7 +306,7 @@ }); } - this.ui.sorterValue.text(i18n.__(sorter.capitalizeEach())); + this.ui.sorterValue.text($(e.target).text()); this.previousSort = sorter; }, @@ -337,7 +318,7 @@ $(e.target).addClass('active'); var type = $(e.target).attr('data-value'); - this.ui.typeValue.text(i18n.__(type)); + this.ui.typeValue.text($(e.target).text()); this.model.set({ keyword: '', @@ -352,7 +333,7 @@ var genre = $(e.target).attr('data-value'); - this.ui.genreValue.text(i18n.__(genre.capitalizeEach())); + this.ui.genreValue.text($(e.target).text()); this.model.set({ keyword: '', @@ -366,9 +347,7 @@ $(e.target).addClass('active'); const rating = $(e.target).attr('data-value'); - const ratingLabel = rating === 'All' ? rating : `${rating}+`; - - this.ui.ratingValue.text(i18n.__(ratingLabel.capitalizeEach())); + this.ui.ratingValue.text($(e.target).text()); this.model.set({ keyword: '', @@ -508,8 +487,4 @@ randomMovie: function() {} }); - - App.View.FilterBar = App.View.FilterBar.extend({ - template: '#filter-bar-tpl' - }); })(window.App); diff --git a/src/app/templates/browser/filter-bar.tpl b/src/app/templates/browser/filter-bar.tpl index 9ac52ef09d..be80ce0ffc 100644 --- a/src/app/templates/browser/filter-bar.tpl +++ b/src/app/templates/browser/filter-bar.tpl @@ -5,6 +5,27 @@
  • <%= i18n.__("Favorites") %>
  • <% }}); %> - <% if(typeof type !== 'undefined' && types.length !== 0){ %> - - - <% }if(typeof rating !== 'undefined' && ratings.length !== 0){ %> - - <% }if(typeof genre !== 'undefined' && genres.length !== 0){ %> - - <%} if(typeof sorter !== 'undefined' && sorters.length !== 0){ %> - - <%}%>

    20){ %> title="<%= title1 %>" data-toggle="tooltip" data-placement="auto bottom" <% } %> ><%= title1 %>

    -<% if (typeof title2 !== 'undefined' && title2 !== '') {%> +<% if (typeof title2 !== 'undefined' && title2 !== '') { %>

    20){ %> title="<%= title2 %>" data-toggle="tooltip" data-placement="auto bottom" <% } %> ><%= title2 %>

    <%} %>

    - <% if (typeof year !== 'undefined') {%> + <% if (typeof year !== 'undefined') { %> <%= year %> - <%} %> + <% } %>

    -<% if (typeof item_data !== 'undefined') {%> -

    - <%= i18n.__(item_data) %> -

    -<% } else if(typeof num_seasons !== 'undefined'){%> +<% if (typeof item_data !== 'undefined') { %> +

    + <%= i18n.__(item_data) %> +

    +<% } else if (typeof num_seasons !== 'undefined') { %>

    <%= num_seasons %> <%= num_seasons == 1 ? i18n.__("Season") : i18n.__("Seasons") %>

    -<%}else if (typeof torrents !== 'undefined') { %> -

    style="display: block;" <% } %> > - <% q720 = torrents["720p"] !== undefined; q1080 = torrents["1080p"] !== undefined; q2160 = torrents["2160p"] !== undefined; - if (q720 && q1080 && q2160) { %> - 720p/1080p/2160p - <% } else if (q720 && q1080) { %> - 720p/1080p - <% } else if (q720 && q2160) { %> - 720p/2160p - <% } else if (q1080 && q2160) { %> - 1080p/2160p - <% } else if (q2160) { %> - 2160p - <% } else if (q1080) { %> - 1080p - <% } else if (q720) { %> - 720p - <% } else { %> - HDRip - <% } %> +<% } else if (typeof qualityList !== 'undefined') { %> +

    + <%= qualityList %>

    -<%} %> +<% } %> From c2507cda4dc0c4cd4b45134097e3ba90df492503 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 27 Sep 2021 02:13:56 +0300 Subject: [PATCH 124/168] hideSeasons not configured - allways true --- src/app/lib/views/show_detail.js | 2 +- src/app/settings.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 8fa7157c87..7e45f59b80 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -233,7 +233,7 @@ $('.number-container-tv').removeClass('hidden'); } - if (AdvSettings.get('hideSeasons') && this.model.get('seasonCount') < 2) { + if (this.model.get('seasonCount') < 2) { this.ui.seasonTab.hide(); } diff --git a/src/app/settings.js b/src/app/settings.js index 2e001e0c95..05ff501c4f 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -134,7 +134,6 @@ Settings.chosenPlayer = 'local'; Settings.alwaysOnTop = false; Settings.theme = 'Official_-_Dark_theme'; Settings.ratingStars = true; //trigger on click in details -Settings.hideSeasons = true; Settings.startScreen = 'Movies'; Settings.lastTab = ''; Settings.defaultFilters = 'default'; From 0ff9a4fb393206668dea14c4216e118dcfc05f43 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 27 Sep 2021 02:36:43 +0300 Subject: [PATCH 125/168] Common.loadImage promise --- src/app/common.js | 21 ++++++++++++++ src/app/lib/views/browser/item.js | 24 ++-------------- src/app/lib/views/movie_detail.js | 42 ++++++--------------------- src/app/lib/views/show_detail.js | 48 +++++++------------------------ 4 files changed, 42 insertions(+), 93 deletions(-) diff --git a/src/app/common.js b/src/app/common.js index 265135acba..67fadbf23f 100644 --- a/src/app/common.js +++ b/src/app/common.js @@ -291,6 +291,27 @@ Common.normalize = (function () { }; })(); +Common.loadImage = function(img) { + return new Promise(function(resolve, reject) { + let cache = new Image(); + cache.onload = () => { + if (img.indexOf('.gif') !== -1) { + // freeze gifs + let c = document.createElement('canvas'); + let w = (c.width = img.width); + let h = (c.height = img.height); + + c.getContext('2d').drawImage(cache, 0, 0, w, h); + img = c.toDataURL(); + } + resolve(img); + }; + + cache.onerror = () => resolve(null); + cache.src = img; + }); +}; + Common.Promises = { allSettled: function (promises) { var wrappedPromises = promises.map( diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 13e450db62..77e48401ec 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -197,29 +197,11 @@ } } - var setImage = function (img) { + Common.loadImage(poster).then((img) => { if (this.ui.cover.css) { - this.ui.cover.css('background-image', 'url(' + img + ')').addClass('fadein'); + this.ui.cover.css('background-image', 'url(' + (img || noimg) + ')').addClass('fadein'); } - }.bind(this); - - var posterCache = new Image(); - posterCache.src = poster; - - posterCache.onload = function () { - if (poster.indexOf('.gif') !== -1) { // freeze gifs - var c = document.createElement('canvas'); - var w = c.width = posterCache.width; - var h = c.height = posterCache.height; - - c.getContext('2d').drawImage(posterCache, 0, 0, w, h); - poster = c.toDataURL(); - } - setImage(poster); - }; - posterCache.onerror = function (e) { - setImage(noimg); - }; + }); }, setTooltips: function () { diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 449b20f34f..c2a7b855f6 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -196,38 +196,6 @@ var noimg = 'images/posterholder.png'; var nobg = 'images/bg-header.jpg'; - var setImage = { - poster: function(img) { - this.ui.poster.attr('src', img || noimg).addClass('fadein'); - }.bind(this), - backdrop: function(img) { - this.ui.backdrop - .css('background-image', 'url(' + (img || nobg) + ')') - .addClass('fadein'); - }.bind(this) - }; - - var loadImage = function(img, type) { - var cache = new Image(); - cache.src = img; - - cache.onload = function() { - if (img.indexOf('.gif') !== -1) { - // freeze gifs - var c = document.createElement('canvas'); - var w = (c.width = img.width); - var h = (c.height = img.height); - - c.getContext('2d').drawImage(cache, 0, 0, w, h); - img = c.toDataURL(); - } - setImage[type](img); - }; - - cache.onerror = function(e) { - setImage[type](null); - }; - }; var images = this.model.get('images'); var p = this.model.get('image') || @@ -248,8 +216,14 @@ } } - loadImage(p, 'poster'); - loadImage(b, 'backdrop'); + Common.loadImage(p).then((img) => { + this.ui.poster.attr('src', img || noimg).addClass('fadein'); + }); + Common.loadImage(b).then((img) => { + this.ui.backdrop + .css('background-image', 'url(' + (img || nobg) + ')') + .addClass('fadein'); + }); }, hideUnused: function() { diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 8fa7157c87..65b3911686 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -185,44 +185,16 @@ } } - var posterCache = new Image(); - posterCache.src = poster; - posterCache.onload = function () { - try { - $('.shp-img') - .css('background-image', 'url(' + poster + ')') - .addClass('fadein'); - } catch (e) {} - posterCache = null; - }; - posterCache.onerror = function () { - try { - $('.shp-img') - .css('background-image', 'url("images/posterholder.png")') - .addClass('fadein'); - } catch (e) {} - posterCache = null; - }; - - - var bgCache = new Image(); - bgCache.src = backdrop; - bgCache.onload = function () { - try { - $('.shb-img') - .css('background-image', 'url(' + backdrop + ')') - .addClass('fadein'); - } catch (e) {} - bgCache = null; - }; - bgCache.onerror = function () { - try { - $('.shb-img') - .css('background-image', 'url("images/bg-header.jpg")') - .addClass('fadein'); - } catch (e) {} - bgCache = null; - }; + Common.loadImage(poster).then((img) => { + $('.shp-img') + .css('background-image', 'url(' + (img || noimg) + ')') + .addClass('fadein'); + }); + Common.loadImage(backdrop).then((img) => { + $('.shb-img') + .css('background-image', 'url(' + (img || nobg) + ')') + .addClass('fadein'); + }); this.selectNextEpisode(); From cf7667959d81de080f9ee36c178d565d5432efc3 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 27 Sep 2021 17:04:53 +0300 Subject: [PATCH 126/168] add failback --- src/app/butter-provider/generic.js | 22 +++++++++ src/app/butter-provider/movie.js | 70 ++++++++++++++++++---------- src/app/butter-provider/tv.js | 74 ++++++++++++++++++++---------- 3 files changed, 119 insertions(+), 47 deletions(-) diff --git a/src/app/butter-provider/generic.js b/src/app/butter-provider/generic.js index ebfad202a3..174fab2e42 100644 --- a/src/app/butter-provider/generic.js +++ b/src/app/butter-provider/generic.js @@ -1,5 +1,6 @@ var memoize = require('memoizee'); var _ = require('lodash'); +const i18n = require('i18n'); const socksProxyAgent = require( 'socks-proxy-agent' ); String.prototype.capitalizeEach = function () { @@ -128,6 +129,27 @@ class Provider { } filters() {return Promise.resolve({});} + + formatFiltersFromServer(sorters, data) + { + let filters = { + genres: {}, + sorters: {}, + }; + for (const genre of sorters) { + filters.sorters[genre] = i18n.__(genre.capitalizeEach()); + } + + filters.genres = { + 'All': data.all.title + ' (' + data.all.count + ')', + }; + delete data.all; + for (const key in data) { + filters.genres[key] = data[key].title + ' (' + data[key].count + ')' + } + + return filters; + } } Provider.ArgType = { diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index c14dc6b216..9088103c6b 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -94,29 +94,53 @@ class MovieApi extends Generic { if (!this.contentLangOnly) { params.showAll = 1; } - return this._get(0, 'movies/stat?' + new URLSearchParams(params)).then((result) => { - - const data = { - sorters: ['trending', 'popularity', 'last added', 'year', 'title', 'rating'], - }; - let filters = { - genres: {}, - sorters: {}, - }; - for (const genre of data.sorters) { - filters.sorters[genre] = i18n.__(genre.capitalizeEach()); - } - - filters.genres = { - 'All': result.all.title + ' (' + result.all.count + ')', - }; - delete result.all; - for (const key in result) { - filters.genres[key] = result[key].title + ' (' + result[key].count + ')' - } - - return filters; - }); + return this._get(0, 'movies/stat?' + new URLSearchParams(params)) + .then((result) => this.formatFiltersFromServer( + ['trending', 'popularity', 'last added', 'year', 'title', 'rating'], + result + )).catch(() => { + const data = { + genres: [ + 'All', + 'Action', + 'Adventure', + 'Animation', + 'Biography', + 'Comedy', + 'Crime', + 'Documentary', + 'Drama', + 'Family', + 'Fantasy', + 'Film-Noir', + 'History', + 'Horror', + 'Music', + 'Musical', + 'Mystery', + 'Romance', + 'Sci-Fi', + 'Short', + 'Sport', + 'Thriller', + 'War', + 'Western' + ], + sorters: ['trending', 'popularity', 'last added', 'year', 'title', 'rating'], + }; + let filters = { + genres: {}, + sorters: {}, + }; + for (const genre of data.genres) { + filters.genres[genre] = i18n.__(genre.capitalizeEach()); + } + for (const sorter of data.sorters) { + filters.sorters[sorter] = i18n.__(sorter.capitalizeEach()); + } + + return Promise.resolve(filters); + }); } } diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index 3064b522e9..c4ced21428 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -3,7 +3,6 @@ const Generic = require('./generic'); const sanitize = require('butter-sanitize'); const i18n = require('i18n'); -const TVDB = require('node-tvdb'); class TVApi extends Generic { constructor(args) { @@ -81,29 +80,56 @@ class TVApi extends Generic { if (!this.contentLangOnly) { params.showAll = 1; } - return this._get(0, 'shows/stat?' + new URLSearchParams(params)).then((result) => { - - const data = { - sorters: ['trending', 'popularity', 'updated', 'year', 'name', 'rating'], - }; - let filters = { - genres: {}, - sorters: {}, - }; - for (const genre of data.sorters) { - filters.sorters[genre] = i18n.__(genre.capitalizeEach()); - } - - filters.genres = { - 'All': result.all.title + ' (' + result.all.count + ')', - }; - delete result.all; - for (const key in result) { - filters.genres[key] = result[key].title + ' (' + result[key].count + ')' - } - - return filters; - }); + return this._get(0, 'shows/stat?' + new URLSearchParams(params)) + .then((result) => this.formatFiltersFromServer( + ['trending', 'popularity', 'updated', 'year', 'name', 'rating'], + result + )).catch(() => { + const data = { + genres: [ + 'All', + 'Action', + 'Adventure', + 'Animation', + 'Children', + 'Comedy', + 'Crime', + 'Documentary', + 'Drama', + 'Family', + 'Fantasy', + 'Game Show', + 'Home and Garden', + 'Horror', + 'Mini Series', + 'Mystery', + 'News', + 'Reality', + 'Romance', + 'Science Fiction', + 'Soap', + 'Special Interest', + 'Sport', + 'Suspense', + 'Talk Show', + 'Thriller', + 'Western' + ], + sorters: ['trending', 'popularity', 'updated', 'year', 'name', 'rating'], + }; + let filters = { + genres: {}, + sorters: {}, + }; + for (const genre of data.genres) { + filters.genres[genre] = i18n.__(genre.capitalizeEach()); + } + for (const sorter of data.sorters) { + filters.sorters[sorter] = i18n.__(sorter.capitalizeEach()); + } + + return Promise.resolve(filters); + }); } } From 0f35b8d05097c947795db4b6a7fd9597eac52abb Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 27 Sep 2021 18:09:51 +0300 Subject: [PATCH 127/168] fix --- src/app/lib/models/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/models/filter.js b/src/app/lib/models/filter.js index 14856548d4..cbb84b3634 100644 --- a/src/app/lib/models/filter.js +++ b/src/app/lib/models/filter.js @@ -21,7 +21,7 @@ this.set('genres', filters.genres || []); this.set('sorters', filters.sorters || []); this.set('types', filters.types || []); - this.set('ratings', filters.types || []); + this.set('ratings', filters.ratings || []); this.init(); App.vent.trigger('filter-bar:render'); From d4c0b78b373da64b0866d12db6b2cbcd7217a08d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 27 Sep 2021 18:31:30 +0300 Subject: [PATCH 128/168] Update item.styl --- src/app/styl/views/browser/item.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/styl/views/browser/item.styl b/src/app/styl/views/browser/item.styl index 072f610db7..c494fbac82 100644 --- a/src/app/styl/views/browser/item.styl +++ b/src/app/styl/views/browser/item.styl @@ -166,6 +166,7 @@ color: $Text4 display: inline float: right + margin-top: 2px @keyframes fadeBd { from { border-color: $PosterHoverOverlayOpq; } From da849640d6c41f05833ef237fc98d788733990f8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 27 Sep 2021 18:55:27 +0300 Subject: [PATCH 129/168] Update item.js --- src/app/lib/views/browser/item.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 9aca7c0984..8e621c4aad 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -59,7 +59,6 @@ let keys = Object.keys(torrents).sort(Common.qualityCollator.compare); keys = keys.filter((key) => key !== '480p'); this.model.set('qualityList', keys.length ? keys.join('/') : 'HDRip'); - console.log(this.model.get('qualityList')); }, localizeTexts: function () { From 1762adff1674e6eb1f1dcd1360088f0db56dcedb Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 27 Sep 2021 19:00:34 +0300 Subject: [PATCH 130/168] fix rating in yts --- src/app/butter-provider/yts.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/butter-provider/yts.js b/src/app/butter-provider/yts.js index 7009cfcfd9..b63c08d2c6 100644 --- a/src/app/butter-provider/yts.js +++ b/src/app/butter-provider/yts.js @@ -95,7 +95,7 @@ class YTSApi extends Generic { } } if (filters.rating && filters.rating !== 'All') { - params.minimum_rating = filters.rating; + params.minimum_rating = filters.rating.replace('r', ''); } const uri = `api/v2/list_movies.json?` + new URLSearchParams(params); @@ -163,7 +163,11 @@ class YTSApi extends Generic { filters.types[type] = i18n.__(type); } for (const rating of data.ratings) { - filters.ratings[rating] = rating === 'All' ? i18n.__(rating) : (rating + '+'); + if (rating === 'All') { + filters.ratings[rating] = i18n.__(rating); + } else { + filters.ratings['r' + rating] = rating + '+'; + } } return Promise.resolve(filters); From 1107253912407c6ebbf739d6368dff9cd11f4a4e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 27 Sep 2021 19:13:17 +0300 Subject: [PATCH 131/168] Update item.js --- src/app/lib/views/browser/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 8e621c4aad..a84fd3fb94 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -57,7 +57,7 @@ return; } let keys = Object.keys(torrents).sort(Common.qualityCollator.compare); - keys = keys.filter((key) => key !== '480p'); + keys = keys.filter((key) => key !== '480p' && key !== '3D'); this.model.set('qualityList', keys.length ? keys.join('/') : 'HDRip'); }, From 9293df5806943da04b62667e8285b444a5ae0987 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 28 Sep 2021 01:42:55 +0300 Subject: [PATCH 132/168] fix load filter --- src/app/lib/models/filter.js | 2 ++ src/app/lib/views/browser/generic_browser.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/app/lib/models/filter.js b/src/app/lib/models/filter.js index cbb84b3634..55648760e8 100644 --- a/src/app/lib/models/filter.js +++ b/src/app/lib/models/filter.js @@ -11,6 +11,7 @@ }, initialize: function () { + this.set('load', false); this.set('genres', []); this.set('sorters', []); this.set('types', []); @@ -24,6 +25,7 @@ this.set('ratings', filters.ratings || []); this.init(); + this.set('load', true); App.vent.trigger('filter-bar:render'); }); }, diff --git a/src/app/lib/views/browser/generic_browser.js b/src/app/lib/views/browser/generic_browser.js index 849f8d56f6..791a11e6ba 100644 --- a/src/app/lib/views/browser/generic_browser.js +++ b/src/app/lib/views/browser/generic_browser.js @@ -77,6 +77,9 @@ }, onFilterChange: function () { + if (!this.filter.get('load')) { + return; + } if (Settings.defaultFilters === 'remember' || curSetDefaultFilters) { this.saveFilter(); } From 9cc9a6d66cf54b63c51173cfe2eacfdb9b2ddecb Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 1 Oct 2021 18:45:23 +0300 Subject: [PATCH 133/168] fix init filters --- src/app/lib/models/filter.js | 7 ------- src/app/lib/views/browser/generic_browser.js | 22 +++++++++++--------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/app/lib/models/filter.js b/src/app/lib/models/filter.js index 55648760e8..f5bc5016cb 100644 --- a/src/app/lib/models/filter.js +++ b/src/app/lib/models/filter.js @@ -2,13 +2,6 @@ 'use strict'; var Filter = Backbone.Model.extend({ - defaults: { - genres: [], - sorters: [], - types: [], - order: -1, - ratings: [] - }, initialize: function () { this.set('load', false); diff --git a/src/app/lib/views/browser/generic_browser.js b/src/app/lib/views/browser/generic_browser.js index 791a11e6ba..af8a98bd54 100644 --- a/src/app/lib/views/browser/generic_browser.js +++ b/src/app/lib/views/browser/generic_browser.js @@ -27,17 +27,19 @@ initialize: function () { const provider = this.provider ? App.Providers.get(this.provider) : App.Config.getProviderForType(this.providerType)[0]; - this.filter = new App.Model.Filter({provider: provider}); - + let initFilter = {}; if (Settings.defaultFilters === 'custom' || Settings.defaultFilters === 'remember') { - this.filter.set(this.getSavedFilter()); + initFilter = this.getSavedFilter(); } + initFilter.provider = provider; - this.collection = new this.collectionModel([], { - filter: this.filter - }); + this.filter = new App.Model.Filter(initFilter); - this.collection.fetch(); + // this.collection = new this.collectionModel([], { + // filter: this.filter + // }); + // + // this.collection.fetch(); this.listenTo(this.filter, 'change', this.onFilterChange); @@ -50,9 +52,9 @@ this.showChildView('FilterBar', this.bar); - this.showChildView('ItemList', new App.View.List({ - collection: this.collection - })); + // this.showChildView('ItemList', new App.View.List({ + // collection: this.collection + // })); if (!isNaN(startupTime)) { win.debug('Butter %s startup time: %sms', Settings.version, (window.performance.now() - startupTime).toFixed(3)); // started in database.js; From 95759b9b35835c794407e031b8641d6750da52f8 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 1 Oct 2021 18:57:34 +0300 Subject: [PATCH 134/168] get saved --- src/app/lib/views/browser/generic_browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/browser/generic_browser.js b/src/app/lib/views/browser/generic_browser.js index af8a98bd54..f3fc34932d 100644 --- a/src/app/lib/views/browser/generic_browser.js +++ b/src/app/lib/views/browser/generic_browser.js @@ -172,7 +172,7 @@ getSavedFilter: function () { var filters = AdvSettings.get('filters') || {}; - return filters[this.currentView()] || this.filter.pick('sorter', 'genre', 'type', 'order', 'rating'); + return filters[this.currentView()] || {}; } }); From 47ff8f8b8838a74af12e190d83063dc81fbddf7d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 2 Oct 2021 15:08:17 +0300 Subject: [PATCH 135/168] Add Release Info and Parental Guide links --- src/app/language/en.json | 4 +++- src/app/lib/views/movie_detail.js | 20 ++++++++++++++++---- src/app/lib/views/show_detail.js | 7 ++++++- src/app/styl/views/movie_detail.styl | 10 ++++++++++ src/app/styl/views/show_detail.styl | 3 +++ src/app/templates/movie-detail.tpl | 6 +++--- src/app/templates/show-detail.tpl | 2 +- 7 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index f5e0e62592..4101234c50 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -569,5 +569,7 @@ "Translations depend on availability. Some options also might not be supported by all API servers": "Translations depend on availability. Some options also might not be supported by all API servers", "added": "added", "The source link was copied to the clipboard": "The source link was copied to the clipboard", - "Max. Down / Up Speed": "Max. Down / Up Speed" + "Max. Down / Up Speed": "Max. Down / Up Speed", + "Release Info": "Release Info", + "Parental Guide": "Parental Guide" } diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index ca7fef4274..225196c8bd 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -20,6 +20,8 @@ events: { 'click .close-icon': 'closeDetails', + 'click .year': 'openRelInfo', + 'click .certification': 'openCert', 'click .movie-imdb-link': 'openIMDb', 'mousedown .magnet-link': 'openMagnet', 'mousedown .source-link': 'openSource', @@ -103,6 +105,10 @@ if (curSynopsis.vstatus !== null && curSynopsis.cast === '') { this.showCast(); } + + $('[data-toggle="tooltip"]').tooltip({ + html: true + }); }, localizeTexts: function() { const locale = this.model.get('locale'); @@ -307,10 +313,16 @@ healthButton.render(); }, - openIMDb: function() { - nw.Shell.openExternal( - 'https://www.imdb.com/title/' + this.model.get('imdb_id') - ); + openRelInfo: function () { + nw.Shell.openExternal('https://www.imdb.com/title/' + this.model.get('imdb_id') + '/releaseinfo'); + }, + + openCert: function () { + nw.Shell.openExternal('https://www.imdb.com/title/' + this.model.get('imdb_id') + '/parentalguide'); + }, + + openIMDb: function () { + nw.Shell.openExternal('https://www.imdb.com/title/' + this.model.get('imdb_id')); }, openMagnet: function(e) { diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 29d775af29..e7a2afe13e 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -26,6 +26,7 @@ 'click .close-icon': 'closeDetails', 'click .tab-season': 'clickSeason', 'click .tab-episode': 'clickEpisode', + 'click .shmi-year': 'openRelInfo', 'click .shmi-imdb': 'openIMDb', 'mousedown .magnet-icon': 'openMagnet', 'mousedown .source-icon': 'openSource', @@ -161,7 +162,7 @@ this.loadAudioDropdown(); this.getRegion('qualitySelector').empty(); - $('.star-container-tv,.shmi-imdb,.magnet-icon,.source-icon').tooltip(); + $('.star-container-tv,.shmi-year,.shmi-imdb,.magnet-icon,.source-icon').tooltip(); var noimg = 'images/posterholder.png'; var nobg = 'images/bg-header.jpg'; var images = this.model.get('images'); @@ -352,6 +353,10 @@ }); }, + openRelInfo: function () { + nw.Shell.openExternal('https://www.imdb.com/title/' + this.model.get('imdb_id') + '/releaseinfo'); + }, + openIMDb: function () { nw.Shell.openExternal('https://www.imdb.com/title/' + this.model.get('imdb_id')); }, diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index 3b08751c65..b1e3650dab 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -117,6 +117,16 @@ font-smoothing: antialiased cursor: pointer + .year, .certification + color: #f8f8f8 + font-size: 12px + position: relative + font-family: $MainFontBold + text-stroke: 1px rgba(0,0,0,0.1) + float: left + font-smoothing: antialiased + cursor: pointer + .movie-imdb-link margin-top: -3px padding-top: 3px diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index ef34a93f1b..721ef54dc9 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -84,6 +84,9 @@ color: #fff -webkit-font-smoothing: antialiased + div.shmi-year + cursor: pointer + div.shmi-imdb cursor: pointer background: url(../images/icons/imdb.png) no-repeat diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index d77e72ff92..a6a2bc2e80 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -26,13 +26,13 @@ if (genre) {
    <%= displayTitle %>
    -
    <%= year %>
    +
    "><%= year %>
    <%= runtime %> min
    <%= genre.join(" / ") %>
    <% if((typeof(certification) !== 'undefined') && (certification !== null) && (certification !== '') && (certification !== 'NR')) { %> -
    <%= certification %>
    +
    "><%= certification %>
    <% } %> -
    " class="fa fa-users show-cast">
    +
    ">
    " class="movie-imdb-link">
    diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index dc84df833d..73239f1189 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -11,7 +11,7 @@
    +
      <%= i18n.__("Rebuild bookmarks database") %>
      <%= i18n.__("Flush bookmarks database") %>
      <%= i18n.__("Flush all databases") %>
      <%= i18n.__("Reset to Default Settings") %>
    From 0035572e53dc955a1f52e817952e6a185e4ddf0d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:03:26 +0300 Subject: [PATCH 155/168] Update settings_container.js --- src/app/lib/views/settings_container.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index a88687c2b1..2f24affe98 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -714,6 +714,14 @@ }, rebuildBookmarks: function (e) { + var btn = $(e.currentTarget); + + if (!this.areYouSure(btn, i18n.__('Rebuilding bookmarks...'))) { + return; + } + + this.alertMessageWait(i18n.__('We are rebuilding your database')); + Database.getAllBookmarks() .then(function (data) { let movieProvider = App.Config.getProviderForType('movie')[0]; @@ -740,6 +748,7 @@ }); } } + that.alertMessageSuccess(true); }); }, From 36c367001e1d144ee51cf3c866f62f1cea9b824e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:07:20 +0300 Subject: [PATCH 156/168] Update en.json --- src/app/language/en.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 343bcd82c0..7cc7dda7b8 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -571,5 +571,7 @@ "The source link was copied to the clipboard": "The source link was copied to the clipboard", "Max. Down / Up Speed": "Max. Down / Up Speed", "Show Release Info": "Show Release Info", - "Parental Guide": "Parental Guide" + "Parental Guide": "Parental Guide", + "Rebuild bookmarks database": "Rebuild bookmarks database", + "Rebuilding bookmarks...": "Rebuilding bookmarks..." } From 66689fcb05f6be187f9b567af0b2d35a59a56e0b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:41:21 +0300 Subject: [PATCH 157/168] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91de51d160..2da8b80dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ New Features: - Add maximum Download/Upload speed options - Add Source, Release Info and Parental Guide links for content where data exists - Add a Magnet Link button in the loading screen +- Add a Rebuild bookmarks database function/button in the settings - Add support for fetching the Genres list from the API - Update WebTorrent to 1.5.5 also adding PE/MSE support @@ -13,9 +14,8 @@ Bug Fixes: - Fix issue with peers not being resolved when restarting canceled stream/download - Fix wrong file selection on some instances where torrents contain multiple video files - Fix issue where the subtitles and cover image weren't being downloaded when using the Download function +- Fix file/directory selection on Windows - Remove non-working TVShow Time support since their API service has been terminated -- Fix file selection with directory on windows -- Various other small fixes and optimizations Other: - Optimize app closing time @@ -23,6 +23,7 @@ Other: - Better unreachable API error message displaying all APIs tried - Update torrent trackers - Update various modules/dependencies +- Various other small fixes and optimizations ## 0.4.5 - The Next Wave - 21 June 2021 From dc55be37c6789d80fc43a3c722fa20e10d00f575 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:52:37 +0300 Subject: [PATCH 158/168] Update loading.styl --- src/app/styl/views/loading.styl | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/styl/views/loading.styl b/src/app/styl/views/loading.styl index 8cba094c6a..28a78be559 100644 --- a/src/app/styl/views/loading.styl +++ b/src/app/styl/views/loading.styl @@ -270,18 +270,6 @@ top 12px font-size 12px - .magnet-icon - float right - cursor pointer - transition opacity .2s - opacity 0.4 - - &:hover - opacity 1 - - &:active - opacity 1 - .loading-info width auto height auto @@ -294,6 +282,21 @@ background: rgba(0, 0, 0, .6) display inline-block + &:hover > .magnet-icon + opacity 0.4 + + &:hover + opacity 1 + + &:active + opacity 1 + + .magnet-icon + float right + cursor pointer + transition opacity .2s + opacity 0 + span position relative color #fff From b39791293f655a33a1bde6a423b23c04cd7d0598 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 10 Oct 2021 12:26:57 +0300 Subject: [PATCH 159/168] Add ability to minimize the native media player --- src/app/app.js | 3 +- src/app/lib/views/main_window.js | 8 +- src/app/lib/views/play_control.js | 2 +- src/app/lib/views/player/player.js | 111 +++++++++++++++++++++--- src/app/lib/views/seedbox.js | 2 +- src/app/lib/views/show_detail.js | 2 +- src/app/lib/views/torrent_collection.js | 2 +- src/app/styl/views/player.styl | 51 ++++++++++- src/app/templates/player.tpl | 13 ++- 9 files changed, 172 insertions(+), 22 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index 269fb820cd..22e3f54444 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -705,7 +705,8 @@ var handleVideoFile = function (file) { App.vent.trigger('stream:ready', localVideo); // start stream App.Device.Collection.setDevice(tmpPlayer); - $('.eye-info-player').hide(); + $('.eye-info-player, .player .maximize-icon #maxdllb').hide(); + $('.player .maximize-icon').addClass('done'); $('.vjs-load-progress').css('width', '100%'); }); }; diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index 9d26db21ef..fb3c227cc4 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -581,9 +581,11 @@ model: streamModel }) ); - this.getRegion('Content').$el.hide(); - if (this.getRegion('MovieDetail').$el !== undefined) { - this.getRegion('MovieDetail').$el.hide(); + if ($('.loading .maximize-icon').is(':hidden')) { + this.getRegion('Content').$el.hide(); + if (this.getRegion('MovieDetail').$el !== undefined) { + this.getRegion('MovieDetail').$el.hide(); + } } }, diff --git a/src/app/lib/views/play_control.js b/src/app/lib/views/play_control.js index 7c2a634d12..11e6932420 100644 --- a/src/app/lib/views/play_control.js +++ b/src/app/lib/views/play_control.js @@ -65,7 +65,7 @@ this.model.on('change:langs', this.loadAudioDropdown.bind(this)); this.model.on('change:subtitle', this.loadSubDropdown.bind(this)); - if ($('.loading .maximize-icon').is(':visible')) { + if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { $('.button:not(#download-torrent)').addClass('disabled'); $('#watch-now, #watch-trailer, .playerchoice').prop('disabled', true); } diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index bda8b4e587..650e3c533b 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -7,6 +7,8 @@ className: 'player', player: null, prevSub: null, + wasFullscreen: false, + wasMinimized: false, ui: { eyeInfo: '.eye-info-player', @@ -14,8 +16,11 @@ uploadSpeed: '.upload_speed_player', activePeers: '.active_peers_player', downloaded: '.downloaded_player', - pause: '.fa-pause', - play: '.fa-play' + downloadedPercent: '.downloadedPercent_player', + pause: '#osd_pause', + play: '#osd_play', + minimizeIcon: '.minimize-icon', + maximizeIcon: '.maximize-icon' }, events: { @@ -27,11 +32,18 @@ 'click .vjs-subtitles-button': 'toggleSubtitles', 'click .vjs-text-track': 'moveSubtitles', 'mousedown .eye-info-player': 'filenametoclip', + 'click .minimize-icon': 'minDetails', + 'click .maximize-icon': 'minDetails', 'click .vjs-play-control': 'togglePlay' }, initialize: function () { _this = this; + + if ($('.loading .maximize-icon').is(':visible')) { + this.wasMinimized = true; + } + this.listenTo(this.model, 'change:downloadSpeed', this.updateDownloadSpeed); this.listenTo(this.model, 'change:uploadSpeed', this.updateUploadSpeed); this.listenTo(this.model, 'change:active_peers', this.updateActivePeers); @@ -39,18 +51,16 @@ this.inFullscreen = win.isFullscreen; this.playerWasReady = false; - this.remaining = false; this.createdRemaining = false; this.firstPlay = true; - this.boundedMouseScroll = this.mouseScroll.bind(this); //If a child was removed from above this view App.vent.on('viewstack:pop', function() { - if (_.last(App.ViewStack) === 'app-overlay') { - _this.bindKeyboardShortcuts(); - } + if (_.last(App.ViewStack) === 'app-overlay') { + _this.bindKeyboardShortcuts(); + } }); }, @@ -78,13 +88,55 @@ this.ui.activePeers.text(this.model.get('active_peers')); }, + minDetails: function () { + if (this.ui.minimizeIcon.is(':visible')) { + if (win.isFullscreen) { + this.toggleFullscreen(); + this.wasFullscreen = true; + } + $('.player').css({'height': '0', 'width': '0'}); + $('.player .video-js').css('display', 'none'); + $('#content').show(); + if ($('#movie-detail') !== undefined) { + $('#movie-detail').show(); + } + $('#player_drag').hide(); + $('#header').show(); + this.ui.minimizeIcon.hide(); + this.ui.maximizeIcon.show(); + this.unbindKeyboardShortcuts(); + Mousetrap.bind(['esc', 'backspace'], function (e) { + App.vent.trigger('show:closeDetail'); + App.vent.trigger('movie:closeDetail'); + }); + } else { + $('.player, .player .video-js').removeAttr('style'); + $('#content').hide(); + if ($('#movie-detail') !== undefined) { + $('#movie-detail').hide(); + } + $('#player_drag').show(); + $('#header').removeClass('header-shadow').hide(); + this.ui.maximizeIcon.hide(); + this.ui.minimizeIcon.show(); + if (this.wasFullscreen) { + this.toggleFullscreen(); + this.wasFullscreen = false; + } + this.bindKeyboardShortcuts(); + } + }, + updateDownloaded: function () { if (this.model.get('downloadedPercent').toFixed(0) < 100 || this.model.get('size') === 0) { if (this.model.get('size') !== 0) { this.ui.downloaded.html(this.model.get('downloadedPercent').toFixed(0) + '%   (' + this.model.get('downloadedFormatted') + ' / ' + Common.fileSize(this.model.get('size')) + ')'); + this.ui.downloadedPercent.html(this.model.get('downloadedPercent').toFixed(0) + '%'); } else { this.ui.downloaded.html('(' + this.model.get('downloadedFormatted') + ' / ' + i18n.__('Unknown') + ')'); + this.ui.downloadedPercent.html(i18n.__('Unknown') + ' %'); } + $('.vjs-load-progress').css('width', this.model.get('downloadedPercent').toFixed(0) + '%'); this.remaining = true; @@ -97,8 +149,10 @@ } else { $('.details-info-player #sstatel').text(i18n.__('Downloaded')); this.ui.downloaded.html(this.model.get('downloadedPercent').toFixed(0) + '%   (' + Common.fileSize(this.model.get('size')) + ')
    '); - $('.details-info-player #dloaddd, .download_speed_player, .details-info-player #apeersss, .active_peers_player').hide(); + this.ui.downloadedPercent.html(this.model.get('downloadedPercent').toFixed(0) + '%'); + $('.details-info-player #dloaddd, .download_speed_player, .details-info-player #apeersss, .active_peers_player, .maximize-icon #maxdllb').hide(); $('.vjs-load-progress').css('width', '100%'); + this.ui.maximizeIcon.addClass('done'); this.remaining = false; } @@ -386,6 +440,9 @@ $('#player_drag').show(); var that = this; + $('.button:not(#download-torrent), .show-details .sdow-watchnow, .show-details #download-torrent, .file-item, .result-item, .collection-actions').addClass('disabled'); + $('#watch-now, #watch-trailer, .playerchoice, .file-item, .result-item').prop('disabled', true); + // Double Click to toggle Fullscreen $('#video_player, .state-info-player').dblclick(function (event) { that.toggleFullscreen(); @@ -401,6 +458,14 @@ this.processNext(); } + this.$('.tooltipped').tooltip({ + html: true, + delay: { + 'show': 800, + 'hide': 0 + } + }); + // start videojs engine if (this.model.get('type') === 'video/youtube') { @@ -414,6 +479,7 @@ this.addClass('vjs-has-started'); }); this.ui.eyeInfo.hide(); + this.ui.minimizeIcon.hide(); $('.player-title').text(this.model.get('title') + ' - Trailer'); // XXX Sammuel86 Trailer UI Show FIX/HACK @@ -492,7 +558,6 @@ this.player.on('pause', this.onPlayerPause.bind(this)); this.player.on('error', this.onPlayerError.bind(this)); - this.bindKeyboardShortcuts(); this.metadataCheck(); $('.player-header-background').appendTo('div#video_player'); @@ -506,12 +571,35 @@ // set fullscreen state & previous state if (Settings.alwaysFullscreen && !this.inFullscreen) { - this.toggleFullscreen(); + if (this.wasMinimized) { + this.wasFullscreen = true; + } else { + this.toggleFullscreen(); + } } if (this.inFullscreen) { win.leaveFullscreen(); this.toggleFullscreen(); } + if (this.wasMinimized) { + $('.player').css({'height': '0', 'width': '0'}); + $('.player .video-js').css('display', 'none'); + $('#player_drag').hide(); + $('#header').show(); + this.ui.minimizeIcon.hide(); + this.ui.maximizeIcon.show(); + this.unbindKeyboardShortcuts(); + Mousetrap.bind(['esc', 'backspace'], function (e) { + App.vent.trigger('show:closeDetail'); + App.vent.trigger('movie:closeDetail'); + }); + } else { + this.bindKeyboardShortcuts(); + } + + Mousetrap.bind('ctrl+v', function (e) { + e.preventDefault(); + }); // don't hide controls when hovering following classes: $('.vjs-menu-content, .eye-info-player, .playing_next, .verify_metadata').hover(function () { @@ -1049,7 +1137,10 @@ if (this.inFullscreen && !win.isFullscreen) { $('.btn-os.fullscreen').removeClass('active'); } + $('.button, #watch-now, .show-details .sdow-watchnow, .playerchoice, .file-item, .result-item, .trash-torrent, .collection-actions').removeClass('disabled').removeProp('disabled'); this.unbindKeyboardShortcuts(); + Mousetrap.bind('ctrl+v', function (e) { + }); App.vent.trigger('player:close'); var vjsPlayer = document.getElementById('video_player'); if (vjsPlayer) { diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index fd43ba3e40..6f42a5e271 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -57,7 +57,7 @@ this.render(); this.addTorrentHooks(); - if ($('.loading .maximize-icon').is(':visible')) { + if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { let currentHash; try { currentHash = App.LoadingView.model.attributes.streamInfo.attributes.torrentModel.attributes.torrent.infoHash; } catch(err) {} currentHash && $('#trash-'+currentHash)[0] ? $('#trash-'+currentHash).addClass('disabled') : null; diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 836b28f4c5..814de47fe7 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -218,7 +218,7 @@ App.Device.ChooserView('#player-chooser').render(); $('.spinner').hide(); - if ($('.loading .maximize-icon').is(':visible')) { + if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { $('.sdow-watchnow, #download-torrent').addClass('disabled'); $('#watch-now').prop('disabled', true); } diff --git a/src/app/lib/views/torrent_collection.js b/src/app/lib/views/torrent_collection.js index 91f2171597..7cac659b84 100644 --- a/src/app/lib/views/torrent_collection.js +++ b/src/app/lib/views/torrent_collection.js @@ -57,7 +57,7 @@ if (Settings.toggleSengines) { this.togglesengines(); } - if ($('.loading .maximize-icon').is(':visible')) { + if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { $('.file-item, .collection-actions').addClass('disabled').prop('disabled', true); } diff --git a/src/app/styl/views/player.styl b/src/app/styl/views/player.styl index effb1b0bd3..4356f57323 100644 --- a/src/app/styl/views/player.styl +++ b/src/app/styl/views/player.styl @@ -25,6 +25,53 @@ top: 20px z-index: 20 } + .minimize-icon { + top: -3px + right: 55px + position: absolute + color: #fff + font-size: 2.5em + font-smoothing: antialiased + transition: all 0.5s + &:hover { + cursor: pointer + color: #a3a5a7 + } + } + .maximize-icon { + display: none + bottom: 20px + right: 20px + position: fixed + color: $CloseButton + font-size: 25px + cursor: pointer + z-index: 100 + background: $BgColor2 + padding: 10px 20px + opacity: 0.9 + border-radius: 3px + box-shadow: 0 2px 6px 0 rgba(0,0,0,0.15), 0 4px 14px 0 rgba(0,0,0,0.25) + font-smoothing: antialiased + transition: background 0.2s, color 0.2s, opacity 0.2s + &:hover { + color: $ButtonText + background: $ButtonBgHover + opacity: 1 + } + &.done:hover { + background: #27ae60 + } + & > * { + font-size: 12px + vertical-align: top + line-height: 25px + } + #maxic { + font-size: 25px + margin-left: 10px + } + } .close-info-player { top: -1px right: 18px @@ -40,7 +87,7 @@ } .quality-info-player { position: absolute - right: 95px + right: 132px top: 3px font-size: 1.3em color: #fff @@ -61,7 +108,7 @@ font-size: 2em color: #fff top: -1px - right: 55px + right: 92px z-index: 4 transition: all 0.5s &:hover { diff --git a/src/app/templates/player.tpl b/src/app/templates/player.tpl index f25b3570ec..64c9f4fd9d 100644 --- a/src/app/templates/player.tpl +++ b/src/app/templates/player.tpl @@ -1,11 +1,12 @@
    - - + +
    <%= title %>
    <% if(quality) { %> <%= quality %> <% } %> +
    @@ -25,6 +26,14 @@
    +
    + + + <%= title %> + @ + + "> +