mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.34k stars 103 forks source link

Version 3.3.0 keeps updating itself forever #307

Closed Orama7 closed 11 months ago

Orama7 commented 11 months ago

I had the 3.1.0 version running properly until now. (Although I had installed MediaDownloader it kept running in Portable mode, but that is a separate issue.)

Then today I started MediaDownloader and it found version 3.3.0. It downloaded the files and told me to restart.

I restarted and it it started downloading the MediaDownloader-3.3.0.zip again. Then I uninstalled completely and downloaded manually the MediaDownloader-3.3.0.zip file. I extracted into "C:\Program Files (x86)\Media Downloader" folder. I ran MediaDownloader exe and it started downloading and updating yt-dl exe, again and again. It kept the loop without stopping, so I had to quit.

How can I solve this?

*** I have Windows 7 Ultimate

mhogomchungu commented 11 months ago

Delete folder C:\Program Files (x86)\Media Downloader\local

Presence or absence of this folder determines if MD is running in portable mode or not.

Orama7 commented 11 months ago

There is not a "local" folder.

OK, so I uninstalled and deleted everything and installed again (MediaDownloader-3.3.0.setup.exe).

I ran MediaDownloader exe and it has started in Portable mode, although there is not a "local" folder.

It started downloading and updating yt-dlp exe, again and again. It kept the loop without stopping, so I had to quit.

Still don't know how to solve this.

mhogomchungu commented 11 months ago

Post log output as seen in the basic downloader tab

Orama7 commented 11 months ago

I can't copy output because the program never stops. Is there a way to halt the program by force?

mhogomchungu commented 11 months ago

It will stop when you disconnect the internet.

Orama7 commented 11 months ago

Here is the Log Output:

[media-downloader] [media-downloader] To Disable These Checks, Do The Following:- [media-downloader] 1. Go To "Configure" Tab. [media-downloader] 2. Go To "General Options" Sub Tab. [media-downloader] 3. Uncheck "Show Version Info When Starting". [media-downloader] [media-downloader] Running in portable mode [media-downloader] Download path: C:/Program Files (x86)/Media Downloader/Downloads [media-downloader] Checking installed version of OpenSSL [media-downloader] Found version: OpenSSL 1.1.1j 16 Feb 2021 [media-downloader] Checking installed version of Media Downloader [media-downloader] Found version: 3.3.0 [media-downloader] Start Downloading yt-dlp ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 13,30 MiB / 13,30 MiB (100.00%) [media-downloader] Download complete [media-downloader] Renaming file to: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe [media-downloader] Start Downloading yt-dlp ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 13,30 MiB / 13,30 MiB (100.00%) [media-downloader] Download complete [media-downloader] Renaming file to: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe [media-downloader] Start Downloading yt-dlp ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 4,39 MiB / 13,30 MiB (33.00%)

***Here I disconnected from Internet

mhogomchungu commented 11 months ago
C:/Program Files (x86)/Media Downloader/local

Delete above folder because it should not be there.

Orama7 commented 11 months ago

I told you, there is not such a folder. I checked multiple times. Maybe that is where the problem lies.

mhogomchungu commented 11 months ago
C:/Program Files (x86)/Media Downloader

Delete above folder and then install again using MediaDownloader-3.3.0.setup.exe

Orama7 commented 11 months ago

Without uninstalling first?

mhogomchungu commented 11 months ago

Yes, the unistaller will only delete files and folders it created. You extracting portable version to the installed version location will confuse the uninstaller.

Orama7 commented 11 months ago

Still having the same problem. Here is the Log Output:

[media-downloader] [media-downloader] To Disable These Checks, Do The Following:- [media-downloader] 1. Go To "Configure" Tab. [media-downloader] 2. Go To "General Options" Sub Tab. [media-downloader] 3. Uncheck "Show Version Info When Starting". [media-downloader] [media-downloader] Running in portable mode [media-downloader] Download path: C:/Program Files (x86)/Media Downloader/Downloads [media-downloader] Checking installed version of OpenSSL [media-downloader] Found version: OpenSSL 1.1.1j 16 Feb 2021 [media-downloader] Checking installed version of Media Downloader [media-downloader] Found version: 3.3.0 [media-downloader] Start Downloading yt-dlp ... ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 13,30 MiB / 13,30 MiB (100.00%) [media-downloader] Download complete [media-downloader] Renaming file to: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe [media-downloader] Start Downloading yt-dlp ... ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 13,30 MiB / 13,30 MiB (100.00%) [media-downloader] Download complete [media-downloader] Renaming file to: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe [media-downloader] Start Downloading yt-dlp ... ... ... [media-downloader] Downloading: https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp.exe [media-downloader] Destination: C:/Program Files (x86)/Media Downloader/local/bin/yt-dlp.exe.tmp [media-downloader] Downloading yt-dlp: 898,52 KiB / 13,30 MiB (6.60%)

*** Here I disconnected from Internet

mhogomchungu commented 11 months ago

This is very strange, what happens when you create "local" folder so that below path exists

C:/Program Files (x86)/Media Downloader/local
Orama7 commented 11 months ago

I already tried that and ran MediaDownloader again. It kept repeating the same loop again and again.

Then I also created folder "local/bin" and ran MediaDownloader again. Again, it kept repeating the same loop.

mhogomchungu commented 11 months ago

I managed to get myself into the problem you are having :-)

Looking into it

mhogomchungu commented 11 months ago
C:/Program Files (x86)/Media Downloader

Rename the "Media Downloader" folder above to something else like "MediaDownloader" and try again.

