Source i (link to git-repo or to original if based on someone elses unmodified work):

https://github.com/fabiomux/kde-servicemenus

Original
2
Become a Fan
5.8

Description:
The service menu allows to download a media file from within one of the supported
websites in the current folder using the *yt-dlp* command line tool,
the successor of the more popular *youtube-dl* application.


In the last version
===================

- Fixed the download of the best format available


Features
========

- Fully translated into 4 languages besides English
(French, German, Italian, Spanish);
- Works from within the Dolphin, Konqueror, Krusader, and KFind-results context menu;
- Support for KDE Plasma 6;
- Select the format among all the available formats;
- Select the format among the only audio formats;
- Select the format among the only video formats;
- Select the format among the audio + video formats;
- Automatically select the best audio format;
- Automatically select the best video format;
- Automatically select the best audio + video format;
- A dialog shows the progress and allows you to cancel the download;
- The output file format can be overridden using the $KSM_DWYDH_OUTPUT variable.


Requirements
============

- KDE 4 or superior;
- KDialog;
- yt-dlp.


Install
=======

The recommended method to install this service menu is through *Dolphin*:
- From Settings > Context Menu > Download new services;
- Search for "download_with_yt-dlp_here";
- Click on the *Install* button and select the localized archive of your choice.

That way the latest stable version is installed, updated, and easily removed from the same interface.

Also, the *Discover* application can install it, but doesn't allow to select a localized version:
- Under Application Addons > Servicemenu;
- Search for: "download_with_yt-dlp_here";
- Click on the *Install* button.

For debugging purposes follow one of the other methods mentioned on the project page:
https://freeaptitude.altervista.org/downloads/download-with-yt-dlp-here.html#installation


Get Help
========

- More info is available at: https://freeaptitude.altervista.org/downloads/download-with-yt-dlp-here.html
- Changelog: https://freeaptitude.altervista.org/downloads/download-with-yt-dlp-here.html#changelog


Contributing
============

If you like this addon and want to encourage me to improve the project or keep it
regularly updated, you can:
- Become a fan and add a positive rating here on this page;
- Star it on the GitHub page: https://github.com/fabiomux/kde-servicemenus;
- Report bugs or malfunctions or even ask for new features, just opening an issue
on the GitHub issues page: https://github.com/fabiomux/kde-servicemenus/issues;
- Localize it in your language using the file as a template:
https://github.com/fabiomux/kde-servicemenus/blob/main/download_with_yt-dlp_here/locale/en.yaml

Ratings & Comments

13 Comments

offo

is there a way to make it use xclip/clipboard directly?

FabioMux

Hi @offo, Do you mean to implement a menu item that automatically grabs the clipboard content instead of asking for the URL with kdialog? If xclip content is shared with Klipper I might be able to implement that.

offo

Yea, basically. I mean, typically you would past the url anyway into the input field, right, so it is already present in the clipboard. Though i suppose i'm more so asking if i could edit the file to make it happen. Maybe other user prefer an input field, but I'm no programmer by any means, so im not sure if i could just add some kind of xclip command to the 'insert url' inputbox part of the exec parameter, or something like that.

FabioMux

I don't use xclip so i have made a little bit of research: to do it you should replace the content within $(...), where the specific dialog is called, with "xsel -ob". In particular, it is the first variable assigned u=$(...)

mbmalone

10 This is the easiest and most convenient way to download an online video straight into the folder you want, from Dolphin. I normally only use best audio best video, but sometimes just want the .mp3. Great App!!!

FabioMux

Thanks a lot :-)

mbmalone

I believe I found the fix for KDE Neon with Plasma 6. I took your previous script and replaced MimeType=inode/directory; and X-KDE-ServiceTypes=KonqPopupMenu/Plugin with MimeType=all/allfiles;inode/directory; and moved the .desktop to the new location in /usr/share/kio/servicemenus/ 😁

FabioMux

Hi @mbmalone, the desktop file is unchanged, the only change is that the installer now uses a different destination folder (kio/...) and sets up the permissions. Adding a different MimeType only involves more "type of files" that can be selected, which might give unexpected results, so be careful. If you want to learn about ServiceMenus you can follow the original documentation (https://develop.kde.org/docs/apps/dolphin/service-menus/), learning a programming language is a plus to create complex scripts :)

mbmalone

ok, I reverted my changes to the MimeType and it still works fine. I just adjusted the naming to include the uploader. 😁

FabioMux

Do you mean that you put the name of the service in the filename?

mbmalone

I just made these little mods to the file name thoughout the script to include the uploader. I mainly do this so I can figure out which account that video came from. You can see where I made the change. yt-dlp --newline --progress -o "%f/%(uploader)s - %(title)s.%(ext)s"

FabioMux

Interesting add! I should provide a way to customize the file output, maybe an environment variable to set up within the .bashrc file or something similar. To remove the quotes have you tried the options "--restrict-filenames" or "--windows-filenames"?

Pling
0 Affiliates
Details
license GPLv3
version 1.3.1
updated
added
downloads 24h 5
mediaviews 24h 0
pageviews 24h 6

More Dolphin Service Menus from FabioMux:

Open with gVim [On opened windows and new tabs vim/gVim]
FabioMux
last update date: 3 months ago

Score 5.7

Copy to Klipper [file name path dirname hash and more]
FabioMux
last update date: 6 months ago

Score 5.8

Compose with Thunderbird Flatpak edition
FabioMux
last update date: 8 months ago

Score 5.8

Compose with Betterbird Flatpak edition
FabioMux
last update date: 8 months ago

Score 5.0

Scan with Clamav
FabioMux
last update date: 8 months ago

Score 5.8

Compose with Thunderbird
FabioMux
last update date: 8 months ago

Score 5.0

Other Dolphin Service Menus:

burnWithGrowisofs
chunkylover
last update date: 20 years ago

Score 5.0

Firefox-bookmarks service menu
storyteller
last update date: 20 years ago

Score 5.0

Text Convert Service Menu
smp-penguin
last update date: 21 years ago

Score 5.0

Pdflatex servicemenu
bobuse
last update date: 20 years ago

Score 5.0

Send through Bluetooth
dmnet
last update date: 21 years ago

Score 5.0

Add to Bloglines
spookster
last update date: 20 years ago

Score 5.0



System Tags