-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow external applications to add downloads #628
Comments
Hi! This sounds like a great idea :) I'll make it so Parabolic can accept URLs in the command-line args (which is what the |
Nice to see that it has been implemented. Thanks! I will look into integrating it into my application soon(-ish). |
No worries. Should have a beta release by the end of this week that you can install through flatpak and ensure it works correctly with your app. Will let you know when it's out! |
https://github.com/NickvisionApps/Parabolic/releases/tag/2023.11.0-beta2 Will be available via |
Thanks for working on this. While opening a URL using the command line works flawlessly, DBus activation does not yet seem to work. I noticed 2 problems: When using the Example: #!/usr/bin/env python3
import dbus
if __name__ == "__main__":
bus = dbus.SessionBus()
proxy = bus.get_object(
"org.nickvision.tubeconverter", "/org/nickvision/tubeconverter"
)
open = proxy.get_dbus_method("Open", "org.freedesktop.Application")
open(["https://youtu.be/8eXj97stbG8"], {}) Output of
Unfortunately, I don't know enough about C# and Gir.Core to debug the root cause of this. I noticed that when I start Parabolic with I am not sure how the command line flag is handled internally, but it may be related to #91. I am uncertain how much this issue really matters. |
Ah I think I know the issue...Will fix, thank you! |
Could you install the flatpak file from this build: https://github.com/NickvisionApps/Parabolic/actions/runs/6852129882 and run the app to test it. Make sure you have both the stable and beta builds uninstalled otherwise dbus might trigger the wrong build:
|
The second problem is now fixed! Unfortunately,
|
@d-k-bo Ok could you try this build: https://github.com/NickvisionApps/Parabolic/actions/runs/6853398652 Remember to uninstall the old versions first. It shouldn't crash anymore, and passing via command line should work again, but i don't know if it will actually open via dbus or not. If dbus doesn't work, then I think it's an issue with the C# gtk bindings, but in that case I can use manual c calls and get it working. |
@d-k-bo Any update with that build? |
Sorry, I hadn't the time to look into it until now. (Again, thanks for investing your time into this feature!) I just tested both builds. Opening a URL via the command line works fine again. Calling |
Alright, then I'll have to do manual C calls. Give me a few hours :) |
@d-k-bo Ok this should be the one that works! CLI and DBus: https://github.com/NickvisionApps/Parabolic/actions/runs/6871301515 |
It works! 🥳️ Thank you very much! |
Glad to hear! Hope to have a stable release out by Friday/the beginning of next week. |
I am working on Televido, an application to access media from German public broadcasting services. I want to offer users the ability to download shows. Since some channels need a more advanced downloader such as yt-dlp, I think it would be the best to rely on Parabolic if it is installed. I can image that there are many other projects with similar needs.
I propose that Parabolic supports opening URLs via the
Open
method of theorg.freedesktop.Application
interface. Calling this method should start Parabolic and open the “Add Download” dialog with the “Media URL” field prefilled.Currently, this method call isn't handled and throws an error:
I think this could be implemented by adding a handler for the
GApplication::open
signal and setting theG_APPLICATION_HANDLES_OPEN
flag. I guess that this would also enable the option to supply the URL as a command line argument.For reference, some video players support starting playback like this. E.g. when you have Celluloid installed and open D-Spy, you can play a video by passing
(['https://youtu.be/8eXj97stbG8'], {})
as a parameter to theorg.freedesktop.Application.Open
call.The text was updated successfully, but these errors were encountered: