-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REMOVE IT #1452
REMOVE IT #1452
Conversation
…ormyVanCool_AudioBooks_ChapterMarker.lua Updated version of the script I started to make 3 year s ago.
It Updates the Chapter Markers create with my script TormyVanCool_AudioBooks_ChapterMarker
…ancool_Audiobooks chapter marker.lua Renamed the file and removed the 2 empty lines at the beginning of the script
…ol_Audiobooks chapter marker updater.lua Renamed the file as illustrated convention. Not any empty row detected here
…h the primary action
It prints on an HTML and CSV files located into the REAPER's default, all the installed plugins
It extract a list of all installed VSTs etc, and put the list into an HTML and CSV file into the REAPER's main dir.
2.4 2024-29-10 # Adjusted header style for production 1.0 2024-26-10 # First Release 1.1 2024-26-10 + Processes Notifications - /Video/ + /Videos/ 1.2 2024-26-10 - --merge-output-format mp4 + -S vcodec:h264,res,acodec:aac 1.3 2024-26-10 - 10 + 2 1.4 2024-26-10 - 2 + 5 1.5 2024-26-10 - 5 + 1 # Unified Update 1.6 2024-26-10 - 1 + 2 + Version 1.7 2024-27-10 - 'start "" "' from all O.S.s + 'start "UPDATE & DOWNLOAD" "' Win 1.8 2024-27-10 - Start = '' - 1 + Start = '"' + 2 1.9 2024-27-10 + Check saved project - 1 + 2 2.0 2024-27-10 - "chmod +x " .. MainPath + 'chmod +x "' .. MainPath .. '"' # Ordered Variables - 2 + 1 + Apple Trial 2.3 2024-27-10 # Linux execution correction + Credits # 2.1 and 2.2 just trials due issues with Linux and Apple 2.31 2024-28-10 # Binaries directly form the source 2.32 2024-28-10 - yt-dlp + yt-dlp_linux 2.4 2024-29-10 # Adjusted header style for production
I've put all the Changelog because it's not present into the history of ReaPack but only in mine one. |
v2.5 Changed the path from 'Various' to 'Video'
it's now 2.5. Corrections made into the path from "Various" to "Video" |
Sorry I remove the request. In 3 days I didn't get any feedback and today other scripts were merged so I'm not welcome. |
This one needs more work to review because it does shell command execution and ships third-party binaries (= more scrutiny warranted compared to a "normal" safe script). The one I merged earlier was an obviously OK 2-line update. Still haven't properly checked this one, but at a glance there were red flag bits that stood out: MainPath = './yt-dlp_macos'
Start = 'cd "' .. CallPath .. '" && chmod +x ' .. dlpMac .. ' && '
os.execute('chmod +x "' .. MainPath .. '"') It does the chmod twice, but the second one happens before Looks like Then there's the I assume that's there because on Windows the command is somehow spawned in the background? I haven't tried on Windows. The yt-dlp binaries are not pinned to a defined version, and supplied for the different OSes but without specifying the architecture? Is yt-dlp.exe 32-bit so it works on 64-bit Windows? The Linux one should probably come from the user's OS not the package, macOS one is ARM or x86_64 or both? (haven't checked yet, having to make sure before posting != fast review) Finally there's a misindented line in the |
|
"Works for me" is no excuse for lower quality. Obviously doing chmod twice, one of them broken (because before cd), isn't intended. Sure the macOS/Linux code paths (double-quoted w/o escaping) likely works for most cases. But it will fail for some users because the full range of valid inputs is not considered. And the failure mode (arbitrary command injection) allows for catastrophic outcomes (even if unlikely in practice).
I do use yt-dlp frequently on macOS but I can't comment on this specific issue you're referring to without without knowing what it is. But if it's broken then it shouldn't be in the script or users should be made aware of that...?
You're correct. From the quick glance I didn't notice it was just filtering user input (rather than existing filenames for the purpose of shell escaping).
That's incorrect. The polling can (and should) be done without freezing REAPER for seconds. And yes making the main thread unresponsive for seconds/minutes/hours is a "freeze". A busy wait (100% CPU usage) makes it worse. Also isn't the loop infinite if the output file fails to be created for whatever reason? The script does no error handling. The file size can stop growing for more than a second before yt-dlp is done (eg. network speed drops temporarily halfway).
Missing the point which was the potential architecture mismatch? 32-bit vs 64-bit, ARM vs x86... Anyway just checked: The Linux file is a python3 script = OK (if python3 is installed). The macOS one is a universal binary x86_64 and ARM64 = no 32-bit. The .exe is x86_64 = no 32-bit. (4% of ReaPack Windows downloads is 32-bit, 7% on macOS, but I do not know how many run on a 32-bit OS.) It's fine to not support all users but it must be documented/the package be made unavailable on unsupported OSes.
That means when a newer version breaks something the user can't easily downgrade to a known working version. (But it does have the advantage of not having to update & test the script regularly so I get your point.) |
It works because tested also by the ones having linux, not only on my machine. hence the credits.
Then I will escape them. But strangely enough to open a quote like
There is no way to do it differently. Even if I segregate the 2 processes (updates and download) the download starts before the update process is finished and the API to import the final video into the project It does so on all the platforms. No way to capture the returns from so by doing
the I don't see any other way to verify that the download is really terminated. EDIT - NOTE: another way is to test the presence of the partial file .. normally with
Not clue.
As I said, it will be documented because I will make a tutorial about where I say all what's needed. I found only 4 detected OSes .. the Windows-ARM still not present "other" is for Linux So if for apple users the is not any solutions "sorry guys for you it's not possible to implement it". |
Well, sometimes testing the entire input possibility space is done (it's called fuzzing). 😉 But I just meant correctly handling the full input value range, not testing. Just standard programming. Input is any non-null bytes representing a path to an existing file. Output is a shell script to be interpreted by sh, bash or cmd.exe. All inputs must map to a valid output. Right now many inputs can make the shell behave unexpectedly (technically arbitrary command injection). (cmd.exe has very different syntax rules than sh/bash! APIs such as
This seems to only happen on Windows? I can't duplicate that behavior on macOS. |
In the reality it was claimed also on Linux. But if you run my script in Reaper see what's happening just by commenting all the block
and just before it, set these PAIs in this way
Now I tried to comment the sleep() and it works fine as well but I will try now the repaer.defer() I never used before so no idea about syntaxis. The doc is very minimalistic. no examples on anything |
ok I tried the reaper.defer() but it was a disaster since i have not clue how should I use it. |
There's multiple threads on the forum explaining how it works. Tons of scripts using it. Pass a function to it and REAPER will call it 30ms later (nominally). |
I spotted this https://forums.cockos.com/showthread.php?p=2616483 but it created mor confusion than clarity. |
function checkWhetherItsFinished()
if not reaper.file_exists('...part') then
-- ...
else
reaper.defer(checkWhetherItsFinished)
end
end
reaper.defer(checkWhetherItsFinished) (I don't mind helping a bit, but this is a release repository, not ReaScript technical support...) |
I appreciate it. Unfortunately it doesn't carry on the wanted result. And form what I see yt-delp is the more probable cause so I have to live with that loop |
under windows: solved. The 'start blah' had to be 'start /b /wait bla' the checking routing is automatically useless. NOTE: I wasn't aware about these switches. |
opened a different PR |
2.4 2024-29-10 # Adjusted header style for production
1.0 2024-26-10
# First Release
1.1 2024-26-10
+ Processes Notifications
- /Video/
+ /Videos/
1.2 2024-26-10
- --merge-output-format mp4
+ -S vcodec:h264,res,acodec:aac
1.3 2024-26-10
- 10
+ 2
1.4 2024-26-10
- 2
+ 5
1.5 2024-26-10
- 5
+ 1
# Unified Update
1.6 2024-26-10 - 1
+ 2
+ Version
1.7 2024-27-10
- 'start "" "' from all O.S.s
+ 'start "UPDATE & DOWNLOAD" "' Win
1.8 2024-27-10
- Start = ''
- 1
+ Start = '"'
+ 2
1.9 2024-27-10
+ Check saved project
- 1
+ 2
2.0 2024-27-10
- "chmod +x " .. MainPath
+ 'chmod +x "' .. MainPath .. '"'
# Ordered Variables
- 2
+ 1
+ Apple Trial
2.3 2024-27-10
# Linux execution correction
+ Credits
# 2.1 and 2.2 just trials due issues with Linux and Apple
2.31 2024-28-10
# Binaries directly form the source
2.32 2024-28-10
- yt-dlp
+ yt-dlp_linux
2.4 2024-29-10
# Adjusted header style for production