Orama7 commented 11 months ago

My questions:

1) Why it keeps running in Portable mode? 1) Why it sees version 3.2.1 when I had just installed version 3.3.0

Log output:

[media-downloader] [media-downloader] To Disable These Checks, Do The Following:- [media-downloader] 1. Go To "Configure" Tab. [media-downloader] 2. Go To "General Options" Sub Tab. [media-downloader] 3. Uncheck "Show Version Info When Starting". [media-downloader] [media-downloader] Running in portable mode [media-downloader] Download path: C:\Series\All Creatures Great and Small (2020- )\Season 3 [media-downloader] Checking installed version of OpenSSL [media-downloader] Found version: OpenSSL 1.1.1j 16 Feb 2021 [media-downloader] Checking installed version of Media Downloader [media-downloader] Found version: 3.2.1 [media-downloader] Newest Version Is 3.3.0, Updating [media-downloader] Start Downloading Media Downloader ... ... [media-downloader] Downloading: https://github.com/mhogomchungu/media-downloader/releases/download/3.3.0/MediaDownloader-3.3.0.zip [media-downloader] Destination: C:/Users/Galaxian/AppData/Roaming/media-downloader/update/local/tmp/MediaDownloader-3.3.0.zip [media-downloader] Downloading Media Downloader: 70,25 MiB / 70,25 MiB (100.00%) [media-downloader] Extracting archive: C:/Users/Galaxian/AppData/Roaming/media-downloader/update/local/tmp/MediaDownloader-3.3.0.zip [media-downloader] Update Complete, Restart To Use New Version [media-downloader] Checking installed version of yt-dlp [media-downloader] Found version: 2023.07.06 [media-downloader] Checking installed version of aria2c [media-downloader] Found version: 1.36.0 [media-downloader] Checking installed version of wget [media-downloader] Found version: 1.21.3 [media-downloader] Checking installed version of ffmpeg [media-downloader] Found version: n5.0-5-g426b7f48d9-20220308 [media-downloader] Checking installed version of aria2c [media-downloader] Found version: 1.36.0

Orama7 commented 11 months ago

Update: I think I understand why it keeps running in Portable mode.

Although I have installed it in folder "C:\Program Files (x86)\Media Downloader" it has created a "local" folder in "C:\Users\Galaxian\AppData\Roaming\media-downloader\update".

In this "local" folder there is a complete copy of all folders and files of the original installation folder, and it seems it's running from there, instead of running from "C:\Program Files (x86)\Media Downloader".

So perhaps I should just delete the local folder from "C:\Users\Galaxian\AppData\Roaming\media-downloader\update". Would that solve my problem?

But why has it done this in the first place? My guess is the auto-updating messed things up, but only you can give me a definite answer.

mhogomchungu commented 11 months ago
C:\Users\Galaxian\AppData\Roaming\media-downloader\update

Delete above path and see if the problem goes away.

The way it works, when Media Downloader starts, it checks if there is a folder named "local" next to it and it assumes the installation is running in portable mode if the folder is present.

In the update folder above, you are supposed to have only "translations" folder and "media-downloader.exe" file. Rest of the stuff are there because an older version of Media Downloader did not delete them by mistake.

mhogomchungu commented 11 months ago

Going back to your original comments

Then I uninstalled completely and downloaded manually the MediaDownloader-3.3.0.zip file. I extracted into "C:\Program Files (x86)\Media Downloader" folder. I ran MediaDownloader exe and it started downloading and updating yt-dl exe, again and again. It kept the loop without stopping, so I had to quit.

When you did the above, you created the portable version in the path of an installed version. The problem here is that the "local" folder now sits in an area where a normal application can not write to it and MD started redownloading yt-dlp because it could not find it after it was done downloading, because the downloaded data was not written to the folder, because the folder is not writable by MD.

I have made changes and the UI will now show a warning if data path is not writable.

Screenshot_20230804_133400

I am on windows 10 and for reasons i do not currently know, MD keep seeing below path as still being present even after i have deleted it and MD starts redownloading things to folder that do not exist.

C:/Program Files (x86)/Media Downloader/local

Solution i have found that worked is to uinstall MD and then reinstalled with a different folder name.

mhogomchungu commented 11 months ago

Closing this one as "user error".

You somehow end up having a portable version in the installation folder and things got confused from there.

Do not install again in the below path. The "local" subfolder disappears from explorer when deleting it but MD still sees it and its contents for some reason and google does seem to know anything about this strange behavior.

C:/Program Files (x86)/Media Downloader
Orama7 commented 11 months ago

From my side, I don't think it's a "user error". Here is my reasoning:

I never messed with the Portable version, in fact I never took any action downloading and installing anything (except my initial installation) until there was already a problem. So, it's a "program error", and in my opinion the error lies in the auto-updating process.

More specifically: I firstly installed version 3.1.0 to my system and the first error occured after the auto-updating of version 3.2.1. After that MD started running in Portable mode, all by itself, without me having done anything to this end.

Except running in Portable mode, something which I never intended it to, it kept functioning so I didn't bother to investigate. But after the latest auto-updating of version 3.3.0 the program's structure just broke.

I suggest you take a look in the auto-updating process, because it's possible this kind of problem will reoccur in the future.

Other than that, Media Downloader is very useful to me, and I really appreciate your efforts and your time to help me find a solution.

Good day to you!

mhogomchungu commented 11 months ago

The auto updating feature still has issues and i fix them with each release as i become i aware of them.

The biggest problem with this feature is that it is windows only feature and i do not use windows so its hard to extensively test it.