From a0a5c698374e03c0efa3758be1cd90320f2e6533 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 12 Oct 2021 14:55:00 +0300 Subject: [PATCH 001/203] turn on all langs, which have more 10 movies and shows --- src/app/language.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/language.js b/src/app/language.js index 01e65697a7..cd612c4c83 100644 --- a/src/app/language.js +++ b/src/app/language.js @@ -65,7 +65,12 @@ App.Localization.filterSubtitle = function (langs) { return filteredLang; }; -App.Localization.allTranslations = ['en', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'es', 'es-mx', 'et', 'eu', 'fa', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ka', 'ko', 'lt', 'mk', 'ms', 'nb', 'nl', 'nn', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'tr', 'uk', 'zh-cn', 'zh-tw']; +App.Localization.allTranslations = [ + 'en', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'es', 'es-mx', 'et', 'eu', 'fa', 'fi', 'fr', 'gl', 'gu', + 'he', 'hr', 'hu', 'hi', 'id', 'it', 'is', 'ka', 'kn', 'ko', 'ja', 'lt', 'ml', 'mk', 'ms', 'no', 'nb', 'nl', + 'nn', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'ta', 'tr', 'tl', 'th', 'te', 'vi', 'uk', 'ur', + 'zh-cn', 'zh-tw' +]; App.Localization.langcodes = { 'aa': { From f23e048176decf0cd5d29cec4d5d9cdd6c4f4edc Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 24 Oct 2021 01:33:47 +0300 Subject: [PATCH 002/203] Add the ability to start playback from the Seedbox --- src/app/lib/views/player/loading.js | 6 ++--- src/app/lib/views/player/player.js | 6 ++--- src/app/lib/views/seedbox.js | 39 +++++++++++++++++++++++------ src/app/styl/views/seedbox.styl | 14 +++++++---- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/app/lib/views/player/loading.js b/src/app/lib/views/player/loading.js index d880a19010..8084e71fbe 100644 --- a/src/app/lib/views/player/loading.js +++ b/src/app/lib/views/player/loading.js @@ -65,8 +65,8 @@ var that = this; App.vent.trigger('settings:close'); App.vent.trigger('about:close'); - $('.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); + $('.button:not(#download-torrent), .show-details .sdow-watchnow, .show-details #download-torrent, .file-item, .result-item, .collection-actions, .seedbox .item-play').addClass('disabled'); + $('#watch-now, #watch-trailer, .playerchoice, .file-item, .result-item, .seedbox .item-play').prop('disabled', true); // If a child was removed from above this view App.vent.on('viewstack:pop', function() { if (_.last(App.ViewStack) === that.className) { @@ -461,7 +461,7 @@ onBeforeDestroy: function() { $('.filter-bar').show(); $('#header').removeClass('header-shadow'); - $('.button, #watch-now, .show-details .sdow-watchnow, .playerchoice, .file-item, .result-item, .trash-torrent, .collection-actions').removeClass('disabled').removeProp('disabled'); + $('.button, #watch-now, .show-details .sdow-watchnow, .playerchoice, .file-item, .result-item, .trash-torrent, .collection-actions, .seedbox .item-play').removeClass('disabled').removeProp('disabled'); Mousetrap.bind(['esc', 'backspace'], function(e) { App.vent.trigger('show:closeDetail'); App.vent.trigger('movie:closeDetail'); diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index b5efb00cb1..f675bfd28d 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -450,8 +450,8 @@ $('#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); + $('.button:not(#download-torrent), .show-details .sdow-watchnow, .show-details #download-torrent, .file-item, .result-item, .collection-actions, .seedbox .item-play').addClass('disabled'); + $('#watch-now, #watch-trailer, .playerchoice, .file-item, .result-item, .seedbox .item-play').prop('disabled', true); // Double Click to toggle Fullscreen $('#video_player, .state-info-player').dblclick(function (event) { @@ -1147,7 +1147,7 @@ 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'); + $('.button, #watch-now, .show-details .sdow-watchnow, .playerchoice, .file-item, .result-item, .trash-torrent, .collection-actions, .seedbox .item-play').removeClass('disabled').removeProp('disabled'); this.unbindKeyboardShortcuts(); Mousetrap.bind('ctrl+v', function (e) { }); diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 6f42a5e271..80321d5ea7 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -25,17 +25,14 @@ className: 'seedbox', events: { - 'mousedown .file-item': 'openFileSelector', - 'mousedown .result-item': 'onlineOpen', - 'mousedown .item-delete': 'deleteItem', - 'mousedown .item-rename': 'renameItem', 'mousedown .magnet-icon': 'openMagnet', 'mousedown .health-icon': 'healthClicked', 'mousedown .pause-torrent': 'onPauseTorrentClicked', 'mousedown .resume-torrent': 'onResumeTorrentClicked', 'mousedown .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', - 'click .file-item': 'tempf' + 'click .item-play': 'playItem', + 'click .item-open': 'openItem' }, initialize: function () { @@ -291,7 +288,7 @@ this.updateView($(e.currentTarget), true /*wasJustSelected*/); }, - tempf: function () { + openItem: function () { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); if (App.settings.separateDownloadsDir && !torrent._servers[0]) { @@ -301,6 +298,22 @@ } }, + playItem: function (e) { + const hash = $('.tab-torrent.active')[0].getAttribute('id'); + const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); + var torrentStart = new Backbone.Model({ + torrent: thisTorrent, + title: thisTorrent.name, + defaultSubtitle: Settings.subtitle_language, + device: App.Device.Collection.selected, + file_name: e.target.parentNode.firstChild.innerHTML + }); + $('#resume-'+hash).show(); + $('#play-'+hash).hide(); + $('#trash-'+hash).addClass('disabled'); + App.vent.trigger('stream:start', torrentStart); + }, + openMagnet: function (e) { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); @@ -369,7 +382,12 @@ } catch (err) {} for (const file of torrent.files) { if (supported.indexOf(path.extname(file.name).toLowerCase()) !== -1) { - $fileList.append(`
  • ${file.name}
  • `); + if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { + $fileList.append(`
  • ${file.name}
  • `); + $('.seedbox .item-play').prop('disabled', true); + } else { + $fileList.append(`
  • ${file.name}
  • `); + } } } } @@ -387,6 +405,13 @@ } else if ($('.progress-bar').hasClass('done')) { $('.progress-bar').removeClass('done'); } + this.$('.item-play, .item-open').tooltip({ + html: true, + delay: { + 'show': 800, + 'hide': 100 + } + }); }, onBeforeDestroy: function () { diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 0d5a05ade2..3f6241780f 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -283,17 +283,21 @@ white-space nowrap text-overflow ellipsis - .item-delete, - .item-rename + .item-open, + .item-play position relative color: $TextError transition all 0.3s cursor pointer - left calc(100% + 22px) + left calc(100% + 7px) top -17px - .item-rename - left calc(100% - 15px) + .item-play + left calc(100% - 5px) + + &.disabled + cursor not-allowed + opacity 0.3 .item-icon position relative From 068a3ee279a0b1f2d5a9bfa85be7d508b4778e54 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 24 Oct 2021 02:18:03 +0300 Subject: [PATCH 003/203] Add filesize tooltips for the Seedbox filelist --- src/app/lib/views/seedbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 80321d5ea7..3985328788 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -383,10 +383,10 @@ for (const file of torrent.files) { if (supported.indexOf(path.extname(file.name).toLowerCase()) !== -1) { if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); $('.seedbox .item-play').prop('disabled', true); } else { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); } } } @@ -405,7 +405,7 @@ } else if ($('.progress-bar').hasClass('done')) { $('.progress-bar').removeClass('done'); } - this.$('.item-play, .item-open').tooltip({ + this.$('.file-item, .item-play, .item-open').tooltip({ html: true, delay: { 'show': 800, From 31f733ab520360e5ac8528e3a8587ae93ef2e2f8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 24 Oct 2021 03:21:59 +0300 Subject: [PATCH 004/203] Add filesize tooltips for the Seedbox filelist --- src/app/lib/views/seedbox.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 3985328788..354661ee8d 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -411,6 +411,10 @@ 'show': 800, 'hide': 100 } + }).hover(function(e){ + if ($(e.target).is('.item-play') || $(e.target).is('.item-open')) { + $('.file-item').tooltip('hide'); + } }); }, From c0ad270e9e0e89db70c28d4c13202e004d656970 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 24 Oct 2021 17:27:06 +0300 Subject: [PATCH 005/203] 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 354661ee8d..d42f6fe7d7 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -302,7 +302,7 @@ const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ - torrent: thisTorrent, + torrent: thisTorrent.magnetURI, title: thisTorrent.name, defaultSubtitle: Settings.subtitle_language, device: App.Device.Collection.selected, From 65447f0ff3ae77dacc79236a21eb942068f5b3d2 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 24 Oct 2021 23:28:52 +0300 Subject: [PATCH 006/203] openOrCopy function --- src/app/common.js | 16 ++++++++++ src/app/lib/views/movie_detail.js | 39 +++---------------------- src/app/lib/views/player/loading.js | 24 ++------------- src/app/lib/views/seedbox.js | 12 +------- src/app/lib/views/settings_container.js | 3 +- src/app/lib/views/show_detail.js | 19 ++---------- src/app/lib/views/torrent_collection.js | 8 +---- src/app/templates/loading.tpl | 6 ++-- 8 files changed, 31 insertions(+), 96 deletions(-) diff --git a/src/app/common.js b/src/app/common.js index 08f19ea040..15ed64ee03 100644 --- a/src/app/common.js +++ b/src/app/common.js @@ -324,4 +324,20 @@ Common.Promises = { Common.getTorrentUri = torrent => torrent.magnet || torrent.url || torrent; +Common.openOrClipboardLink = function(e, link, text, noOpen = false, noCopy = false) { + if (e.button === 2 && !noCopy) { + var clipboard = nw.Clipboard.get(); + clipboard.set(link, 'text'); + $('.notification_alert') + .text(i18n.__('The %s was copied to the clipboard', text)) + .fadeIn('fast') + .delay(2500) + .fadeOut('fast') + ; + } + if (e.button === 0 && !noOpen) { + nw.Shell.openExternal(link); + } +}; + Common.qualityCollator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}); diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 15d1929f7c..fbc94a3708 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -1,9 +1,6 @@ (function(App) { 'use strict'; - // Torrent Health - var torrentHealth = require('webtorrent-health'), - healthButton, - curSynopsis; + var healthButton, curSynopsis; var _this; App.View.MovieDetail = Marionette.View.extend({ @@ -249,13 +246,7 @@ $('.overview *').tooltip({html: true, sanitize: false, container: 'body', placement: 'bottom', delay: {show: 200, hide: 0}, template: '
    '}); }, - clickPoster: function(e) { - if (e.button === 2) { - var clipboard = nw.Clipboard.get(); - clipboard.set($('.mcover-image')[0].src, 'text'); - $('.notification_alert').text(i18n.__('The image url was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); - } - }, + clickPoster: (e) => Common.openOrClipboardLink(e, $('.mcover-image')[0].src, i18n.__('image url'), true), onBeforeDestroy: function() { $('[data-toggle="tooltip"]').tooltip('hide'); @@ -336,18 +327,7 @@ magnetLink = torrent.url.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) { - //if right click on magnet link - var clipboard = nw.Clipboard.get(); - clipboard.set(magnetLink, '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(magnetLink); - } + Common.openOrClipboardLink(e, magnetLink, i18n.__('magnet link')); }, openSource: function(e) { @@ -360,18 +340,7 @@ } 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); - } + Common.openOrClipboardLink(e, sourceLink, i18n.__('source link')); } }); diff --git a/src/app/lib/views/player/loading.js b/src/app/lib/views/player/loading.js index 8084e71fbe..c3e40486dd 100644 --- a/src/app/lib/views/player/loading.js +++ b/src/app/lib/views/player/loading.js @@ -54,9 +54,7 @@ 'click .maximize-icon': 'minDetails', 'click #max_play_ctrl': 'maxPlayCtrl', 'click .show-pcontrols': 'showpcontrols', - 'mousedown .title': 'copytoclip', - 'mousedown .text_filename': 'copytoclip', - 'mousedown .text_streamurl': 'copytoclip', + 'mousedown .copytoclip': 'copytoclip', 'mousedown .magnet-icon': 'openMagnet', 'click .playing-progressbar': 'seekStreaming' }, @@ -351,17 +349,7 @@ 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); - } + Common.openOrClipboardLink(e, magnetLink, i18n.__('magnet link')); } }, @@ -379,13 +367,7 @@ } }, - copytoclip: function (e) { - if (e.button === 2) { - var clipboard = nw.Clipboard.get(); - clipboard.set(e.target.textContent, 'text'); - $('.notification_alert').text(i18n.__('Copied to clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); - } - }, + copytoclip: (e) => Common.openOrClipboardLink(e, e.target.textContent, i18n.__($(e.target).data('copy')), true), pauseStreaming: function() { App.vent.trigger('device:pause'); diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index d42f6fe7d7..e3c45c98c0 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -320,17 +320,7 @@ 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.__('The magnet link was copied to the clipboard')) - .fadeIn('fast') - .delay(2500) - .fadeOut('fast'); - } else { - nw.Shell.openExternal(magnetLink); - } + Common.openOrClipboardLink(e, magnetLink, i18n.__('magnet link')); } }, diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 2f24affe98..826f565265 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -1,7 +1,6 @@ (function (App) { 'use strict'; - var clipboard = nw.Clipboard.get(), - waitComplete, + var waitComplete, oldTmpLocation, oldDownloadsLocation, that; diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 814de47fe7..5e5f644e51 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -1,9 +1,6 @@ (function (App) { 'use strict'; - var torrentHealth = require('webtorrent-health'); - var cancelTorrentHealth = function () {}; - var torrentHealthRestarted = null; let healthButton; var _this, bookmarked; @@ -366,24 +363,12 @@ openMagnet: function (e) { var torrentUrl = $('.startStreaming').attr('data-torrent').replace(/\&/g, '&'); torrentUrl = torrentUrl.split('&tr=')[0] + _.union(decodeURIComponent(torrentUrl).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) { //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); - } + Common.openOrClipboardLink(e, torrentUrl, i18n.__('magnet link')); }, 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 source link was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); - } else { - nw.Shell.openExternal(torrentUrl); - } + Common.openOrClipboardLink(e, torrentUrl, i18n.__('source link')); }, switchRating: function () { diff --git a/src/app/lib/views/torrent_collection.js b/src/app/lib/views/torrent_collection.js index 7cac659b84..1c0064698b 100644 --- a/src/app/lib/views/torrent_collection.js +++ b/src/app/lib/views/torrent_collection.js @@ -468,13 +468,7 @@ } 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) { //if right click on magnet link - var clipboard = nw.Clipboard.get(); - clipboard.set(magnetLink, '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(magnetLink); - } + Common.openOrClipboardLink(e, magnetLink, i18n.__('magnet link')); }, deleteItem: function (e) { diff --git a/src/app/templates/loading.tpl b/src/app/templates/loading.tpl index ae64765ba6..7067187ae5 100644 --- a/src/app/templates/loading.tpl +++ b/src/app/templates/loading.tpl @@ -13,7 +13,7 @@
    -
    ">
    +
    ">
    <%= i18n.__("Streaming to") %>
    @@ -79,9 +79,9 @@ 0
    <%= i18n.__("Filename") %>:  "> - ">
    + ">
    <%= i18n.__("Stream Url") %>:  - ">
    + ">
    ">
    From 3932c9ec891b795c3bfd8c16f4b5371f5983e504 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 25 Oct 2021 11:19:21 +0300 Subject: [PATCH 007/203] add button --- src/app/lib/views/movie_detail.js | 7 +++++++ src/app/lib/views/show_detail.js | 7 +++++++ src/app/styl/views/movie_detail.styl | 2 +- src/app/styl/views/show_detail.styl | 2 +- src/app/templates/movie-detail.tpl | 13 +++++++------ src/app/templates/show-detail.tpl | 4 +++- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index fbc94a3708..4f2026906f 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -22,6 +22,7 @@ 'click .movie-imdb-link': 'openIMDb', 'mousedown .magnet-link': 'openMagnet', 'mousedown .source-link': 'openSource', + 'mousedown .tmdb-link': 'openTmdb', 'click .rating-container': 'switchRating', 'click .show-cast': 'showCast', 'click .showall-cast': 'showallCast', @@ -341,6 +342,12 @@ return; } Common.openOrClipboardLink(e, sourceLink, i18n.__('source link')); + }, + + openTmdb: function(e) { + console.log(this.model); + let tmdbLink = ''; + Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } }); diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 5e5f644e51..4a0607f86d 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -25,6 +25,7 @@ 'click .tab-episode': 'clickEpisode', 'click .shmi-year': 'openRelInfo', 'click .shmi-imdb': 'openIMDb', + 'click .shmi-tmdb-link': 'openTmdb', 'mousedown .magnet-icon': 'openMagnet', 'mousedown .source-icon': 'openSource', 'dblclick .tab-episode': 'dblclickEpisode', @@ -371,6 +372,12 @@ Common.openOrClipboardLink(e, torrentUrl, i18n.__('source link')); }, + openTmdb: function(e) { + console.log(this.model); + let tmdbLink = ''; + Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); + }, + switchRating: function () { $('.number-container-tv').toggleClass('hidden'); $('.star-container-tv').toggleClass('hidden'); diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index b1e3650dab..2c3e3718d3 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -107,7 +107,7 @@ &:first-child::before display: none - .show-cast + .show-cast, .tmdb-link color: #f8f8f8 font-size: 12px position: relative diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index 721ef54dc9..f00813056f 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -84,7 +84,7 @@ color: #fff -webkit-font-smoothing: antialiased - div.shmi-year + div.shmi-year, div.shmi-tmdb-link cursor: pointer div.shmi-imdb diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index bf435c78ae..68808111da 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -26,14 +26,14 @@ if (genre) {
    <%= displayTitle %>
    -
    "><%= year %>
    +
    <%= year %>
    <%= runtime %> min
    <%= genre.join(" / ") %>
    <% if((typeof(certification) !== 'undefined') && (certification !== null) && (certification !== '') && (certification !== 'NR')) { %> -
    "><%= certification %>
    +
    <%= certification %>
    <% } %> -
    ">
    -
    " class="movie-imdb-link">
    +
    +
    <% var p_rating = Math.round(rating) / 2; %> @@ -52,8 +52,9 @@ if (genre) {
    -
    " class="fa fa-circle health-icon <%= health %>">
    -
    " class="fa fa-magnet magnet-link">
    +
    +
    +
    diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 1aa0ee0dee..36d460e396 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -11,7 +11,7 @@ + +
    <%= displaySynopsis %>
    From 91af32dea2418fa42a96afc26a97ca68ff954ad1 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 26 Oct 2021 10:12:20 +0300 Subject: [PATCH 008/203] get id and build link --- src/app/butter-provider/movie.js | 1 + src/app/lib/views/movie_detail.js | 3 +-- src/app/lib/views/show_detail.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 9088103c6b..142e565423 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -21,6 +21,7 @@ class MovieApi extends Generic { results.push({ type: 'movie', imdb_id: movie.imdb_id, + tmdb_id: movie.tmdb_id, title: movie.title, year: movie.year, genre: movie.genres, diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 4f2026906f..27807c40cf 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -345,8 +345,7 @@ }, openTmdb: function(e) { - console.log(this.model); - let tmdbLink = ''; + let tmdbLink = 'https://www.themoviedb.org/movie/' + this.model.get('tmdb_id'); Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 4a0607f86d..d2a7c14c70 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -373,8 +373,7 @@ }, openTmdb: function(e) { - console.log(this.model); - let tmdbLink = ''; + let tmdbLink = 'https://www.themoviedb.org/tv/' + this.model.get('tmdb_id'); Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); }, From a7d95ea277fba5b9d579c54ea5c699ac3f5cb045 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 26 Oct 2021 18:43:07 +0300 Subject: [PATCH 009/203] fixes --- src/app/lib/views/movie_detail.js | 25 ++++++++++++++++++++++++- src/app/lib/views/show_detail.js | 25 ++++++++++++++++++++++++- src/app/templates/movie-detail.tpl | 2 +- src/app/templates/show-detail.tpl | 2 +- 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 27807c40cf..8ace15b97c 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -345,7 +345,30 @@ }, openTmdb: function(e) { - let tmdbLink = 'https://www.themoviedb.org/movie/' + this.model.get('tmdb_id'); + let imdb = this.model.get('imdb_id'), + tmdb = this.model.get('tmdb_id'), + api_key = Settings.tmdb.api_key; + + if (!tmdb) { + let movie = (function () { + let tmp = null; + $.ajax({ + url: 'http://api.themoviedb.org/3/movie/' + imdb + '?api_key=' + api_key, + type: 'get', + dataType: 'json', + timeout: 5000, + async: false, + global: false, + success: function (data) { + tmp = data; + } + }); + return tmp; + }()); + tmdb = movie.id; + } + + let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index d2a7c14c70..880526c058 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -373,7 +373,30 @@ }, openTmdb: function(e) { - let tmdbLink = 'https://www.themoviedb.org/tv/' + this.model.get('tmdb_id'); + let imdb = this.model.get('imdb_id'), + tmdb = this.model.get('tmdb_id'), + api_key = Settings.tmdb.api_key; + + if (!tmdb) { + let show = (function () { + let tmp = null; + $.ajax({ + url: 'http://api.themoviedb.org/3/tv/' + imdb + '?api_key=' + api_key, + type: 'get', + dataType: 'json', + timeout: 5000, + async: false, + global: false, + success: function (data) { + tmp = data; + } + }); + return tmp; + }()); + tmdb = show.id; + } + + let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); }, diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 68808111da..c3216d22ca 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -52,7 +52,7 @@ if (genre) {
    -
    +
    diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 36d460e396..44d9621f92 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -40,7 +40,7 @@ - +
    <%= displaySynopsis %>
    From 8c24a39f27af937e112dc556db6aaac3f96197ea Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:57:06 +0300 Subject: [PATCH 010/203] Tmdb link fixes --- src/app/language/en.json | 3 ++- src/app/lib/views/movie_detail.js | 32 ++++++++++++++-------------- src/app/lib/views/show_detail.js | 10 ++++----- src/app/styl/views/movie_detail.styl | 17 ++++++++++++++- src/app/styl/views/show_detail.styl | 10 ++++++++- src/app/templates/movie-detail.tpl | 2 +- src/app/templates/show-detail.tpl | 2 +- 7 files changed, 50 insertions(+), 26 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 7cc7dda7b8..e967594485 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -573,5 +573,6 @@ "Show Release Info": "Show Release Info", "Parental Guide": "Parental Guide", "Rebuild bookmarks database": "Rebuild bookmarks database", - "Rebuilding bookmarks...": "Rebuilding bookmarks..." + "Rebuilding bookmarks...": "Rebuilding bookmarks...", + "Submit metadata and translations": "Submit metadata and translations" } diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 8ace15b97c..0e128682b9 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -350,22 +350,22 @@ api_key = Settings.tmdb.api_key; if (!tmdb) { - let movie = (function () { - let tmp = null; - $.ajax({ - url: 'http://api.themoviedb.org/3/movie/' + imdb + '?api_key=' + api_key, - type: 'get', - dataType: 'json', - timeout: 5000, - async: false, - global: false, - success: function (data) { - tmp = data; - } - }); - return tmp; - }()); - tmdb = movie.id; + let movie = (function () { + let tmp = null; + $.ajax({ + url: 'http://api.themoviedb.org/3/find/' + imdb + '?api_key=' + api_key + '&external_source=imdb_id', + type: 'get', + dataType: 'json', + timeout: 5000, + async: false, + global: false, + success: function (data) { + tmp = data; + } + }); + return tmp; + }()); + tmdb = movie.movie_results[0].id; } let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 880526c058..0006f73f54 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -162,7 +162,7 @@ this.loadAudioDropdown(); this.getRegion('qualitySelector').empty(); - $('.star-container-tv,.shmi-year,.shmi-imdb,.magnet-icon,.source-icon').tooltip(); + $('.star-container-tv,.shmi-year,.shmi-imdb,.shmi-tmdb-link,.magnet-icon,.source-icon').tooltip(); var noimg = 'images/posterholder.png'; var nobg = 'images/bg-header.jpg'; var images = this.model.get('images'); @@ -374,14 +374,14 @@ openTmdb: function(e) { let imdb = this.model.get('imdb_id'), - tmdb = this.model.get('tmdb_id'), - api_key = Settings.tmdb.api_key; + tmdb = this.model.get('tmdb_id'), + api_key = Settings.tmdb.api_key; if (!tmdb) { let show = (function () { let tmp = null; $.ajax({ - url: 'http://api.themoviedb.org/3/tv/' + imdb + '?api_key=' + api_key, + url: 'http://api.themoviedb.org/3/find/' + imdb + '?api_key=' + api_key + '&external_source=imdb_id', type: 'get', dataType: 'json', timeout: 5000, @@ -393,7 +393,7 @@ }); return tmp; }()); - tmdb = show.id; + tmdb = show.tv_results[0].id; } let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index 2c3e3718d3..37eeb64b84 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -107,7 +107,7 @@ &:first-child::before display: none - .show-cast, .tmdb-link + .show-cast color: #f8f8f8 font-size: 12px position: relative @@ -117,6 +117,21 @@ font-smoothing: antialiased cursor: pointer + .tmdb-link + color: #f8f8f8 + font-size: 11px + position: relative + font-family: "Font Awesome 5 Free" + text-stroke: 1px rgba(0,0,0,0.1) + float: left + font-smoothing: antialiased + cursor: pointer + opacity: 0.4 + transition: opacity .3s ease-in + + &:hover + opacity: 1 + .year, .certification color: #f8f8f8 font-size: 12px diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index f00813056f..c18199f219 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -84,9 +84,17 @@ color: #fff -webkit-font-smoothing: antialiased - div.shmi-year, div.shmi-tmdb-link + div.shmi-year cursor: pointer + div.shmi-tmdb-link + cursor: pointer + opacity: 0.4 + transition: opacity .3s ease-in + + &:hover + opacity: 1 + 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 c3216d22ca..2cc25b9380 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -52,7 +52,7 @@ if (genre) { -
    +
    diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 44d9621f92..0c3ffcaa81 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -40,7 +40,7 @@ - +
    <%= displaySynopsis %>
    From 7798d3f4c3fc48608b6cc883942f4211e8afe561 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 20:56:30 +0300 Subject: [PATCH 011/203] Update movie_detail.js --- src/app/lib/views/movie_detail.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 0e128682b9..86fdad6e6d 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -213,6 +213,7 @@ !this.model.get('trailer') && movie && movie.videos && movie.videos.results && movie.videos.results[0] ? this.model.set('trailer', 'http://www.youtube.com/watch?v=' + movie.videos.results[0].key) : null; (!this.model.get('poster') || this.model.get('poster') === 'images/posterholder.png') && movie && movie.poster_path ? this.model.set('poster', 'http://image.tmdb.org/t/p/w500' + movie.poster_path) : null; (!this.model.get('backdrop') || this.model.get('backdrop') === 'images/posterholder.png') && movie && movie.backdrop_path ? this.model.set('backdrop', 'http://image.tmdb.org/t/p/w500' + movie.backdrop_path) : ((!this.model.get('backdrop') || this.model.get('backdrop') === 'images/posterholder.png') && movie && movie.poster_path ? this.model.set('backdrop', 'http://image.tmdb.org/t/p/w500' + movie.poster_path) : null); + !this.model.get('tmdb_id') && movie && movie.id ? this.model.set('tmdb_id', movie.id) : null; if (movie && movie.credits && movie.credits.cast && movie.credits.crew && (movie.credits.cast[0] || movie.credits.crew[0])) { curSynopsis.old = this.model.get('synopsis'); curSynopsis.crew = movie.credits.crew.filter(function (el) {return el.job === 'Director';}).map(function (el) {return '' + el.job + ' - ${el.name.replace(/\ /g, ' ')}`;}).join('   ') + '

     

    '; @@ -365,7 +366,8 @@ }); return tmp; }()); - tmdb = movie.movie_results[0].id; + movie && movie.movie_results && movie.movie_results[0].id ? this.model.set('tmdb_id', tmdb) : null; + tmdb = this.model.get('tmdb_id'); } let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; From f65de067d14b0fb46c3588631d1343895e47cb5b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 20:59:39 +0300 Subject: [PATCH 012/203] Update show_detail.js --- src/app/lib/views/show_detail.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 0006f73f54..20b2c0f804 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -393,7 +393,8 @@ }); return tmp; }()); - tmdb = show.tv_results[0].id; + show && show.tv_results && show.tv_results[0].id ? this.model.set('tmdb_id', tmdb) : null; + tmdb = this.model.get('tmdb_id'); } let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; From 32ca714e3a82613428a8bd7ffb4d818c4a06d0e0 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:06:57 +0300 Subject: [PATCH 013/203] Update movie_detail.js --- src/app/lib/views/movie_detail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 86fdad6e6d..de626e5551 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -370,8 +370,12 @@ tmdb = this.model.get('tmdb_id'); } - let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; - Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); + if (tmdb) { + let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; + Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); + } else { + $('.tmdb-link').css('cursor', 'not-allowed').attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + } } }); From 8f0316d0c8406c7a91a36306fe6d33bdbff51a20 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:08:50 +0300 Subject: [PATCH 014/203] Update show_detail.js --- src/app/lib/views/show_detail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 20b2c0f804..cd7e0a7322 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -397,8 +397,12 @@ tmdb = this.model.get('tmdb_id'); } - let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; - Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); + if (tmdb) { + let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; + Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); + } else { + $('.shmi-tmdb-link').css('cursor', 'not-allowed').attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + } }, switchRating: function () { From 0b3080a3abefafaaf4711c9ed108ae860fce19b0 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:10:53 +0300 Subject: [PATCH 015/203] 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 e967594485..21df36b974 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -574,5 +574,7 @@ "Parental Guide": "Parental Guide", "Rebuild bookmarks database": "Rebuild bookmarks database", "Rebuilding bookmarks...": "Rebuilding bookmarks...", - "Submit metadata and translations": "Submit metadata and translations" + "Submit metadata and translations": "Submit metadata and translations", + "Not available": "Not available", + "Cast not available": "Cast not available" } From fa2ba64555989c31d535eada44b8eab0aa52640d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:25:31 +0300 Subject: [PATCH 016/203] Update movie_detail.js --- src/app/lib/views/movie_detail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index de626e5551..5ca6bb3422 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -374,7 +374,7 @@ let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } else { - $('.tmdb-link').css('cursor', 'not-allowed').attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + $('.tmdb-link').css('cursor', 'not-allowed').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); } } From 09242fd1b4cefc3d739e5a7d5d317d05d7f3af01 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:25:36 +0300 Subject: [PATCH 017/203] 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 cd7e0a7322..f39acce72b 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -401,7 +401,7 @@ let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } else { - $('.shmi-tmdb-link').css('cursor', 'not-allowed').attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + $('.shmi-tmdb-link').css('cursor', 'not-allowed').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); } }, From 3e25983f855cdb93c1d09b873321dc9bcd6afafa Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:27:15 +0300 Subject: [PATCH 018/203] More TMDb link fixes --- src/app/lib/views/browser/item.js | 1 + src/app/lib/views/movie_detail.js | 10 +++++++--- src/app/lib/views/show_detail.js | 4 ++-- src/app/styl/views/movie_detail.styl | 4 ++++ src/app/styl/views/show_detail.styl | 4 ++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index a84fd3fb94..f241ec447b 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -199,6 +199,7 @@ (!this.model.get('runtime') || this.model.get('runtime') === '0') && movie && movie.runtime ? this.model.set('runtime', movie.runtime) : null; !this.model.get('trailer') && movie && movie.videos && movie.videos.results && movie.videos.results[0] ? this.model.set('trailer', 'http://www.youtube.com/watch?v=' + movie.videos.results[0].key) : null; (!this.model.get('backdrop') || this.model.get('backdrop') === 'images/posterholder.png') && movie && movie.backdrop_path ? this.model.set('backdrop', 'http://image.tmdb.org/t/p/w500' + movie.backdrop_path) : ((!this.model.get('backdrop') || this.model.get('backdrop') === 'images/posterholder.png') && movie && movie.poster_path ? this.model.set('backdrop', 'http://image.tmdb.org/t/p/w500' + movie.poster_path) : null); + !this.model.get('tmdb_id') && movie && movie.id ? this.model.set('tmdb_id', movie.id) : null; this.model.set('getmetarunned', true); } diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 5ca6bb3422..699a480388 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -22,7 +22,7 @@ 'click .movie-imdb-link': 'openIMDb', 'mousedown .magnet-link': 'openMagnet', 'mousedown .source-link': 'openSource', - 'mousedown .tmdb-link': 'openTmdb', + 'click .tmdb-link': 'openTmdb', 'click .rating-container': 'switchRating', 'click .show-cast': 'showCast', 'click .showall-cast': 'showallCast', @@ -346,6 +346,10 @@ }, openTmdb: function(e) { + if (this.model.get('getmetarunned')) { + return; + } + let imdb = this.model.get('imdb_id'), tmdb = this.model.get('tmdb_id'), api_key = Settings.tmdb.api_key; @@ -366,7 +370,7 @@ }); return tmp; }()); - movie && movie.movie_results && movie.movie_results[0].id ? this.model.set('tmdb_id', tmdb) : null; + movie && movie.movie_results && movie.movie_results[0] && movie.movie_results[0].id ? this.model.set('tmdb_id', movie.movie_results[0].id) : null; tmdb = this.model.get('tmdb_id'); } @@ -374,7 +378,7 @@ let tmdbLink = 'https://www.themoviedb.org/movie/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } else { - $('.tmdb-link').css('cursor', 'not-allowed').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + $('.tmdb-link').addClass('disabled').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); } } diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index f39acce72b..6a3d8f8ee6 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -393,7 +393,7 @@ }); return tmp; }()); - show && show.tv_results && show.tv_results[0].id ? this.model.set('tmdb_id', tmdb) : null; + show && show.tv_results && show.tv_results[0] && show.tv_results[0].id ? this.model.set('tmdb_id', show.tv_results[0].id) : null; tmdb = this.model.get('tmdb_id'); } @@ -401,7 +401,7 @@ let tmdbLink = 'https://www.themoviedb.org/tv/' + tmdb + '/edit?language=' + Settings.language; Common.openOrClipboardLink(e, tmdbLink, i18n.__('TMDB link')); } else { - $('.shmi-tmdb-link').css('cursor', 'not-allowed').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); + $('.shmi-tmdb-link').addClass('disabled').prop('disabled', true).attr('title', i18n.__('Not available')).tooltip('hide').tooltip('fixTitle'); } }, diff --git a/src/app/styl/views/movie_detail.styl b/src/app/styl/views/movie_detail.styl index 37eeb64b84..c409267ea8 100644 --- a/src/app/styl/views/movie_detail.styl +++ b/src/app/styl/views/movie_detail.styl @@ -132,6 +132,10 @@ &:hover opacity: 1 + &.disabled + cursor: default + opacity: 0.4 + .year, .certification color: #f8f8f8 font-size: 12px diff --git a/src/app/styl/views/show_detail.styl b/src/app/styl/views/show_detail.styl index c18199f219..c3385a3f4e 100644 --- a/src/app/styl/views/show_detail.styl +++ b/src/app/styl/views/show_detail.styl @@ -95,6 +95,10 @@ &:hover opacity: 1 + &.disabled + cursor: default + opacity: 0.4 + div.shmi-imdb cursor: pointer background: url(../images/icons/imdb.png) no-repeat From 5015e51d7e18a115260ee78ceafccba2899b5db2 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 27 Oct 2021 00:25:42 +0300 Subject: [PATCH 019/203] Update movie_detail.js --- src/app/lib/views/movie_detail.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/lib/views/movie_detail.js b/src/app/lib/views/movie_detail.js index 699a480388..ffec97c453 100644 --- a/src/app/lib/views/movie_detail.js +++ b/src/app/lib/views/movie_detail.js @@ -346,15 +346,11 @@ }, openTmdb: function(e) { - if (this.model.get('getmetarunned')) { - return; - } - let imdb = this.model.get('imdb_id'), tmdb = this.model.get('tmdb_id'), api_key = Settings.tmdb.api_key; - if (!tmdb) { + if (!tmdb && !this.model.get('getmetarunned')) { let movie = (function () { let tmp = null; $.ajax({ From 55e2926fc59ba6e0e79dfd549fe0e20d89686c4d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 27 Oct 2021 19:38:31 +0300 Subject: [PATCH 020/203] Update en.json --- src/app/language/en.json | 2 +- src/app/templates/movie-detail.tpl | 2 +- src/app/templates/show-detail.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 21df36b974..0545335ce5 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -574,7 +574,7 @@ "Parental Guide": "Parental Guide", "Rebuild bookmarks database": "Rebuild bookmarks database", "Rebuilding bookmarks...": "Rebuilding bookmarks...", - "Submit metadata and translations": "Submit metadata and translations", + "Submit metadata & translations": "Submit metadata & translations", "Not available": "Not available", "Cast not available": "Cast not available" } diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index 2cc25b9380..bc3b231b67 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -52,7 +52,7 @@ if (genre) { -
    +
    diff --git a/src/app/templates/show-detail.tpl b/src/app/templates/show-detail.tpl index 0c3ffcaa81..7bb52b9e79 100644 --- a/src/app/templates/show-detail.tpl +++ b/src/app/templates/show-detail.tpl @@ -40,7 +40,7 @@ - +
    <%= displaySynopsis %>
    From fc0ebdfea2c79ed52dc596190601f708848b7646 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 27 Oct 2021 20:26:46 +0300 Subject: [PATCH 021/203] Add option for TMDb link --- src/app/lib/views/seedbox.js | 42 +++++++++++++++++++++++++++++---- src/app/styl/views/seedbox.styl | 1 + 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index e3c45c98c0..bdbd78bfa5 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -31,6 +31,7 @@ 'mousedown .resume-torrent': 'onResumeTorrentClicked', 'mousedown .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', + 'click .item-download': 'downloadItem', 'click .item-play': 'playItem', 'click .item-open': 'openItem' }, @@ -80,6 +81,10 @@ this.onAddTorrent(torrent); }); + setTimeout(function() { + $('.tab-torrent.active').click(); + }, 500); + updateInterval = setInterval(() => { this.updateView($('.tab-torrent.active')); }, 1000); @@ -298,6 +303,24 @@ } }, + downloadItem: function (e) { + const hash = $('.tab-torrent.active')[0].getAttribute('id'); + const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); + var torrentStart = new Backbone.Model({ + torrent: thisTorrent.magnetURI, + title: thisTorrent.name, + defaultSubtitle: Settings.subtitle_language, + device: App.Device.Collection.selected, + file_name: e.target.parentNode.firstChild.innerHTML + }); + $('#resume-'+hash).show(); + $('#play-'+hash).hide(); + e.target.parentNode.style.opacity = 1; + e.target.parentNode.childNodes[3].style.display = 'inline-block'; + e.target.parentNode.childNodes[2].style.display = 'none'; + App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); + }, + playItem: function (e) { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); @@ -311,6 +334,9 @@ $('#resume-'+hash).show(); $('#play-'+hash).hide(); $('#trash-'+hash).addClass('disabled'); + e.target.parentNode.style.opacity = 1; + e.target.parentNode.childNodes[3].style.display = 'inline-block'; + e.target.parentNode.childNodes[2].style.display = 'none'; App.vent.trigger('stream:start', torrentStart); }, @@ -373,10 +399,18 @@ for (const file of torrent.files) { if (supported.indexOf(path.extname(file.name).toLowerCase()) !== -1) { if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { - $fileList.append(`
  • ${file.name}
  • `); + if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { + $fileList.append(`
  • ${file.name}
  • `); + } else { + $fileList.append(`
  • ${file.name}
  • `); + } $('.seedbox .item-play').prop('disabled', true); } else { - $fileList.append(`
  • ${file.name}
  • `); + if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { + $fileList.append(`
  • ${file.name}
  • `); + } else { + $fileList.append(`
  • ${file.name}
  • `); + } } } } @@ -395,14 +429,14 @@ } else if ($('.progress-bar').hasClass('done')) { $('.progress-bar').removeClass('done'); } - this.$('.file-item, .item-play, .item-open').tooltip({ + this.$('.file-item, .item-download, .item-play, .item-open').tooltip({ html: true, delay: { 'show': 800, 'hide': 100 } }).hover(function(e){ - if ($(e.target).is('.item-play') || $(e.target).is('.item-open')) { + if ($(e.target).is('.item-download') || $(e.target).is('.item-play') || $(e.target).is('.item-open')) { $('.file-item').tooltip('hide'); } }); diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 3f6241780f..17894fce6c 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -283,6 +283,7 @@ white-space nowrap text-overflow ellipsis + .item-download, .item-open, .item-play position relative From 5fdc3a4b183758536e0c96fd49a9e84df35a5dc6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 27 Oct 2021 20:35:27 +0300 Subject: [PATCH 022/203] Add option for TMDb link --- src/app/language/en.json | 3 ++- src/app/lib/views/settings_container.js | 2 ++ src/app/settings.js | 1 + src/app/templates/movie-detail.tpl | 2 ++ src/app/templates/settings-container.tpl | 4 ++++ src/app/templates/show-detail.tpl | 2 ++ 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 0545335ce5..8822dc35ff 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -576,5 +576,6 @@ "Rebuilding bookmarks...": "Rebuilding bookmarks...", "Submit metadata & translations": "Submit metadata & translations", "Not available": "Not available", - "Cast not available": "Cast not available" + "Cast not available": "Cast not available", + "Show the 'Submit metadata & translations' button": "Show the 'Submit metadata & translations' button" } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 826f565265..e381c61105 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -300,6 +300,7 @@ case 'coversShowRating': case 'torColSearchMore': case 'showSeedboxOnDlInit': + case 'showSubmitMeta': case 'nativeWindowFrame': case 'translatePosters': case 'translateSynopsis': @@ -573,6 +574,7 @@ case 'multipleExtSubtitles': case 'torColSearchMore': case 'httpApiEnabled': + case 'showSubmitMeta': $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; diff --git a/src/app/settings.js b/src/app/settings.js index 05ff501c4f..857a4fa1a8 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -141,6 +141,7 @@ Settings.moviesTabEnable = true; Settings.seriesTabEnable = true; Settings.animeTabEnable = true; Settings.showSeedboxOnDlInit = true; +Settings.showSubmitMeta = true; // Quality Settings.shows_default_quality = '720p'; diff --git a/src/app/templates/movie-detail.tpl b/src/app/templates/movie-detail.tpl index bc3b231b67..2615b3f0dd 100644 --- a/src/app/templates/movie-detail.tpl +++ b/src/app/templates/movie-detail.tpl @@ -52,7 +52,9 @@ if (genre) { + <% if (Settings.showSubmitMeta) { %>
    + <% } %>
    diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 0e686d5693..3f6a3be407 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -113,6 +113,10 @@ <% } %> + + > + + + <% if (Settings.showSubmitMeta) { %> + <% } %>
    <%= displaySynopsis %>
    From e12e1ff05c4fb27db8bd9b3a83a0c8107ea256c4 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:41:17 +0300 Subject: [PATCH 023/203] Update streamer.js --- src/app/lib/streamer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index 8c094d68bb..acc0e7a4cd 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -323,7 +323,7 @@ linkTransferStatus: function () { this.torrent.on('download', function () { - if (this.torrentModel) { + if (this.torrentModel && this.torrent) { this.torrentModel.set('downloadSpeed', Common.fileSize(this.torrent.downloadSpeed) + '/s'); this.torrentModel.set('downloaded', Math.round(this.torrent.downloaded).toFixed(2)); this.torrentModel.set('downloadedFormatted', Common.fileSize(this.torrent.downloaded)); @@ -334,7 +334,7 @@ }.bind(this)); this.torrent.on('upload', function () { - if (this.torrentModel) { + if (this.torrentModel && this.torrent) { this.torrentModel.set('uploadSpeed', Common.fileSize(this.torrent.uploadSpeed) + '/s'); this.torrentModel.set('active_peers', this.torrent.numPeers); } From 1a6750fec092b339bc4c3d80127def5e70e2ccfb Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 01:24:33 +0300 Subject: [PATCH 024/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 38 +++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index bdbd78bfa5..e86e936d2e 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -4,6 +4,8 @@ var torrentsDir = path.join(App.settings.tmpLocation + '/TorrentCache/'), torrentsDir2 = path.join(App.settings.downloadsLocation + '/TorrentCache/'), toDel = [], + totalSize, + totalPer, updateInterval; const supported = ['.mp4', '.m4v', '.avi', '.mov', '.mkv', '.wmv']; @@ -73,6 +75,7 @@ }, addTorrentHooks() { + var _this = this; App.WebTorrent.on('torrent', (torrent) => { this.onAddTorrent(torrent); }); @@ -82,8 +85,8 @@ }); setTimeout(function() { - $('.tab-torrent.active').click(); - }, 500); + _this.updateView($('.tab-torrent.active'), true); + }, 100); updateInterval = setInterval(() => { this.updateView($('.tab-torrent.active')); @@ -304,6 +307,7 @@ }, downloadItem: function (e) { + var _this = this; const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -315,13 +319,14 @@ }); $('#resume-'+hash).show(); $('#play-'+hash).hide(); - e.target.parentNode.style.opacity = 1; - e.target.parentNode.childNodes[3].style.display = 'inline-block'; - e.target.parentNode.childNodes[2].style.display = 'none'; + setTimeout(function() { + _this.updateView($('.tab-torrent.active'), true); + }, 100); App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); }, playItem: function (e) { + var _this = this; const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -334,9 +339,9 @@ $('#resume-'+hash).show(); $('#play-'+hash).hide(); $('#trash-'+hash).addClass('disabled'); - e.target.parentNode.style.opacity = 1; - e.target.parentNode.childNodes[3].style.display = 'inline-block'; - e.target.parentNode.childNodes[2].style.display = 'none'; + setTimeout(function() { + _this.updateView($('.tab-torrent.active'), true); + }, 100); App.vent.trigger('stream:start', torrentStart); }, @@ -386,6 +391,9 @@ const torrent = App.WebTorrent.get(infoHash); if (wasJustSelected) { + if (!totalPer || totalPer < 1) { + totalSize = 0; + } this.updateHealth(torrent); const $fileList = $('.torrents-info > ul.file-list'); $fileList.empty(); @@ -401,6 +409,9 @@ if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { $fileList.append(`
  • ${file.name}
  • `); + if (!totalPer || totalPer < 1) { + totalSize = totalSize + file.length; + } } else { $fileList.append(`
  • ${file.name}
  • `); } @@ -408,6 +419,9 @@ } else { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { $fileList.append(`
  • ${file.name}
  • `); + if (!totalPer || totalPer < 1) { + totalSize = totalSize + file.length; + } } else { $fileList.append(`
  • ${file.name}
  • `); } @@ -416,19 +430,21 @@ } } + totalPer = 1 / (totalSize / torrent.downloaded); 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(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) { + if (totalPer >= 1) { if (!$('.progress-bar').hasClass('done')) { $('.progress-bar').addClass('done'); } + totalPer = 1; } else if ($('.progress-bar').hasClass('done')) { $('.progress-bar').removeClass('done'); } + $('.progress-bar').css('width', ((totalPer || 0) * 100).toFixed(2) + '%'); + $('.progress-percentage>span').text(((totalPer || 0) * 100).toFixed(2) + '%'); this.$('.file-item, .item-download, .item-play, .item-open').tooltip({ html: true, delay: { From a98961ded5d2085d29e2dc9ceb73794110d648af Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 01:44:31 +0300 Subject: [PATCH 025/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index e86e936d2e..5ff6b0c843 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -409,9 +409,7 @@ if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { $fileList.append(`
  • ${file.name}
  • `); - if (!totalPer || totalPer < 1) { - totalSize = totalSize + file.length; - } + totalSize = totalSize + file.length; } else { $fileList.append(`
  • ${file.name}
  • `); } @@ -419,9 +417,7 @@ } else { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { $fileList.append(`
  • ${file.name}
  • `); - if (!totalPer || totalPer < 1) { - totalSize = totalSize + file.length; - } + totalSize = totalSize + file.length; } else { $fileList.append(`
  • ${file.name}
  • `); } From b78d6f42fb006e30e1037303a73e3bcabad93222 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 17:20:21 +0300 Subject: [PATCH 026/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 5ff6b0c843..cc97a888ee 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -341,6 +341,7 @@ $('#trash-'+hash).addClass('disabled'); setTimeout(function() { _this.updateView($('.tab-torrent.active'), true); + $('.seedbox .item-play').addClass('disabled').prop('disabled', true); }, 100); App.vent.trigger('stream:start', torrentStart); }, @@ -408,22 +409,32 @@ if (supported.indexOf(path.extname(file.name).toLowerCase()) !== -1) { if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); totalSize = totalSize + file.length; } else { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); } $('.seedbox .item-play').prop('disabled', true); } else { if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); totalSize = totalSize + file.length; } else { - $fileList.append(`
  • ${file.name}
  • `); + $fileList.append(`
  • ${file.name}
  • `); } } } } + $('.file-item').tooltip({ + html: true, + delay: { + 'show': 800, + 'hide': 100 + } + }); + $('.item-download, .item-play, .item-open').hover(function(){ + $('.file-item').tooltip('hide'); + }); } totalPer = 1 / (totalSize / torrent.downloaded); @@ -441,17 +452,6 @@ } $('.progress-bar').css('width', ((totalPer || 0) * 100).toFixed(2) + '%'); $('.progress-percentage>span').text(((totalPer || 0) * 100).toFixed(2) + '%'); - this.$('.file-item, .item-download, .item-play, .item-open').tooltip({ - html: true, - delay: { - 'show': 800, - 'hide': 100 - } - }).hover(function(e){ - if ($(e.target).is('.item-download') || $(e.target).is('.item-play') || $(e.target).is('.item-open')) { - $('.file-item').tooltip('hide'); - } - }); }, onBeforeDestroy: function () { From 6037572197d8e1dac75c21aa69d8b320f739d4cd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 17:37:25 +0300 Subject: [PATCH 027/203] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 17894fce6c..51305acc84 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -273,6 +273,22 @@ filter brightness(110%) backdrop-filter brightness(110%) + &.unselected + opacity 0.3 + + &:hover + opacity 0.5 + + & > .item-download, + & > .item-open, + & > .item-play + display inline-block + + .item-download, + .item-open, + .item-play + display none + a color $FileSelectorText text-decoration blink @@ -293,6 +309,9 @@ left calc(100% + 7px) top -17px + &:hover + color $CloseButtonHover + .item-play left calc(100% - 5px) From 4928fe4705a69cc3beb1aae3923bdcc636eb57df Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 18:54:05 +0300 Subject: [PATCH 028/203] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 51305acc84..fc478caf82 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -280,24 +280,23 @@ opacity 0.5 & > .item-download, - & > .item-open, - & > .item-play + & > .item-open display inline-block .item-download, - .item-open, - .item-play + .item-open display none a color $FileSelectorText text-decoration blink - width 100% + width calc(100% - 25px) display block transition all 0.3s overflow hidden white-space nowrap text-overflow ellipsis + margin-left 25px .item-download, .item-open, @@ -313,7 +312,7 @@ color $CloseButtonHover .item-play - left calc(100% - 5px) + left 0px &.disabled cursor not-allowed From 5f25c1795d1306613ab3a24dd7ba3560daece68b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 29 Oct 2021 19:13:29 +0300 Subject: [PATCH 029/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index cc97a888ee..3fa5df28e7 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -304,6 +304,7 @@ } else { App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.tmpLocation) : nw.Shell.openItem(Settings.tmpLocation); } + $('.file-item').tooltip('hide'); }, downloadItem: function (e) { @@ -432,7 +433,7 @@ 'hide': 100 } }); - $('.item-download, .item-play, .item-open').hover(function(){ + $('.item-play').hover(function(){ $('.file-item').tooltip('hide'); }); } From d5f33fb434e598996548cfaa3e01d6f5a7c0f135 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 30 Oct 2021 04:06:39 +0300 Subject: [PATCH 030/203] optimize seedbox display --- src/app/lib/views/seedbox.js | 60 ++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index cc97a888ee..84771343da 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -75,7 +75,6 @@ }, addTorrentHooks() { - var _this = this; App.WebTorrent.on('torrent', (torrent) => { this.onAddTorrent(torrent); }); @@ -84,9 +83,7 @@ this.onAddTorrent(torrent); }); - setTimeout(function() { - _this.updateView($('.tab-torrent.active'), true); - }, 100); + setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); updateInterval = setInterval(() => { this.updateView($('.tab-torrent.active')); @@ -299,15 +296,12 @@ openItem: function () { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); - if (App.settings.separateDownloadsDir && !torrent._servers[0]) { - App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.downloadsLocation) : nw.Shell.openItem(Settings.downloadsLocation); - } else { - App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.tmpLocation) : nw.Shell.openItem(Settings.tmpLocation); - } + const location = App.settings.separateDownloadsDir && !torrent._servers[0] + ? Settings.downloadsLocation : Settings.tmpLocation; + App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, downloadItem: function (e) { - var _this = this; const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -319,14 +313,11 @@ }); $('#resume-'+hash).show(); $('#play-'+hash).hide(); - setTimeout(function() { - _this.updateView($('.tab-torrent.active'), true); - }, 100); + setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); }, playItem: function (e) { - var _this = this; const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -339,8 +330,8 @@ $('#resume-'+hash).show(); $('#play-'+hash).hide(); $('#trash-'+hash).addClass('disabled'); - setTimeout(function() { - _this.updateView($('.tab-torrent.active'), true); + setTimeout(() => { + this.updateView($('.tab-torrent.active'), true); $('.seedbox .item-play').addClass('disabled').prop('disabled', true); }, 100); App.vent.trigger('stream:start', torrentStart); @@ -405,26 +396,29 @@ return 0; }); } catch (err) {} + + let active = $('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible'); for (const file of torrent.files) { - if (supported.indexOf(path.extname(file.name).toLowerCase()) !== -1) { - if ($('.loading .maximize-icon').is(':visible') || $('.player .maximize-icon').is(':visible')) { - if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { - $fileList.append(`
  • ${file.name}
  • `); - totalSize = totalSize + file.length; - } else { - $fileList.append(`
  • ${file.name}
  • `); - } - $('.seedbox .item-play').prop('disabled', true); - } else { - if (torrent._selections.some(function (el) { return el.from == file._startPiece || el.to == file._endPiece; })) { - $fileList.append(`
  • ${file.name}
  • `); - totalSize = totalSize + file.length; - } else { - $fileList.append(`
  • ${file.name}
  • `); - } - } + if (supported.indexOf(path.extname(file.name).toLowerCase()) === -1) { + continue; + } + let selected = false; + if (torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; })) { + selected = true; + totalSize = totalSize + file.length; } + + $fileList.append(`
  • ${file.name} + + + +
  • `); } + if (active) { + $('.seedbox .item-play').addClass('disabled').prop('disabled', true); + } + $('.file-item').tooltip({ html: true, delay: { From 05ef922bee864d872b3d79c7219e7f0b8c92e9ac Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 10:18:00 +0300 Subject: [PATCH 031/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 3fa5df28e7..cc97a888ee 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -304,7 +304,6 @@ } else { App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.tmpLocation) : nw.Shell.openItem(Settings.tmpLocation); } - $('.file-item').tooltip('hide'); }, downloadItem: function (e) { @@ -433,7 +432,7 @@ 'hide': 100 } }); - $('.item-play').hover(function(){ + $('.item-download, .item-play, .item-open').hover(function(){ $('.file-item').tooltip('hide'); }); } From 8dae659cfc81820d49974b02c2cd4903cf87fa9e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 13:37:05 +0300 Subject: [PATCH 032/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 57 ++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 84771343da..5373b764b8 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -33,9 +33,10 @@ 'mousedown .resume-torrent': 'onResumeTorrentClicked', 'mousedown .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', - 'click .item-download': 'downloadItem', + 'click .file-item': 'openItem', 'click .item-play': 'playItem', - 'click .item-open': 'openItem' + 'click .item-download': 'downloadItem', + 'click .item-cancel': 'cancelItem' }, initialize: function () { @@ -301,7 +302,8 @@ App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, - downloadItem: function (e) { + playItem: function (e) { + e.stopPropagation(); const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -311,13 +313,21 @@ device: App.Device.Collection.selected, file_name: e.target.parentNode.firstChild.innerHTML }); - $('#resume-'+hash).show(); - $('#play-'+hash).hide(); - setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); - App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); + if (thisTorrent.paused) { + this.onResumeTorrentClicked($('.tab-torrent.active'), hash); + $('#resume-'+hash).show(); + $('#play-'+hash).hide(); + $('#trash-'+hash).addClass('disabled'); + } + setTimeout(() => { + this.updateView($('.tab-torrent.active'), true); + $('.seedbox .item-play').addClass('disabled').prop('disabled', true); + }, 100); + App.vent.trigger('stream:start', torrentStart); }, - playItem: function (e) { + downloadItem: function (e) { + e.stopPropagation(); const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -327,14 +337,25 @@ device: App.Device.Collection.selected, file_name: e.target.parentNode.firstChild.innerHTML }); - $('#resume-'+hash).show(); - $('#play-'+hash).hide(); - $('#trash-'+hash).addClass('disabled'); - setTimeout(() => { - this.updateView($('.tab-torrent.active'), true); - $('.seedbox .item-play').addClass('disabled').prop('disabled', true); - }, 100); - App.vent.trigger('stream:start', torrentStart); + if (thisTorrent.paused) { + this.onResumeTorrentClicked($('.tab-torrent.active'), hash); + $('#resume-'+hash).show(); + $('#play-'+hash).hide(); + } + setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); + App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); + }, + + cancelItem: function (e) { + e.stopPropagation(); + const hash = $('.tab-torrent.active')[0].getAttribute('id'); + const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); + const filename = e.target.parentNode.firstChild.innerHTML; + const fileIndex = thisTorrent.files.filter(obj => { return obj.name === filename; })[0].index; + if (!thisTorrent.files[fileIndex]._fileStreams.size) { + thisTorrent.files[fileIndex].deselect(0); + setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); + } }, openMagnet: function (e) { @@ -412,7 +433,7 @@ title="${Common.fileSize(file.length)}" data-placement="left">${file.name} - + `); } if (active) { @@ -426,7 +447,7 @@ 'hide': 100 } }); - $('.item-download, .item-play, .item-open').hover(function(){ + $('.item-play, .item-download, .item-cancel').hover(function(){ $('.file-item').tooltip('hide'); }); } From ea513c72508dedb7ce9fdc203abcea32109d8400 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 13:43:15 +0300 Subject: [PATCH 033/203] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index fc478caf82..4c8c7e7c6f 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -273,24 +273,25 @@ filter brightness(110%) backdrop-filter brightness(110%) + & > .item-cancel + display inline-block + &.unselected opacity 0.3 &:hover opacity 0.5 - & > .item-download, - & > .item-open + & > .item-download display inline-block - .item-download, - .item-open + .item-download display none a color $FileSelectorText text-decoration blink - width calc(100% - 25px) + width calc(100% - 20px) display block transition all 0.3s overflow hidden @@ -299,7 +300,7 @@ margin-left 25px .item-download, - .item-open, + .item-cancel, .item-play position relative color: $TextError @@ -318,6 +319,9 @@ cursor not-allowed opacity 0.3 + .item-cancel + display none + .item-icon position relative font-family "Font Awesome 5 Free" From c9ad054f925acf13ac005894bfd9a1a2739919c5 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 14:08:42 +0300 Subject: [PATCH 034/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 5373b764b8..47a5ee50ce 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -351,9 +351,9 @@ const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); const filename = e.target.parentNode.firstChild.innerHTML; - const fileIndex = thisTorrent.files.filter(obj => { return obj.name === filename; })[0].index; - if (!thisTorrent.files[fileIndex]._fileStreams.size) { - thisTorrent.files[fileIndex].deselect(0); + const file = thisTorrent.files.filter(obj => { return obj.name === filename; })[0]; + if (!file._fileStreams.size) { + file.deselect(0); setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); } }, From 7c9e64827051a63a288b803b72390e9874cbffe6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 16:27:18 +0300 Subject: [PATCH 035/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 43 ++++++++++----------------------- src/app/styl/views/seedbox.styl | 6 ++--- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 47a5ee50ce..1ca6f7ec33 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -34,9 +34,9 @@ 'mousedown .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', 'click .file-item': 'openItem', - 'click .item-play': 'playItem', - 'click .item-download': 'downloadItem', - 'click .item-cancel': 'cancelItem' + 'click .item-play': 'addItem', + 'click .item-download': 'addItem', + 'click .item-remove': 'removeItem' }, initialize: function () { @@ -302,8 +302,9 @@ App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, - playItem: function (e) { + addItem: function (e) { e.stopPropagation(); + const target = $(e.target); const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); var torrentStart = new Backbone.Model({ @@ -317,36 +318,18 @@ this.onResumeTorrentClicked($('.tab-torrent.active'), hash); $('#resume-'+hash).show(); $('#play-'+hash).hide(); - $('#trash-'+hash).addClass('disabled'); } setTimeout(() => { this.updateView($('.tab-torrent.active'), true); - $('.seedbox .item-play').addClass('disabled').prop('disabled', true); + if (target.hasClass('item-play')) { + $('#trash-'+hash).addClass('disabled'); + $('.seedbox .item-play').addClass('disabled').prop('disabled', true); + } }, 100); - App.vent.trigger('stream:start', torrentStart); - }, - - downloadItem: function (e) { - e.stopPropagation(); - const hash = $('.tab-torrent.active')[0].getAttribute('id'); - const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); - var torrentStart = new Backbone.Model({ - torrent: thisTorrent.magnetURI, - title: thisTorrent.name, - defaultSubtitle: Settings.subtitle_language, - device: App.Device.Collection.selected, - file_name: e.target.parentNode.firstChild.innerHTML - }); - if (thisTorrent.paused) { - this.onResumeTorrentClicked($('.tab-torrent.active'), hash); - $('#resume-'+hash).show(); - $('#play-'+hash).hide(); - } - setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); - App.vent.trigger('stream:start', torrentStart, 'downloadOnly'); + App.vent.trigger('stream:start', torrentStart, target.hasClass('item-play') ? '' : 'downloadOnly' ); }, - cancelItem: function (e) { + removeItem: function (e) { e.stopPropagation(); const hash = $('.tab-torrent.active')[0].getAttribute('id'); const thisTorrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); @@ -433,7 +416,7 @@ title="${Common.fileSize(file.length)}" data-placement="left">${file.name} - + `); } if (active) { @@ -447,7 +430,7 @@ 'hide': 100 } }); - $('.item-play, .item-download, .item-cancel').hover(function(){ + $('.item-play, .item-download, .item-remove').hover(function(){ $('.file-item').tooltip('hide'); }); } diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 4c8c7e7c6f..f9b279f552 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -273,7 +273,7 @@ filter brightness(110%) backdrop-filter brightness(110%) - & > .item-cancel + & > .item-remove display inline-block &.unselected @@ -300,7 +300,7 @@ margin-left 25px .item-download, - .item-cancel, + .item-remove, .item-play position relative color: $TextError @@ -319,7 +319,7 @@ cursor not-allowed opacity 0.3 - .item-cancel + .item-remove display none .item-icon From 123828f3e8c6bcd7f33dec355d9dba202954950b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 30 Oct 2021 22:31:38 +0300 Subject: [PATCH 036/203] Update notification.styl --- src/app/styl/views/notification.styl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/styl/views/notification.styl b/src/app/styl/views/notification.styl index 1d4479b71a..fe7e744cc7 100644 --- a/src/app/styl/views/notification.styl +++ b/src/app/styl/views/notification.styl @@ -71,6 +71,9 @@ background $NotificationBtn opacity .7 + label + cursor pointer + .btn.chnglog margin-right 5px From bbecf58fdcb91315f13e36d75ca3d403c7f71aa1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 31 Oct 2021 01:13:24 +0300 Subject: [PATCH 037/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 1ca6f7ec33..45c429a819 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -294,11 +294,12 @@ this.updateView($(e.currentTarget), true /*wasJustSelected*/); }, - openItem: function () { + openItem: function (e) { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); - const location = App.settings.separateDownloadsDir && !torrent._servers[0] - ? Settings.downloadsLocation : Settings.tmpLocation; + const filename = e.target.innerHTML; + const filepath = torrent.files.filter(obj => { return obj.name === filename; })[0].path.replace(/[^\\/]*$/, ''); + const location = App.settings.separateDownloadsDir && !torrent._servers[0] ? path.join(Settings.downloadsLocation, filepath) : path.join(Settings.tmpLocation, filepath); App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, From b6a1289f48b10c6ca3621934d296d93c6a826483 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 31 Oct 2021 02:03:16 +0300 Subject: [PATCH 038/203] Update loading.js --- src/app/lib/views/player/loading.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/player/loading.js b/src/app/lib/views/player/loading.js index c3e40486dd..4453b2f7db 100644 --- a/src/app/lib/views/player/loading.js +++ b/src/app/lib/views/player/loading.js @@ -44,7 +44,7 @@ 'click #cancel-button': 'cancelStreaming', 'click #cancel-button-regular': 'cancelStreaming', 'click #cancel-button-vpn': 'cancelStreamingVPN', - 'click .open-button': 'tempf', + 'click .open-button': 'openItem', 'click .pause': 'pauseStreaming', 'click .stop': 'stopStreaming', 'click .play': 'resumeStreaming', @@ -340,8 +340,9 @@ } }, - tempf: function (e) { - App.settings.os === 'windows' ? nw.Shell.openExternal(Settings.tmpLocation) : nw.Shell.openItem(Settings.tmpLocation); + openItem: function (e) { + const location = this.model.get('streamInfo').attributes.videoFile.replace(/[^\\/]*$/, ''); + App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, openMagnet: function (e) { From 8db1c2503239a8a69f00a6926285dbf38eb02aa8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 31 Oct 2021 17:22:22 +0200 Subject: [PATCH 039/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 45c429a819..6e6e6b9cd9 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -33,7 +33,7 @@ 'mousedown .resume-torrent': 'onResumeTorrentClicked', 'mousedown .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', - 'click .file-item': 'openItem', + 'dblclick .file-item': 'openItem', 'click .item-play': 'addItem', 'click .item-download': 'addItem', 'click .item-remove': 'removeItem' @@ -297,7 +297,7 @@ openItem: function (e) { const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); - const filename = e.target.innerHTML; + const filename = e.target.firstChild.innerHTML || e.target.innerHTML; const filepath = torrent.files.filter(obj => { return obj.name === filename; })[0].path.replace(/[^\\/]*$/, ''); const location = App.settings.separateDownloadsDir && !torrent._servers[0] ? path.join(Settings.downloadsLocation, filepath) : path.join(Settings.tmpLocation, filepath); App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); From ddc49a1e57418b7e9ddd1f6a6681e4d7c547c5c0 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 2 Nov 2021 14:28:21 +0200 Subject: [PATCH 040/203] Update SHA256 for brew install *fixes https://github.com/popcorn-official/popcorn-desktop/issues/2329 --- casks/popcorn-time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index 5dea12a31f..6c9f5cd75b 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -1,6 +1,6 @@ cask "popcorn-time" do version "0.4.6" - sha256 "cacf8ed13b427bceb481ba88ff97ff297f7e9e0487f1411f8d20ff87dd674ddb" + sha256 "cddc2f156dd3cd4fbc7ccd3b3a02c00d3546886dcad183cd1f5dcd984b609c2c" server = "popcorn-ru.tk" homepage = "http://#{server}" From 5c8a7e98b9097f8c1872fdc86a98f342c2f461ad Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:09:57 +0200 Subject: [PATCH 041/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 6e6e6b9cd9..bef8c6cad7 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -5,6 +5,7 @@ torrentsDir2 = path.join(App.settings.downloadsLocation + '/TorrentCache/'), toDel = [], totalSize, + totalDownloaded, totalPer, updateInterval; @@ -388,9 +389,6 @@ const torrent = App.WebTorrent.get(infoHash); if (wasJustSelected) { - if (!totalPer || totalPer < 1) { - totalSize = 0; - } this.updateHealth(torrent); const $fileList = $('.torrents-info > ul.file-list'); $fileList.empty(); @@ -408,9 +406,8 @@ continue; } let selected = false; - if (torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; })) { + if (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; })) { selected = true; - totalSize = totalSize + file.length; } $fileList.append(`
  • = 1) { From 8a228cb538901c50b591b397c54a02f1904d5a4e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 3 Nov 2021 00:55:31 +0200 Subject: [PATCH 042/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 1 + src/app/styl/views/seedbox.styl | 3 +++ src/app/templates/seedbox.tpl | 1 + 3 files changed, 5 insertions(+) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index bef8c6cad7..39e20e3b32 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -452,6 +452,7 @@ } torrent.name ? $('.seedbox-infos-title').text(torrent.name) : $('.seedbox-infos-title').text(i18n.__('connecting')); + $('.seedbox-totalsize').text(' ' + formatBytes(totalSize)); $('.seedbox-downloaded').text(' ' + formatBytes(totalDownloaded)); $('.seedbox-uploaded').text(' ' + formatBytes(torrent.uploaded)); try { $('.seedbox-infos-date').text(i18n.__('added') + ' ' + dayjs(stats.ctime).fromNow()); } catch(err) {} diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index f9b279f552..dc5f598a74 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -246,6 +246,9 @@ white-space: nowrap text-overflow: ellipsis + i + margin-right: 5px + .seedbox-infos-synopsis color: $ShowText1 font-size: 13px diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 4db52c060e..8202ff29a8 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -20,6 +20,7 @@
    + From 20ea3eaf05313b118842b9df16db57a60f6fadd5 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 3 Nov 2021 02:39:33 +0200 Subject: [PATCH 043/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 19 +++++++++++++++++++ src/app/templates/seedbox.tpl | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 39e20e3b32..a2cd9b890c 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -365,6 +365,22 @@ healthButton.render(); }, + remainingTime: function (downloadSpeed) { + var timeRemaining = Math.round((totalSize - totalDownloaded) / downloadSpeed); + if (isNaN(timeRemaining) || timeRemaining < 0) { + timeRemaining = 0; + } + if (timeRemaining === undefined || !isFinite(timeRemaining) || totalSize === 0) { + return i18n.__('Unknown time remaining'); + } else if (timeRemaining > 3600) { + return i18n.__('%s hour(s) remaining', Math.round(timeRemaining / 3600)); + } else if (timeRemaining > 60) { + return i18n.__('%s minute(s) remaining', Math.round(timeRemaining / 60)); + } else if (timeRemaining <= 60) { + return i18n.__('%s second(s) remaining', timeRemaining); + } + }, + updateView: function ($elem, wasJustSelected = false) { if (!wasJustSelected) { App.WebTorrent.torrents.forEach(function(torrent) { @@ -460,9 +476,12 @@ if (!$('.progress-bar').hasClass('done')) { $('.progress-bar').addClass('done'); } + $('.progress-label span').text(i18n.__('Downloaded')); totalPer = 1; } else if ($('.progress-bar').hasClass('done')) { $('.progress-bar').removeClass('done'); + } else { + $('.progress-label span').text(this.remainingTime(torrent.downloadSpeed)); } $('.progress-bar').css('width', ((totalPer || 0) * 100).toFixed(2) + '%'); $('.progress-percentage>span').text(((totalPer || 0) * 100).toFixed(2) + '%'); diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 8202ff29a8..17d920256f 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -33,7 +33,7 @@
    - Download progress + <%= i18n.__('Unknown time remaining') %>
    0% From 2fe168506ee6805cf6d338f84f30cb8aaa8b3b3b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 3 Nov 2021 19:36:02 +0200 Subject: [PATCH 044/203] Increase bookmarks page size *bigger batches to help with correcting sorting --- src/app/database.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/database.js b/src/app/database.js index e25f9f3554..6e2f06a491 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -107,7 +107,7 @@ var Database = { // format: {page: page, keywords: title} getBookmarks: function (data) { var page = data.page - 1; - var byPage = 50; + var byPage = 500; var offset = page * byPage; var query = {}; From 6353d7fb8b5474cbcadccfe16d5e09455f5e489a Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 3 Nov 2021 23:38:52 +0300 Subject: [PATCH 045/203] gulp dev version names --- gulpfile.js | 168 ++++++++++++++++++++++------------------------------ 1 file changed, 70 insertions(+), 98 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 352a0f6820..a657bd004b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -104,27 +104,40 @@ const curVersion = () => { } }; +const waitProcess = function(process) { + return new Promise((resolve, reject) => { + // display log only on failed build + const logs = []; + process.stdout.on('data', (buf) => { + logs.push(buf.toString()); + }); + process.stderr.on('data', (buf) => { + logs.push(buf.toString()); + }); + + process.on('close', (exitCode) => { + if (!exitCode) { + resolve(); + } else { + if (logs.length) { + console.log(logs.join('\n')); + } + reject(); + } + }); + + process.on('error', (error) => { + console.log(error); + reject(); + }); + }); +}; + // console.log for thenable promises const log = () => { console.log.apply(console, arguments); }; -// handle callbacks -function promiseCallback(fn) { - // use ES6 rest params for much cleaner code - let args = Array.prototype.slice.call(arguments, 1); - return new Promise((resolve, reject) => { - fn.apply( - this, - args.concat([ - (res) => { - return res ? resolve(res) : reject(res); - } - ]) - ); - }); -} - // del wrapper for `clean` tasks const deleteAndLog = (path, what) => () => del(path).then((paths) => { @@ -133,6 +146,16 @@ const deleteAndLog = (path, what) => () => : console.log('Nothing to delete'); }); +const renameFile = (dir, src, dest) => { + return new Promise((resolve, reject) => { + return gulp + .src(path.join(dir, src)) + .pipe(gulpRename(dest)) + .pipe(gulp.dest(dir)) + .on('end', () => resolve()); + }).then(() => del(path.join(dir, src))); +}; + // clean for dist gulp.task('cleanForDist', (done) => { del([path.join(releasesDir, pkJson.name)]).then((paths) => { @@ -380,35 +403,20 @@ gulp.task('mac-pkg', () => { const child = spawn('bash', ['dist/mac/pkg-maker.sh']); - // display log only on failed build - const debLogs = []; - child.stdout.on('data', (buf) => { - debLogs.push(buf.toString()); - }); - child.stderr.on('data', (buf) => { - debLogs.push(buf.toString()); - }); - - child.on('close', (exitCode) => { - if (!exitCode) { - console.log( - '%s pkg packaged in', - platform, - path.join(process.cwd(), releasesDir) - ); - } else { - if (debLogs.length) { - console.log(debLogs.join('\n')); + waitProcess(child).then(() => { + console.log('%s pkg packaged in', platform, path.join(process.cwd(), releasesDir)); + if (pkJson.version === curVersion()) { + resolve(); + return; } - console.log('%s failed to package deb', platform); - } - resolve(); - }); - - child.on('error', (error) => { - console.log(error); - console.log('%s failed to package pkg', platform); - resolve(); + return renameFile( + path.join(process.cwd(), releasesDir), + pkJson.name + '-' + pkJson.version + '.pkg', + pkJson.name + '-' + curVersion() + '.pkg' + ).then(() => resolve()); + }).catch(() => { + console.log('%s failed to package pkg', platform); + reject(); }); }); }) @@ -525,33 +533,20 @@ gulp.task('nsis', () => { '-DOUTDIR=' + path.join(process.cwd(), releasesDir) ]); - // display log only on failed build - const nsisLogs = []; - child.stdout.on('data', (buf) => { - nsisLogs.push(buf.toString()); - }); - - child.on('close', (exitCode) => { - if (!exitCode) { - console.log( - '%s nsis packaged in', - platform, - path.join(process.cwd(), releasesDir) - ); - } else { - if (nsisLogs.length) { - console.log(nsisLogs.join('\n')); + waitProcess(child).then(() => { + console.log('%s nsis packaged in', platform, path.join(process.cwd(), releasesDir)); + if (pkJson.version === curVersion()) { + resolve(); + return; } - console.log(nsisLogs); + return renameFile( + path.join(process.cwd(), releasesDir), + pkJson.name + '-' + pkJson.version + '-' + platform + '-Setup.exe', + pkJson.name + '-' + curVersion() + '-' + platform + '-Setup.exe' + ).then(() => resolve()); + }).catch(() => { console.log('%s failed to package nsis', platform); - } - resolve(); - }); - - child.on('error', (error) => { - console.log(error); - console.log(platform + ' failed to package nsis'); - resolve(); + reject(); }); }); }) @@ -585,35 +580,12 @@ gulp.task('deb', () => { releasesDir ]); - // display log only on failed build - const debLogs = []; - child.stdout.on('data', (buf) => { - debLogs.push(buf.toString()); - }); - child.stderr.on('data', (buf) => { - debLogs.push(buf.toString()); - }); - - child.on('close', (exitCode) => { - if (!exitCode) { - console.log( - '%s deb packaged in', - platform, - path.join(process.cwd(), releasesDir) - ); - } else { - if (debLogs.length) { - console.log(debLogs.join('\n')); - } + waitProcess(child).then(() => { + console.log('%s deb packaged in', platform, path.join(process.cwd(), releasesDir)); + resolve(); + }).catch(() => { console.log('%s failed to package deb', platform); - } - resolve(); - }); - - child.on('error', (error) => { - console.log(error); - console.log('%s failed to package deb', platform); - resolve(); + reject(); }); }); }) @@ -690,7 +662,7 @@ 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')) From f1b3b5e07e262ab52af4ab22678f5a19b5ec2213 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 4 Nov 2021 19:53:59 +0300 Subject: [PATCH 046/203] fix rebuild bookmarks --- src/app/lib/views/settings_container.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index e381c61105..2bf576b70c 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -724,12 +724,14 @@ this.alertMessageWait(i18n.__('We are rebuilding your database')); Database.getAllBookmarks() - .then(function (data) { + .then(async function (data) { let movieProvider = App.Config.getProviderForType('movie')[0]; let showProvider = App.Config.getProviderForType('tvshow')[0]; - for (let item of data) { + for (let n in data) { + let item = data[n]; + console.log(item); if (item.type === 'movie') { - movieProvider.fetch({keywords: item.imdb_id}).then(function (movies) { + await movieProvider.fetch({keywords: item.imdb_id, page:1}).then(function (movies) { if (movies.results.length !== 1) { return; } @@ -740,7 +742,7 @@ }); } if (item.type === 'show') { - showProvider.detail(item.imdb_id, { + await showProvider.detail(item.imdb_id, { contextLocale: App.settings.contextLanguage || App.settings.language }).then(function (show) { Database.deleteTVShow(item.imdb_id); @@ -748,6 +750,9 @@ Database.addTVShow(show); }); } + that.alertMessageWait(i18n.__('Rebuilding bookmarks (%s)', n+'/'+data.length)); + // api has nginx limit rps + await new Promise(resolve => setTimeout(resolve, 700)); } that.alertMessageSuccess(true); }); From 9da19bf0ef6be54923378199a9e358c24dfffd0d Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 4 Nov 2021 23:12:48 +0300 Subject: [PATCH 047/203] remove replase for server --- src/app/butter-provider/anime.js | 2 +- src/app/butter-provider/movie.js | 2 +- src/app/butter-provider/tv.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/butter-provider/anime.js b/src/app/butter-provider/anime.js index bb8fea7453..d986a98b23 100644 --- a/src/app/butter-provider/anime.js +++ b/src/app/butter-provider/anime.js @@ -22,7 +22,7 @@ class AnimeApi extends Generic { }; if (filters.keywords) { - params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); + params.keywords = filters.keywords.trim(); } if (filters.genre) { params.genre = filters.genre; diff --git a/src/app/butter-provider/movie.js b/src/app/butter-provider/movie.js index 142e565423..9fe7b89bdb 100644 --- a/src/app/butter-provider/movie.js +++ b/src/app/butter-provider/movie.js @@ -66,7 +66,7 @@ class MovieApi extends Generic { } if (filters.keywords) { - params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); + params.keywords = filters.keywords.trim(); } if (filters.genre) { params.genre = filters.genre; diff --git a/src/app/butter-provider/tv.js b/src/app/butter-provider/tv.js index c4ced21428..297b008eb6 100644 --- a/src/app/butter-provider/tv.js +++ b/src/app/butter-provider/tv.js @@ -30,7 +30,7 @@ class TVApi extends Generic { } if (filters.keywords) { - params.keywords = this.apiURL[0].includes('popcorn-ru') ? filters.keywords.trim() : filters.keywords.trim().replace(/[^a-zA-Z0-9]|\s/g, '% '); + params.keywords = filters.keywords.trim(); } if (filters.genre) { params.genre = filters.genre; From 104be4bcdf335312ed7a06c6cc4bb5d1a87284b6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 6 Nov 2021 16:37:02 +0200 Subject: [PATCH 048/203] Fix the rebuild bookmarks function --- src/app/lib/views/settings_container.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 2bf576b70c..dea8348bf4 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -737,7 +737,8 @@ } let movie = movies.results[0]; Database.deleteMovie(item.imdb_id); - movie.providers = [movieProvider.name]; + movie.providers = {}; + movie.providers.torrent = [movieProvider.name]; Database.addMovie(movie); }); } @@ -746,7 +747,8 @@ contextLocale: App.settings.contextLanguage || App.settings.language }).then(function (show) { Database.deleteTVShow(item.imdb_id); - show.providers = [showProvider.name]; + show.providers = {}; + show.providers.torrent = [showProvider.name]; Database.addTVShow(show); }); } From 600aabf0003e1c823ad6161070cd7c7ed16ebd4d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 6 Nov 2021 17:44:33 +0200 Subject: [PATCH 049/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index dea8348bf4..6272c9b077 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -738,7 +738,7 @@ let movie = movies.results[0]; Database.deleteMovie(item.imdb_id); movie.providers = {}; - movie.providers.torrent = [movieProvider.name]; + movie.providers.torrent = movieProvider; Database.addMovie(movie); }); } @@ -748,7 +748,7 @@ }).then(function (show) { Database.deleteTVShow(item.imdb_id); show.providers = {}; - show.providers.torrent = [showProvider.name]; + show.providers.torrent = showProvider; Database.addTVShow(show); }); } From 765a2e06aef4acd68080bd7dc873189a41ae0457 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 6 Nov 2021 19:48:15 +0300 Subject: [PATCH 050/203] fix lang switch for fav --- src/app/lib/views/settings_container.js | 1 - src/app/lib/views/show_detail.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 6272c9b077..3c16d819f1 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -729,7 +729,6 @@ let showProvider = App.Config.getProviderForType('tvshow')[0]; for (let n in data) { let item = data[n]; - console.log(item); if (item.type === 'movie') { await movieProvider.fetch({keywords: item.imdb_id, page:1}).then(function (movies) { if (movies.results.length !== 1) { diff --git a/src/app/lib/views/show_detail.js b/src/app/lib/views/show_detail.js index 6a3d8f8ee6..133b1f859a 100644 --- a/src/app/lib/views/show_detail.js +++ b/src/app/lib/views/show_detail.js @@ -416,8 +416,8 @@ return; } $('.spinner').show(); - const provider = this.model.get('providers').torrent; - const data = await provider.contentOnLang(this.model.get('imdb_id'), lang); + const showProvider = App.Config.getProviderForType('tvshow')[0]; + const data = await showProvider.contentOnLang(this.model.get('imdb_id'), lang); this.model.set('contextLocale', data.contextLocale); this.model.set('episodes', data.episodes); this.initTorrents(data.episodes); From 1b4002b8085e5926639cf1e715a64c0091069edf Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 7 Nov 2021 21:18:11 +0200 Subject: [PATCH 051/203] Update seedbox.js --- src/app/lib/streamer.js | 1 + src/app/lib/views/seedbox.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index acc0e7a4cd..b85255f620 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -463,6 +463,7 @@ fileSize = file.length; fileName = file.path; file.select(); + file.hidden = false; } else { // file.deselect(); } diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index a2cd9b890c..54a196ee4b 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -339,6 +339,7 @@ const file = thisTorrent.files.filter(obj => { return obj.name === filename; })[0]; if (!file._fileStreams.size) { file.deselect(0); + file.hidden = true; setTimeout(() => this.updateView($('.tab-torrent.active'), true), 100); } }, @@ -422,7 +423,7 @@ continue; } let selected = false; - if (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; })) { + if (!file.hidden && (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; }))) { selected = true; } @@ -457,7 +458,7 @@ if (supported.indexOf(path.extname(file.name).toLowerCase()) === -1) { continue; } - if (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; })) { + if (!file.hidden && (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; }))) { totalSize = totalSize + file.length; totalDownloaded = totalDownloaded + file.downloaded; } From 494c19156eb561a536c2951dedfa4f09e930447e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 20 Nov 2021 23:58:18 +0200 Subject: [PATCH 052/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 54a196ee4b..69685df97a 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -461,6 +461,8 @@ if (!file.hidden && (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; }))) { totalSize = totalSize + file.length; totalDownloaded = totalDownloaded + file.downloaded; + let thisElement = document.evaluate("//a[text()='" + file.name + "']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentNode; + $(thisElement).attr('title', Common.fileSize(file.downloaded) + ' / ' + Common.fileSize(file.length)).tooltip('fixTitle'); } } From 1e723e570320865b81f8b38016d6c7c812cfb281 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 1 Dec 2021 20:39:25 +0200 Subject: [PATCH 053/203] Remove a dead torrent tracker --- src/app/settings.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/settings.js b/src/app/settings.js index 857a4fa1a8..10436ddfc9 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -87,7 +87,6 @@ Settings.trackers = { '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' ] From e5452f8125849514aae0f9e38d8d613747dbeb8f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 1 Dec 2021 20:43:28 +0200 Subject: [PATCH 054/203] Add a torrent tracker --- src/app/settings.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/settings.js b/src/app/settings.js index 10436ddfc9..63bfa7691c 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -87,6 +87,7 @@ Settings.trackers = { 'udp://opentor.org:2710', 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', + 'udp://explodie.org:6969/announce', 'udp://retracker.lanta-net.ru:2710', 'wss://tracker.openwebtorrent.com' ] From f74b678d2a5852b86f1a69a3b27f57cd7d106471 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 1 Dec 2021 22:19:05 +0200 Subject: [PATCH 055/203] 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 63bfa7691c..adea27daf5 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -87,7 +87,7 @@ Settings.trackers = { 'udp://opentor.org:2710', 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', - 'udp://explodie.org:6969/announce', + 'udp://explodie.org:6969', 'udp://retracker.lanta-net.ru:2710', 'wss://tracker.openwebtorrent.com' ] From 1dcce7099defd3cfea4548160f9d946d73f8eacd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 4 Dec 2021 15:27:05 +0200 Subject: [PATCH 056/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 69685df97a..057b62f294 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -30,9 +30,9 @@ events: { 'mousedown .magnet-icon': 'openMagnet', 'mousedown .health-icon': 'healthClicked', - 'mousedown .pause-torrent': 'onPauseTorrentClicked', - 'mousedown .resume-torrent': 'onResumeTorrentClicked', - 'mousedown .trash-torrent': 'onRemoveTorrentClicked', + 'click .pause-torrent': 'onPauseTorrentClicked', + 'click .resume-torrent': 'onResumeTorrentClicked', + 'click .trash-torrent': 'onRemoveTorrentClicked', 'click .tab-torrent': 'clickTorrent', 'dblclick .file-item': 'openItem', 'click .item-play': 'addItem', @@ -62,7 +62,7 @@ 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; + currentHash && $('#trash-'+currentHash)[0] ? $('#trash-'+currentHash).addClass('disabled').prop('disabled', true) : null; } }, @@ -197,6 +197,7 @@ }, onPauseTorrentClicked(e, id) { + e.stopPropagation(); const torrent = this.getTorrentFromEvent(e, id); if (torrent) { this.pauseTorrent(torrent); @@ -204,6 +205,7 @@ }, onResumeTorrentClicked(e, id) { + e.stopPropagation(); const torrent = this.getTorrentFromEvent(e, id); if (torrent) { torrent.resume(); @@ -220,6 +222,7 @@ }, onRemoveTorrentClicked(e) { + e.stopPropagation(); const torrent = this.getTorrentFromEvent(e); if (torrent) { if (App.settings.delSeedboxCache === 'always') { @@ -324,7 +327,7 @@ setTimeout(() => { this.updateView($('.tab-torrent.active'), true); if (target.hasClass('item-play')) { - $('#trash-'+hash).addClass('disabled'); + $('#trash-'+hash).addClass('disabled').prop('disabled', true); $('.seedbox .item-play').addClass('disabled').prop('disabled', true); } }, 100); @@ -461,8 +464,10 @@ if (!file.hidden && (file.done || torrent._selections.some(function (el) { return el.from === file._startPiece || el.to === file._endPiece; }))) { totalSize = totalSize + file.length; totalDownloaded = totalDownloaded + file.downloaded; - let thisElement = document.evaluate("//a[text()='" + file.name + "']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentNode; - $(thisElement).attr('title', Common.fileSize(file.downloaded) + ' / ' + Common.fileSize(file.length)).tooltip('fixTitle'); + try { + let thisElement = document.evaluate("//a[text()='" + file.name + "']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentNode; + $(thisElement).attr('title', Common.fileSize(file.downloaded) + ' / ' + Common.fileSize(file.length)).tooltip('fixTitle'); + } catch(err) {} } } From 371f4a79e0af744cc9c3a4691476c1a415d5f465 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 4 Dec 2021 15:28:49 +0200 Subject: [PATCH 057/203] 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 dc5f598a74..59d9870323 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -50,7 +50,7 @@ color: $ShowWatchedIcon_true &.disabled - pointer-events: none + cursor: not-allowed opacity: 0.2 li:nth-child(odd) From 880d71ff81de04ca6203b491b22468f361c0e6d7 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 4 Dec 2021 18:00:52 +0300 Subject: [PATCH 058/203] update webtorrent --- package.json | 2 +- yarn.lock | 49 ++++++++++++++++++++++++------------------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 59e2c1f090..1bc4b81431 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.5", + "webtorrent": "^1.5.8", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index f7cda5503d..698820631f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -825,16 +825,16 @@ bittorrent-tracker@^9.1.0: 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== +bittorrent-tracker@^9.18.3: + version "9.18.3" + resolved "https://registry.yarnpkg.com/bittorrent-tracker/-/bittorrent-tracker-9.18.3.tgz#0b2d8a20c8974d118c010b2fc99ff4d914e6cb92" + integrity sha512-IhLKp8wUgA7WXTfJggw/HB8qxhwlLNDWRraUFxXRHTgOQXcMiKITGcErzvC7B7mMOcUnk0wiUsZdaaQ8lzz3LQ== dependencies: bencode "^2.0.1" bittorrent-peerid "^1.3.3" bn.js "^5.2.0" chrome-dgram "^3.0.6" - clone "^1.0.2" + clone "^2.0.0" compact2string "^1.4.1" debug "^4.1.1" ip "^1.1.5" @@ -1409,7 +1409,7 @@ clone@^1.0.0, clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.1: +clone@^2.0.0, clone@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= @@ -2577,10 +2577,10 @@ 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.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== +fs-chunk-store@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/fs-chunk-store/-/fs-chunk-store-2.0.4.tgz#ca797b7032a3752d1e7553cb9cec8970395cc34a" + integrity sha512-JfeKRPPWkLaUoNKZdi+eLPKzZkZK1pdj2Y5lidEw9fUCkglvK/muLe6ONjdvn8yAGrDsk4tkjNp52GS658yy0g== dependencies: queue-microtask "^1.2.2" random-access-file "^2.0.1" @@ -3293,9 +3293,9 @@ http-headers@^3.0.1: dependencies: next-line "^1.1.0" -"http-node@github:feross/http-node#webtorrent": +"http-node@github:webtorrent/http-node#webtorrent": version "1.2.0" - resolved "https://codeload.github.com/feross/http-node/tar.gz/342ef8624495343ffd050bd0808b3750cf0e3974" + resolved "https://codeload.github.com/webtorrent/http-node/tar.gz/342ef8624495343ffd050bd0808b3750cf0e3974" dependencies: chrome-net "^3.3.3" freelist "^1.0.3" @@ -7120,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.5: - version "9.4.6" - resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.6.tgz#b7e1262a77d14242aaf52eec382f6a142f49e2ae" - integrity sha512-11FlrGmDvgD3RJhZLrC749yyqS7tKx3gXWbYN7xayVYsAcc6f8lQRQQIOF7TBgJE4f0e+ZS8dsct++aOlxFjRw== +torrent-discovery@^9.4.6: + version "9.4.7" + resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.7.tgz#d45ee78cb6a7004a8f3cd203ee7df915088bea70" + integrity sha512-7Zw474LJE5r3Momi4ykBYkjgcFhENbUxcAFs5cBllUkv9ErJPzPEGmpEuqX7V8TkLS+Clmt/l5CjV5IFHg/A/A== dependencies: bittorrent-dht "^10.0.2" bittorrent-lsd "^1.1.1" - bittorrent-tracker "^9.18.2" + bittorrent-tracker "^9.18.3" debug "^4.3.2" run-parallel "^1.2.0" @@ -7704,10 +7704,10 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -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== +webtorrent@^1.5.8: + version "1.5.8" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.8.tgz#1dcb26347a8c0ea15a20b77f1c85dea9ce4f170b" + integrity sha512-ltYdloqDamay36XN8FZ+O2fqRQNDt+JGhRbOt1gCBeC+fFhke3WxEVs3/A2UtKjhwN8OEp3Go7tWU9R0S+29Lw== dependencies: addr-to-ip-port "^1.5.4" bitfield "^4.0.0" @@ -7721,8 +7721,8 @@ webtorrent@^1.5.5: debug "^4.3.2" end-of-stream "^1.4.4" escape-html "^1.0.3" - fs-chunk-store "^2.0.3" - http-node "github:feross/http-node#webtorrent" + fs-chunk-store "^2.0.4" + http-node "github:webtorrent/http-node#webtorrent" immediate-chunk-store "^2.2.0" load-ip-set "^2.2.1" lt_donthave "^1.0.1" @@ -7736,7 +7736,6 @@ webtorrent@^1.5.5: random-iterate "^1.0.1" randombytes "^2.1.0" range-parser "^1.2.1" - readable-stream "^3.6.0" render-media "^4.1.0" run-parallel "^1.2.0" run-parallel-limit "^1.1.0" @@ -7749,7 +7748,7 @@ webtorrent@^1.5.5: 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.5" + torrent-discovery "^9.4.6" torrent-piece "^2.0.1" unordered-array-remove "^1.0.2" ut_metadata "^3.5.2" From e8a6e4796353d2be04bb84d339c6e5d78751c163 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 5 Dec 2021 21:33:32 +0300 Subject: [PATCH 059/203] fix file path --- src/app/lib/streamer.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/lib/streamer.js b/src/app/lib/streamer.js index b85255f620..161a4d4ac0 100644 --- a/src/app/lib/streamer.js +++ b/src/app/lib/streamer.js @@ -468,12 +468,15 @@ // file.deselect(); } } + if (!fileName.startsWith(torrent.path)) { + fileName = path.join(torrent.path, fileName); + } return { name: path.basename(fileName), size: fileSize, index: fileIndex, - path: path.join(torrent.path, fileName) + path: fileName }; }, @@ -486,15 +489,13 @@ if (isFormatted) { this.torrentModel.set('video_file', this.selectFile(torrent, fileName)); this.handleSubtitles(); + } else if (isRead) { + this.torrentModel.set('video_file', this.selectFile(torrent, fileName)); + this.lookForMetadata(torrent); } else { - if (isRead) { - this.torrentModel.set('video_file', this.selectFile(torrent, fileName)); - this.lookForMetadata(torrent); - } else { - this.openFileSelector(torrent); - this.stopped = true; - throw 'interrupt'; - } + this.openFileSelector(torrent); + this.stopped = true; + throw 'interrupt'; } return; }, From 8e92fb7a7a3bd925973ed0f105fb7cdf6e8f106d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 5 Dec 2021 21:51:01 +0200 Subject: [PATCH 060/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 057b62f294..163369c022 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -302,8 +302,7 @@ const hash = $('.tab-torrent.active')[0].getAttribute('id'); const torrent = App.WebTorrent.torrents.find(torrent => torrent.infoHash === hash); const filename = e.target.firstChild.innerHTML || e.target.innerHTML; - const filepath = torrent.files.filter(obj => { return obj.name === filename; })[0].path.replace(/[^\\/]*$/, ''); - const location = App.settings.separateDownloadsDir && !torrent._servers[0] ? path.join(Settings.downloadsLocation, filepath) : path.join(Settings.tmpLocation, filepath); + const location = torrent.files.filter(obj => { return obj.name === filename; })[0].path.replace(/[^\\/]*$/, ''); App.settings.os === 'windows' ? nw.Shell.openExternal(location) : nw.Shell.openItem(location); }, From a97ff74a8a3dcd2f6a352d8c9704fb4b67cffe9e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 5 Dec 2021 23:08:42 +0200 Subject: [PATCH 061/203] Update seedbox.js --- src/app/lib/views/seedbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 163369c022..8c4da739a3 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -197,7 +197,7 @@ }, onPauseTorrentClicked(e, id) { - e.stopPropagation(); + try { e.stopPropagation(); } catch(err) {} const torrent = this.getTorrentFromEvent(e, id); if (torrent) { this.pauseTorrent(torrent); @@ -205,7 +205,7 @@ }, onResumeTorrentClicked(e, id) { - e.stopPropagation(); + try { e.stopPropagation(); } catch(err) {} const torrent = this.getTorrentFromEvent(e, id); if (torrent) { torrent.resume(); @@ -222,7 +222,7 @@ }, onRemoveTorrentClicked(e) { - e.stopPropagation(); + try { e.stopPropagation(); } catch(err) {} const torrent = this.getTorrentFromEvent(e); if (torrent) { if (App.settings.delSeedboxCache === 'always') { From 1e1c6ef82476a5a41df5d40a75c89d99b70a7c8c Mon Sep 17 00:00:00 2001 From: jwfxpr Date: Mon, 6 Dec 2021 22:16:51 +1100 Subject: [PATCH 062/203] Update package.json with new URL Replaces old popcorntime.sh URL in installers with new popcorntime.app (and moves to https) --- dist/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/package.json b/dist/package.json index b8974bb63c..9d840f6000 100644 --- a/dist/package.json +++ b/dist/package.json @@ -3,7 +3,7 @@ "companyName": "Popcorn Time", "installIcon": "./src/app/images/popcorntime.ico", "unInstallIcon": "./src/app/images/butter_uninstall.ico", - "homepage": "http://popcorntime.sh/", + "homepage": "https://popcorntime.app/", "bugs": "https://github.com/popcorn-official/popcorn-desktop/issues", "repository": { "type": "git", From c57b37056cdb9ccc8c802055deff872a1d21037f Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 8 Dec 2021 15:06:16 +0300 Subject: [PATCH 063/203] remove it nafig --- dist/package.json | 120 ---------------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 dist/package.json diff --git a/dist/package.json b/dist/package.json deleted file mode 100644 index 9d840f6000..0000000000 --- a/dist/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "name": "Popcorn-Time", - "companyName": "Popcorn Time", - "installIcon": "./src/app/images/popcorntime.ico", - "unInstallIcon": "./src/app/images/butter_uninstall.ico", - "homepage": "https://popcorntime.app/", - "bugs": "https://github.com/popcorn-official/popcorn-desktop/issues", - "repository": { - "type": "git", - "url": "https://github.com/popcorn-official/popcorn-desktop.git" - }, - "license": "GPL-3.0", - "main": "src/app/index.html", - "version": "0.3.10", - "releaseName": "Popcorn is Love", - "scripts": { - "gulp": "gulp", - "postinstall": "node -e \"try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'src/app/vendor', 'junction') } catch (e) { }\"", - "postupdate": "node_modules/.bin/bower update --config.interactive=false", - "start": "gulp run", - "build": "gulp build", - "test": "gulp test" - }, - "chromium-args": "--enable-node-worker", - "engines": { - "npm": ">=3.0.0", - "node": ">=4.4.0", - "yarn": ">= 1.0.0" - }, - "window": { - "title": "Popcorn Time", - "icon": "src/app/images/icon.png", - "frame": false, - "min_width": 960, - "min_height": 520, - "resizable": true, - "show": false, - "position": "center" - }, - "dependencies": { - "@bower_components/backbone": "jashkenas/backbone#>=0.9.9 <=1.3.x", - "@bower_components/backbone.babysitter": "marionettejs/backbone.babysitter#^0.1.0", - "@bower_components/backbone.wreqr": "marionettejs/backbone.wreqr#^1.0.0", - "@bower_components/bootstrap": "twbs/bootstrap#~3.3.7", - "@bower_components/font-awesome": "FortAwesome/Font-Awesome#~4.6.3", - "@bower_components/jquery": "jquery/jquery-dist#1.9.1 - 3", - "@bower_components/marionette": "marionettejs/backbone.marionette#~2.x.x", - "@bower_components/mousetrap": "ccampbell/mousetrap#~1.6.0", - "@bower_components/underscore": "jashkenas/underscore#1.4.4 - 1.8.3", - "@bower_components/video.js": "videojs/video.js#4.11.4", - "@bower_components/videojs-youtube": "eXon/videojs-youtube#1.2.10", - "adm-zip": "0.4.7", - "airplayer": "2.0.0", - "async": "2.1.2", - "butter-provider": "0.6.0", - "butter-provider-anime": "1.0.0", - "butter-provider-movies": "1.0.3", - "butter-provider-tvapi": "git+https://github.com/team-pct/butter-provider-tvapi.git", - "butter-provider-vodo": "git+https://github.com/butterproviders/butter-provider-vodo.git", - "butter-settings-popcorntime.io": "git+https://github.com/popcorn-official/butter-settings-popcorn.git", - "chromecasts": "1.9.0", - "defer-request": "0.0.2", - "dlnacasts": "0.1.0", - "gitlab": "1.4.1", - "i18n": "0.x.x", - "iconv-lite": "^0.4.19", - "jschardet": "1.4.1", - "json-rpc2": "1.0.2", - "markdown": "0.5.x", - "memoizee": "^0.4.12", - "mkdirp": "*", - "moment": "^2.21.0", - "mv": "2.x.x", - "nedb": "1.8.0", - "node-captions": "0.4.6", - "node-webkit-fdialogs": "latest", - "opensubtitles-api": "4.0.0", - "os-name": "2.0.1", - "popcorn-txt-api": "git+https://github.com/hackhackhack/popcorn-txt-api.git", - "q": "2.0.3", - "readdirp": "*", - "request": "^2.85.0", - "rimraf": "^2.6.2", - "sanitizer": "0.x.x", - "semver": "^5.5.0", - "send": "0.14.x", - "tar": "2.2.1", - "temp": "0.x.x", - "trakt.tv": "2.x.x", - "trakt.tv-images": "1.x.x", - "trakt.tv-matcher": "1.x.x", - "trakt.tv-ondeck": "0.x.x", - "underscore": "1.x.x", - "urijs": "1.18.3", - "webtorrent": "^0.98.24", - "webtorrent-health": "^1.1.2" - }, - "devDependencies": { - "bower": "^1.8.2", - "del": "^2.2.0", - "git-rev": "^0.2.1", - "gulp": "^3.9.1", - "gulp-filter": "^4.0.0", - "gulp-gzip": "^1.4.2", - "gulp-jsbeautifier": "^2.1.2", - "gulp-jshint": "^2.1.0", - "gulp-load-plugins": "^1.2.0", - "gulp-stylus": "^2.7.0", - "gulp-tar": "^1.8.0", - "gulp-yarn": "^1.0.1", - "guppy-pre-commit": "^0.4.0", - "jshint": "^2.9.1", - "jshint-stylish": "^2.1.0", - "nib": "^1.1.0", - "nw-builder": "^3.5.1", - "run-sequence": "^1.1.5", - "stylus": "^0.54.2", - "yargs": "^6.4.0" - } -} From 2f5b86b2f9df4f166da793535caa5bca330a04cd Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 28 Dec 2021 00:54:39 +0300 Subject: [PATCH 064/203] fix callback --- src/app/lib/subtitle/generic.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/lib/subtitle/generic.js b/src/app/lib/subtitle/generic.js index 3bf73a464f..2d14567d3e 100644 --- a/src/app/lib/subtitle/generic.js +++ b/src/app/lib/subtitle/generic.js @@ -137,11 +137,16 @@ }, convert: function (data, cb) { // Converts .srt's to .vtt's try { - var srtPath = data.path; - var vttPath = srtPath.replace('.srt', '.vtt'); + const srtPath = data.path; + const vttPath = srtPath.replace('.srt', '.vtt'); fs.createReadStream(srtPath) .pipe(srt2vtt()) .pipe(fs.createWriteStream(vttPath)); + cb(null, { + vtt: vttPath, + srt: srtPath, + encoding: 'utf8' + }); } catch (e) { cb(e, null); } From 5447728baddb4a97c56f9943885dd645aba9e542 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 28 Dec 2021 01:33:58 +0300 Subject: [PATCH 065/203] remove unused function --- src/app/lib/subtitle/server.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/lib/subtitle/server.js b/src/app/lib/subtitle/server.js index 445db5dc4b..7032e4cbe0 100644 --- a/src/app/lib/subtitle/server.js +++ b/src/app/lib/subtitle/server.js @@ -52,7 +52,6 @@ var SubtitlesServer = { start: function (data, cb) { - iconv.extendNodeEncodings(); encoding = data.encoding || 'utf8'; win.debug('SubtitleServer: loading', data.srt || data.vtt); From ed6d58a9fa07c727bc1969c47e5b50eb3f03492e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 1 Jan 2022 23:42:49 +0200 Subject: [PATCH 066/203] Update popcorn-time.rb --- casks/popcorn-time.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index 6c9f5cd75b..4e23dcccc7 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -28,17 +28,19 @@ 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}'` + if File.exists?(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 end From cf80e9e377d4c91dc0db833c6f9a5a19df855cbd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 21:15:09 +0200 Subject: [PATCH 067/203] Delete Planned-Features.md --- docs/Planned-Features.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/Planned-Features.md diff --git a/docs/Planned-Features.md b/docs/Planned-Features.md deleted file mode 100644 index b3a425249b..0000000000 --- a/docs/Planned-Features.md +++ /dev/null @@ -1 +0,0 @@ -placeholder \ No newline at end of file From 4e2ae0972381355deb6e532b6a27f38cd17eb07c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 21:15:16 +0200 Subject: [PATCH 068/203] Delete RoadMap.md --- docs/RoadMap.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/RoadMap.md diff --git a/docs/RoadMap.md b/docs/RoadMap.md deleted file mode 100644 index b3a425249b..0000000000 --- a/docs/RoadMap.md +++ /dev/null @@ -1 +0,0 @@ -placeholder \ No newline at end of file From 795a2296fd06e4a9dae5ff86b5b0771376f96c95 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 21:21:37 +0200 Subject: [PATCH 069/203] Update CONTRIBUTING.md --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32f864fb00..687a7d9726 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,8 +77,7 @@ Any other information you want to share that is relevant to the issue being repo Feature requests are welcome. Before you submit one be sure to have: -1. Read the [Roadmap](https://github.com/popcorn-official/popcorn-desktop/tree/master/docs/RoadMap.md) and -[Planned Features](https://github.com/popcorn-official/popcorn-desktop/tree/master/docs/Planned-Features.md) listing, **use the Github Issues search** and check the feature hasn't already been requested. +1. Check [existing feature requests](https://github.com/popcorn-official/popcorn-desktop/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) and verify the feature hasn't already been requested. 2. Take a moment to think about whether your idea fits with the scope and aims of the project, or if it might better fit being an app/plugin. 3. Remember, it's up to *you* to make a strong case to convince the project's leaders of the merits of this From 9355c07c4bafd9ad6548d5c5408039b369855ab6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 21:44:11 +0200 Subject: [PATCH 070/203] Delete .gitmodules --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ccf1312174..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "src/app/styl/third_party"] - path = src/app/styl/third_party - url = https://github.com/popcorn-official/popcorn-desktop-themes.git From fcadd91f6f817fc47e3a45d2bf09e95916592837 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 21:57:57 +0200 Subject: [PATCH 071/203] Delete Jenkinsfile --- Jenkinsfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index e69de29bb2..0000000000 From a70523ffd1de8532558f2699d876afd8b1c18595 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 2 Jan 2022 23:27:27 +0200 Subject: [PATCH 072/203] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 112ceba3e6..59bb2a9434 100644 --- a/README.md +++ b/README.md @@ -172,4 +172,4 @@ You should have received a copy of the GNU General Public License along with thi *** -Copyright © 2021 Popcorn Time Project - Released under the [GPL v3 license](LICENSE.txt). +Copyright © 2022 Popcorn Time Project - Released under the [GPL v3 license](LICENSE.txt). From 03188b68bc2047393e0295e77432ccb282e6485e Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 4 Jan 2022 18:13:27 +0300 Subject: [PATCH 073/203] remove unused providers --- src/app/lib/providers/cache_provider.js | 50 ----------------------- src/app/lib/providers/cache_providerv2.js | 47 --------------------- 2 files changed, 97 deletions(-) delete mode 100644 src/app/lib/providers/cache_provider.js delete mode 100644 src/app/lib/providers/cache_providerv2.js diff --git a/src/app/lib/providers/cache_provider.js b/src/app/lib/providers/cache_provider.js deleted file mode 100644 index 2349c67644..0000000000 --- a/src/app/lib/providers/cache_provider.js +++ /dev/null @@ -1,50 +0,0 @@ -(function (App) { - 'use strict'; - - var CacheProvider = function (table, ttl) { - this.table = table; - this.cache = new App.Cache(table); - this.ttl = ttl; - }; - - // TODO: Duplicate cache entry - CacheProvider.prototype.fetch = function (ids) { - var self = this; - ids = _.map(ids, function (id) { - if (id) { - return id.toString(); - } - }); - var cachePromise = this.cache.getItems(ids); - var queryPromise = cachePromise.then(function (items) { - // Filter out cached subtitles - var cachedIds = _.keys(items); - win.debug(cachedIds.length + ' cached ' + self.table); - var filteredId = _.difference(ids, cachedIds); - return filteredId; - }) - .then(this.query); - - // Cache ysubs subtitles - queryPromise.then(function (items) { - win.debug('Cache ' + _.keys(items).length + ' ' + self.table); - self.cache.setItems(items, self.ttl); - }); - - // Wait for all query promise to finish - return Q.allSettled([cachePromise, queryPromise]) - .then(function (results) { - // Merge all promise result - var items = {}; - _.each(results, function (result) { - if (result.state === 'fulfilled') { - _.extend(items, result.value); - } - }); - - return items; - }); - }; - - App.Providers.CacheProvider = CacheProvider; -})(window.App); diff --git a/src/app/lib/providers/cache_providerv2.js b/src/app/lib/providers/cache_providerv2.js deleted file mode 100644 index 898a0ca1b7..0000000000 --- a/src/app/lib/providers/cache_providerv2.js +++ /dev/null @@ -1,47 +0,0 @@ -(function (App) { - 'use strict'; - - var CacheProvider = function (table, ttl) { - this._table = table; - this._cache = new App.CacheV2(table); - this.ttl = ttl; - }; - - CacheProvider.prototype.config = { - name: 'CacheProviderV2' - }; - - CacheProvider.prototype.fetch = function (ids) { - var self = this; - if (this._cache._openPromise.isFulfilled()) { - return this._cache.getMultiple(ids).then(function (items) { - win.debug('Loaded ' + items.length + ' items from the ' + self._table + ' cache!'); - return items; - }); - } else { - return this._cache._openPromise.then(function () { - return self._cache.getMultiple(ids).then(function (items) { - win.debug('Loaded ' + items.length + ' items from the ' + self._table + ' cache!'); - return items; - }); - }); - } - }; - - CacheProvider.prototype.store = function (key, items) { - var promises = []; - var self = this; - win.debug('Stored ' + items.length + ' items in the ' + this._table + ' cache!'); - _.each(items, function (item) { - if (!item[key]) { - return; - } - promises.push(self._cache.set(item[key], item, { - ttl: self.ttl - })); - }); - return Q(items); - }; - - App.Providers.CacheProviderV2 = CacheProvider; -})(window.App); From 57a4211a9616cf841715a5e5856bfd67361d4475 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 16 Jan 2022 04:12:48 +0200 Subject: [PATCH 074/203] Show an Undo button when a bookmark is removed *fixes https://github.com/popcorn-official/popcorn-desktop/issues/2223 --- src/app/language/en.json | 9 +++- src/app/lib/views/browser/item.js | 57 +++++++++++++++++++++--- src/app/lib/views/settings_container.js | 1 + src/app/settings.js | 1 + src/app/templates/settings-container.tpl | 6 ++- 5 files changed, 66 insertions(+), 8 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 8822dc35ff..90f4c0ba12 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -552,7 +552,7 @@ "Ask me every time": "Ask me every time", "Enable Protocol Encryption": "Enable Protocol Encryption", "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", + "Show the Seedbox when a new download is added": "Show the Seedbox when a new download is added", "Download added": "Download added", "Change API Server": "Change API Server", "Localisation": "Localisation", @@ -577,5 +577,10 @@ "Submit metadata & translations": "Submit metadata & translations", "Not available": "Not available", "Cast not available": "Cast not available", - "Show the 'Submit metadata & translations' button": "Show the 'Submit metadata & translations' button" + "Show the 'Submit metadata & translations' button": "Show the 'Submit metadata & translations' button", + "Show an 'Undo' button when a bookmark is removed": "Show an 'Undo' button when a bookmark is removed", + "was added to bookmarks": "was added to bookmarks", + "was removed from bookmarks": "was removed from bookmarks", + "Bookmark restored": "Bookmark restored", + "Undo": "Undo" } diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index f241ec447b..f6e20d1d4f 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -320,8 +320,18 @@ addBookmarked: function () { var imdb = this.model.get('imdb_id'); - var itemtype = this.model.get('type'); - var provider = this.model.get('providers').torrent; + var itemtype = this.model.get('type').replace('bookmarked', ''); + var provider; + + if (this.model.get('providers') && this.model.get('providers').torrent.detail) { + provider = this.model.get('providers').torrent; + } else { + if (itemtype === 'show') { + provider = App.Config.getProviderForType('tvshow')[0]; + } else { + provider = App.Config.getProviderForType('movie')[0]; + } + } return provider.detail(imdb, this.model.attributes).then(function (data) { data.provider = provider.name; @@ -365,6 +375,26 @@ var itemtype = this.model.get('type'); var bookmarked = this.model.get('bookmarked'); + var delCache = (function (e) { + var id = window.setTimeout(function() {}, 0); + while (id--) { window.clearTimeout(id); } + App.vent.trigger('notification:close'); + this.toggleFavorite(e); + $('.favourites-toggle').text(i18n.__('Remove from bookmarks')).addClass('selected'); + $('.sha-bookmark').text(i18n.__('Remove from bookmarks')).addClass('selected'); + App.vent.trigger('notification:show', new App.Model.Notification({ + title: '', + body: '' + this.model.get('title') + ' (' + this.model.get('year') + ')' + '
    ' + i18n.__('was added to bookmarks'), + showClose: false, + autoclose: 3000, + type: 'success', + buttons: [{ title: i18n.__('Bookmark restored'), action: function () { + var id = window.setTimeout(function() {}, 0); + while (id--) { window.clearTimeout(id); } + App.vent.trigger('notification:close'); + }}] + })); + }.bind(this)); if (bookmarked) { this.removeBookmarked().then(function () { @@ -389,14 +419,31 @@ } }); } + }.bind(this)).then(function () { + if (Settings.showUndoRBookmark) { + App.vent.trigger('notification:show', new App.Model.Notification({ + title: '', + body: '' + this.model.get('title') + ' (' + this.model.get('year') + ')' + '
    ' + i18n.__('was removed from bookmarks'), + showClose: false, + autoclose: true, + type: 'info', + buttons: [{ title: i18n.__('Undo'), action: delCache }] + })); + } }.bind(this)); } else { - this.ui.bookmarkIcon.addClass('selected'); + if (this.ui.bookmarkIcon[0].isConnected) { + this.ui.bookmarkIcon.addClass('selected'); + } this.addBookmarked().then(function () { this.model.set('bookmarked', true); - this.setCoverStates(); - this.setTooltips(); + if (App.currentview === 'Favorites') { + App.vent.trigger('favorites:list', []); + } else { + this.setCoverStates(); + this.setTooltips(); + } }.bind(this)).catch(function (err) { console.error('item.addBookmarked failed:', err); $('.notification_alert').text(i18n.__('Error loading data, try again later...')).fadeIn('fast').delay(2500).fadeOut('fast'); diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 3c16d819f1..5fc47a4060 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -301,6 +301,7 @@ case 'torColSearchMore': case 'showSeedboxOnDlInit': case 'showSubmitMeta': + case 'showUndoRBookmark': case 'nativeWindowFrame': case 'translatePosters': case 'translateSynopsis': diff --git a/src/app/settings.js b/src/app/settings.js index adea27daf5..3f1ac062f9 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -142,6 +142,7 @@ Settings.seriesTabEnable = true; Settings.animeTabEnable = true; Settings.showSeedboxOnDlInit = true; Settings.showSubmitMeta = true; +Settings.showUndoRBookmark = true; // Quality Settings.shows_default_quality = '720p'; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 3f6a3be407..f929235221 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -110,9 +110,13 @@ <% if (Settings.activateSeedbox) { %> > - + <% } %> + + > + + > From 7c1254984a916ddfe30b42d0554f94c0426fe2f9 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 16 Jan 2022 04:57:56 +0200 Subject: [PATCH 075/203] Update item.js --- src/app/lib/views/browser/item.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index f6e20d1d4f..28b6ef7e10 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -421,6 +421,9 @@ } }.bind(this)).then(function () { if (Settings.showUndoRBookmark) { + var id = window.setTimeout(function() {}, 0); + while (id--) { window.clearTimeout(id); } + App.vent.trigger('notification:close'); App.vent.trigger('notification:show', new App.Model.Notification({ title: '', body: '' + this.model.get('title') + ' (' + this.model.get('year') + ')' + '
    ' + i18n.__('was removed from bookmarks'), From 1eca2f936ba391fa8a68bcef92701710b787480f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 17 Jan 2022 01:10:27 +0200 Subject: [PATCH 076/203] Update item.js --- src/app/lib/views/browser/item.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 28b6ef7e10..0562729541 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -382,18 +382,7 @@ this.toggleFavorite(e); $('.favourites-toggle').text(i18n.__('Remove from bookmarks')).addClass('selected'); $('.sha-bookmark').text(i18n.__('Remove from bookmarks')).addClass('selected'); - App.vent.trigger('notification:show', new App.Model.Notification({ - title: '', - body: '' + this.model.get('title') + ' (' + this.model.get('year') + ')' + '
    ' + i18n.__('was added to bookmarks'), - showClose: false, - autoclose: 3000, - type: 'success', - buttons: [{ title: i18n.__('Bookmark restored'), action: function () { - var id = window.setTimeout(function() {}, 0); - while (id--) { window.clearTimeout(id); } - App.vent.trigger('notification:close'); - }}] - })); + $('.notification_alert').stop().text(i18n.__('Bookmark restored')).fadeIn('fast').delay(1500).fadeOut('fast'); }.bind(this)); if (bookmarked) { From ba23af113383092feb15749da70d0cb01478f5cf Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 17 Jan 2022 02:23:58 +0300 Subject: [PATCH 077/203] fix watchlist provider --- src/app/lib/providers/watchlist.js | 4 ++++ src/app/lib/views/browser/watchlist_browser.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/lib/providers/watchlist.js b/src/app/lib/providers/watchlist.js index a0679bce92..445228f069 100644 --- a/src/app/lib/providers/watchlist.js +++ b/src/app/lib/providers/watchlist.js @@ -275,6 +275,10 @@ } } + Watchlist.prototype.filters = function () { + return Promise.resolve({}); + }; + App.vent.on('show:watched', onShowWatched); App.Providers.install(Watchlist); diff --git a/src/app/lib/views/browser/watchlist_browser.js b/src/app/lib/views/browser/watchlist_browser.js index e01c390b4a..b405ad9edb 100644 --- a/src/app/lib/views/browser/watchlist_browser.js +++ b/src/app/lib/views/browser/watchlist_browser.js @@ -2,7 +2,8 @@ 'use strict'; var WatchlistBrowser = App.View.PCTBrowser.extend({ - collectionModel: App.Model.WatchlistCollection + collectionModel: App.Model.WatchlistCollection, + provider: 'Watchlist', }); App.View.WatchlistBrowser = WatchlistBrowser; From 9be3a161360c947c105be763bdd04e6268a16b89 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 30 Jan 2022 14:08:44 +0300 Subject: [PATCH 078/203] update webtorrent --- package.json | 2 +- yarn.lock | 75 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 1bc4b81431..0e4bb9ba32 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.8", + "webtorrent": "^1.7.0", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 698820631f..0ffe81f4d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,6 +157,14 @@ request-promise-native "^1.0.8" ws "^7.2.1" +"@webtorrent/http-node@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@webtorrent/http-node/-/http-node-1.3.0.tgz#bd8aacf13f08bb19ee25b5f5364e8d261eaa5c3c" + integrity sha512-GWZQKroPES4z91Ijx6zsOsb7+USOxjy66s8AoTWg0HiBBdfnbtf9aeh3Uav0MgYn4BL8Q7tVSUpd0gGpngKGEQ== + dependencies: + freelist "^1.0.3" + http-parser-js "^0.4.3" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -778,14 +786,14 @@ bittorrent-peerid@^1.3.3: resolved "https://registry.yarnpkg.com/bittorrent-peerid/-/bittorrent-peerid-1.3.4.tgz#81c1597a06a1d424a6ddd1bb196eead98c250d01" integrity sha512-Xzk1FJFHmsc9H8IKFtDUkfAZIT1HW8r6UqajfZBBxWmpA1v7FsPO8xPFtnFzCqcXlPN3yi8dDmlqZCemyB7P8w== -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== +bittorrent-protocol@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bittorrent-protocol/-/bittorrent-protocol-3.5.1.tgz#795131c236010f91371b6e2a2e6beb4b108eeb3b" + integrity sha512-euVSavQL0jBqRcbsNs5zUP9Ygm+OW5vCDDaatC6vrONtXp+eVe4sO1wA58Gig3IYOdRSBKl53auniWEAJ9quxg== dependencies: - bencode "^2.0.1" + bencode "^2.0.2" bitfield "^4.0.0" - debug "^4.3.1" + debug "^4.3.3" randombytes "^2.1.0" rc4 "^0.1.5" readable-stream "^3.6.0" @@ -1298,7 +1306,7 @@ chrome-dns@^1.0.0: dependencies: chrome-net "^3.3.2" -chrome-net@^3.3.2, chrome-net@^3.3.3, chrome-net@^3.3.4: +chrome-net@^3.3.2, chrome-net@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/chrome-net/-/chrome-net-3.3.4.tgz#0e604a31d226ebfb8d2d1c381cab47d35309825d" integrity sha512-Jzy2EnzmE+ligqIZUsmWnck9RBXLuUy6CaKyuNMtowFG3ZvLt8d+WBJCTPEludV0DHpIKjAOlwjFmTaEdfdWCw== @@ -1760,6 +1768,13 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + 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" @@ -3293,14 +3308,6 @@ http-headers@^3.0.1: dependencies: next-line "^1.1.0" -"http-node@github:webtorrent/http-node#webtorrent": - version "1.2.0" - resolved "https://codeload.github.com/webtorrent/http-node/tar.gz/342ef8624495343ffd050bd0808b3750cf0e3974" - dependencies: - chrome-net "^3.3.3" - freelist "^1.0.3" - http-parser-js "^0.4.3" - http-parser-js@>=0.5.1: version "0.5.3" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" @@ -4665,11 +4672,16 @@ mime@1.6.0, mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.3.1, mime@^2.5.2: +mime@^2.3.1: version "2.5.2" resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -6387,6 +6399,15 @@ simple-get@^4.0.0: once "^1.3.1" simple-concat "^1.0.0" +simple-get@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + simple-glob@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/simple-glob/-/simple-glob-0.2.0.tgz#95cf6a5fb5d84843a52a58529cba31b0f5c3478c" @@ -7120,7 +7141,7 @@ 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.6: +torrent-discovery@^9.4.7: version "9.4.7" resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.7.tgz#d45ee78cb6a7004a8f3cd203ee7df915088bea70" integrity sha512-7Zw474LJE5r3Momi4ykBYkjgcFhENbUxcAFs5cBllUkv9ErJPzPEGmpEuqX7V8TkLS+Clmt/l5CjV5IFHg/A/A== @@ -7704,30 +7725,30 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -webtorrent@^1.5.8: - version "1.5.8" - resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.8.tgz#1dcb26347a8c0ea15a20b77f1c85dea9ce4f170b" - integrity sha512-ltYdloqDamay36XN8FZ+O2fqRQNDt+JGhRbOt1gCBeC+fFhke3WxEVs3/A2UtKjhwN8OEp3Go7tWU9R0S+29Lw== +webtorrent@^1.7.0: + version "1.7.2" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.7.2.tgz#24672163e8cc12b19b107ceb56e925ef8076b3fc" + integrity sha512-i2ceefclrbWcXrp/WyLSZYmwg5AhNrxiO+hUizb2wMqNEMNHOGfRc/0jT2j/2Jy0ar12zF8XcV4sEAjlaBPDcQ== dependencies: + "@webtorrent/http-node" "^1.3.0" addr-to-ip-port "^1.5.4" bitfield "^4.0.0" bittorrent-dht "^10.0.2" - bittorrent-protocol "^3.4.3" + bittorrent-protocol "^3.5.1" cache-chunk-store "^3.2.2" chrome-net "^3.3.4" chunk-store-stream "^4.3.0" cpus "^1.0.3" create-torrent "^5.0.1" - debug "^4.3.2" + debug "^4.3.3" end-of-stream "^1.4.4" escape-html "^1.0.3" fs-chunk-store "^2.0.4" - http-node "github:webtorrent/http-node#webtorrent" immediate-chunk-store "^2.2.0" load-ip-set "^2.2.1" lt_donthave "^1.0.1" memory-chunk-store "^1.3.5" - mime "^2.5.2" + mime "^3.0.0" multistream "^4.1.0" package-json-versionify "^1.0.4" parse-torrent "^9.1.4" @@ -7740,7 +7761,7 @@ webtorrent@^1.5.8: run-parallel "^1.2.0" run-parallel-limit "^1.1.0" simple-concat "^1.0.1" - simple-get "^4.0.0" + simple-get "^4.0.1" simple-peer "^9.11.0" simple-sha1 "^3.1.0" speed-limiter "^1.0.2" @@ -7748,7 +7769,7 @@ webtorrent@^1.5.8: 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.6" + torrent-discovery "^9.4.7" torrent-piece "^2.0.1" unordered-array-remove "^1.0.2" ut_metadata "^3.5.2" From 40852c2a053b0de54f5c8bc6085b6a8302b2d876 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 28 May 2021 03:04:35 +0300 Subject: [PATCH 079/203] read server from dht --- package.json | 1 + src/app/database.js | 10 +++++++++ src/app/dht.js | 49 +++++++++++++++++++++++++++++++++++++++++++++ src/app/index.html | 1 + src/app/settings.js | 1 + yarn.lock | 10 ++++++++- 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 src/app/dht.js diff --git a/package.json b/package.json index 1bc4b81431..76abe80594 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "chromecast-api": "0.3.4", "dayjs": "^1.10.6", "dlnacasts2": "0.2.0", + "ed25519-supercop": "^2.0.1", "edit-json-file": "^1.4.1", "flag-icon-css": "^3.5.0", "i18n": "0.x.x", diff --git a/src/app/database.js b/src/app/database.js index 6e2f06a491..6e5a85b07d 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -374,6 +374,13 @@ var Database = { window.__isNewInstall = true; } + if (typeof Settings.dhtData === 'string') { + let dhtInfo = JSON.parse(Settings.dhtData); + if (typeof dhtInfo === 'object') { + App.Providers.updateConnection(dhtInfo.server, dhtInfo.server, dhtInfo.server, Settings.proxyServer); + } + } + if (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer || Settings.proxyServer) { App.Providers.updateConnection(Settings.customMoviesServer, Settings.customSeriesServer, Settings.customAnimeServer, Settings.proxyServer); } @@ -415,6 +422,9 @@ var Database = { App.WebTorrent.throttleUpload(parseInt(parseFloat(Settings.uploadLimit, 10) * parseInt(Settings.maxLimitMult, 10)) || -1); App.WebTorrent.maxConns = parseInt(Settings.connectionLimit, 10) || 55; }) + .then(function () { + App.DhtReader.updateOld(); + }) .catch(function (err) { win.error('Error starting up', err); }); diff --git a/src/app/dht.js b/src/app/dht.js new file mode 100644 index 0000000000..b287d172e5 --- /dev/null +++ b/src/app/dht.js @@ -0,0 +1,49 @@ +'use strict'; + +var DHT = require('bittorrent-dht'); +var ed = require('ed25519-supercop'); + +class DhtReader +{ + constructor(options) { + this.options = _.defaults(options || {}, { + }); + } + + _update() + { + var dht = new DHT({ verify: ed.verify }); + var hash = Buffer(Settings.dht, 'hex'); + dht.once('ready', function () { + dht.get(hash, function (err, node) { + if (err) { + console.error(err); + return; + } + if (!node || !node.v) { + console.error('DHT hash not found'); + return; + } + AdvSettings.set('dhtData', node.v.toString()); + AdvSettings.set('dhtDataUpdated', Date.now()); + console.log('Updated from DHT'); + }); + }); + } + + updateOld() + { + if (!Settings.dht) { + return; + } + let data = AdvSettings.get('dhtData'); + let last = AdvSettings.get('dhtDataUpdated'); + const time = 1000 * 60 * 60 * 24 * 7; + if (!data || (Date.now() - last > time)) { + this._update(); + } + } + +} + +App.DhtReader = new DhtReader(); diff --git a/src/app/index.html b/src/app/index.html index f3f556269f..b698e4885d 100644 --- a/src/app/index.html +++ b/src/app/index.html @@ -74,6 +74,7 @@ + diff --git a/src/app/settings.js b/src/app/settings.js index 3f1ac062f9..0cb777e427 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -12,6 +12,7 @@ var Settings = { issuesUrl: 'https://github.com/popcorn-official/popcorn-desktop/issues', sourceUrl: 'https://github.com/popcorn-official/popcorn-desktop/', commitUrl: 'https://github.com/popcorn-official/popcorn-desktop/commit', + dht: '', updateKey: '-----BEGIN PUBLIC KEY-----\n' + 'MIIBtjCCASsGByqGSM44BAEwggEeAoGBAPNM5SX+yR8MJNrX9uCQIiy0t3IsyNHs\n' + diff --git a/yarn.lock b/yarn.lock index 698820631f..eac6d80afb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2056,6 +2056,14 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ed25519-supercop@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ed25519-supercop/-/ed25519-supercop-2.0.1.tgz#5b317dec9b17a0ff2c303d2a5b600983f9df1806" + integrity sha512-5K75apA428ygTu/uvWwfOPPqdw65v7lFDLX6CSsV/ByhhVR5xED93KXeKDEMZ7G2Ttd3RyQoL8pFGSoMEWBXHA== + dependencies: + napi-macros "^2.0.0" + node-gyp-build "^4.2.3" + edit-json-file@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/edit-json-file/-/edit-json-file-1.6.0.tgz#ff51a1648e40ab7613c912f33a2d1079d9b03f63" @@ -4950,7 +4958,7 @@ node-fetch@^2.0.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-gyp-build@^4.2.0: +node-gyp-build@^4.2.0, node-gyp-build@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== From a3b3a22fd194b1875bcf871808552c35867e80cd Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sun, 4 Jul 2021 10:55:09 +0300 Subject: [PATCH 080/203] git and reddit from dht --- src/app/database.js | 17 ++++++++++++++++- src/app/settings.js | 3 +-- src/app/templates/about.tpl | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/app/database.js b/src/app/database.js index 6e5a85b07d..a964f345fa 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -325,6 +325,21 @@ var Database = { }); }, + applyDhtSettings: function (dhtInfo) { + if (dhtInfo.server) { + App.Providers.updateConnection(dhtInfo.server, dhtInfo.server, dhtInfo.server, Settings.proxyServer); + } + if (dhtInfo.r) { + Settings.projectForum = 'https://www.reddit.com/r/' + dhtInfo.r; + } + if (dhtInfo.git) { + Settings.changelogUrl = dhtInfo.git + 'commits/master'; + Settings.issuesUrl = dhtInfo.git + 'issues'; + Settings.sourceUrl = dhtInfo.git; + Settings.commitUrl = dhtInfo.git + 'commit'; + } + }, + deleteDatabases: function () { fs.unlinkSync(path.join(data_path, 'data/watched.db')); @@ -377,7 +392,7 @@ var Database = { if (typeof Settings.dhtData === 'string') { let dhtInfo = JSON.parse(Settings.dhtData); if (typeof dhtInfo === 'object') { - App.Providers.updateConnection(dhtInfo.server, dhtInfo.server, dhtInfo.server, Settings.proxyServer); + Database.applyDhtSettings(dhtInfo); } } diff --git a/src/app/settings.js b/src/app/settings.js index 0cb777e427..124627269e 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -4,9 +4,8 @@ var Settings = { projectUrl: 'https://popcorntime.app', projectCi: 'https://ci.popcorntime.app', projectBlog: 'https://blog.popcorntime.app/', - projectForum: 'https://www.reddit.com/r/PopcornTime', + projectForum: 'https://www.reddit.com/r/PopcornTimeApp', projectForum2: 'https://discuss.popcorntime.app', - projectForum3: 'https://www.reddit.com/r/PopcornTimeApp', statusUrl: 'http://status.popcorntime.app', changelogUrl: 'https://github.com/popcorn-official/popcorn-desktop/commits/master', issuesUrl: 'https://github.com/popcorn-official/popcorn-desktop/issues', diff --git a/src/app/templates/about.tpl b/src/app/templates/about.tpl index a2d7b6b617..f4e8653d44 100644 --- a/src/app/templates/about.tpl +++ b/src/app/templates/about.tpl @@ -25,7 +25,7 @@ - +
    From a209e91b3478ce85ae2395f1345641e56961c314 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 14 Jul 2021 00:36:47 +0300 Subject: [PATCH 081/203] update dht reader --- src/app/database.js | 4 ++- src/app/dht.js | 38 ++++++++++++++++++++---- src/app/language/ru.json | 5 ++-- src/app/lib/views/settings_container.js | 8 ++++- src/app/settings.js | 1 + src/app/templates/settings-container.tpl | 8 ++++- 6 files changed, 54 insertions(+), 10 deletions(-) diff --git a/src/app/database.js b/src/app/database.js index a964f345fa..aedc57d1b0 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -438,7 +438,9 @@ var Database = { App.WebTorrent.maxConns = parseInt(Settings.connectionLimit, 10) || 55; }) .then(function () { - App.DhtReader.updateOld(); + if (Settings.dhtEnable) { + App.DhtReader.updateOld(); + } }) .catch(function (err) { win.error('Error starting up', err); diff --git a/src/app/dht.js b/src/app/dht.js index b287d172e5..dc5e30cfd2 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -10,10 +10,14 @@ class DhtReader }); } - _update() + update() { - var dht = new DHT({ verify: ed.verify }); - var hash = Buffer(Settings.dht, 'hex'); + if (!Settings.dht) { + return; + } + const dht = new DHT({verify: ed.verify}); + const hash = Buffer(Settings.dht, 'hex'); + const self=this; dht.once('ready', function () { dht.get(hash, function (err, node) { if (err) { @@ -24,7 +28,12 @@ class DhtReader console.error('DHT hash not found'); return; } - AdvSettings.set('dhtData', node.v.toString()); + let newData = node.v.toString(); + let data = AdvSettings.get('dhtData'); + if (data !== newData) { + self.alertMessageSuccess(true, i18n.__('Сonfig updated successfully')); + } + AdvSettings.set('dhtData', newData); AdvSettings.set('dhtDataUpdated', Date.now()); console.log('Updated from DHT'); }); @@ -39,11 +48,30 @@ class DhtReader let data = AdvSettings.get('dhtData'); let last = AdvSettings.get('dhtDataUpdated'); const time = 1000 * 60 * 60 * 24 * 7; + if (!data) { + this.alertMessageSuccess(false, i18n.__('Updating config from internet')); + } if (!data || (Date.now() - last > time)) { - this._update(); + this.update(); } } + alertMessageSuccess(btnRestart, successDesc) { + var notificationModel = new App.Model.Notification({ + title: i18n.__('Endpoints'), + body: successDesc, + type: 'success', + }); + + if (btnRestart) { + notificationModel.set('showRestart', true); + } else { + notificationModel.attributes.autoclose = 4000; + } + + // Open the notification + App.vent.trigger('notification:show', notificationModel); + } } App.DhtReader = new DhtReader(); diff --git a/src/app/language/ru.json b/src/app/language/ru.json index 6374d89168..27467607a4 100644 --- a/src/app/language/ru.json +++ b/src/app/language/ru.json @@ -448,5 +448,6 @@ "Browse Directoy to save to": "Открыть директорию для сохранения в", "Cancel and use VPN": "Отменить и использовать VPN", "Continue seeding torrents after restart app?": "Продолжить раздавать торренты после перезапуска приложения?", - "Enable VPN": "Включить VPN" -} \ No newline at end of file + "Enable VPN": "Включить VPN", + "Updating config from internet": "Получаем настройки из этих ваших Интернетов" +} diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 5fc47a4060..86cc4ce43a 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -47,7 +47,8 @@ 'click #syncTrakt': 'syncTrakt', 'click .qr-code': 'generateQRcode', 'click .set-current-filter': 'saveFilter', - 'click .reset-current-filter': 'resetFilter' + 'click .reset-current-filter': 'resetFilter', + 'click .update-dht': 'updateDht', }, onAttach: function () { @@ -297,6 +298,7 @@ case 'protocolEncryption': case 'contentLangOnly': case 'vpnEnabled': + case 'dhtEnabled': case 'coversShowRating': case 'torColSearchMore': case 'showSeedboxOnDlInit': @@ -644,6 +646,10 @@ } }, + updateDht: function() { + App.DhtReader.update(); + }, + connectTrakt: function (e) { if (!Settings.traktStatus) { $('#authTrakt').hide(); diff --git a/src/app/settings.js b/src/app/settings.js index 124627269e..4acb6fc7fe 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -196,6 +196,7 @@ Settings.automaticUpdating = true; Settings.UpdateSeed = false; Settings.events = true; Settings.minimizeToTray = false; +Settings.dhtEnable = true; // Features Settings.activateTorrentCollection = true; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index f929235221..3f427fb12d 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -561,7 +561,7 @@
    -
    +
    <%= i18n.__("API Server(s)") %>
    @@ -806,6 +806,12 @@ > + + > + + "> + +
    From 19c82c06700107dd850efc95b65ceb81a61be75c Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 14 Jul 2021 11:28:54 +0300 Subject: [PATCH 082/203] update settings --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 76abe80594..19e70edc6e 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.6", + "butter-settings-popcorntime.app": "0.0.7", "chromecast-api": "0.3.4", "dayjs": "^1.10.6", "dlnacasts2": "0.2.0", diff --git a/yarn.lock b/yarn.lock index eac6d80afb..15952293f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1049,10 +1049,10 @@ butter-sanitize@^0.1.1: dependencies: sanitizer "^0.1.3" -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== +butter-settings-popcorntime.app@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/butter-settings-popcorntime.app/-/butter-settings-popcorntime.app-0.0.7.tgz#962b2fb32fd42b05d2a90a288521e4b9c4ec6c08" + integrity sha512-Tk45ZkYpD9V9yv8y8bi1cn1YPEYsbRsjyQII0L7I8OLh8qa8v6wnR0ExMVGRRBx/LmVNeplEEjPwExFCbk20Bw== bytes@^3.0.0: version "3.1.0" From 80dd3e24f5b737c1077d8d1fa13d1cfd8bca6cfc Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 3 Sep 2021 13:36:18 +0300 Subject: [PATCH 083/203] show adv settings when change api server on time --- src/app/lib/views/browser/generic_browser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/lib/views/browser/generic_browser.js b/src/app/lib/views/browser/generic_browser.js index f3fc34932d..dea821bab6 100644 --- a/src/app/lib/views/browser/generic_browser.js +++ b/src/app/lib/views/browser/generic_browser.js @@ -129,6 +129,7 @@ break; default: } + App.settings.showAdvancedSettings = true; App.vent.trigger('settings:show'); curView ? $(curView).attr('style', 'border: 1px solid !important; animation: fadeBd .5s forwards; margin-left: 9px').focus().focusout(function() { this.removeAttribute('style'); }) : null; }, From d9b1ec55bf12802c23868471b2cb453eb9e72db0 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Fri, 3 Sep 2021 01:29:27 +0300 Subject: [PATCH 084/203] change lib --- package.json | 2 +- src/app/dht.js | 2 +- yarn.lock | 15 ++++++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 19e70edc6e..e7e71f384a 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "chromecast-api": "0.3.4", "dayjs": "^1.10.6", "dlnacasts2": "0.2.0", - "ed25519-supercop": "^2.0.1", "edit-json-file": "^1.4.1", "flag-icon-css": "^3.5.0", "i18n": "0.x.x", @@ -74,6 +73,7 @@ "mousetrap": "~1.6.2", "mv": "2.x.x", "nedb-promises": "^5.0.0", + "noble-ed25519": "^1.2.5", "node-tvdb": "^4.1.0", "opensubtitles-api": "^5.1.2", "q": "2.0.3", diff --git a/src/app/dht.js b/src/app/dht.js index dc5e30cfd2..f42f21e47f 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -1,7 +1,7 @@ 'use strict'; var DHT = require('bittorrent-dht'); -var ed = require('ed25519-supercop'); +var ed = require('noble-ed25519'); // better use ed25519-supercop but need rebuild ed25519 for windows class DhtReader { diff --git a/yarn.lock b/yarn.lock index 15952293f0..072b8ded45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2056,14 +2056,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ed25519-supercop@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ed25519-supercop/-/ed25519-supercop-2.0.1.tgz#5b317dec9b17a0ff2c303d2a5b600983f9df1806" - integrity sha512-5K75apA428ygTu/uvWwfOPPqdw65v7lFDLX6CSsV/ByhhVR5xED93KXeKDEMZ7G2Ttd3RyQoL8pFGSoMEWBXHA== - dependencies: - napi-macros "^2.0.0" - node-gyp-build "^4.2.3" - edit-json-file@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/edit-json-file/-/edit-json-file-1.6.0.tgz#ff51a1648e40ab7613c912f33a2d1079d9b03f63" @@ -4945,6 +4937,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +noble-ed25519@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/noble-ed25519/-/noble-ed25519-1.2.5.tgz#ed6dde9213debcf121083d18daecb30bb6416753" + integrity sha512-7vst+4UhM5QU3jJ3pUqPMKBCOePrxBojmoQa59qcSnYvjFF/T4jqb4WISlfslcWyBw7G5H9V/acpcAxMd8DzUQ== + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -4958,7 +4955,7 @@ node-fetch@^2.0.0: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-gyp-build@^4.2.0, node-gyp-build@^4.2.3: +node-gyp-build@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== From 5d2f5b03cbf6e776ef1bd5268d4271b02fa94a8c Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 1 Dec 2021 23:39:16 +0300 Subject: [PATCH 085/203] if dht enabled --- src/app/database.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/database.js b/src/app/database.js index aedc57d1b0..f7c54d45ac 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -389,7 +389,7 @@ var Database = { window.__isNewInstall = true; } - if (typeof Settings.dhtData === 'string') { + if ((Settings.dhtEnable && typeof Settings.dhtData === 'string')) { let dhtInfo = JSON.parse(Settings.dhtData); if (typeof dhtInfo === 'object') { Database.applyDhtSettings(dhtInfo); From 09305af40617ce54ef6604746f3aef1e9e5d5f7e Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 4 Dec 2021 18:17:50 +0300 Subject: [PATCH 086/203] fix message --- src/app/dht.js | 2 +- src/app/language/ru.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index f42f21e47f..35ed270629 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -49,7 +49,7 @@ class DhtReader let last = AdvSettings.get('dhtDataUpdated'); const time = 1000 * 60 * 60 * 24 * 7; if (!data) { - this.alertMessageSuccess(false, i18n.__('Updating config from internet')); + this.alertMessageSuccess(false, i18n.__('Updating config from these of yours Internets')); } if (!data || (Date.now() - last > time)) { this.update(); diff --git a/src/app/language/ru.json b/src/app/language/ru.json index 27467607a4..25a7e754b7 100644 --- a/src/app/language/ru.json +++ b/src/app/language/ru.json @@ -449,5 +449,5 @@ "Cancel and use VPN": "Отменить и использовать VPN", "Continue seeding torrents after restart app?": "Продолжить раздавать торренты после перезапуска приложения?", "Enable VPN": "Включить VPN", - "Updating config from internet": "Получаем настройки из этих ваших Интернетов" + "Updating config from these of yours Internets": "Получаем настройки из этих ваших Интернетов" } From ae9fb128c534a45df387aa479e8372bbe6bf39dc Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Mon, 31 Jan 2022 16:22:26 +0300 Subject: [PATCH 087/203] Revert "update webtorrent" This reverts commit 9be3a161360c947c105be763bdd04e6268a16b89. --- package.json | 2 +- yarn.lock | 75 +++++++++++++++++++--------------------------------- 2 files changed, 28 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 0e4bb9ba32..1bc4b81431 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.7.0", + "webtorrent": "^1.5.8", "webtorrent-health": "1.x.x" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 0ffe81f4d7..698820631f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,14 +157,6 @@ request-promise-native "^1.0.8" ws "^7.2.1" -"@webtorrent/http-node@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@webtorrent/http-node/-/http-node-1.3.0.tgz#bd8aacf13f08bb19ee25b5f5364e8d261eaa5c3c" - integrity sha512-GWZQKroPES4z91Ijx6zsOsb7+USOxjy66s8AoTWg0HiBBdfnbtf9aeh3Uav0MgYn4BL8Q7tVSUpd0gGpngKGEQ== - dependencies: - freelist "^1.0.3" - http-parser-js "^0.4.3" - abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -786,14 +778,14 @@ bittorrent-peerid@^1.3.3: resolved "https://registry.yarnpkg.com/bittorrent-peerid/-/bittorrent-peerid-1.3.4.tgz#81c1597a06a1d424a6ddd1bb196eead98c250d01" integrity sha512-Xzk1FJFHmsc9H8IKFtDUkfAZIT1HW8r6UqajfZBBxWmpA1v7FsPO8xPFtnFzCqcXlPN3yi8dDmlqZCemyB7P8w== -bittorrent-protocol@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bittorrent-protocol/-/bittorrent-protocol-3.5.1.tgz#795131c236010f91371b6e2a2e6beb4b108eeb3b" - integrity sha512-euVSavQL0jBqRcbsNs5zUP9Ygm+OW5vCDDaatC6vrONtXp+eVe4sO1wA58Gig3IYOdRSBKl53auniWEAJ9quxg== +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.2" + bencode "^2.0.1" bitfield "^4.0.0" - debug "^4.3.3" + debug "^4.3.1" randombytes "^2.1.0" rc4 "^0.1.5" readable-stream "^3.6.0" @@ -1306,7 +1298,7 @@ chrome-dns@^1.0.0: dependencies: chrome-net "^3.3.2" -chrome-net@^3.3.2, chrome-net@^3.3.4: +chrome-net@^3.3.2, chrome-net@^3.3.3, chrome-net@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/chrome-net/-/chrome-net-3.3.4.tgz#0e604a31d226ebfb8d2d1c381cab47d35309825d" integrity sha512-Jzy2EnzmE+ligqIZUsmWnck9RBXLuUy6CaKyuNMtowFG3ZvLt8d+WBJCTPEludV0DHpIKjAOlwjFmTaEdfdWCw== @@ -1768,13 +1760,6 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - 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" @@ -3308,6 +3293,14 @@ http-headers@^3.0.1: dependencies: next-line "^1.1.0" +"http-node@github:webtorrent/http-node#webtorrent": + version "1.2.0" + resolved "https://codeload.github.com/webtorrent/http-node/tar.gz/342ef8624495343ffd050bd0808b3750cf0e3974" + dependencies: + chrome-net "^3.3.3" + freelist "^1.0.3" + http-parser-js "^0.4.3" + http-parser-js@>=0.5.1: version "0.5.3" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" @@ -4672,16 +4665,11 @@ mime@1.6.0, mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.3.1: +mime@^2.3.1, mime@^2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== -mime@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" - integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== - mimic-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -6399,15 +6387,6 @@ simple-get@^4.0.0: once "^1.3.1" simple-concat "^1.0.0" -simple-get@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" - integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== - dependencies: - decompress-response "^6.0.0" - once "^1.3.1" - simple-concat "^1.0.0" - simple-glob@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/simple-glob/-/simple-glob-0.2.0.tgz#95cf6a5fb5d84843a52a58529cba31b0f5c3478c" @@ -7141,7 +7120,7 @@ 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.7: +torrent-discovery@^9.4.6: version "9.4.7" resolved "https://registry.yarnpkg.com/torrent-discovery/-/torrent-discovery-9.4.7.tgz#d45ee78cb6a7004a8f3cd203ee7df915088bea70" integrity sha512-7Zw474LJE5r3Momi4ykBYkjgcFhENbUxcAFs5cBllUkv9ErJPzPEGmpEuqX7V8TkLS+Clmt/l5CjV5IFHg/A/A== @@ -7725,30 +7704,30 @@ webtorrent-health@1.x.x: bittorrent-tracker "^9.1.0" parse-torrent "^5.8.2" -webtorrent@^1.7.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.7.2.tgz#24672163e8cc12b19b107ceb56e925ef8076b3fc" - integrity sha512-i2ceefclrbWcXrp/WyLSZYmwg5AhNrxiO+hUizb2wMqNEMNHOGfRc/0jT2j/2Jy0ar12zF8XcV4sEAjlaBPDcQ== +webtorrent@^1.5.8: + version "1.5.8" + resolved "https://registry.yarnpkg.com/webtorrent/-/webtorrent-1.5.8.tgz#1dcb26347a8c0ea15a20b77f1c85dea9ce4f170b" + integrity sha512-ltYdloqDamay36XN8FZ+O2fqRQNDt+JGhRbOt1gCBeC+fFhke3WxEVs3/A2UtKjhwN8OEp3Go7tWU9R0S+29Lw== dependencies: - "@webtorrent/http-node" "^1.3.0" addr-to-ip-port "^1.5.4" bitfield "^4.0.0" bittorrent-dht "^10.0.2" - bittorrent-protocol "^3.5.1" + 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 "^5.0.1" - debug "^4.3.3" + debug "^4.3.2" end-of-stream "^1.4.4" escape-html "^1.0.3" fs-chunk-store "^2.0.4" + http-node "github:webtorrent/http-node#webtorrent" immediate-chunk-store "^2.2.0" load-ip-set "^2.2.1" lt_donthave "^1.0.1" memory-chunk-store "^1.3.5" - mime "^3.0.0" + mime "^2.5.2" multistream "^4.1.0" package-json-versionify "^1.0.4" parse-torrent "^9.1.4" @@ -7761,7 +7740,7 @@ webtorrent@^1.7.0: run-parallel "^1.2.0" run-parallel-limit "^1.1.0" simple-concat "^1.0.1" - simple-get "^4.0.1" + simple-get "^4.0.0" simple-peer "^9.11.0" simple-sha1 "^3.1.0" speed-limiter "^1.0.2" @@ -7769,7 +7748,7 @@ webtorrent@^1.7.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.7" + torrent-discovery "^9.4.6" torrent-piece "^2.0.1" unordered-array-remove "^1.0.2" ut_metadata "^3.5.2" From 9acda90ff525a09183968ce5986ebb2f8487de45 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 3 Feb 2022 23:14:02 +0200 Subject: [PATCH 088/203] Adjustable next episode preload time (#2389) --- src/app/language/en.json | 3 ++- src/app/lib/views/player/player.js | 16 +++++++++------- src/app/lib/views/settings_container.js | 9 +++++++++ src/app/settings.js | 1 + src/app/templates/settings-container.tpl | 6 ++++++ 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 90f4c0ba12..9f26a27081 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -582,5 +582,6 @@ "was added to bookmarks": "was added to bookmarks", "was removed from bookmarks": "was removed from bookmarks", "Bookmark restored": "Bookmark restored", - "Undo": "Undo" + "Undo": "Undo", + "Remaining runtime before start preloading next episode": "Remaining runtime before start preloading next episode" } diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index f675bfd28d..ff90c02d79 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -258,7 +258,7 @@ checkAutoPlay: function () { if (this.isMovie() === 'episode' && this.next_episode_model) { - if ((this.video.duration() - this.video.currentTime()) < 60 && this.video.currentTime() > 30) { + if ((this.video.duration() - this.video.currentTime()) < (Settings.preloadNextEpisodeTime * 60) && this.video.currentTime() > 30) { if (!this.autoplayisshown) { var playingNext = $('.playing_next'); @@ -268,12 +268,14 @@ this.precachestarted = true; } - win.info('Showing Auto Play message'); - this.autoplayisshown = true; - playingNext.show(); - playingNext.appendTo('div#video_player'); - if (!this.player.userActive()) { - this.player.userActive(true); + if ((this.video.duration() - this.video.currentTime()) < 60) { + win.info('Showing Auto Play message'); + this.autoplayisshown = true; + playingNext.show(); + playingNext.appendTo('div#video_player'); + if (!this.player.userActive()) { + this.player.userActive(true); + } } } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 5fc47a4060..53abe7c1ad 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -365,6 +365,14 @@ value = nvalue; win.zoomLevel = Math.log(value/100) / Math.log(1.2); break; + case 'preloadNextEpisodeTime': + let nnvalue = field.val().replace(/[^0-9]/gi, ''); + if (!nnvalue || nnvalue <= 0) { + nnvalue = 1; + } + field.val(nnvalue); + value = nnvalue; + break; case 'tmpLocation': tmpLocationChanged = true; value = field.val(); @@ -576,6 +584,7 @@ case 'torColSearchMore': case 'httpApiEnabled': case 'showSubmitMeta': + case 'playNextEpisodeAuto': $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; diff --git a/src/app/settings.js b/src/app/settings.js index 3f1ac062f9..f65d23d323 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -127,6 +127,7 @@ Settings.translateEpisodes = true; //Playback Settings.alwaysFullscreen = false; Settings.playNextEpisodeAuto = false; +Settings.preloadNextEpisodeTime = 1; Settings.activateLoCtrl = false; Settings.chosenPlayer = 'local'; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index f929235221..709414e178 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -408,6 +408,12 @@ > + <% if (Settings.playNextEpisodeAuto) { %> + +

    <%= i18n.__("Remaining runtime before start preloading next episode") %>  

    +    <%= i18n.__("minute(s)") %> +
    + <% } %>
    From 536132dd729d263a8e34c36d55051961db55bb7d Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 5 Feb 2022 15:53:26 +0300 Subject: [PATCH 089/203] apply patch for samsung DLNA fix --- package.json | 5 +- patches/upnp-mediarenderer-client+1.4.0.patch | 13 ++ yarn.lock | 158 +++++++++++++++++- 3 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 patches/upnp-mediarenderer-client+1.4.0.patch diff --git a/package.json b/package.json index 1bc4b81431..7fba62cc68 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "css": "gulp css", "dist": "gulp dist", "start": "gulp run", - "test": "gulp test" + "test": "gulp test", + "postinstall": "patch-package" }, "chromium-args": "--enable-node-worker", "engines": { @@ -75,6 +76,8 @@ "nedb-promises": "^5.0.0", "node-tvdb": "^4.1.0", "opensubtitles-api": "^5.1.2", + "patch-package": "^6.4.7", + "postinstall-postinstall": "^2.1.0", "q": "2.0.3", "querystring": "^0.2.0", "readdirp": "2.x.x", diff --git a/patches/upnp-mediarenderer-client+1.4.0.patch b/patches/upnp-mediarenderer-client+1.4.0.patch new file mode 100644 index 0000000000..2f190d2531 --- /dev/null +++ b/patches/upnp-mediarenderer-client+1.4.0.patch @@ -0,0 +1,13 @@ +https://github.com/thibauts/node-upnp-mediarenderer-client/pull/36 +Fix Samsung DLNA +--- a/node_modules/upnp-mediarenderer-client/index.js ++++ b/node_modules/upnp-mediarenderer-client/index.js +@@ -144,7 +144,7 @@ MediaRendererClient.prototype.load = function(url, options, callback) { + + this.callAction('ConnectionManager', 'PrepareForConnection', params, function(err, result) { + if(err) { +- if(err.code !== 'ENOACTION') { ++ if( ! ['ENOACTION', 'EUPNP'].includes(err.code)) { + return callback(err); + } + // diff --git a/yarn.lock b/yarn.lock index 698820631f..b148815470 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,6 +157,11 @@ request-promise-native "^1.0.8" ws "^7.2.1" +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -969,6 +974,13 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + browserify-package-json@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-package-json/-/browserify-package-json-1.0.1.tgz#98dde8aa5c561fd6d3fe49bbaa102b74b396fdea" @@ -1199,7 +1211,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.3.2: +chalk@^2.0.1, chalk@^2.3.2, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1332,6 +1344,11 @@ ci-info@^1.5.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1638,7 +1655,7 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -2444,6 +2461,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -2464,6 +2488,13 @@ find-value@^1.0.3: resolved "https://registry.yarnpkg.com/find-value/-/find-value-1.0.12.tgz#68b6cec84e5b2d51272965e0bf09b26c9159c26e" integrity sha512-OCpo8LTk8eZ2sdDCwbU2Lc3ivYsdM6yod6jP2jHcNEFcjPhkgH0+POzTIol7xx1LZgtbI5rkO5jqxsG5MWtPjQ== +find-yarn-workspace-root@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" + integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== + dependencies: + micromatch "^4.0.2" + findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -2605,6 +2636,15 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -3519,6 +3559,13 @@ is-ci@^1.0.10: dependencies: ci-info "^1.5.0" +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-core-module@^2.2.0: version "2.6.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.6.0.tgz#d7553b2526fe59b92ba3e40c8df757ec8a709e19" @@ -3565,6 +3612,11 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -3679,6 +3731,11 @@ is-number@^4.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" @@ -3802,6 +3859,13 @@ is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@0.0.1, isarray@~0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3956,6 +4020,13 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + jsonparse@1.x.x: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -4055,6 +4126,13 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" @@ -4648,6 +4726,14 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + mime-db@1.49.0: version "1.49.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" @@ -5203,6 +5289,14 @@ once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" +open@^7.4.2: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + opensubtitles-api@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/opensubtitles-api/-/opensubtitles-api-5.1.2.tgz#750c9e808fbf6b006225150e062de0876ff41288" @@ -5250,6 +5344,11 @@ os-locale@^3.0.0: lcid "^2.0.0" mem "^4.0.0" +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -5407,6 +5506,25 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +patch-package@^6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" + integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^2.0.0" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + open "^7.4.2" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -5484,6 +5602,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picomatch@^2.2.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + piece-length@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/piece-length/-/piece-length-2.0.1.tgz#dbed4e78976955f34466d0a65304d0cb21914ac9" @@ -5567,6 +5690,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postinstall-postinstall@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" + integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -6165,7 +6293,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.5.2: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -6443,6 +6571,11 @@ single-line-log@^1.0.1: dependencies: string-width "^1.0.1" +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + smart-buffer@^1.0.13: version "1.1.15" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" @@ -7042,6 +7175,13 @@ timers-ext@^0.1.7: es5-ext "~0.10.46" next-tick "1" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + to-absolute-glob@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" @@ -7087,6 +7227,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" @@ -7334,6 +7481,11 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + unordered-array-remove@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unordered-array-remove/-/unordered-array-remove-1.0.2.tgz#c546e8f88e317a0cf2644c97ecb57dba66d250ef" From c3b14928717536a89de3464a09f1f48400a37d1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 13:35:03 +0000 Subject: [PATCH 090/203] Bump simple-get from 2.8.1 to 2.8.2 Bumps [simple-get](https://github.com/feross/simple-get) from 2.8.1 to 2.8.2. - [Release notes](https://github.com/feross/simple-get/releases) - [Commits](https://github.com/feross/simple-get/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: simple-get 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 b148815470..115351aa12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6498,9 +6498,9 @@ simple-concat@^1.0.0, simple-concat@^1.0.1: integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^2.0.0, simple-get@^2.1.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + version "2.8.2" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" + integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== dependencies: decompress-response "^3.3.0" once "^1.3.1" From 4d2972cb9048b11f0f3b972f5199098776a6eefa Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 6 Feb 2022 13:01:49 +0200 Subject: [PATCH 091/203] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 59d9870323..6e8abaa29f 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -39,12 +39,11 @@ cursor: pointer .watched - padding 9px 0 + padding 10px 0 color: $ShowWatchedIcon_false transition color .5s - - &:hover - color: $ShowWatchedIcon_hover + font-size: 0.9em + font-family: "Font Awesome 5 Free", "Open Sans SemiBold" &.true color: $ShowWatchedIcon_true @@ -53,6 +52,10 @@ cursor: not-allowed opacity: 0.2 + .watched:not(.fa-download):not(.fa-upload) + &:hover + color: $ShowWatchedIcon_true + li:nth-child(odd) background-color $ShowBgColor2 @@ -137,6 +140,10 @@ .seedbox-torrent-list ul li.active i color: rgba($EpisodeSelectorText,.5) + .seedbox-torrent-list ul li.active i:not(.fa-download):not(.fa-upload) + &:hover + color: $EpisodeSelectorText + .seedbox-torrent-list ul li.error background: $NotificationError @@ -248,6 +255,7 @@ i margin-right: 5px + font-family: "Font Awesome 5 Free", "Open Sans SemiBold" .seedbox-infos-synopsis color: $ShowText1 From 76a261e243049c8bbf64195c36866f1a2491aace Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 6 Feb 2022 16:53:43 +0200 Subject: [PATCH 092/203] Update seedbox.styl --- src/app/styl/views/seedbox.styl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 6e8abaa29f..38d59aba17 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -52,6 +52,9 @@ cursor: not-allowed opacity: 0.2 + &:hover + color: $ShowWatchedIcon_false !important + .watched:not(.fa-download):not(.fa-upload) &:hover color: $ShowWatchedIcon_true @@ -330,6 +333,9 @@ cursor not-allowed opacity 0.3 + &:hover + color: $TextError !important + .item-remove display none From 3de0a5ce89491227e3e14b810618bd06ac5ad6ed Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 24 Jan 2022 11:59:00 +0800 Subject: [PATCH 093/203] Run gulp build within context of node_modules Currently `./make_popcorn.sh` only works if the user has gulp installed globally. By by running gulp through yarn, `./make_popcorn.sh` will use the gulp installed in `node_modules`, which should work the same for everybody. --- make_popcorn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make_popcorn.sh b/make_popcorn.sh index 6c1a068782..406ec87299 100755 --- a/make_popcorn.sh +++ b/make_popcorn.sh @@ -122,7 +122,7 @@ if [ "$rd_dep" = "yes" ]; then echo "Successfully setup for Popcorn Time" fi -if gulp build; then +if yarn build; then echo "Popcorn Time built successfully!" if [[ `uname -s` != *"NT"* ]]; then # if not windows ./Create-Desktop-Entry From 6ccdf58c2c06435d5ff5f421df3cac3f6028625f Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 24 Jan 2022 12:00:31 +0800 Subject: [PATCH 094/203] Separate download speed from download icon --- src/app/lib/views/seedbox.js | 8 ++++---- src/app/styl/views/seedbox.styl | 3 ++- src/app/templates/seedbox.tpl | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 8c4da739a3..96855f09bd 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -109,11 +109,11 @@
    ${App.plugins.mediaName.getMediaName(torrent)}
    - - + 0 Kb/s + 0 Kb/s - 0 Kb/s - 0 Kb/s + +
  • ` ); diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 38d59aba17..3193745b6f 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -28,7 +28,8 @@ .seedbox-types ul, .seedbox-torrents ul height: calc(100vh - 167px) - direction: rtl + /* direction: rtl */ + text-align: right scrollable() li diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 17d920256f..5d2be9432a 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -20,9 +20,9 @@
    - - - + + +
    From 65886aff5f8f83a126d0257437284409c9618e53 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 24 Jan 2022 12:15:49 +0800 Subject: [PATCH 095/203] Reduce font size of download/upload rates --- src/app/lib/views/seedbox.js | 4 ++-- src/app/styl/views/seedbox.styl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 96855f09bd..32f2e7f2c6 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -109,8 +109,8 @@
    ${App.plugins.mediaName.getMediaName(torrent)}
    - 0 Kb/s - 0 Kb/s + 0 Kb/s + 0 Kb/s diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 3193745b6f..b954294364 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -39,6 +39,9 @@ width: calc(100% - 7px) cursor: pointer + small + font-size: 85% + .watched padding 10px 0 color: $ShowWatchedIcon_false From 54299e0ce5d22643caa3b6e8766f67485c2a5246 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 24 Jan 2022 13:08:01 +0800 Subject: [PATCH 096/203] Abbreviate Bytes to B, to reduce resizing "B" has a more consistent width with "KB" and "MB" --- src/app/lib/views/seedbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index 32f2e7f2c6..309f620958 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -13,12 +13,12 @@ var formatBytes = function (bytes, decimals) { if (bytes === 0) { - return '0 Bytes'; + return '0 B'; } let k = 1024, dm = decimals || 2, - sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], + sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; }; From 405e70ef322b1464e22eda49c78851fbadf436a7 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Tue, 25 Jan 2022 21:18:29 +0800 Subject: [PATCH 097/203] Remove parseFloat() for consistency Using parseFloat() here was producing inconsistent output: - 2.9 - 2.95 - 3 - 3.05 - 3.1 --- 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 309f620958..a29d2b92fa 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -20,7 +20,7 @@ dm = decimals || 2, sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k)); - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; + return (bytes / Math.pow(k, i)).toFixed(dm) + ' ' + sizes[i]; }; var Seedbox = Marionette.View.extend({ From 9a54f1c8d101258d45af096ca1f08b84991e0008 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Tue, 25 Jan 2022 21:25:03 +0800 Subject: [PATCH 098/203] Reduce to one decimal place --- 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 a29d2b92fa..b27c34311a 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -17,7 +17,7 @@ } let k = 1024, - dm = decimals || 2, + dm = decimals || 1, sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k)); return (bytes / Math.pow(k, i)).toFixed(dm) + ' ' + sizes[i]; From 2ef14ea5d36431d21c8a61a8cb53bfc83c650853 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 03:42:06 +0800 Subject: [PATCH 099/203] Bring text back inside the --- src/app/lib/views/seedbox.js | 4 ++-- src/app/styl/views/seedbox.styl | 3 --- src/app/templates/seedbox.tpl | 6 +++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/lib/views/seedbox.js b/src/app/lib/views/seedbox.js index b27c34311a..7ccfd0ae5f 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -109,8 +109,8 @@
    ${App.plugins.mediaName.getMediaName(torrent)}
    - 0 Kb/s - 0 Kb/s + 0 Kb/s + 0 Kb/s diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index b954294364..3193745b6f 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -39,9 +39,6 @@ width: calc(100% - 7px) cursor: pointer - small - font-size: 85% - .watched padding 10px 0 color: $ShowWatchedIcon_false diff --git a/src/app/templates/seedbox.tpl b/src/app/templates/seedbox.tpl index 5d2be9432a..17d920256f 100644 --- a/src/app/templates/seedbox.tpl +++ b/src/app/templates/seedbox.tpl @@ -20,9 +20,9 @@
    - - - + + +
    From 2178ff064c2cc3189bc0fda6e00c13cb03a41691 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 03:43:02 +0800 Subject: [PATCH 100/203] Use font chosen by theme --- src/app/styl/views/seedbox.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/styl/views/seedbox.styl b/src/app/styl/views/seedbox.styl index 3193745b6f..452c7de940 100644 --- a/src/app/styl/views/seedbox.styl +++ b/src/app/styl/views/seedbox.styl @@ -44,7 +44,7 @@ color: $ShowWatchedIcon_false transition color .5s font-size: 0.9em - font-family: "Font Awesome 5 Free", "Open Sans SemiBold" + font-family: "Font Awesome 5 Free", $MainFont &.true color: $ShowWatchedIcon_true @@ -259,7 +259,7 @@ i margin-right: 5px - font-family: "Font Awesome 5 Free", "Open Sans SemiBold" + font-family: "Font Awesome 5 Free", $MainFont .seedbox-infos-synopsis color: $ShowText1 From dfd2597c69d4a40388e6be2fa6fcac63b3bfedfd Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 03:43:39 +0800 Subject: [PATCH 101/203] Fix jshint warning --- 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 7ccfd0ae5f..384adf00a2 100644 --- a/src/app/lib/views/seedbox.js +++ b/src/app/lib/views/seedbox.js @@ -464,7 +464,7 @@ totalSize = totalSize + file.length; totalDownloaded = totalDownloaded + file.downloaded; try { - let thisElement = document.evaluate("//a[text()='" + file.name + "']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentNode; + const thisElement = document.evaluate(`//a[text()='${file.name}']`, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.parentNode; $(thisElement).attr('title', Common.fileSize(file.downloaded) + ' / ' + Common.fileSize(file.length)).tooltip('fixTitle'); } catch(err) {} } From 4c64f22b4f1185f340439ebbb8589bd3a271d9ba Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 03:18:10 +0800 Subject: [PATCH 102/203] Add keybinds to adjust brightness/contrast --- src/app/lib/views/player/player.js | 111 +++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index ff90c02d79..7835fd94aa 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -58,6 +58,15 @@ this.firstPlay = true; this.boundedMouseScroll = this.mouseScroll.bind(this); + this.zoom = 1.0; + + this.filters = { + brightness: 1.0, + contrast: 1.0, + hue: 0, + saturation: 1.0, + }; + //If a child was removed from above this view App.vent.on('viewstack:pop', function() { if (_.last(App.ViewStack) === 'app-overlay') { @@ -760,6 +769,48 @@ } }, + adjustZoom: function (difference) { + var v = $('video')[0]; + this.zoom += difference; + v.style.transform = `scale(${this.zoom})`; + this.displayOverlayMsg(i18n.__('Zoom') + ': ' + (this.zoom.toFixed(2))); + $('.vjs-overlay').css('opacity', '1'); + }, + + adjustBrightness: function (difference) { + this.filters.brightness += difference; + this.applyFilters(); + this.displayOverlayMsg(i18n.__('Brightness') + ': ' + this.filters.brightness.toFixed(2)); + $('.vjs-overlay').css('opacity', '1'); + }, + + adjustContrast: function (difference) { + this.filters.contrast += difference; + this.applyFilters(); + this.displayOverlayMsg(i18n.__('Contrast') + ': ' + (this.filters.contrast.toFixed(2))); + $('.vjs-overlay').css('opacity', '1'); + }, + + adjustHue: function (difference) { + this.filters.hue += difference; + this.applyFilters(); + this.displayOverlayMsg(i18n.__('Hue') + ': ' + (this.filters.hue.toFixed(0))); + $('.vjs-overlay').css('opacity', '1'); + }, + + adjustSaturation: function (difference) { + this.filters.saturation += difference; + this.applyFilters(); + this.displayOverlayMsg(i18n.__('Saturation') + ': ' + (this.filters.saturation.toFixed(2))); + $('.vjs-overlay').css('opacity', '1'); + }, + + applyFilters: function (difference) { + const { brightness, contrast, hue, saturation } = this.filters; + var curVideo = $('#video_player_html5_api'); + curVideo[0].style.filter = `brightness(${brightness}) contrast(${contrast}) hue-rotate(${hue}deg) saturate(${saturation})`; + }, + bindKeyboardShortcuts: function () { var that = this; @@ -920,6 +971,46 @@ that.scaleWindow(2); }); + Mousetrap.bind('w', function (e) { + that.adjustZoom(-0.05); + }, 'keydown'); + + Mousetrap.bind('e', function (e) { + that.adjustZoom(+0.05); + }, 'keydown'); + + Mousetrap.bind('shift+1', function (e) { + that.adjustContrast(-0.05); + }, 'keydown'); + + Mousetrap.bind('shift+2', function (e) { + that.adjustContrast(+0.05); + }, 'keydown'); + + Mousetrap.bind('shift+3', function (e) { + that.adjustBrightness(-0.05); + }, 'keydown'); + + Mousetrap.bind('shift+4', function (e) { + that.adjustBrightness(+0.05); + }, 'keydown'); + + Mousetrap.bind('shift+5', function (e) { + that.adjustHue(-2); + }, 'keydown'); + + Mousetrap.bind('shift+6', function (e) { + that.adjustHue(+2); + }, 'keydown'); + + Mousetrap.bind('shift+7', function (e) { + that.adjustSaturation(-0.05); + }, 'keydown'); + + Mousetrap.bind('shift+8', function (e) { + that.adjustSaturation(+0.05); + }, 'keydown'); + // multimedia keys // Change when mousetrap can be extended $('body').bind('keydown', function (e) { @@ -1005,6 +1096,26 @@ Mousetrap.unbind('2'); + Mousetrap.unbind('w'); + + Mousetrap.unbind('e'); + + Mousetrap.unbind('shift+1'); + + Mousetrap.unbind('shift+2'); + + Mousetrap.unbind('shift+3'); + + Mousetrap.unbind('shift+4'); + + Mousetrap.unbind('shift+5'); + + Mousetrap.unbind('shift+6'); + + Mousetrap.unbind('shift+7'); + + Mousetrap.unbind('shift+8'); + // multimedia keys // Change when mousetrap can be extended $('body').unbind('keydown'); From 32554c4a3a37bbf646bcf178b36fee7eb69d63b4 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 04:38:47 +0800 Subject: [PATCH 103/203] Disable the hue adjustment for now --- src/app/lib/views/player/player.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 7835fd94aa..4c60227496 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -1,6 +1,11 @@ (function (App) { 'use strict'; + // I found on my Linux that setting both hue-rotate(0) and saturate(anything) was buggy: the entire image turned orange! + // So for now, we disable the hue adjustment. + // If we determine this is a Linux-only issue, we could disable this only for Linux. + const disableHueSlider = true; + var _this; var Player = Marionette.View.extend({ template: '#player-tpl', @@ -792,6 +797,11 @@ }, adjustHue: function (difference) { + if (disableHueSlider) { + this.displayOverlayMsg(i18n.__('Hue') + ': ' + i18n.__('Disabled')); + $('.vjs-overlay').css('opacity', '1'); + return; + } this.filters.hue += difference; this.applyFilters(); this.displayOverlayMsg(i18n.__('Hue') + ': ' + (this.filters.hue.toFixed(0))); @@ -808,7 +818,8 @@ applyFilters: function (difference) { const { brightness, contrast, hue, saturation } = this.filters; var curVideo = $('#video_player_html5_api'); - curVideo[0].style.filter = `brightness(${brightness}) contrast(${contrast}) hue-rotate(${hue}deg) saturate(${saturation})`; + const hueAdjustment = disableHueSlider ? '' : `hue-rotate(${hue}deg)`; + curVideo[0].style.filter = `brightness(${brightness}) contrast(${contrast}) ${hueAdjustment} saturate(${saturation})`; }, bindKeyboardShortcuts: function () { From 277889d799ce8502ec4178886532af3972432daf Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 7 Feb 2022 03:48:26 +0200 Subject: [PATCH 104/203] Small fix for Keybinds to adjust brightness, contrast, saturation, zoom (#2399) --- src/app/language/en.json | 12 ++++++++- src/app/lib/views/player/player.js | 43 +++++++++++++++++------------- src/app/templates/keyboard.tpl | 40 +++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 19 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 9f26a27081..9b0a1b2308 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -583,5 +583,15 @@ "was removed from bookmarks": "was removed from bookmarks", "Bookmark restored": "Bookmark restored", "Undo": "Undo", - "Remaining runtime before start preloading next episode": "Remaining runtime before start preloading next episode" + "Remaining runtime before start preloading next episode": "Remaining runtime before start preloading next episode", + "Decrease Zoom by": "Decrease Zoom by", + "Increase Zoom by": "Increase Zoom by", + "Decrease Contrast by": "Decrease Contrast by", + "Increase Contrast by": "Increase Contrast by", + "Decrease Brightness by": "Decrease Brightness by", + "Increase Brightness by": "Increase Brightness by", + "Rotate Hue counter-clockwise by": "Rotate Hue counter-clockwise by", + "Rotate Hue clockwise by": "Rotate Hue clockwise by", + "Decrease Saturation by": "Decrease Saturation by", + "Increase Saturation by": "Increase Saturation by" } diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 4c60227496..8505800525 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -1,11 +1,6 @@ (function (App) { 'use strict'; - // I found on my Linux that setting both hue-rotate(0) and saturate(anything) was buggy: the entire image turned orange! - // So for now, we disable the hue adjustment. - // If we determine this is a Linux-only issue, we could disable this only for Linux. - const disableHueSlider = true; - var _this; var Player = Marionette.View.extend({ template: '#player-tpl', @@ -777,48 +772,60 @@ adjustZoom: function (difference) { var v = $('video')[0]; this.zoom += difference; + if (this.zoom < 0) { + this.zoom = 0; + } v.style.transform = `scale(${this.zoom})`; - this.displayOverlayMsg(i18n.__('Zoom') + ': ' + (this.zoom.toFixed(2))); + this.displayOverlayMsg(i18n.__('Zoom') + ': ' + (this.zoom * 100).toFixed(0) + '%'); $('.vjs-overlay').css('opacity', '1'); }, adjustBrightness: function (difference) { this.filters.brightness += difference; + if (this.filters.brightness < 0) { + this.filters.brightness = 0; + } this.applyFilters(); - this.displayOverlayMsg(i18n.__('Brightness') + ': ' + this.filters.brightness.toFixed(2)); + this.displayOverlayMsg(i18n.__('Brightness') + ': ' + (this.filters.brightness * 100).toFixed(0) + '%'); $('.vjs-overlay').css('opacity', '1'); }, adjustContrast: function (difference) { this.filters.contrast += difference; + if (this.filters.contrast < 0) { + this.filters.contrast = 0; + } this.applyFilters(); - this.displayOverlayMsg(i18n.__('Contrast') + ': ' + (this.filters.contrast.toFixed(2))); + this.displayOverlayMsg(i18n.__('Contrast') + ': ' + (this.filters.contrast * 100).toFixed(0) + '%'); $('.vjs-overlay').css('opacity', '1'); }, adjustHue: function (difference) { - if (disableHueSlider) { - this.displayOverlayMsg(i18n.__('Hue') + ': ' + i18n.__('Disabled')); - $('.vjs-overlay').css('opacity', '1'); - return; - } this.filters.hue += difference; + if (this.filters.hue < -180) { + this.filters.hue = -180; + } else if (this.filters.hue > 180) { + this.filters.hue = 180; + } this.applyFilters(); - this.displayOverlayMsg(i18n.__('Hue') + ': ' + (this.filters.hue.toFixed(0))); + this.displayOverlayMsg(i18n.__('Hue') + ': ' + this.filters.hue.toFixed(0)); $('.vjs-overlay').css('opacity', '1'); }, adjustSaturation: function (difference) { this.filters.saturation += difference; + if (this.filters.saturation < 0) { + this.filters.saturation = 0; + } this.applyFilters(); - this.displayOverlayMsg(i18n.__('Saturation') + ': ' + (this.filters.saturation.toFixed(2))); + this.displayOverlayMsg(i18n.__('Saturation') + ': ' + (this.filters.saturation * 100).toFixed(0) + '%'); $('.vjs-overlay').css('opacity', '1'); }, applyFilters: function (difference) { const { brightness, contrast, hue, saturation } = this.filters; var curVideo = $('#video_player_html5_api'); - const hueAdjustment = disableHueSlider ? '' : `hue-rotate(${hue}deg)`; + const hueAdjustment = `hue-rotate(${hue}deg)`; curVideo[0].style.filter = `brightness(${brightness}) contrast(${contrast}) ${hueAdjustment} saturate(${saturation})`; }, @@ -1007,11 +1014,11 @@ }, 'keydown'); Mousetrap.bind('shift+5', function (e) { - that.adjustHue(-2); + that.adjustHue(-1); }, 'keydown'); Mousetrap.bind('shift+6', function (e) { - that.adjustHue(+2); + that.adjustHue(+1); }, 'keydown'); Mousetrap.bind('shift+7', function (e) { diff --git a/src/app/templates/keyboard.tpl b/src/app/templates/keyboard.tpl index 87cb7e8005..eda05435b8 100644 --- a/src/app/templates/keyboard.tpl +++ b/src/app/templates/keyboard.tpl @@ -284,6 +284,46 @@ 0 <%= i18n.__("Set player window to half of video resolution") %> + + w + <%= i18n.__("Decrease Zoom by") %> 5% + + + e + <%= i18n.__("Increase Zoom by") %> 5% + + + <%= i18n.__("shift") %>+1 + <%= i18n.__("Decrease Contrast by") %> 5% + + + <%= i18n.__("shift") %>+2 + <%= i18n.__("Increase Contrast by") %> 5% + + + <%= i18n.__("shift") %>+3 + <%= i18n.__("Decrease Brightness by") %> 5% + + + <%= i18n.__("shift") %>+4 + <%= i18n.__("Increase Brightness by") %> 5% + + + <%= i18n.__("shift") %>+5 + <%= i18n.__("Rotate Hue counter-clockwise by") %> 1° + + + <%= i18n.__("shift") %>+6 + <%= i18n.__("Rotate Hue clockwise by") %> 1° + + + <%= i18n.__("shift") %>+7 + <%= i18n.__("Decrease Saturation by") %> 5% + + + <%= i18n.__("shift") %>+8 + <%= i18n.__("Increase Saturation by") %> 5% +
    From 1ba2d9d946489265c98a6c6d1c0d4c14f31d2f5d Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 12:48:06 +0800 Subject: [PATCH 105/203] Only add hue-rotate() filter if needed --- src/app/lib/views/player/player.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 8505800525..7d8405cf2c 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -825,7 +825,9 @@ applyFilters: function (difference) { const { brightness, contrast, hue, saturation } = this.filters; var curVideo = $('#video_player_html5_api'); - const hueAdjustment = `hue-rotate(${hue}deg)`; + // On some devices, the image turns orange if both hue-rotate() and saturate() are used! + // So we only add the hue-rotate() filter if requested by the user. + const hueAdjustment = hue === 0 ? '' : `hue-rotate(${hue}deg)`; curVideo[0].style.filter = `brightness(${brightness}) contrast(${contrast}) ${hueAdjustment} saturate(${saturation})`; }, From 284e2aa41a1cbca67cd8cd0e8608f1ff78c7bccc Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 12:56:49 +0800 Subject: [PATCH 106/203] Only use scale() transform if needed (for performance) --- src/app/lib/views/player/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 7d8405cf2c..04661262fa 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -775,7 +775,7 @@ if (this.zoom < 0) { this.zoom = 0; } - v.style.transform = `scale(${this.zoom})`; + v.style.transform = this.zoom === 1 ? '' : `scale(${this.zoom})`; this.displayOverlayMsg(i18n.__('Zoom') + ': ' + (this.zoom * 100).toFixed(0) + '%'); $('.vjs-overlay').css('opacity', '1'); }, From 0e7de6b3a302076f816685d9abd9786029d0d2c1 Mon Sep 17 00:00:00 2001 From: Paul Joey Clark Date: Mon, 7 Feb 2022 12:55:17 +0800 Subject: [PATCH 107/203] Update en.json --- src/app/language/en.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/language/en.json b/src/app/language/en.json index 9b0a1b2308..a31be784f2 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -584,6 +584,11 @@ "Bookmark restored": "Bookmark restored", "Undo": "Undo", "Remaining runtime before start preloading next episode": "Remaining runtime before start preloading next episode", + "Zoom": "Zoom", + "Contrast": "Contrast", + "Brightness": "Brightness", + "Hue": "Hue", + "Saturation": "Saturation", "Decrease Zoom by": "Decrease Zoom by", "Increase Zoom by": "Increase Zoom by", "Decrease Contrast by": "Decrease Contrast by", From 7d291f3947b6574824e9da6233c1e231e2dba607 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 8 Feb 2022 12:42:13 +0300 Subject: [PATCH 108/203] advanced --- src/app/lib/views/browser/generic_browser.js | 1 - src/app/templates/settings-container.tpl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/browser/generic_browser.js b/src/app/lib/views/browser/generic_browser.js index dea821bab6..f3fc34932d 100644 --- a/src/app/lib/views/browser/generic_browser.js +++ b/src/app/lib/views/browser/generic_browser.js @@ -129,7 +129,6 @@ break; default: } - App.settings.showAdvancedSettings = true; App.vent.trigger('settings:show'); curView ? $(curView).attr('style', 'border: 1px solid !important; animation: fadeBd .5s forwards; margin-left: 9px').focus().focusout(function() { this.removeAttribute('style'); }) : null; }, diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 3f427fb12d..1aba44c103 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -561,7 +561,7 @@ -
    +
    <%= i18n.__("API Server(s)") %>
    From 156d9fe37cd721f50a2c37ec7031d8ae6b846d6a Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Tue, 8 Feb 2022 23:38:18 +0200 Subject: [PATCH 109/203] Small fix/modification concerning automatic updating (#2403) --- src/app/language/en.json | 7 ++++++- src/app/lib/views/disclaimer.js | 2 ++ src/app/lib/views/main_window.js | 2 +- src/app/lib/views/settings_container.js | 7 ++++++- src/app/settings.js | 4 ++-- src/app/templates/disclaimer.tpl | 8 ++++++++ src/app/templates/settings-container.tpl | 16 ++++++++-------- 7 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index a31be784f2..d6fa2197d4 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -598,5 +598,10 @@ "Rotate Hue counter-clockwise by": "Rotate Hue counter-clockwise by", "Rotate Hue clockwise by": "Rotate Hue clockwise by", "Decrease Saturation by": "Decrease Saturation by", - "Increase Saturation by": "Increase Saturation by" + "Increase Saturation by": "Increase Saturation by", + "Automatically update the API Server URLs": "Automatically update the API Server URLs", + "Enable automatically updating the API Server URLs": "Enable automatically updating the API Server URLs", + "Automatically update the app when a new version is available": "Automatically update the app when a new version is available", + "Enable automatically updating the app when a new version is available": "Enable automatically updating the app when a new version is available", + "Check for updates": "Check for updates" } diff --git a/src/app/lib/views/disclaimer.js b/src/app/lib/views/disclaimer.js index 4b8566b3b8..24c8048758 100644 --- a/src/app/lib/views/disclaimer.js +++ b/src/app/lib/views/disclaimer.js @@ -18,6 +18,8 @@ acceptDisclaimer: function (e) { e.preventDefault(); Mousetrap.unpause(); + AdvSettings.set('dhtEnable', document.getElementById('dhtEnableFR').checked ? true : false); + AdvSettings.set('automaticUpdating', document.getElementById('automaticUpdatingFR').checked ? true : false); AdvSettings.set('disclaimerAccepted', 1); App.vent.trigger('disclaimer:close'); }, diff --git a/src/app/lib/views/main_window.js b/src/app/lib/views/main_window.js index fb3c227cc4..bc8549a3a3 100644 --- a/src/app/lib/views/main_window.js +++ b/src/app/lib/views/main_window.js @@ -296,7 +296,7 @@ }); // we check if the disclaimer is accepted - if (!AdvSettings.get('disclaimerAccepted')) { + if (!AdvSettings.get('disclaimerAccepted') || AdvSettings.get('automaticUpdating') === '' || AdvSettings.get('dhtEnable') === '') { that.showDisclaimer(); } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index f1d6d56c76..a0f6e30bb3 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -49,6 +49,7 @@ 'click .set-current-filter': 'saveFilter', 'click .reset-current-filter': 'resetFilter', 'click .update-dht': 'updateDht', + 'click .update-app': 'updateApp' }, onAttach: function () { @@ -656,7 +657,11 @@ }, updateDht: function() { - App.DhtReader.update(); + App.DhtReader.update().catch(function (err) {win.error('dhtReader.update()', err);});; + }, + + updateApp: function() { + App.Updater().update().catch(function (err) {win.error('updater.update()', err);}); }, connectTrakt: function (e) { diff --git a/src/app/settings.js b/src/app/settings.js index 4b5a955df3..6619eb8e62 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -193,11 +193,11 @@ Settings.delSeedboxCache = 'ask'; Settings.continueSeedingOnStart = false; Settings.vpnEnabled = false; Settings.maxActiveTorrents = 5; -Settings.automaticUpdating = true; +Settings.automaticUpdating = ''; Settings.UpdateSeed = false; +Settings.dhtEnable = '' Settings.events = true; Settings.minimizeToTray = false; -Settings.dhtEnable = true; // Features Settings.activateTorrentCollection = true; diff --git a/src/app/templates/disclaimer.tpl b/src/app/templates/disclaimer.tpl index 33eeff6463..a154d0f3e3 100644 --- a/src/app/templates/disclaimer.tpl +++ b/src/app/templates/disclaimer.tpl @@ -29,6 +29,14 @@

    By using '<%= Settings.projectName %>' or accessing this site you affirm that you are either more than 18 years of age, or an emancipated minor, or possess legal parental or guardian consent, and are fully able and competent to enter into the terms, conditions, obligations, affirmations, representations, and warranties set forth in these Terms of Service, and to abide by and comply with these Terms of Service. In any case, you affirm that you are over the age of 13, as the Service is not intended for children under 13. If you are under 13 years of age, then please do not use the Service. There are lots of other great web sites for you. Talk to your parents about what sites are appropriate for you.

    + + > + + + + > + +
    <%= i18n.__("I Accept") %> <%= i18n.__("Leave") %> diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index e040133787..b210625656 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -800,24 +800,24 @@
    <%= i18n.__("Miscellaneous") %>
    - - > - + + > + + "> > - + + "> > - > - - "> + > + -
    From dc459204b0216513e61a805621b7ed966c386062 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 01:31:35 +0200 Subject: [PATCH 110/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 4 ++-- src/app/templates/settings-container.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index a0f6e30bb3..11822492a0 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -299,7 +299,7 @@ case 'protocolEncryption': case 'contentLangOnly': case 'vpnEnabled': - case 'dhtEnabled': + case 'dhtEnable': case 'coversShowRating': case 'torColSearchMore': case 'showSeedboxOnDlInit': @@ -657,7 +657,7 @@ }, updateDht: function() { - App.DhtReader.update().catch(function (err) {win.error('dhtReader.update()', err);});; + App.DhtReader.update(); }, updateApp: function() { diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index b210625656..1e4ed87024 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -801,7 +801,7 @@
    <%= i18n.__("Miscellaneous") %>
    - > + > "> From e4d2c83284279583b25b9d907a0f539eab4b85c8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 02:59:41 +0200 Subject: [PATCH 111/203] Add tab API url tooltip --- src/app/lib/views/browser/filter_bar.js | 7 +++++++ src/app/lib/views/browser/item.js | 7 +++++++ src/app/templates/browser/filter-bar.tpl | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/browser/filter_bar.js b/src/app/lib/views/browser/filter_bar.js index f2e818ef61..ecca31ca4e 100644 --- a/src/app/lib/views/browser/filter_bar.js +++ b/src/app/lib/views/browser/filter_bar.js @@ -224,6 +224,13 @@ } }); + $('.providerinfo').tooltip({ + delay: { + 'show': 2000, + 'hide': 100 + } + }); + if (!this.previousSort) { this.previousSort = $('.sorters .active').data('value') || $('.sorters .value').data('value'); } diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 0562729541..287e41b767 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -48,6 +48,13 @@ 'hide': 100 } }); + + $('.providerinfo').tooltip({ + delay: { + 'show': 2000, + 'hide': 100 + } + }); }, setQualityDisplayed: function() { diff --git a/src/app/templates/browser/filter-bar.tpl b/src/app/templates/browser/filter-bar.tpl index 3b908eef8f..ad73c7101e 100644 --- a/src/app/templates/browser/filter-bar.tpl +++ b/src/app/templates/browser/filter-bar.tpl @@ -1,6 +1,6 @@ From c48c70e7975d8c3f14d46bc0382fee650c2a5607 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 04:52:42 +0200 Subject: [PATCH 112/203] Add tab API url tooltip --- src/app/lib/views/browser/filter_bar.js | 3 ++- src/app/lib/views/browser/item.js | 3 ++- src/app/templates/browser/filter-bar.tpl | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/browser/filter_bar.js b/src/app/lib/views/browser/filter_bar.js index ecca31ca4e..b740b79ad0 100644 --- a/src/app/lib/views/browser/filter_bar.js +++ b/src/app/lib/views/browser/filter_bar.js @@ -228,7 +228,8 @@ delay: { 'show': 2000, 'hide': 100 - } + }, + html: true }); if (!this.previousSort) { diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 287e41b767..262d2b8ddd 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -53,7 +53,8 @@ delay: { 'show': 2000, 'hide': 100 - } + }, + html: true }); }, diff --git a/src/app/templates/browser/filter-bar.tpl b/src/app/templates/browser/filter-bar.tpl index ad73c7101e..1d1956ea16 100644 --- a/src/app/templates/browser/filter-bar.tpl +++ b/src/app/templates/browser/filter-bar.tpl @@ -1,6 +1,12 @@ From 0b48101b71eaa705d77f888544c7854ca5cd9127 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 05:03:21 +0200 Subject: [PATCH 113/203] Add tab API url tooltip --- src/app/lib/views/browser/filter_bar.js | 2 +- src/app/lib/views/browser/item.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/browser/filter_bar.js b/src/app/lib/views/browser/filter_bar.js index b740b79ad0..ed0d9c2609 100644 --- a/src/app/lib/views/browser/filter_bar.js +++ b/src/app/lib/views/browser/filter_bar.js @@ -226,7 +226,7 @@ $('.providerinfo').tooltip({ delay: { - 'show': 2000, + 'show': 2400, 'hide': 100 }, html: true diff --git a/src/app/lib/views/browser/item.js b/src/app/lib/views/browser/item.js index 262d2b8ddd..746940c030 100644 --- a/src/app/lib/views/browser/item.js +++ b/src/app/lib/views/browser/item.js @@ -51,7 +51,7 @@ $('.providerinfo').tooltip({ delay: { - 'show': 2000, + 'show': 2400, 'hide': 100 }, html: true From 8f7325dfc1eb8f4b3a229841ec611a989151f789 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 06:17:20 +0200 Subject: [PATCH 114/203] Update disclaimer.js --- src/app/lib/views/disclaimer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/lib/views/disclaimer.js b/src/app/lib/views/disclaimer.js index 24c8048758..6e0fa2bd2f 100644 --- a/src/app/lib/views/disclaimer.js +++ b/src/app/lib/views/disclaimer.js @@ -21,6 +21,9 @@ AdvSettings.set('dhtEnable', document.getElementById('dhtEnableFR').checked ? true : false); AdvSettings.set('automaticUpdating', document.getElementById('automaticUpdatingFR').checked ? true : false); AdvSettings.set('disclaimerAccepted', 1); + if (document.getElementById('dhtEnableFR').checked) { + App.DhtReader.update(); + } App.vent.trigger('disclaimer:close'); }, From 5e1fa229130e9cc4227fe9795c57febeb6051674 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 06:28:04 +0200 Subject: [PATCH 115/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 11822492a0..60e0d2c911 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -612,6 +612,11 @@ $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; + case 'dhtEnable': + if (Settings.dhtEnable) { + this.updateDht(); + } + break; default: } if (that.$el.scrollTop() !== scrollPos) { From 13161eb6adc1e2bbb7b0dd7c941ddf552a71a767 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 07:10:12 +0200 Subject: [PATCH 116/203] Update settings_container.js --- src/app/dht.js | 4 ++-- src/app/lib/views/settings_container.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 35ed270629..fc06dbcac1 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -10,7 +10,7 @@ class DhtReader }); } - update() + update(e) { if (!Settings.dht) { return; @@ -30,7 +30,7 @@ class DhtReader } let newData = node.v.toString(); let data = AdvSettings.get('dhtData'); - if (data !== newData) { + if (e === 'enable' || data !== newData) { self.alertMessageSuccess(true, i18n.__('Сonfig updated successfully')); } AdvSettings.set('dhtData', newData); diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 60e0d2c911..010ae3e974 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -614,7 +614,7 @@ break; case 'dhtEnable': if (Settings.dhtEnable) { - this.updateDht(); + App.DhtReader.update('enable'); } break; default: From 02171db95d7a7805802567563a60ef1c307ea0fe Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 07:23:24 +0200 Subject: [PATCH 117/203] 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 010ae3e974..4dae092251 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -615,6 +615,8 @@ case 'dhtEnable': if (Settings.dhtEnable) { App.DhtReader.update('enable'); + } else { + this.alertMessageSuccess(true); } break; default: From 024e8ae6244b7b98d065067c55a01186e939e205 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 07:43:14 +0200 Subject: [PATCH 118/203] Update settings_container.js --- src/app/dht.js | 1 + src/app/lib/views/settings_container.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/app/dht.js b/src/app/dht.js index fc06dbcac1..363c4eba68 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -30,6 +30,7 @@ class DhtReader } let newData = node.v.toString(); let data = AdvSettings.get('dhtData'); + App.vent.trigger('notification:close'); if (e === 'enable' || data !== newData) { self.alertMessageSuccess(true, i18n.__('Сonfig updated successfully')); } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 4dae092251..a9b501255f 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -615,6 +615,7 @@ case 'dhtEnable': if (Settings.dhtEnable) { App.DhtReader.update('enable'); + this.alertMessageWait(i18n.__('Updating config..')); } else { this.alertMessageSuccess(true); } @@ -665,6 +666,7 @@ updateDht: function() { App.DhtReader.update(); + this.alertMessageWait(i18n.__('Updating config..')); }, updateApp: function() { From 397732310f0e932be9bcf6492c1e72ae73d43d63 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 07:54:20 +0200 Subject: [PATCH 119/203] Update disclaimer.js --- src/app/lib/views/disclaimer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/lib/views/disclaimer.js b/src/app/lib/views/disclaimer.js index 6e0fa2bd2f..dbe524d92f 100644 --- a/src/app/lib/views/disclaimer.js +++ b/src/app/lib/views/disclaimer.js @@ -23,6 +23,11 @@ AdvSettings.set('disclaimerAccepted', 1); if (document.getElementById('dhtEnableFR').checked) { App.DhtReader.update(); + App.vent.trigger('notification:show', new App.Model.Notification({ + title: i18n.__('Please wait') + '...', + body: i18n.__('Updating config..') + '.', + type: 'danger' + })); } App.vent.trigger('disclaimer:close'); }, From e3bd7993d39e8d9fc666513caa9799bda2ca99f0 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 9 Feb 2022 08:27:16 +0200 Subject: [PATCH 120/203] Update filter-bar.tpl --- src/app/templates/browser/filter-bar.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/templates/browser/filter-bar.tpl b/src/app/templates/browser/filter-bar.tpl index 1d1956ea16..0589dd71ce 100644 --- a/src/app/templates/browser/filter-bar.tpl +++ b/src/app/templates/browser/filter-bar.tpl @@ -1,6 +1,6 @@
    - + > - + >
    From e0938503879ba3db85eb650f64f5454d5bd34dd1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 10 Feb 2022 08:59:18 +0200 Subject: [PATCH 130/203] Update list.js --- src/app/lib/views/browser/list.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/lib/views/browser/list.js b/src/app/lib/views/browser/list.js index 2fe42bdfce..bdcfae86e9 100644 --- a/src/app/lib/views/browser/list.js +++ b/src/app/lib/views/browser/list.js @@ -351,6 +351,20 @@ self.$('.items:first').focus(); }); + $('.tooltipped').tooltip({ + delay: { + 'show': 800, + 'hide': 100 + } + }); + + $('.providerinfo').tooltip({ + delay: { + 'show': 2400, + 'hide': 100 + }, + html: true + }); }, checkFetchMore: function () { From 6fccb318903740e3e90109a1608c3a2160cb5f93 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 10 Feb 2022 10:35:09 +0200 Subject: [PATCH 131/203] Notification fix when user initiated API server update --- src/app/dht.js | 3 +++ src/app/lib/views/settings_container.js | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index bd073e8ce0..f8122fc85f 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -33,6 +33,8 @@ class DhtReader App.vent.trigger('notification:close'); if (e === 'enable' || data !== newData) { self.alertMessageSuccess(true); + } else if (e === 'manual') { + self.alertMessageSuccess(); } AdvSettings.set('dhtData', newData); AdvSettings.set('dhtDataUpdated', Date.now()); @@ -74,6 +76,7 @@ class DhtReader notificationModel.set('body', i18n.__('Please restart your application')); } else { notificationModel.attributes.autoclose = 4000; + notificationModel.set('body', i18n.__('API Server URLs already updated')); } // Open the notification diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index ad4f209cf4..7c1b29e165 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -614,8 +614,7 @@ break; case 'dhtEnable': if (Settings.dhtEnable) { - App.DhtReader.update('enable'); - this.alertMessageWait(i18n.__('Updating the API Server URLs')); + this.updateDht('enable'); } else { this.alertMessageSuccess(true); } @@ -664,8 +663,14 @@ } }, - updateDht: function() { - App.DhtReader.update(); + updateDht: function(e) { + let updateMode = ''; + if (e === 'enable') { + updateMode = e; + } else if (e) { + updateMode = 'manual'; + } + App.DhtReader.update(updateMode); this.alertMessageWait(i18n.__('Updating the API Server URLs')); }, From fa676f8860e8927195c4d3554579ee49c3865492 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 10 Feb 2022 10:46:28 +0200 Subject: [PATCH 132/203] Update notification.styl --- src/app/dht.js | 2 +- src/app/lib/views/disclaimer.js | 2 +- src/app/lib/views/settings_container.js | 2 +- src/app/styl/views/notification.styl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index f8122fc85f..9a183e90fb 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -54,7 +54,7 @@ class DhtReader if (!data) { App.vent.trigger('notification:show', new App.Model.Notification({ title: i18n.__('Please wait') + '...', - body: i18n.__('Updating the API Server URLs') + '.', + body: i18n.__('Updating the API Server URLs'), type: 'danger', autoclose: 4000 })); diff --git a/src/app/lib/views/disclaimer.js b/src/app/lib/views/disclaimer.js index aabb20eb7c..b8025eb8f4 100644 --- a/src/app/lib/views/disclaimer.js +++ b/src/app/lib/views/disclaimer.js @@ -25,7 +25,7 @@ App.DhtReader.update(); App.vent.trigger('notification:show', new App.Model.Notification({ title: i18n.__('Please wait') + '...', - body: i18n.__('Updating the API Server URLs') + '.', + body: i18n.__('Updating the API Server URLs'), type: 'danger' })); } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 7c1b29e165..ecc42db9a6 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -1001,7 +1001,7 @@ alertMessageWait: function (waitDesc) { App.vent.trigger('notification:show', new App.Model.Notification({ title: i18n.__('Please wait') + '...', - body: waitDesc + '.', + body: waitDesc, type: 'danger' })); }, diff --git a/src/app/styl/views/notification.styl b/src/app/styl/views/notification.styl index 2e5f4c3296..dfb5c89412 100644 --- a/src/app/styl/views/notification.styl +++ b/src/app/styl/views/notification.styl @@ -42,7 +42,7 @@ .close position absolute top 5px - right 5px + right 7px opacity 0.7 color white &:hover From d75526d7b586d8c2dd613e2572dfc96d7523ac26 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 10 Feb 2022 12:11:28 +0200 Subject: [PATCH 133/203] 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 444ea6104a..9b4f39d428 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -604,5 +604,6 @@ "Automatically update the app when a new version is available": "Automatically update the app when a new version is available", "Enable automatically updating the app when a new version is available": "Enable automatically updating the app when a new version is available", "Check for updates": "Check for updates", - "Updating the API Server URLs": "Updating the API Server URLs" + "Updating the API Server URLs": "Updating the API Server URLs", + "API Server URLs already updated": "API Server URLs already updated" } From 7c74ff83ae4c394014ce2549afdb5b87963ea687 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 10 Feb 2022 19:20:30 +0200 Subject: [PATCH 134/203] Show all API Servers in the Settings --- src/app/lib/views/settings_container.js | 17 +++++++++- src/app/templates/settings-container.tpl | 42 ++++++++++++++---------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index ecc42db9a6..d4bbcbc140 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -49,7 +49,10 @@ 'click .set-current-filter': 'saveFilter', 'click .reset-current-filter': 'resetFilter', 'click .update-dht': 'updateDht', - 'click .update-app': 'updateApp' + 'click .update-app': 'updateApp', + 'mousedown #customMoviesServer': 'showFullDatalist', + 'mousedown #customSeriesServer': 'showFullDatalist', + 'mousedown #customAnimeServer': 'showFullDatalist' }, onAttach: function () { @@ -749,6 +752,18 @@ setTimeout(self.render, 200); }, + showFullDatalist: function(e) { + if(!e.detail || e.detail == 1){ + var tmpDlist = $(e.target).val(); + $(e.target).val(''); + $(e.target).one('blur', function() { + if (!$(e.target).val()) { + $(e.target).val(tmpDlist); + } + }); + } + }, + rebuildBookmarks: function (e) { var btn = $(e.currentTarget); diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 526374ce20..8f80a2cd35 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -572,14 +572,16 @@
    -

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

    - +

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

    + -
    @@ -586,6 +586,7 @@ + "> @@ -604,6 +605,7 @@ + "> @@ -622,6 +624,7 @@ + "> @@ -809,12 +812,10 @@ > - "> > - "> > From f83c1e96f18d0f4770e5b622896fb727ed8d7ec7 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 11 Feb 2022 04:06:06 +0200 Subject: [PATCH 142/203] Update settings_container.styl --- src/app/styl/views/settings_container.styl | 3 +++ src/app/templates/settings-container.tpl | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index 073c609d9a..e4029a170c 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -285,6 +285,9 @@ position relative top 2px + #apiserver + input + text-overflow ellipsis #connection #overallRatio diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 9f8fbd0740..e4d7e32ad7 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -573,7 +573,7 @@

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

    -

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

    -

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

    - Date: Fri, 11 Feb 2022 04:42:50 +0200 Subject: [PATCH 143/203] Update settings-container.tpl --- src/app/templates/settings-container.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index e4d7e32ad7..80484396d5 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -573,7 +573,7 @@

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

    -

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

    -

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

    -

    <%= i18n.__("Cache Directory") %>

    - " id="faketmpLocation" value="<%= Settings.tmpLocation %>" readonly="readonly" size="65" /> + " id="faketmpLocation" value="<%= Settings.tmpLocation %>" readonly="readonly" size="61" /> ">
    @@ -747,7 +747,7 @@ <% if (Settings.activateSeedbox && Settings.separateDownloadsDir) { %>

    <%= i18n.__("Downloads Directory") %>

    - " id="fakedownloadsLocation" value="<%= Settings.downloadsLocation %>" readonly="readonly" size="65" /> + " id="fakedownloadsLocation" value="<%= Settings.downloadsLocation %>" readonly="readonly" size="61" /> ">
    @@ -760,7 +760,7 @@

    <%= i18n.__("Database Directory") %>

    - " id="fakedatabaseLocation" value="<%= Settings.databaseLocation %>" readonly="readonly" size="65" /> + " id="fakedatabaseLocation" value="<%= Settings.databaseLocation %>" readonly="readonly" size="61" /> ">
    From cce0f2e55846b87049b7981f1d554ec3da209365 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 11 Feb 2022 21:58:57 +0200 Subject: [PATCH 144/203] Add valid-tick/invalid-cross for the API Server fields update --- src/app/dht.js | 25 ++++++++--------- src/app/styl/views/settings_container.styl | 32 ++++++++++++++++++++++ src/app/templates/settings-container.tpl | 9 ------ 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 8219c0aed2..3870f84a29 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -3,17 +3,16 @@ var DHT = require('bittorrent-dht'); var ed = require('noble-ed25519'); // better use ed25519-supercop but need rebuild ed25519 for windows -class DhtReader -{ +class DhtReader { constructor(options) { this.options = _.defaults(options || {}, { }); } - update(e) - { + update(e) { if (!Settings.dht) { - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('fa-redo'); + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 4000); App.vent.trigger('notification:close'); return; } @@ -22,18 +21,17 @@ class DhtReader const self=this; dht.once('ready', function () { dht.get(hash, function (err, node) { - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('fa-redo'); App.vent.trigger('notification:close'); - if (err) { - console.error(err); - return; - } - if (!node || !node.v) { - console.error('DHT hash not found'); + if (err || !node || !node.v) { + err ? console.error(err) : console.error('DHT hash not found'); + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 4000); return; } let newData = node.v.toString(); let data = AdvSettings.get('dhtData'); + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); + setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 4000); if (data !== newData && (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { self.alertMessageApply(); } else if (data !== newData || e === 'enable') { @@ -47,8 +45,7 @@ class DhtReader }); } - updateOld() - { + updateOld() { if (!Settings.dht) { return; } diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index e4029a170c..c1edd8242e 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -289,6 +289,38 @@ input text-overflow ellipsis + .valid-tick + width 20px + height 20px + display inline-flex + line-height 12px + + &:before + content "\2714" + font-family Arial + font-size 17px + font-weight bold + text-shadow 0 0 10px #4EEE30 + color #4EEE30 + position relative + top 1px + + .invalid-cross + width 20px + height 20px + display inline-flex + margin-left -27px + line-height 12px + vertical-align top + + &:before + content "\2573" + font-family Arial + font-size 12px + font-weight bolder + text-shadow 0 0 10px #EE3030 + color #EE3030 + #connection #overallRatio pointer-events: none diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 80484396d5..519d671233 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -583,9 +583,6 @@
    @@ -602,9 +599,6 @@
    @@ -621,9 +615,6 @@
    From 7199984e79cf10a2037acc31140f0df116c62c0e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:05:16 +0200 Subject: [PATCH 145/203] Update dht.js --- src/app/dht.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dht.js b/src/app/dht.js index 3870f84a29..dc5f8c41aa 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -23,7 +23,7 @@ class DhtReader { dht.get(hash, function (err, node) { App.vent.trigger('notification:close'); if (err || !node || !node.v) { - err ? console.error(err) : console.error('DHT hash not found'); + console.error(err || 'DHT hash not found'); $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 4000); return; From 4ed115d19dbf5cc387c94695b133ab10dc2276c5 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 12 Feb 2022 03:20:48 +0300 Subject: [PATCH 146/203] remove very old config option --- src/app/lib/views/settings_container.js | 39 ------------------------ src/app/templates/settings-container.tpl | 9 ------ 2 files changed, 48 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 658a38b3d3..dca148c38a 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -41,7 +41,6 @@ 'click #unauthTrakt': 'disconnectTrakt', 'click #authOpensubtitles': 'connectOpensubtitles', 'click #unauthOpensubtitles': 'disconnectOpensubtitles', - 'click .reset-tvshow': 'resettvshow', 'change #tmpLocation': 'updateCacheDirectory', 'change #downloadsLocation': 'updateDownloadsDirectory', 'click #syncTrakt': 'syncTrakt', @@ -153,26 +152,6 @@ App.vent.trigger('settings:close'); }, - resettvshow: function () { - var value = [{ - url: 'https:///', - strictSSL: true - }, { - url: 'https:///', - strictSSL: true - }]; - App.settings['tvshow'] = value; - //save to db - App.db.writeSetting({ - key: 'tvshow', - value: value - }).then(function () { - that.ui.success_alert.show().delay(3000).fadeOut(400); - }); - - that.syncSetting('tvshow', value); - }, - generateQRcode: function () { var qrcodecanvus = document.getElementById('qrcode'), QRCodeInfo = { @@ -247,19 +226,6 @@ apiDataChanged = true; value = parseInt(field.val()); break; - case 'tvshow': - value = field.val(); - if (value.substr(-1) !== '/') { - value += '/'; - } - if (value.substr(0, 8) !== 'https://' && value.substr(0, 7) !== 'http://') { - value = 'http://' + value; - } - value = [{ - url: value, - strictSSL: value.substr(0, 8) === 'https://' - }]; - break; case 'subtitle_size': case 'tv_detail_jump_to': case 'subtitle_language': @@ -609,11 +575,6 @@ $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); break; - case 'tvshow': - App.Providers.delete('tvshow'); - $('.nav-hor.left li:first').click(); - App.vent.trigger('settings:show'); - break; case 'dhtEnable': if (Settings.dhtEnable) { this.updateDht('enable'); diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index 519d671233..f864fb0a17 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -624,15 +624,6 @@
    <%= i18n.__("Connection") %>
    - <% if (Settings.tvshow) { %> - -

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

    - - <% if (Settings.tvshow.length <= 1) { %> -    - <% } %> -
    - <% } %> <% if (Settings.activateSeedbox) { %>

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

    From 2ab3358a5013da88be4455132d0197f163e3d645 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 02:23:35 +0200 Subject: [PATCH 147/203] Add error notification for the API Server fields update --- src/app/dht.js | 33 ++++++++++++++++--------- src/app/language/en.json | 3 ++- src/app/lib/views/settings_container.js | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index dc5f8c41aa..efd33af654 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -5,15 +5,17 @@ var ed = require('noble-ed25519'); // better use ed25519-supercop but need rebui class DhtReader { constructor(options) { - this.options = _.defaults(options || {}, { - }); + this.options = _.defaults(options || {}, {}); } update(e) { if (!Settings.dht) { $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 4000); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); App.vent.trigger('notification:close'); + if (e) { + self.alertMessageError(); + } return; } const dht = new DHT({verify: ed.verify}); @@ -25,13 +27,16 @@ class DhtReader { if (err || !node || !node.v) { console.error(err || 'DHT hash not found'); $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 4000); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); + if (e) { + self.alertMessageError(); + } return; } let newData = node.v.toString(); let data = AdvSettings.get('dhtData'); $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); - setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 4000); + setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 6000); if (data !== newData && (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { self.alertMessageApply(); } else if (data !== newData || e === 'enable') { @@ -57,7 +62,7 @@ class DhtReader { title: i18n.__('Please wait') + '...', body: i18n.__('Updating the API Server URLs'), type: 'danger', - autoclose: 4000 + autoclose: true })); } if (!data || (Date.now() - last > time)) { @@ -71,16 +76,13 @@ class DhtReader { body: successDesc, type: 'success', }); - if (btnRestart) { notificationModel.set('showRestart', true); notificationModel.set('body', i18n.__('Please restart your application')); } else { - notificationModel.attributes.autoclose = 4000; + notificationModel.attributes.autoclose = true; notificationModel.set('body', i18n.__('API Server URLs already updated')); } - - // Open the notification App.vent.trigger('notification:show', notificationModel); } @@ -102,8 +104,17 @@ class DhtReader { showRestart: false, buttons: [{ title: '', action: changeapis }, { title: '', action: dontchangeapis }] }); + App.vent.trigger('notification:show', notificationModel); + } - // Open the notification + alertMessageError() { + var notificationModel = new App.Model.Notification({ + title: i18n.__('Error'), + body: i18n.__('API Server URLs could not be updated'), + showRestart: false, + type: 'error', + autoclose: true + }); App.vent.trigger('notification:show', notificationModel); } } diff --git a/src/app/language/en.json b/src/app/language/en.json index c4a2911ef4..34696d95f7 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -606,5 +606,6 @@ "Check for updates": "Check for updates", "Updating the API Server URLs": "Updating the API Server URLs", "API Server URLs already updated": "API Server URLs already updated", - "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?" + "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?", + "API Server URLs could not be updated": "API Server URLs could not be updated" } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 658a38b3d3..046bfcf983 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -1028,7 +1028,7 @@ notificationModel.set('showRestart', true); notificationModel.set('body', i18n.__('Please restart your application')); } else { - notificationModel.attributes.autoclose = 4000; + notificationModel.attributes.autoclose = true; } // Open the notification From 7e088615472eb32fcb81ffe863d005a7fd3592f8 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 02:39:11 +0200 Subject: [PATCH 148/203] Update dht.js --- src/app/dht.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dht.js b/src/app/dht.js index efd33af654..5760892fc7 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -9,6 +9,7 @@ class DhtReader { } update(e) { + const self = this; if (!Settings.dht) { $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); @@ -20,7 +21,6 @@ class DhtReader { } const dht = new DHT({verify: ed.verify}); const hash = Buffer(Settings.dht, 'hex'); - const self=this; dht.once('ready', function () { dht.get(hash, function (err, node) { App.vent.trigger('notification:close'); From d37ffd59d1e138c7686accaf7e52e8c285692c88 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 12 Feb 2022 04:35:53 +0300 Subject: [PATCH 149/203] when disable updating app not run updater --- src/app/database.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/database.js b/src/app/database.js index f7c54d45ac..9579dfd3cb 100644 --- a/src/app/database.js +++ b/src/app/database.js @@ -419,6 +419,10 @@ var Database = { .then(function () { App.Trakt = App.Config.getProviderForType('metadata'); + if (Settings.automaticUpdating === false) { + return; + } + // check update var updater = new App.Updater(); From 27f92efcd1288b48cf9c76497b02bc671fd29dd2 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 04:31:33 +0200 Subject: [PATCH 150/203] Update dht.js --- src/app/dht.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 5760892fc7..532e98d104 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -58,14 +58,9 @@ class DhtReader { let last = AdvSettings.get('dhtDataUpdated'); const time = 1000 * 60 * 60 * 24 * 7; if (!data) { - App.vent.trigger('notification:show', new App.Model.Notification({ - title: i18n.__('Please wait') + '...', - body: i18n.__('Updating the API Server URLs'), - type: 'danger', - autoclose: true - })); - } - if (!data || (Date.now() - last > time)) { + this.alertMessageWait(); + this.update('enable'); + } else if (Date.now() - last > time) { this.update(); } } @@ -101,17 +96,24 @@ class DhtReader { title: i18n.__('Success'), body: i18n.__('Change API Server(s) to the new URLs?'), type: 'success', - showRestart: false, buttons: [{ title: '', action: changeapis }, { title: '', action: dontchangeapis }] }); App.vent.trigger('notification:show', notificationModel); } + alertMessageWait() { + var notificationModel = new App.Model.Notification({ + title: i18n.__('Please wait') + '...', + body: i18n.__('Updating the API Server URLs'), + type: 'danger' + }); + App.vent.trigger('notification:show', notificationModel); + } + alertMessageError() { var notificationModel = new App.Model.Notification({ title: i18n.__('Error'), body: i18n.__('API Server URLs could not be updated'), - showRestart: false, type: 'error', autoclose: true }); From db5f732017e6dc961668c5f3de5a21eb98ef81d2 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 05:35:59 +0200 Subject: [PATCH 151/203] Update dht.js --- src/app/dht.js | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 532e98d104..f682ab8f4d 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -38,7 +38,7 @@ class DhtReader { $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 6000); if (data !== newData && (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { - self.alertMessageApply(); + self.alertMessageSuccess('apply'); } else if (data !== newData || e === 'enable') { self.alertMessageSuccess(true); } else if (e === 'manual') { @@ -66,27 +66,12 @@ class DhtReader { } alertMessageSuccess(btnRestart, btn, btnText, successDesc) { - var notificationModel = new App.Model.Notification({ - title: i18n.__('Success'), - body: successDesc, - type: 'success', - }); - if (btnRestart) { - notificationModel.set('showRestart', true); - notificationModel.set('body', i18n.__('Please restart your application')); - } else { - notificationModel.attributes.autoclose = true; - notificationModel.set('body', i18n.__('API Server URLs already updated')); - } - App.vent.trigger('notification:show', notificationModel); - } - - alertMessageApply() { var self = this; var changeapis = function () { - AdvSettings.set('customMoviesServer', ''); - AdvSettings.set('customSeriesServer', ''); - AdvSettings.set('customAnimeServer', ''); + let newServer = AdvSettings.get('dhtData') && !AdvSettings.get('dhtEnable') ? AdvSettings.get('dhtData').split('server":"')[1].split('","git":"')[0] : ''; + AdvSettings.set('customMoviesServer', newServer); + AdvSettings.set('customSeriesServer', newServer); + AdvSettings.set('customAnimeServer', newServer); self.alertMessageSuccess(true); }; var dontchangeapis = function () { @@ -94,10 +79,19 @@ class DhtReader { }; var notificationModel = new App.Model.Notification({ title: i18n.__('Success'), - body: i18n.__('Change API Server(s) to the new URLs?'), + body: successDesc, type: 'success', - buttons: [{ title: '', action: changeapis }, { title: '', action: dontchangeapis }] }); + if (btnRestart === 'apply') { + notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); + notificationModel.set('buttons', [{ title: '', action: changeapis }, { title: '', action: dontchangeapis }]); + } else if (btnRestart) { + notificationModel.set('showRestart', true); + notificationModel.set('body', i18n.__('Please restart your application')); + } else { + notificationModel.attributes.autoclose = true; + notificationModel.set('body', i18n.__('API Server URLs already updated')); + } App.vent.trigger('notification:show', notificationModel); } From 20f3099358905eea16efce64b7902e16fbccb9bd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 05:52:07 +0200 Subject: [PATCH 152/203] Update dht.js --- src/app/dht.js | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index f682ab8f4d..517bafb1e2 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -65,16 +65,35 @@ class DhtReader { } } + alertMessageWait() { + var notificationModel = new App.Model.Notification({ + title: i18n.__('Please wait') + '...', + body: i18n.__('Updating the API Server URLs'), + type: 'danger' + }); + App.vent.trigger('notification:show', notificationModel); + } + + alertMessageError() { + var notificationModel = new App.Model.Notification({ + title: i18n.__('Error'), + body: i18n.__('API Server URLs could not be updated'), + type: 'error', + autoclose: true + }); + App.vent.trigger('notification:show', notificationModel); + } + alertMessageSuccess(btnRestart, btn, btnText, successDesc) { var self = this; - var changeapis = function () { + var change = function () { let newServer = AdvSettings.get('dhtData') && !AdvSettings.get('dhtEnable') ? AdvSettings.get('dhtData').split('server":"')[1].split('","git":"')[0] : ''; AdvSettings.set('customMoviesServer', newServer); AdvSettings.set('customSeriesServer', newServer); AdvSettings.set('customAnimeServer', newServer); self.alertMessageSuccess(true); }; - var dontchangeapis = function () { + var dontchange = function () { self.alertMessageSuccess(true); }; var notificationModel = new App.Model.Notification({ @@ -84,7 +103,7 @@ class DhtReader { }); if (btnRestart === 'apply') { notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); - notificationModel.set('buttons', [{ title: '', action: changeapis }, { title: '', action: dontchangeapis }]); + notificationModel.set('buttons', [{ title: '', action: change }, { title: '', action: dontchange }]); } else if (btnRestart) { notificationModel.set('showRestart', true); notificationModel.set('body', i18n.__('Please restart your application')); @@ -94,25 +113,6 @@ class DhtReader { } App.vent.trigger('notification:show', notificationModel); } - - alertMessageWait() { - var notificationModel = new App.Model.Notification({ - title: i18n.__('Please wait') + '...', - body: i18n.__('Updating the API Server URLs'), - type: 'danger' - }); - App.vent.trigger('notification:show', notificationModel); - } - - alertMessageError() { - var notificationModel = new App.Model.Notification({ - title: i18n.__('Error'), - body: i18n.__('API Server URLs could not be updated'), - type: 'error', - autoclose: true - }); - App.vent.trigger('notification:show', notificationModel); - } } App.DhtReader = new DhtReader(); From 8ef9eed8e34a3cfe2d8e2f2409fa8ef5cfb6bcad Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 08:28:12 +0200 Subject: [PATCH 153/203] Update dht.js --- src/app/dht.js | 73 ++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 517bafb1e2..932b6d3398 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -15,7 +15,7 @@ class DhtReader { setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); App.vent.trigger('notification:close'); if (e) { - self.alertMessageError(); + self.alertMessage('error'); } return; } @@ -29,7 +29,7 @@ class DhtReader { $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); if (e) { - self.alertMessageError(); + self.alertMessage('error'); } return; } @@ -38,11 +38,11 @@ class DhtReader { $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 6000); if (data !== newData && (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { - self.alertMessageSuccess('apply'); + self.alertMessage('change'); } else if (data !== newData || e === 'enable') { - self.alertMessageSuccess(true); + self.alertMessage('restart'); } else if (e === 'manual') { - self.alertMessageSuccess(); + self.alertMessage(); } AdvSettings.set('dhtData', newData); AdvSettings.set('dhtDataUpdated', Date.now()); @@ -58,58 +58,49 @@ class DhtReader { let last = AdvSettings.get('dhtDataUpdated'); const time = 1000 * 60 * 60 * 24 * 7; if (!data) { - this.alertMessageWait(); + this.alertMessage('wait'); this.update('enable'); } else if (Date.now() - last > time) { this.update(); } } - alertMessageWait() { - var notificationModel = new App.Model.Notification({ - title: i18n.__('Please wait') + '...', - body: i18n.__('Updating the API Server URLs'), - type: 'danger' - }); - App.vent.trigger('notification:show', notificationModel); - } - - alertMessageError() { - var notificationModel = new App.Model.Notification({ - title: i18n.__('Error'), - body: i18n.__('API Server URLs could not be updated'), - type: 'error', - autoclose: true - }); - App.vent.trigger('notification:show', notificationModel); - } - - alertMessageSuccess(btnRestart, btn, btnText, successDesc) { + alertMessage(alertType) { var self = this; - var change = function () { + var changeServer = function () { let newServer = AdvSettings.get('dhtData') && !AdvSettings.get('dhtEnable') ? AdvSettings.get('dhtData').split('server":"')[1].split('","git":"')[0] : ''; AdvSettings.set('customMoviesServer', newServer); AdvSettings.set('customSeriesServer', newServer); AdvSettings.set('customAnimeServer', newServer); - self.alertMessageSuccess(true); - }; - var dontchange = function () { - self.alertMessageSuccess(true); + self.alertMessage('restart'); }; var notificationModel = new App.Model.Notification({ title: i18n.__('Success'), - body: successDesc, type: 'success', }); - if (btnRestart === 'apply') { - notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); - notificationModel.set('buttons', [{ title: '', action: change }, { title: '', action: dontchange }]); - } else if (btnRestart) { - notificationModel.set('showRestart', true); - notificationModel.set('body', i18n.__('Please restart your application')); - } else { - notificationModel.attributes.autoclose = true; - notificationModel.set('body', i18n.__('API Server URLs already updated')); + switch (alertType) { + case 'wait': + notificationModel.set('title', i18n.__('Please wait') + '...'); + notificationModel.set('body', i18n.__('Updating the API Server URLs')); + notificationModel.set('type', 'danger'); + notificationModel.set('autoclose', true); + break; + case 'error': + notificationModel.set('title', i18n.__('Error')); + notificationModel.set('body', i18n.__('API Server URLs could not be updated')); + notificationModel.set('type', 'error'); + break; + case 'change': + notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); + notificationModel.set('buttons', [{ title: '', action: changeServer }, { title: '', action: function () {self.alertMessage('restart');}}]); + break; + case 'restart': + notificationModel.set('body', i18n.__('Please restart your application')); + notificationModel.set('showRestart', true); + break; + default: + notificationModel.set('body', i18n.__('API Server URLs already updated')); + notificationModel.set('autoclose', true); } App.vent.trigger('notification:show', notificationModel); } From a6b65097e8bb2541908c939984d3c74215425b15 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 08:46:36 +0200 Subject: [PATCH 154/203] Update dht.js --- src/app/dht.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 932b6d3398..613d1aa301 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -66,14 +66,13 @@ class DhtReader { } alertMessage(alertType) { - var self = this; var changeServer = function () { let newServer = AdvSettings.get('dhtData') && !AdvSettings.get('dhtEnable') ? AdvSettings.get('dhtData').split('server":"')[1].split('","git":"')[0] : ''; AdvSettings.set('customMoviesServer', newServer); AdvSettings.set('customSeriesServer', newServer); AdvSettings.set('customAnimeServer', newServer); - self.alertMessage('restart'); - }; + this.alertMessage('restart'); + }.bind(this); var notificationModel = new App.Model.Notification({ title: i18n.__('Success'), type: 'success', @@ -92,7 +91,7 @@ class DhtReader { break; case 'change': notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); - notificationModel.set('buttons', [{ title: '', action: changeServer }, { title: '', action: function () {self.alertMessage('restart');}}]); + notificationModel.set('buttons', [{ title: '', action: changeServer }, { title: '', action: function () {this.alertMessage('restart');}.bind(this)}]); break; case 'restart': notificationModel.set('body', i18n.__('Please restart your application')); From 10463314aa711ab5e6726ab29c0f11144d3c2936 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 08:58:32 +0200 Subject: [PATCH 155/203] Update dht.js --- src/app/dht.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dht.js b/src/app/dht.js index 613d1aa301..37d73db2cf 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -82,12 +82,12 @@ class DhtReader { notificationModel.set('title', i18n.__('Please wait') + '...'); notificationModel.set('body', i18n.__('Updating the API Server URLs')); notificationModel.set('type', 'danger'); - notificationModel.set('autoclose', true); break; case 'error': notificationModel.set('title', i18n.__('Error')); notificationModel.set('body', i18n.__('API Server URLs could not be updated')); notificationModel.set('type', 'error'); + notificationModel.set('autoclose', true); break; case 'change': notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); From d612031248a521f3ddfc3a7abbe36c5d7058dd8f Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:15:42 +0200 Subject: [PATCH 156/203] Update dht.js --- src/app/dht.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 37d73db2cf..78ca558ac5 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -11,10 +11,10 @@ class DhtReader { update(e) { const self = this; if (!Settings.dht) { - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); App.vent.trigger('notification:close'); if (e) { + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); self.alertMessage('error'); } return; @@ -25,10 +25,9 @@ class DhtReader { dht.get(hash, function (err, node) { App.vent.trigger('notification:close'); if (err || !node || !node.v) { - console.error(err || 'DHT hash not found'); - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); if (e) { + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); + setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); self.alertMessage('error'); } return; From c9abaa8a1c6cc32d335cf41b5ab95dc1fbd39e6b Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 11:05:01 +0200 Subject: [PATCH 157/203] Update settings_container.styl --- src/app/styl/views/settings_container.styl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index c1edd8242e..05856ba5a8 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -309,7 +309,6 @@ width 20px height 20px display inline-flex - margin-left -27px line-height 12px vertical-align top From cc6e37f9d4506f8179c213b7f45e962ee0b9380b Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 9 Nov 2021 23:37:49 +0300 Subject: [PATCH 158/203] changelog for 0.4.7 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7634dcc18c..a9a704ca6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 0.4.7 - Title - date + +New Features: +- Add more languages +- Add play and download video file from seedbox +- Add link to TMDB.org media page for edit description +- Add load config from internet + +Bug Fixes: +- Fix rebuild movies bookmarks +- Fix calculate torrent size in seedbox +- Fix favourites order + ## 0.4.6 - The Good Variant - 11 October 2021 New Features: From 0bc9f96143adcaf7c54512d5add62fef9dd142a6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 1 Dec 2021 21:00:15 +0200 Subject: [PATCH 159/203] Update CHANGELOG.md --- CHANGELOG.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a704ca6a..412b53632b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,19 @@ -## 0.4.7 - Title - date +## 0.4.7 - Title - 01 December 2021 New Features: +- Add Play/Download functions to the Seedbox and various other right pane fixes and additions +- Add ability of updating the API server urls using DHT +- Add a link for contributing media information to TMDB - Add more languages -- Add play and download video file from seedbox -- Add link to TMDB.org media page for edit description -- Add load config from internet Bug Fixes: -- Fix rebuild movies bookmarks -- Fix calculate torrent size in seedbox -- Fix favourites order +- Fix the Rebuild bookmarks database function +- Fix the incorrect sorting/filtering of bookmarks when more than 50 + +Other: +- Update torrent trackers +- Update various modules/dependencies +- Various other small fixes and optimizations ## 0.4.6 - The Good Variant - 11 October 2021 From 3aadfc689ac732452cd9e5929b1a598bd9ec667d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 2 Dec 2021 00:23:19 +0200 Subject: [PATCH 160/203] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 536b3886fa..a484d73c0c 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ }, "license": "GPL-3.0", "main": "src/app/index.html", - "version": "0.4.6", - "releaseName": "The Good Variant", + "version": "0.4.7", + "releaseName": "Title", "scripts": { "build": "gulp build", "clean": "gulp clean", From b861fdfafbec8191c2e30751c78a5facd19aba46 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 2 Dec 2021 00:27:21 +0200 Subject: [PATCH 161/203] Update popcorn-time.rb --- casks/popcorn-time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casks/popcorn-time.rb b/casks/popcorn-time.rb index 4e23dcccc7..c3e884317f 100644 --- a/casks/popcorn-time.rb +++ b/casks/popcorn-time.rb @@ -1,5 +1,5 @@ cask "popcorn-time" do - version "0.4.6" + version "0.4.7" sha256 "cddc2f156dd3cd4fbc7ccd3b3a02c00d3546886dcad183cd1f5dcd984b609c2c" server = "popcorn-ru.tk" From b1eafb650be731c112f9f6d20b738d5436413f9c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 2 Dec 2021 00:29:11 +0200 Subject: [PATCH 162/203] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 59bb2a9434..a788dd54b6 100644 --- a/README.md +++ b/README.md @@ -66,17 +66,17 @@ Download and install: Via archive and command line (tested on ubuntu 18.04 and 20.04): 1. Download Popcorn Time archive: * For the **latest release**: - `wget -c https://get.popcorntime.app/repo/build/Popcorn-Time-0.4.6-linux64.zip` + `wget -c https://get.popcorntime.app/repo/build/Popcorn-Time-0.4.7-linux64.zip` _if eventually you get issue with popcorntime.app website you can try to download from the github repo - `wget -c https://github.com/popcorn-official/popcorn-desktop/releases/download/v0.4.6/Popcorn-Time-0.4.6-linux64.zip`_ + `wget -c https://github.com/popcorn-official/popcorn-desktop/releases/download/v0.4.7/Popcorn-Time-0.4.7-linux64.zip`_ * Or for the **latest dev build (for testers)**: - `wget -c https://ci.popcorntime.app/job/Popcorn-Time-Desktop/lastSuccessfulBuild/artifact/build/Popcorn-Time-0.4.6_linux64.zip -O Popcorn-Time-0.4.6-linux64.zip` + `wget -c https://ci.popcorntime.app/job/Popcorn-Time-Desktop/lastSuccessfulBuild/artifact/build/Popcorn-Time-0.4.7_linux64.zip -O Popcorn-Time-0.4.7-linux64.zip` 2. Create popcorn-time folder in /opt/: `sudo mkdir /opt/popcorn-time` 3. Install unzip && dependencies (they should not be always required but some users needed them to make Popcorn Time working): `sudo apt update && sudo apt install unzip libcanberra-gtk-module libgconf-2-4 libatomic1` 4. Extract the zip in /opt/popcorn-time: - `sudo unzip Popcorn-Time-0.4.6-linux64.zip -d /opt/popcorn-time` + `sudo unzip Popcorn-Time-0.4.7-linux64.zip -d /opt/popcorn-time` 5. Create symlink of Popcorn-Time in /usr/bin: `sudo ln -sf /opt/popcorn-time/Popcorn-Time /usr/bin/popcorn-time` 6. Create .desktop file (so the launcher): From 6c18c684f1f090c6fda53e802cfc2a3120b6df41 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 4 Dec 2021 18:05:10 +0300 Subject: [PATCH 163/203] update wt --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 412b53632b..a21f7da668 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Bug Fixes: Other: - Update torrent trackers - Update various modules/dependencies +- Update WebTorrent to 1.5.8 - Various other small fixes and optimizations ## 0.4.6 - The Good Variant - 11 October 2021 From 336dbac37a28adfe08f1eb29d88e6427e329f2e4 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Tue, 28 Dec 2021 02:10:28 +0300 Subject: [PATCH 164/203] release name --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a21f7da668..3633db60d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.7 - Title - 01 December 2021 +## 0.4.7 - Merry Omicron - 01 December 2021 New Features: - Add Play/Download functions to the Seedbox and various other right pane fixes and additions diff --git a/package.json b/package.json index a484d73c0c..c8f91b1c55 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "GPL-3.0", "main": "src/app/index.html", "version": "0.4.7", - "releaseName": "Title", + "releaseName": "Merry Omicron", "scripts": { "build": "gulp build", "clean": "gulp clean", From bd22c907b5993744670a65eda8447147eddf7040 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Thu, 6 Jan 2022 17:03:49 +0300 Subject: [PATCH 165/203] release name --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3633db60d5..a0daaba713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.7 - Merry Omicron - 01 December 2021 +## 0.4.7 - The reports of my death are greatly exaggerated - 10 January 2022 New Features: - Add Play/Download functions to the Seedbox and various other right pane fixes and additions diff --git a/package.json b/package.json index c8f91b1c55..fa56a03ece 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "GPL-3.0", "main": "src/app/index.html", "version": "0.4.7", - "releaseName": "Merry Omicron", + "releaseName": "The reports of my death are greatly exaggerated", "scripts": { "build": "gulp build", "clean": "gulp clean", From fa734a4978fd30a32fe75db1ca6060140440c96b Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Sat, 12 Feb 2022 20:59:50 +0300 Subject: [PATCH 166/203] add torrent list to changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0daaba713..0d7213c27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ -## 0.4.7 - The reports of my death are greatly exaggerated - 10 January 2022 +## 0.4.7 - The reports of my death are greatly exaggerated - 13 February 2022 New Features: - Add Play/Download functions to the Seedbox and various other right pane fixes and additions - Add ability of updating the API server urls using DHT - Add a link for contributing media information to TMDB +- Show torrent list for current media - Add more languages Bug Fixes: From ae19822b98e4e3b5e4faed603c8294cca088b05a Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 21:26:56 +0200 Subject: [PATCH 167/203] Update initializing.styl --- src/app/styl/views/initializing.styl | 56 +++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/app/styl/views/initializing.styl b/src/app/styl/views/initializing.styl index 6c8c569c5b..49c2bc08ad 100644 --- a/src/app/styl/views/initializing.styl +++ b/src/app/styl/views/initializing.styl @@ -155,6 +155,58 @@ width 100% height 100% + input[type=checkbox] + position absolute + overflow hidden + clip rect(0 0 0 0) + height 1px + width 1px + margin -1px + padding 0 + border 0 + + &+label + height 15px + display inline-block + line-height 15px + font-size 13px + font-family $MainFont + vertical-align middle + cursor pointer + + &:hover + opacity 1 + + &:checked+label + opacity 1 + + &:after + opacity 1 + + label + &:before + content '\f0c8' + font-family "Font Awesome 5 Free" + font-weight 900 + font-size 18px + padding-right 8px + float left + position relative + color $CheckboxBg + + &:after + content '\f00c' + font-family "Font Awesome 5 Free" + font-weight 900 + font-size 12px + margin-right -14px + color $CheckboxCheck + position relative + float left + left -21px + opacity 0 + transition opacity .1s ease-in-out + .icon-disclaimer z-index 1000 top 20% @@ -205,13 +257,13 @@ display block font-size 0.9em text-align left - padding 12px 0 0 30px + padding 12px 0 0 28px .automaticUpdatingSpn display block font-size 0.9em text-align left - padding 8px 0 6px 30px + padding 8px 0 6px 28px .disclaimer-text font-size 14px From 3f1800244525cb115dcfbbd670ea9d5004b49244 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 21:33:06 +0200 Subject: [PATCH 168/203] Update initializing.styl --- src/app/styl/views/initializing.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/styl/views/initializing.styl b/src/app/styl/views/initializing.styl index 49c2bc08ad..df81d02636 100644 --- a/src/app/styl/views/initializing.styl +++ b/src/app/styl/views/initializing.styl @@ -263,7 +263,7 @@ display block font-size 0.9em text-align left - padding 8px 0 6px 28px + padding 8px 0 8px 28px .disclaimer-text font-size 14px From 3d32a930818b907eaabe9c200e01e22fe6ae92a7 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 12 Feb 2022 22:51:28 +0200 Subject: [PATCH 169/203] Update settings-container.tpl --- src/app/language/en.json | 3 ++- src/app/templates/settings-container.tpl | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 34696d95f7..e52564616a 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -607,5 +607,6 @@ "Updating the API Server URLs": "Updating the API Server URLs", "API Server URLs already updated": "API Server URLs already updated", "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?", - "API Server URLs could not be updated": "API Server URLs could not be updated" + "API Server URLs could not be updated": "API Server URLs could not be updated", + "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available": "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available" } diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index f864fb0a17..d230af1b4d 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -618,6 +618,9 @@ ">
    + + * <%= i18n.__("You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available") %> +
    From 92981ad16320c8e4b076e806abafaced1dce6725 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 13 Feb 2022 01:17:03 +0200 Subject: [PATCH 170/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 26 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 30698a121f..8ddf54e866 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -102,8 +102,10 @@ rightclick_field: function (e) { e.preventDefault(); - var menu = new this.context_Menu(i18n.__('Cut'), i18n.__('Copy'), i18n.__('Paste'), e.target.id); - menu.popup(e.originalEvent.x, e.originalEvent.y); + if (e.target !== document.getElementById('customMoviesServer') && e.target !== document.getElementById('customSeriesServer') && e.target !== document.getElementById('customAnimeServer')) { + var menu = new this.context_Menu(i18n.__('Cut'), i18n.__('Copy'), i18n.__('Paste'), e.target.id); + menu.popup(e.originalEvent.x, e.originalEvent.y); + } }, context_Menu: function (cutLabel, copyLabel, pasteLabel, field) { @@ -710,14 +712,20 @@ }, showFullDatalist: function(e) { - if(!e.detail || e.detail == 1){ + if (!e.detail || e.detail == 1) { var tmpDlist = $(e.target).val(); - $(e.target).val(''); - $(e.target).one('blur', function() { - if (!$(e.target).val()) { - $(e.target).val(tmpDlist); - } - }); + if (e.button === 0){ + $(e.target).val(''); + $(e.target).one('blur', function() { + if (!$(e.target).val()) { + $(e.target).val(tmpDlist); + } + }); + } else if (e.button === 2) { + var clipboard = nw.Clipboard.get(); + clipboard.set(tmpDlist, 'text'); + $('.notification_alert').text(i18n.__('The API Server url(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + } } }, From bef44067f19231c739dd11bc4c1664bb805c28f3 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 13 Feb 2022 01:33:34 +0200 Subject: [PATCH 171/203] Update settings_container.js --- src/app/language/en.json | 3 ++- src/app/lib/views/settings_container.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index e52564616a..4a6d0657dc 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -608,5 +608,6 @@ "API Server URLs already updated": "API Server URLs already updated", "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?", "API Server URLs could not be updated": "API Server URLs could not be updated", - "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available": "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available" + "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available": "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available", + "The API Server URL(s) was copied to the clipboard": "The API Server URL(s) was copied to the clipboard" } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 8ddf54e866..f726436504 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -724,7 +724,7 @@ } else if (e.button === 2) { var clipboard = nw.Clipboard.get(); clipboard.set(tmpDlist, 'text'); - $('.notification_alert').text(i18n.__('The API Server url(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); } } }, From 04d56a415efe7f659d0f9f323273c130ae0db9c4 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 13 Feb 2022 23:53:44 +0200 Subject: [PATCH 172/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 65 +++++++++++++++++++------ 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index f726436504..f27d5e5e11 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -102,10 +102,13 @@ rightclick_field: function (e) { e.preventDefault(); - if (e.target !== document.getElementById('customMoviesServer') && e.target !== document.getElementById('customSeriesServer') && e.target !== document.getElementById('customAnimeServer')) { - var menu = new this.context_Menu(i18n.__('Cut'), i18n.__('Copy'), i18n.__('Paste'), e.target.id); - menu.popup(e.originalEvent.x, e.originalEvent.y); + var menu; + if (/customMoviesServer|customSeriesServer|customAnimeServer/.test(e.target.id)) { + menu = new this.altcontext_Menu(i18n.__('Cut'), i18n.__('Copy'), i18n.__('Paste'), e.target.id); + } else { + menu = new this.context_Menu(i18n.__('Cut'), i18n.__('Copy'), i18n.__('Paste'), e.target.id); } + menu.popup(e.originalEvent.x, e.originalEvent.y); }, context_Menu: function (cutLabel, copyLabel, pasteLabel, field) { @@ -135,7 +138,43 @@ menu.append(cut); menu.append(copy); menu.append(paste); + return menu; + }, + + altcontext_Menu: function (cutLabel, copyLabel, pasteLabel, field) { + var menu = new nw.Menu(), + clipboard = nw.Clipboard.get(), + + cut = new nw.MenuItem({ + label: cutLabel || 'Cut', + click: function () { + var text = $('#' + field).val(); + clipboard.set(text, 'text'); + $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + $('#' + field).val(''); + } + }), + copy = new nw.MenuItem({ + label: copyLabel || 'Copy', + click: function () { + var text = $('#' + field).val(); + clipboard.set(text, 'text'); + $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); + } + }), + + paste = new nw.MenuItem({ + label: pasteLabel || 'Paste', + click: function () { + var text = $('#' + field).val() + clipboard.get('text'); + $('#' + field).val(text); + } + }); + + menu.append(cut); + menu.append(copy); + menu.append(paste); return menu; }, @@ -712,20 +751,14 @@ }, showFullDatalist: function(e) { - if (!e.detail || e.detail == 1) { + if (e.button === 0 && (!e.detail || e.detail == 1)) { var tmpDlist = $(e.target).val(); - if (e.button === 0){ - $(e.target).val(''); - $(e.target).one('blur', function() { - if (!$(e.target).val()) { - $(e.target).val(tmpDlist); - } - }); - } else if (e.button === 2) { - var clipboard = nw.Clipboard.get(); - clipboard.set(tmpDlist, 'text'); - $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); - } + $(e.target).val(''); + $(e.target).one('blur', function() { + if (!$(e.target).val()) { + $(e.target).val(tmpDlist); + } + }); } }, From 60bc24b0c348304fce82918fb62adc5ed5359b17 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 00:20:23 +0200 Subject: [PATCH 173/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index f27d5e5e11..0cee558a6e 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -167,8 +167,7 @@ paste = new nw.MenuItem({ label: pasteLabel || 'Paste', click: function () { - var text = $('#' + field).val() + clipboard.get('text'); - $('#' + field).val(text); + document.execCommand('paste'); } }); From e4b3bf4e35aca11d1e7907ee0c5277bfb9b9fbc1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 01:39:52 +0200 Subject: [PATCH 174/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 0cee558a6e..09a909908c 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -144,11 +144,12 @@ altcontext_Menu: function (cutLabel, copyLabel, pasteLabel, field) { var menu = new nw.Menu(), clipboard = nw.Clipboard.get(), + text = $('#' + field).val(), cut = new nw.MenuItem({ label: cutLabel || 'Cut', click: function () { - var text = $('#' + field).val(); + text = $('#' + field).val(); clipboard.set(text, 'text'); $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); $('#' + field).val(''); @@ -158,7 +159,7 @@ copy = new nw.MenuItem({ label: copyLabel || 'Copy', click: function () { - var text = $('#' + field).val(); + text = $('#' + field).val(); clipboard.set(text, 'text'); $('.notification_alert').text(i18n.__('The API Server URL(s) was copied to the clipboard')).fadeIn('fast').delay(2500).fadeOut('fast'); } @@ -171,6 +172,15 @@ } }); + $('#' + field).one('blur', function() { + if (text && !$('#' + field).val()) { + $('#' + field).val(text); + if (!AdvSettings.get(field)) { + AdvSettings.set(field, text); + } + } + }); + menu.append(cut); menu.append(copy); menu.append(paste); @@ -754,7 +764,7 @@ var tmpDlist = $(e.target).val(); $(e.target).val(''); $(e.target).one('blur', function() { - if (!$(e.target).val()) { + if (tmpDlist && !$(e.target).val()) { $(e.target).val(tmpDlist); } }); From 1bd8a47791d1c49bbce264ad78fb5878ef21ae88 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 18:54:34 +0200 Subject: [PATCH 175/203] Update initializing.styl --- src/app/styl/views/initializing.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/styl/views/initializing.styl b/src/app/styl/views/initializing.styl index df81d02636..b62cbf3211 100644 --- a/src/app/styl/views/initializing.styl +++ b/src/app/styl/views/initializing.styl @@ -263,7 +263,7 @@ display block font-size 0.9em text-align left - padding 8px 0 8px 28px + padding 10px 0 8px 28px .disclaimer-text font-size 14px From 01c2b4cf47aa49206944c9457e93bb12e289ff57 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 19:45:12 +0200 Subject: [PATCH 176/203] Update dht.js --- src/app/dht.js | 59 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 78ca558ac5..788a7fc49a 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -10,11 +10,11 @@ class DhtReader { update(e) { const self = this; + self.alertIcon(); if (!Settings.dht) { App.vent.trigger('notification:close'); if (e) { - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); + self.alertIcon('error'); self.alertMessage('error'); } return; @@ -26,25 +26,30 @@ class DhtReader { App.vent.trigger('notification:close'); if (err || !node || !node.v) { if (e) { - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('invalid-cross'); - setTimeout(function() { $('.update-dht').removeClass('invalid-cross').addClass('fa-redo');}, 6000); + self.alertIcon('error'); self.alertMessage('error'); } return; } let newData = node.v.toString(); let data = AdvSettings.get('dhtData'); - $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); - setTimeout(function() { $('.update-dht').removeClass('valid-tick').addClass('fa-redo');}, 6000); - if (data !== newData && (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { - self.alertMessage('change'); - } else if (data !== newData || e === 'enable') { + AdvSettings.set('dhtData', newData); + AdvSettings.set('dhtDataUpdated', Date.now()); + if (e) { + self.alertIcon('success'); + } + if (data !== newData) { + self.updateSettings(); + if (!Settings.dhtEnable || (Settings.customMoviesServer || Settings.customSeriesServer || Settings.customAnimeServer)) { + self.alertMessage('change'); + } else { + self.alertMessage('restart'); + } + } else if (e === 'enable') { self.alertMessage('restart'); } else if (e === 'manual') { - self.alertMessage(); + self.alertMessage('alrdupdated'); } - AdvSettings.set('dhtData', newData); - AdvSettings.set('dhtDataUpdated', Date.now()); }); }); } @@ -64,6 +69,28 @@ class DhtReader { } } + updateSettings() { + setTimeout(function() { + if (App.ViewStack.includes('settings-container-contain')) { + let scrollPos = $('.settings-container-contain').scrollTop(); + $('.nav-hor.left li:first').click(); + App.vent.trigger('settings:show'); + $('.update-dht').removeClass('fa-spin fa-spinner').addClass('valid-tick'); + $('.settings-container-contain').scrollTop(scrollPos); + } + }, 200); + } + + alertIcon(e) { + if (e) { + let tmpclass = e === 'success' ? 'valid-tick' : 'invalid-cross'; + $('.update-dht').removeClass('fa-spin fa-spinner').addClass(tmpclass); + setTimeout(function() { $('.update-dht').removeClass(tmpclass).addClass('fa-redo');}, 6000); + } else { + $('.update-dht').removeClass('fa-redo').removeClass('valid-tick').removeClass('invalid-cross').addClass('fa-spin fa-spinner'); + } + } + alertMessage(alertType) { var changeServer = function () { let newServer = AdvSettings.get('dhtData') && !AdvSettings.get('dhtEnable') ? AdvSettings.get('dhtData').split('server":"')[1].split('","git":"')[0] : ''; @@ -90,13 +117,17 @@ class DhtReader { break; case 'change': notificationModel.set('body', i18n.__('Change API Server(s) to the new URLs?')); - notificationModel.set('buttons', [{ title: '', action: changeServer }, { title: '', action: function () {this.alertMessage('restart');}.bind(this)}]); + notificationModel.set('buttons', [{ title: '', action: changeServer }, { title: '', action: function () {this.alertMessage('updated');}.bind(this)}]); break; case 'restart': notificationModel.set('body', i18n.__('Please restart your application')); notificationModel.set('showRestart', true); break; - default: + case 'updated': + notificationModel.set('body', i18n.__('API Server URLs updated')); + notificationModel.set('autoclose', true); + break; + case 'alrdupdated': notificationModel.set('body', i18n.__('API Server URLs already updated')); notificationModel.set('autoclose', true); } From 3eb14106954edccb472f416bdb765f62b856584c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 19:45:55 +0200 Subject: [PATCH 177/203] Update en.json --- src/app/language/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/language/en.json b/src/app/language/en.json index 4a6d0657dc..9b947e4ad5 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -605,6 +605,7 @@ "Enable automatically updating the app when a new version is available": "Enable automatically updating the app when a new version is available", "Check for updates": "Check for updates", "Updating the API Server URLs": "Updating the API Server URLs", + "API Server URLs updated": "API Server URLs updated", "API Server URLs already updated": "API Server URLs already updated", "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?", "API Server URLs could not be updated": "API Server URLs could not be updated", From 62f6f7dbac8f278ec9eacecb1daa9d3bf9b47eac Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 19:58:07 +0200 Subject: [PATCH 178/203] Update dht.js --- src/app/dht.js | 6 ++++-- src/app/lib/views/settings_container.js | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index 788a7fc49a..b4e5997aec 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -10,7 +10,10 @@ class DhtReader { update(e) { const self = this; - self.alertIcon(); + if (e) { + self.alertIcon(); + self.alertMessage('wait'); + } if (!Settings.dht) { App.vent.trigger('notification:close'); if (e) { @@ -62,7 +65,6 @@ class DhtReader { let last = AdvSettings.get('dhtDataUpdated'); const time = 1000 * 60 * 60 * 24 * 7; if (!data) { - this.alertMessage('wait'); this.update('enable'); } else if (Date.now() - last > time) { this.update(); diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 09a909908c..c2a0214c12 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -684,8 +684,6 @@ updateMode = 'manual'; } App.DhtReader.update(updateMode); - $('.update-dht').removeClass('fa-redo').addClass('fa-spin fa-spinner'); - this.alertMessageWait(i18n.__('Updating the API Server URLs')); }, connectTrakt: function (e) { From 03205b4261b1cbee61b13226bbe5210a0130f88c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Mon, 14 Feb 2022 20:13:26 +0200 Subject: [PATCH 179/203] Update dht.js --- src/app/dht.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/dht.js b/src/app/dht.js index b4e5997aec..72fd684dc0 100644 --- a/src/app/dht.js +++ b/src/app/dht.js @@ -10,23 +10,20 @@ class DhtReader { update(e) { const self = this; - if (e) { - self.alertIcon(); - self.alertMessage('wait'); - } if (!Settings.dht) { - App.vent.trigger('notification:close'); if (e) { self.alertIcon('error'); self.alertMessage('error'); } return; + } else if (e) { + self.alertIcon(); + self.alertMessage('wait'); } const dht = new DHT({verify: ed.verify}); const hash = Buffer(Settings.dht, 'hex'); dht.once('ready', function () { dht.get(hash, function (err, node) { - App.vent.trigger('notification:close'); if (err || !node || !node.v) { if (e) { self.alertIcon('error'); From 677042ca32a198c4bf6a073af4ae338f5ebc651d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 16 Feb 2022 18:18:11 +0200 Subject: [PATCH 180/203] Fix Keyboard help not visible when in fullscreen (#2433) --- src/app/lib/views/keyboard.js | 12 +++++++++++- src/app/lib/views/player/player.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/keyboard.js b/src/app/lib/views/keyboard.js index c839731b24..da88c1771f 100644 --- a/src/app/lib/views/keyboard.js +++ b/src/app/lib/views/keyboard.js @@ -4,6 +4,7 @@ var Keyboard = Marionette.View.extend({ template: '#keyboard-tpl', className: 'keyboard', + wasFullscreen: false, events: { 'click .close-icon': 'closeKeyboard', @@ -12,12 +13,21 @@ onAttach: function () { $('.search input').blur(); + if (win.isFullscreen) { + $('.player .video-js').hide(); + this.wasFullscreen = true; + } + Mousetrap.bind(['esc', 'backspace'], function (e) { App.vent.trigger('keyboard:close'); }); }, - onBeforeDestroy: function () {}, + onBeforeDestroy: function () { + if (this.wasFullscreen) { + $('.player .video-js').removeAttr('style'); + } + }, closeKeyboard: function () { App.vent.trigger('keyboard:close'); diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 04661262fa..4923f6e37f 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -1161,7 +1161,7 @@ }, mouseScroll: function (e) { - if ($(e.target).parents('.vjs-subtitles-button').length) { + if (App.ViewStack[App.ViewStack.length -1] !== 'app-overlay' || $(e.target).parents('.vjs-subtitles-button').length) { return; } var mult = (Settings.os === 'mac') ? -1 : 1; // up/down invert From 78f4a4dc8b0e7801f89e8e4efc00a5fc0f3a5301 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 16 Feb 2022 19:05:02 +0200 Subject: [PATCH 181/203] Revert 2433 --- src/app/lib/views/keyboard.js | 12 +----------- src/app/lib/views/player/player.js | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/app/lib/views/keyboard.js b/src/app/lib/views/keyboard.js index da88c1771f..c839731b24 100644 --- a/src/app/lib/views/keyboard.js +++ b/src/app/lib/views/keyboard.js @@ -4,7 +4,6 @@ var Keyboard = Marionette.View.extend({ template: '#keyboard-tpl', className: 'keyboard', - wasFullscreen: false, events: { 'click .close-icon': 'closeKeyboard', @@ -13,21 +12,12 @@ onAttach: function () { $('.search input').blur(); - if (win.isFullscreen) { - $('.player .video-js').hide(); - this.wasFullscreen = true; - } - Mousetrap.bind(['esc', 'backspace'], function (e) { App.vent.trigger('keyboard:close'); }); }, - onBeforeDestroy: function () { - if (this.wasFullscreen) { - $('.player .video-js').removeAttr('style'); - } - }, + onBeforeDestroy: function () {}, closeKeyboard: function () { App.vent.trigger('keyboard:close'); diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 4923f6e37f..04661262fa 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -1161,7 +1161,7 @@ }, mouseScroll: function (e) { - if (App.ViewStack[App.ViewStack.length -1] !== 'app-overlay' || $(e.target).parents('.vjs-subtitles-button').length) { + if ($(e.target).parents('.vjs-subtitles-button').length) { return; } var mult = (Settings.os === 'mac') ? -1 : 1; // up/down invert From 78d909106f15f1e60432a088a2462c469ad26b22 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 16 Feb 2022 19:08:50 +0200 Subject: [PATCH 182/203] Fix Keyboard help not visible when in fullscreen (#2435) --- src/app/lib/views/player/player.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 04661262fa..c8b15677bc 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -71,6 +71,18 @@ App.vent.on('viewstack:pop', function() { if (_.last(App.ViewStack) === 'app-overlay') { _this.bindKeyboardShortcuts(); + if (this.wasFullscreen) { + $('.player .video-js').removeAttr('style'); + this.wasFullscreen = false; + } + } + }); + + //If a child was added above this view + App.vent.on('viewstack:push', function() { + if (win.isFullscreen && _.last(App.ViewStack) !== 'app-overlay') { + $('.player .video-js').hide(); + this.wasFullscreen = true; } }); }, @@ -1161,7 +1173,7 @@ }, mouseScroll: function (e) { - if ($(e.target).parents('.vjs-subtitles-button').length) { + if (_.last(App.ViewStack) !== 'app-overlay' || $(e.target).parents('.vjs-subtitles-button').length) { return; } var mult = (Settings.os === 'mac') ? -1 : 1; // up/down invert From 058c56fec3529a39cb6c37c64352e7e922438786 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 16 Feb 2022 19:51:14 +0200 Subject: [PATCH 183/203] Update player.js --- src/app/lib/views/player/player.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index c8b15677bc..7d2b44445d 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -67,6 +67,17 @@ saturation: 1.0, }; + //If a child was added above this view + App.vent.on('viewstack:push', function() { + if (_.last(App.ViewStack) !== 'app-overlay') { + _this.unbindKeyboardShortcuts(); + if (win.isFullscreen) { + $('.player .video-js').hide(); + this.wasFullscreen = true; + } + } + }); + //If a child was removed from above this view App.vent.on('viewstack:pop', function() { if (_.last(App.ViewStack) === 'app-overlay') { @@ -77,14 +88,6 @@ } } }); - - //If a child was added above this view - App.vent.on('viewstack:push', function() { - if (win.isFullscreen && _.last(App.ViewStack) !== 'app-overlay') { - $('.player .video-js').hide(); - this.wasFullscreen = true; - } - }); }, isMovie: function () { From 0de4a20bee6c85e070e7052daaf783d8c7a4c69f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 19 Feb 2022 02:24:00 +0000 Subject: [PATCH 184/203] Bump url-parse from 1.5.3 to 1.5.7 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7) --- 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 d78f1fc940..608138f4f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7586,9 +7586,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.1.9: - version "1.5.3" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" - integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== + version "1.5.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" + integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From c4e5829adeeab2779b08e54d77d91a66bacac5dd Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 23 Feb 2022 00:46:28 +0200 Subject: [PATCH 185/203] Add ability to disable preloading of next episode when autoplay next episode is enabled (#2441) --- src/app/language/en.json | 3 ++- src/app/lib/views/player/player.js | 4 ++-- src/app/lib/views/settings_container.js | 4 +++- src/app/templates/settings-container.tpl | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 9b947e4ad5..976382b030 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -610,5 +610,6 @@ "Change API server(s) to the new URLs?": "Change API server(s) to the new URLs?", "API Server URLs could not be updated": "API Server URLs could not be updated", "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available": "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available", - "The API Server URL(s) was copied to the clipboard": "The API Server URL(s) was copied to the clipboard" + "The API Server URL(s) was copied to the clipboard": "The API Server URL(s) was copied to the clipboard", + "0 = Disable preloading": "0 = Disable preloading" } diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 7d2b44445d..9d6f17dde0 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -282,12 +282,12 @@ checkAutoPlay: function () { if (this.isMovie() === 'episode' && this.next_episode_model) { - if ((this.video.duration() - this.video.currentTime()) < (Settings.preloadNextEpisodeTime * 60) && this.video.currentTime() > 30) { + if ((!Settings.preloadNextEpisodeTime || (this.video.duration() - this.video.currentTime() < Settings.preloadNextEpisodeTime * 60)) && this.video.currentTime() > 30) { if (!this.autoplayisshown) { var playingNext = $('.playing_next'); - if (!this.precachestarted) { + if (Settings.preloadNextEpisodeTime && !this.precachestarted) { App.vent.trigger('stream:start', this.next_episode_model, 'preload'); this.precachestarted = true; } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index c2a0214c12..ad30a3d7b5 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -388,8 +388,10 @@ break; case 'preloadNextEpisodeTime': let nnvalue = field.val().replace(/[^0-9]/gi, ''); - if (!nnvalue || nnvalue <= 0) { + if (!nnvalue || nnvalue < 0) { nnvalue = 1; + } else { + nnvalue = parseInt(nnvalue); } field.val(nnvalue); value = nnvalue; diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index d230af1b4d..db50e05194 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -411,7 +411,7 @@ <% if (Settings.playNextEpisodeAuto) { %>

    <%= i18n.__("Remaining runtime before start preloading next episode") %>  

    -    <%= i18n.__("minute(s)") %> +    <%= i18n.__("minute(s)") %>,   <%= i18n.__("0 = Disable preloading") %>
    <% } %> From d8f5c3d1b701bd9568369795e658b233a08da658 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 23 Feb 2022 01:01:17 +0200 Subject: [PATCH 186/203] Update settings_container.js --- src/app/lib/views/settings_container.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index ad30a3d7b5..4411579222 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -388,7 +388,7 @@ break; case 'preloadNextEpisodeTime': let nnvalue = field.val().replace(/[^0-9]/gi, ''); - if (!nnvalue || nnvalue < 0) { + if (!nnvalue) { nnvalue = 1; } else { nnvalue = parseInt(nnvalue); From 4fc15854c03f380164570e83df2deca677be4291 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 23 Feb 2022 02:18:54 +0200 Subject: [PATCH 187/203] Update player.js --- src/app/lib/views/player/player.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index 9d6f17dde0..e6c1025ea5 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -285,14 +285,13 @@ if ((!Settings.preloadNextEpisodeTime || (this.video.duration() - this.video.currentTime() < Settings.preloadNextEpisodeTime * 60)) && this.video.currentTime() > 30) { if (!this.autoplayisshown) { - var playingNext = $('.playing_next'); - if (Settings.preloadNextEpisodeTime && !this.precachestarted) { App.vent.trigger('stream:start', this.next_episode_model, 'preload'); this.precachestarted = true; } if ((this.video.duration() - this.video.currentTime()) < 60) { + var playingNext = $('.playing_next'); win.info('Showing Auto Play message'); this.autoplayisshown = true; playingNext.show(); From 4aac4ee12378902f9a95ab04d0cf39e43d8ac84d Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Wed, 23 Feb 2022 02:29:25 +0200 Subject: [PATCH 188/203] Update player.js --- src/app/lib/views/player/player.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/app/lib/views/player/player.js b/src/app/lib/views/player/player.js index e6c1025ea5..b8e5952854 100644 --- a/src/app/lib/views/player/player.js +++ b/src/app/lib/views/player/player.js @@ -283,13 +283,11 @@ checkAutoPlay: function () { if (this.isMovie() === 'episode' && this.next_episode_model) { if ((!Settings.preloadNextEpisodeTime || (this.video.duration() - this.video.currentTime() < Settings.preloadNextEpisodeTime * 60)) && this.video.currentTime() > 30) { - if (!this.autoplayisshown) { if (Settings.preloadNextEpisodeTime && !this.precachestarted) { App.vent.trigger('stream:start', this.next_episode_model, 'preload'); this.precachestarted = true; } - if ((this.video.duration() - this.video.currentTime()) < 60) { var playingNext = $('.playing_next'); win.info('Showing Auto Play message'); @@ -301,19 +299,15 @@ } } } - var count = Math.round(this.video.duration() - this.video.currentTime()); $('.playing_next #nextCountdown').text(count); - } else { - if (this.autoplayisshown) { win.info('Hiding Auto Play message'); $('.playing_next').hide(); $('.playing_next #nextCountdown').text(''); this.autoplayisshown = false; } - } } }, From 5b5e904574d28dcd1dcd188587d484cfa44c232e Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Thu, 24 Feb 2022 12:50:12 +0200 Subject: [PATCH 189/203] Fix Missing X button in Movies/Series when using Native window frame (#2445) --- src/app/styl/views/settings_container.styl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/styl/views/settings_container.styl b/src/app/styl/views/settings_container.styl index 05856ba5a8..1bd6a4d4fc 100644 --- a/src/app/styl/views/settings_container.styl +++ b/src/app/styl/views/settings_container.styl @@ -658,7 +658,9 @@ .default-frame .settings-container-contain padding-top 0 + .close-icon + top 5px &::-webkit-scrollbar-track margin-top: $FilterBarHeight .close-icon - top 5px + top 45px From a5ad37abd39a97b1566aa85df8c97d6918fe5686 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 03:10:22 +0000 Subject: [PATCH 190/203] Bump urijs from 1.19.7 to 1.19.8 Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.7 to 1.19.8. - [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.7...v1.19.8) --- 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 536b3886fa..dbfa05970e 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "trakt.tv-matcher": "7.x.x", "trakt.tv-ondeck": "7.x.x", "underscore": "^1.13.0", - "urijs": "^1.19.7", + "urijs": "^1.19.8", "video.js": "4.11.4", "videojs-youtube": "1.2.10", "webtorrent": "^1.5.8", diff --git a/yarn.lock b/yarn.lock index 608138f4f1..87454bf192 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7561,10 +7561,10 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -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== +urijs@^1.19.1, urijs@^1.19.8: + version "1.19.8" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.8.tgz#ee0407a18528934d3c383e691912f47043a58feb" + integrity sha512-iIXHrjomQ0ZCuDRy44wRbyTZVnfVNLVo3Ksz1yxNyE5wV1IDZW2S5Jszy45DTlw/UdsnRT7DyDhIz7Gy+vJumw== urix@^0.1.0: version "0.1.0" From 04f91683a061938988047185f233dd7a3d77aeb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 09:29:35 +0000 Subject: [PATCH 191/203] Bump url-parse from 1.5.7 to 1.5.10 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10) --- 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 87454bf192..0c1265b13d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7586,9 +7586,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.1.9: - version "1.5.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" - integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From 1c98930dfb04ead00872b14c32b3c37c9177a6f1 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 26 Feb 2022 15:27:14 +0200 Subject: [PATCH 192/203] Update torrent trackers --- src/app/settings.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/settings.js b/src/app/settings.js index 42b641eb35..35b4e8212b 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -84,7 +84,8 @@ Settings.trackers = { 'udp://tracker.cyberia.is:6969', 'udp://tracker.torrent.eu.org:451', 'udp://open.stealth.si:80', - 'udp://opentor.org:2710', + 'udp://bt1.archive.org:6969', + 'udp://bt2.archive.org:6969', 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', 'udp://explodie.org:6969', From cee5e7407040972729d94f8edf868c12eb27397c Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 26 Feb 2022 15:29:28 +0200 Subject: [PATCH 193/203] Update torrent trackers --- src/app/settings.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/settings.js b/src/app/settings.js index 35b4e8212b..38967d3510 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -84,8 +84,6 @@ Settings.trackers = { 'udp://tracker.cyberia.is:6969', 'udp://tracker.torrent.eu.org:451', 'udp://open.stealth.si:80', - 'udp://bt1.archive.org:6969', - 'udp://bt2.archive.org:6969', 'udp://tracker.moeking.me:6969', 'udp://tracker.zerobytes.xyz:1337', 'udp://explodie.org:6969', From d50c3f427a765ce40fe8ee0cabc32870555794f6 Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sat, 26 Feb 2022 18:15:37 +0200 Subject: [PATCH 194/203] Update loading.js --- src/app/lib/views/player/loading.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/lib/views/player/loading.js b/src/app/lib/views/player/loading.js index 4453b2f7db..8a9d72299c 100644 --- a/src/app/lib/views/player/loading.js +++ b/src/app/lib/views/player/loading.js @@ -237,11 +237,13 @@ this.checkFreeSpace(streamInfo.get('size')); this.firstUpdate = true; } - if (streamInfo.get('backdrop')) { + if (!this.backdropSet && streamInfo.get('backdrop')) { $('.loading-backdrop').css('background-image', 'url(' + streamInfo.get('backdrop') + ')'); + this.backdropSet = true; } - if (streamInfo.get('title') !== '') { + if (!this.titleSet && streamInfo.get('title') !== '') { this.ui.title.html(streamInfo.get('title')); + this.titleSet = true; } if (streamInfo.get('downloaded')) { this.ui.downloadSpeed.text(streamInfo.get('downloadSpeed')); From e4297c5f8f42844d22263d50a2b601dbbd8dbbac Mon Sep 17 00:00:00 2001 From: kiriles90 <38388670+kiriles90@users.noreply.github.com> Date: Sun, 27 Feb 2022 00:00:21 +0200 Subject: [PATCH 195/203] Add always expanded search box option (#2450) --- src/app/language/en.json | 3 ++- src/app/lib/views/settings_container.js | 2 ++ src/app/settings.js | 1 + src/app/styl/views/filter_bar.styl | 2 +- src/app/templates/browser/filter-bar.tpl | 2 +- src/app/templates/settings-container.tpl | 4 ++++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/app/language/en.json b/src/app/language/en.json index 976382b030..956b4f89c7 100644 --- a/src/app/language/en.json +++ b/src/app/language/en.json @@ -611,5 +611,6 @@ "API Server URLs could not be updated": "API Server URLs could not be updated", "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available": "You can add multiple API Servers separated with a , from which it will select randomly (*for load balancing) until it finds the first available", "The API Server URL(s) was copied to the clipboard": "The API Server URL(s) was copied to the clipboard", - "0 = Disable preloading": "0 = Disable preloading" + "0 = Disable preloading": "0 = Disable preloading", + "Search field always expanded": "Search field always expanded" } diff --git a/src/app/lib/views/settings_container.js b/src/app/lib/views/settings_container.js index 4411579222..1a99d05ebd 100644 --- a/src/app/lib/views/settings_container.js +++ b/src/app/lib/views/settings_container.js @@ -322,6 +322,7 @@ case 'torColSearchMore': case 'showSeedboxOnDlInit': case 'showSubmitMeta': + case 'expandedSearch': case 'showUndoRBookmark': case 'nativeWindowFrame': case 'translatePosters': @@ -607,6 +608,7 @@ case 'torColSearchMore': case 'httpApiEnabled': case 'showSubmitMeta': + case 'expandedSearch': case 'playNextEpisodeAuto': $('.nav-hor.left li:first').click(); App.vent.trigger('settings:show'); diff --git a/src/app/settings.js b/src/app/settings.js index 38967d3510..cffdf041b1 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -143,6 +143,7 @@ Settings.animeTabEnable = true; Settings.showSeedboxOnDlInit = true; Settings.showSubmitMeta = true; Settings.showUndoRBookmark = true; +Settings.expandedSearch = false; // Quality Settings.shows_default_quality = '720p'; diff --git a/src/app/styl/views/filter_bar.styl b/src/app/styl/views/filter_bar.styl index aeed85a3bc..b4c2bc06e1 100644 --- a/src/app/styl/views/filter_bar.styl +++ b/src/app/styl/views/filter_bar.styl @@ -121,7 +121,7 @@ padding: 3px 5px font-size: 1.2em - &.edited input, input:focus + &.edited input, input:focus, input.expanded width: 180px background-color: $SearchBoxBg color: $FilterBarText diff --git a/src/app/templates/browser/filter-bar.tpl b/src/app/templates/browser/filter-bar.tpl index 0589dd71ce..254716e355 100644 --- a/src/app/templates/browser/filter-bar.tpl +++ b/src/app/templates/browser/filter-bar.tpl @@ -43,7 +43,7 @@
  • diff --git a/src/app/templates/settings-container.tpl b/src/app/templates/settings-container.tpl index db50e05194..37f2264e74 100644 --- a/src/app/templates/settings-container.tpl +++ b/src/app/templates/settings-container.tpl @@ -121,6 +121,10 @@ > + + > + +