persepolisdm / persepolis

Persepolis Download Manager is a GUI for aria2.
https://persepolisdm.github.io
GNU General Public License v3.0
6.19k stars 651 forks source link

Suggestion to fix "Firefox in MS Windows can't open Persepolis" #722

Closed 7aman closed 3 years ago

7aman commented 4 years ago

Hi.

Known bugs: -Firefox in MS Windows can't open Persepolis. Persepolis must be executed manually by user.

I am the :ghost: who opened 1st issue on web-extension two and half years ago.
I'm a Firefox junky and this line of release info about my precious really bothers me :rage: :smile: .

Kidding aside, I still have the same idea to fix this: Persepolis needs a middle man to handle web extension requests!

To prove my point there is a quote from Firefox MDN about native messaging:

If you started the native application by sending runtime.sendNativeMessage(), then it is closed after it has received the message and sent a response.

Just to emphasis it in "then clause" refers to native application. So it's obvious that Persepolis will be closed after receiving the message.
But if Persepolis adds a middle man to handle messages, message will pass through the middle man to get to Persepolis. In this procedure it is the middle man who dies for then it is closed after it has received the message and sent a response.
I did not read Persepolis thoroughly but I guess current implementation of native messaging of firefox is working in linux distros because of persepolis_run_shell.

Last time you strangled my idea in Notfeh!+. :smiley:
May I work on this fix and be hopeful it will be merged? Thanks.

P.S. As a successful and commercial example IDM implements native messaging with same idea.

alireza-amirsamimi commented 4 years ago

Hello Obviously the answer is middle man and we use middle man in Linux and Mac. We also tested middle man in Windows. Unfortunately It didn't work!. Chrome can call Persepolis without any problem in Windows but FireFox can't!

7aman commented 4 years ago

OK. I will try.

7aman commented 4 years ago

Hi again.
I prepared an installer for windows x64 that contains a middle man based on this branch and available to download from link below. Would you ask some windows users to test this installer, please?

https://github.com/7aman/pdm-win-build/releases/download/v3.2.0.0-test/Persepolis.Download.Manager_setupX64-fix-firefox.exe

Now chrome is not working! I will keep working on it.

7aman commented 4 years ago

I fixed the chrome issue.
New bundle is available at:
https://github.com/7aman/pdm-win-build/releases/download/v3.2.0.0-test/Persepolis.Download.Manager_setupX64-fix-firefox.exe

This bundle is based on this branch and has no conflict with linux and mac related codes.
https://github.com/7aman/persepolis/tree/firefox