OpenMediaVault-Plugin-Developers / openmediavault-downloader

OpenMediaVault plugin for downloading files
11 stars 11 forks source link

Master #17

Closed godofallthatwas closed 2 years ago

godofallthatwas commented 2 years ago

The newest change fixes a minor(?) security issue. If you don't want to make all the changes maybe just changing the --no-exec line?

ryecoaaron commented 2 years ago

I don't really consider it a security issue because you have to have admin access to web interface to "exploit" it. And if you have admin access to the web interface, you can run any command in scheduled tasks.

And can you remove the noffmpeg stuff since I was going to add it to the dependencies in the control file (or you can).

godofallthatwas commented 2 years ago

I'm very not sure i did the control file thing correctly. Seems simple enough just add the one line ffmpeg to where the other things listed as dependencies were....

Otherwise I think this is in a much happier state for getting the correct output when you've asked for a specific file type. I wanna do some work on things like an options tab and stuff. I don't know if I care enough if they're not going to be brought into the main plugin. Any reason you wouldn't bring them in?

ryecoaaron commented 2 years ago

Depends on what is on the options tab and what the "stuff" is.

godofallthatwas commented 2 years ago

I'm maybe in over my head.... I can't figure out how the front end generates things.

I think I have some idea of how the backend would work. I've mapped out the logic on how to make the Multiple option show how many of the url's it's run through to give more information to the Filesize column, just so you have some kind of indicator on progress, like "1 of 14 urls", or "1/14" , But when I change the value to a string and put a string in there I just get "Nan".

Can you point me in the direction of what's changing the filesize from what I assume to be integers like 4096000 to 4.0MB and my string "filelist" to Nan?

ryecoaaron commented 2 years ago

https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-downloader/blob/master/usr/share/openmediavault/workbench/component.d/omv-services-downloader-datatable-page.yaml#L41 is what converts the integer

godofallthatwas commented 2 years ago

I got that far... I deleted that line.....

i also added a "best" format option to the format list.

Neither change shows up? Do I have to tell OMV to rescan the yaml file somewhow?

ryecoaaron commented 2 years ago

If you are editing files in /usr/share/openmediavault/workbench/, you need to run: omv-mkworkbench all

godofallthatwas commented 2 years ago

OMG thank you. I was feeling so stupid.