popcorn-official / popcorn-desktop

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player ( Windows / Mac / Linux ) A Butter-Project Fork
https://popcorn-time.site
Other
9.49k stars 629 forks source link

PCT won't play any torrent if cache directory is not default #1221

Closed dutchy1001 closed 4 years ago

dutchy1001 commented 4 years ago

Operating System Version: Windows 10

Popcorn Time Version: latest build 401

Download date: 25/03/2020 (time 15:15)

Expected Behaviour

after changing the default Cache Directory the movie or serie play as normal. ...

Actual Behaviour

after changing the default Cache Directory the movie or serie wont play. ...

Steps to reproduce the behaviour

  1. Change Cache Directory in settings (in my case to G-drive) to different location
  2. start watching movie or serie
  3. Screen stuck at "connecting" connecting
  4. File still downloads to "new" location and can be started manual
team-pct commented 4 years ago

Open console with F12 and see if there is an error

dutchy1001 commented 4 years ago

app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/00d3b686172de76f03b0e9e3506f6853048ed48a' win.error @ app.js:36 app.js:17 [INFO] Closing loading view app.js:17 [INFO] Streaming cancelled quality-selector.js:79 Select quality: 720p show_detail.js:497 Playing next episode automatically: true app.js:17 [INFO] Loading torrent app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/00d3b686172de76f03b0e9e3506f6853048ed48a' win.error @ app.js:36

full log is here

team-pct commented 4 years ago

Seems it was not able to create TorrentCache folder try to remove This folder and create a new one https://github.com/popcorn-official/popcorn-desktop/blob/development/src/app/lib/views/settings_container.js#L584

dutchy1001 commented 4 years ago

After deleting the folder and re-apply the path it worked, as soon I added a serie to the favorite folder it stopped working

app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/df6304836a07293f0159e4b3a8a216d23176bfb2' win.error @ app.js:36 app.js:17 [INFO] Closing loading view app.js:17 [INFO] Streaming cancelled app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p show_detail.js:497 Playing next episode automatically: true app.js:17 [INFO] Loading torrent app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/df6304836a07293f0159e4b3a8a216d23176bfb2' win.error @ app.js:36 app.js:17 [INFO] Closing loading view app.js:17 [INFO] Streaming cancelled app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p show_detail.js:497 Playing next episode automatically: true app.js:17 [INFO] Loading torrent app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/07f6892608a891c8732ce40207734381822bfc2e' win.error @ app.js:36 app.js:17 [INFO] Closing loading view app.js:17 [INFO] Streaming cancelled app.js:17 [INFO] Returning cached provider Favorites app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, item.js:296 Bookmark deleted (tt5555260) app.js:17 [INFO] Returning cached provider Favorites app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider MovieApi?&apiURL=https://movies-v2.api-fetch.website/,cloudflare+https://movies-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider TVApi?&apiURL=https://tv-v2.api-fetch.website/,cloudflare+https://tv-v2.api-fetch.website, app.js:17 [INFO] Returning cached provider AnimeApi?&apiURL=https://anime.api-fetch.website/,cloudflare+https://anime.api-fetch.website, quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p quality-selector.js:79 Select quality: 720p showdetail.js:497 Playing next episode automatically: true app.js:17 [INFO] Loading torrent app.js:36 [ERROR] Error: ENOENT: no such file or directory, open 'G:\Popcorn Time/TorrentCache/b85e33db77bd73d5e3e1afe8eda818162235bd06' win.error @ app.js:36 handleErrors @ streamer.js:105 Promise.catch (async) start @ streamer.js:70 @ backbone.js:369 m @ backbone.js:356 f @ backbone.js:155 u.trigger @ backbone.js:346 startStreaming @ show_detail.js:499 N @ underscore-min.js:5 (anonymous) @ underscore-min.js:5 (anonymous) @ underscore-min.js:5 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2

full log here

After deleting the serie from the favorite folder it still won't play but downloads to the path I gave it

team-pct commented 4 years ago

Replace https://github.com/popcorn-official/popcorn-desktop/blob/development/src/app/lib/streamer.js#L135

'/TorrentCache' by '/'

it should fix this issue

dutchy1001 commented 4 years ago

I'm not a coder and compiling my own version is not an option.

dutchy1001 commented 4 years ago

Found the file, changed the '/TorrentCache' to '/' and working now.

Will this be changed in the next update or do we have to manual keep changing this?

Thanks for your great work on PCT

team-pct commented 4 years ago

I will push it as fix later today

dutchy1001 commented 4 years ago

great, thank for your help

dutchy1001 commented 4 years ago

Spoke to soon, after restarting and adding series to the favorite folder. See log here as to long to post no-folder As you can see it wont make a folder now were the files are saved in

team-pct commented 4 years ago

Can you tell me the steps you made so i reproduce it locally?

dutchy1001 commented 4 years ago

I'll start fresh and see if I can reproduce this myself, as soon I done this I let you know tonight.

dutchy1001 commented 4 years ago

1 - Reverted back to build 396 (all working with cancel/restart trick) 2 - Updated PCT with Popcorn-Time-0.4.1_win64.zip (build 401). Overwriting files 3 - Start PCT open favorite tab and choose file to watch

Next post I will uninstall PCT clean DB's and start with new install build 401

dutchy1001 commented 4 years ago

1 - Fresh download "Popcorn-Time-0.4.1-win64-Setup.exe" build 401. 2 - Install to default location (AppData-Local) 3 - Start PCT right after install (only setting changed to use SMPlayer)

to be continued

dutchy1001 commented 4 years ago

13 - Cache Directory set back to G-drive 14 - Change "streamer.js" from '/TorrentCache' to '/' 15 - starting PCT again 16 - Choosing serie from favorite folder 17 - Download screen starts, SMPlayer starts but is stuck on loading (see previous pic with red arrow) 18 - File saved in "G:\Popcorn Time" is again same as before 19 - log can be found here

hope this helps

harmonymeow commented 4 years ago

I don't know anything about node.js but based on https://gist.github.com/drodsou/de2ba6291aea67ffc5bc4b52d8c32abd#gistcomment-2943513

/ may not behave as expected on Windows platform.

Can we try what is suggested:

const path = require("path");

And then replace all instances of hardcoded / with path.sep?

dutchy1001 commented 4 years ago

With the latest build 402 it seems this issue has been fixed.

thx