Skip to content

Commit

Permalink
Merge pull request #2572 from popcorn-official/development
Browse files Browse the repository at this point in the history
  • Loading branch information
kiriles90 authored Jul 16, 2022
2 parents 9fed9bc + b64259c commit 4d4fc35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion casks/popcorn-time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

if MacOS.version < :monterey || ENV["HOMEBREW_POPCORN_TIME_BUILD"] == "false"
sha256 "15930323f3c58f090e2d47f8d34a65457bb53ae03e948184702f045f6fad0cb3"
sha256 "97cc4984614f87285edc4afe98ee82ac2b1ba7879b5561a497cff8401f4ba0ec"

url "#{homepage}/build/#{zip}"
else
Expand Down
23 changes: 5 additions & 18 deletions src/app/lib/views/torrent-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,14 @@
e.stopPropagation();
const torrent = this.getTorrent(e.target);
const download = !$(e.target).hasClass('item-play');
let imdb_id;
let subtitle;
let season;
let episode;
if (App.currentview === 'movies') {
imdb_id = App.MovieDetailView.model.get('imdb_id');
subtitle = $("#subs-dropdown .selected-lang")[0].classList[$("#subs-dropdown .selected-lang")[0].classList.length - 1];
} else if (App.currentview === 'shows') {
imdb_id = $('.list .items .item.selected')[0].dataset.imdbId;
season = $('.tab-episode.active')[0].attributes['data-season'].value;
episode = $('.tab-episode.active')[0].attributes['data-episode'].value;
}
var torrentStart = new Backbone.Model({
torrent: torrent.url,
title: this.model.get('select') && !download ? null : torrent.title,
defaultSubtitle: subtitle || Settings.subtitle_language,
imdb_id: imdb_id,
season: season,
episode: episode,
device: App.Device.Collection.selected,
// file_name: e.target.parentNode.firstChild.innerHTML
defaultSubtitle: $("#subs-dropdown .selected-lang")[0] ? $("#subs-dropdown .selected-lang")[0].classList[$("#subs-dropdown .selected-lang")[0].classList.length - 1] : Settings.subtitle_language,
imdb_id: $('.list .items .item.selected')[0] ? $('.list .items .item.selected')[0].dataset.imdbId : null,
season: $('.tab-episode.active')[0] ? $('.tab-episode.active')[0].attributes['data-season'].value : null,
episode: $('.tab-episode.active')[0] ? $('.tab-episode.active')[0].attributes['data-episode'].value : null,
device: App.Device.Collection.selected
});
App.vent.trigger('stream:start', torrentStart, download ? 'downloadOnly' : '' );
if (download) {
Expand Down

0 comments on commit 4d4fc35

Please sign in to comment.