Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets YoutubeDl applet
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
[Locked] YoutubeDl applet [Bug #285]
brianw English 14 matttbe [Read]
14 June 2013 à 22:36

brianw, Wednesday 06 June 2012 à 15:39


Subscription date : 25 April 2012
Messages : 270
From the technical discussion http://www.glx-dock.org/bg_topic.php?t=6161

Eduardo Mucelli :
It would be nice to add a flow like following: Left-click [Dialog box appers] -> Paste URL -> Enter [Download starts]


Would that be if there are currently no urls the user would be presented with the dialog? Or should the user be able to set which functionality to use in the configuration (i.e choose left click either view current list or add urls)?

I am looking into pygtk to use along with the dialogs. Hopefully I can get the left click to open an editor so the user can move urls up/down in the list or add/delete urls. I have something in tkinter but have not implemented it in the applet.

Eduardo Mucelli, Sunday 10 June 2012 à 10:56


Subscription date : 05 August 2009
Messages : 285
Yes, when there is no URLs, the user would be presented with a dialog. I was thinking something simpler than that, a place to add one URL a time. Normally users do not want a bunch of URLs, they convert one, well, at least this is my way of using it

At least for what I am thinking, the dialog provided by the CDApplet would be enough.

brianw, Monday 11 June 2012 à 18:05


Subscription date : 25 April 2012
Messages : 270
Eduardo Mucelli :
Yes, when there is no URLs, the user would be presented with a dialog.


OK, this has been implemented. So you can either drag and drop a url on the icon or you can left click (if there are no urls already in the queue) and be presented with a dialog to paste or type in a url. If there are urls already in the queue then you will be presented with a dialog showing the current download and urls queued up for downloading.

The current version is available: http://bazaar.launchpad.net/~mycompostpile/cairo-dock-plug-ins-extras/YoutubeDl/tarball/280

There is also a url list editor (using python's tkinter) available on right click of the icon (if tkniter is not installed you will get a dialog message stating that editing is not possible).

In the configuration you can choose what the middle click does (either shows current status or opens the video folder). You can also choose various options for alert messages, directory setup and options for the downloader.

The right click will allow you to load, save, clear and edit the url list. It will also allow aborting, pausing and resuming downloads (pausing and resuming stops/starts urls from being put on the queue they do not affect the current download, only abort affects the current download).

I am currently working on using the python gtk interface to make the file dialogs, and editor integrate better into the desktop. Once the editor using gtk is finished it will most likely replace the left click url list display.

If there is interest I may also add a download option to use the youtube downloaders built in option to convert to mp3 (Requires that ffmpeg and ffprobe be installed). I personally don't use it so haven't implemented that but should not be a problem.

If you want to test that would be appreciated and reporting any bug, request or suggestion would also be greatly appreciated (my feelings do not get hurt by being told something can be done better a different way, that is how we learn and grow our knowledge).

fabounet, Monday 11 June 2012 à 19:12


Subscription date : 30 November 2007
Messages : 17118
I didn't try the latest version, but what about the behavior of the "Drop to share" applet ?
you can either drop a file/text on it, or right-click -> send the clipboard
so here, you would have en entry in the menu with "get the URL in the clipboard"

fabounet, Tuesday 12 June 2012 à 13:28


Subscription date : 30 November 2007
Messages : 17118
tested the latest version yesterday, and have some remarks

- the handbook is too long, doesn't make one wants to read it
- at first I didn't understand the dialog with the concept of URL-list. I thought it would download all the videos at once. But maybe it's ok one by one too, I don't think it's a big deal. Maybe if I had read the handbook it would have told me that ...
- when a dl is canceled, the next one doesn't start automatically
- canceling a dl is quite long, makes you wonder if the applet is doing something ... maybe we need some kind of progress bar in the API to signal a work in progress
- middle-click didn't open the folder until I edit the conf and apply (it was selected by default, which is probably the good choice)
- also, opening the folder should appear in the menu, and if it's also mapped on the middle-click, it should be written in the menu ("Open the videos folder" and "Open the videos folder (middle-click)", like other applets).
- when reloading the applet, I think there are some bugs (for instance, I think that the label was resetted to "YoutubeDL")
- some widgets in the config panel are weird, like labels with no actions that are sensitive or not. it's probably possible to refine it a little bit.
- being able to do ctrl+c and then right-click -> download the URL in clipboard would be nice (and if the clipboard is empty, the menu entry should be unsensitive)
- the 3rd configuration tab is not called "Configuration ", which doesn't suit other applets (the 4th one is ok).

Hope you don't mind my remarks, they are not criticisms but merely my feelings and observations when using the applet to download my daily Starcraft replays

brianw, Tuesday 12 June 2012 à 14:47


Subscription date : 25 April 2012
Messages : 270
fabounet :
Hope you don't mind my remarks, they are not criticisms but merely my feelings and observations when using the applet to download my daily Starcraft replays :D


That is the only way to make it better. Even if I do something that seems good for me others may have a different view which can be better.

- the handbook is too long, doesn't make one wants to read it


I thought this as well but I just kept putting it on the "back burner".

- at first I didn't understand the dialog with the concept of URL-list. I thought it would download all the videos at once. But maybe it's ok one by one too, I don't think it's a big deal. Maybe if I had read the handbook it would have told me that ...


When I clear up the handbook hopefully it helps.

- when a dl is canceled, the next one doesn't start automatically


I had this originally but because I was testing so much it annoyed me and I changed it. This is a perfect example of doing something I think is better but others seeing it differently. I will change it back to obey the pause/resume control instead (next download will start unless the user specifically pauses downloading).

- canceling a dl is quite long, makes you wonder if the applet is doing something ... maybe we need some kind of progress bar in the API to signal a work in progress


Yes, I think I mentioned this on launchpad when requesting the merge but it is definitely slow due the queue communication. I would like to find a way to make it better (would be best written in C but how to integrate the downloader without re-writing it, maybe I need to look into the python-c stuff matttbe told me about).

- middle-click didn't open the folder until I edit the conf and apply (it was selected by default, which is probably the good choice)


It should so this is actually a bug.

- also, opening the folder should appear in the menu, and if it's also mapped on the middle-click, it should be written in the menu ("Open the videos folder" and "Open the videos folder (middle-click)", like other applets).


Yes, when I was looking at the sound applet it made me realize that I should have this in the right click.

- when reloading the applet, I think there are some bugs (for instance, I think that the label was resetted to "YoutubeDL")


Thanks, will look into this.

[quote/- some widgets in the config panel are weird, like labels with no actions that are sensitive or not. it's probably possible to refine it a little bit.

Thanks, will look into this.

- being able to do ctrl+c and then right-click -> download the URL in clipboard would be nice (and if the clipboard is empty, the menu entry should be unsensitive)


Working on this.

- the 3rd configuration tab is not called "Configuration ", which doesn't suit other applets (the 4th one is ok).


Will change to make it consistent.

Thanks for the info.

matttbe, Tuesday 12 June 2012 à 18:54


Subscription date : 24 January 2009
Messages : 12573
- canceling a dl is quite long, makes you wonder if the applet is doing something ... maybe we need some kind of progress bar in the API to signal a work in progress
Yes, I think I mentioned this on launchpad when requesting the merge but it is definitely slow due the queue communication. I would like to find a way to make it better (would be best written in C but how to integrate the downloader without re-writing it, maybe I need to look into the python-c stuff matttbe told me about)
I think it's maybe better to find a solution with Python because Python doesn't need to be compiled (except if you want to use Cairo-Dock functions but it's maybe a lot of work just for a tiny details)

fabounet, Thursday 14 June 2012 à 15:51


Subscription date : 30 November 2007
Messages : 17118
or maybe you can just cancel the download in a thread ?
we don't need to wait until the cancellation is finished I think, except if you can't launch the next download until the first one is cancelled.
that's not a big deal, but it's a little surprising that it takes so much time, you would expect it to be immediate
Also, I don't think that the files are deleted

about the "working" animation, I'll add it on my TODO list, as well as "progress-bar" I think that many applets can benefit from these 2 features.

1 more thing: when the clipboard is empty, or doesn't have a valid URL (if it's possible to detect that), the menu entry should be visible but unsensitive (it's not good to have a menu layout that changes, plus making it invisible makes it hard to find for users).

Thanks for the great job !

brianw, Friday 15 June 2012 à 05:26


Subscription date : 25 April 2012
Messages : 270
fabounet :
or maybe you can just cancel the download in a thread ?

I am going to look into making this better.

Also, I don't think that the files are deleted ;)

No, that is the youtube-dl process. I didn't do anything to it except over ride the report progress function to use a queue instead of the screen and I over rode the main function to set options depending on the configuration file settings and use the queue process. The original youtube-dl.py file does not remove partial downloads.

1 more thing: when the clipboard is empty, or doesn't have a valid URL (if it's possible to detect that), the menu entry should be visible but unsensitive (it's not good to have a menu layout that changes, plus making it invisible makes it hard to find for users).


I tried doing the validate url but it has been brought to my attention that there are "short" urls used for youtube so it may not be practical to validate a url.

As for the unsensitive part of the menu, I looked for a solution but could not find any. Is there a method to do this already or do I need to find a way to "grey" out the selection by changing the font colour and add code in the on_menu_selection to check the status?

Thanks to you and matttbe for all the support and feedback.

matttbe, Friday 15 June 2012 à 06:46


Subscription date : 24 January 2009
Messages : 12573
As for the unsensitive part of the menu, I looked for a solution but could not find any. Is there a method to do this already or do I need to find a way to "grey" out the selection by changing the font colour and add code in the on_menu_selection to check the status?
I didn't test but you can maybe add this property: 'sensitive', False (but changing the colour is maybe not a good idea )

brianw, Saturday 16 June 2012 à 03:12


Subscription date : 25 April 2012
Messages : 270
matttbe :
I didn't test but you can maybe add this property: 'sensitive', False (but changing the colour is maybe not a good idea )


This doesn't work for me. I even checked the file: cairo-dock-plug-ins/Dbus/src/interface-applet-methods.c which seems to have everything to do with the menu building and I could find nothing to make the entry sensitive/unsensitive. There is a state field for checkbox menu types which removes the icon and the icon position is either blank (state false) or a checkmark (state true) but there was nothing about changing the sensitivity of a menu entry. There was nothing for a normal entry to change the sensitivity and the only other types were submenu, seperator and group box for radio buttons.

The sensitive and unsensitive idea is very good as most applications handle things this way and as fabounet says:

fabounet :
it's not good to have a menu layout that changes, plus making it invisible makes it hard to find for users


Which I agree with 100%. Any suggestions?

matttbe, Saturday 16 June 2012 à 09:19


Subscription date : 24 January 2009
Messages : 12573
But currently, I think you can use a simple menu entry

fabounet, Saturday 16 June 2012 à 23:51


Subscription date : 30 November 2007
Messages : 17118
indeed, you're right, there is nothing in the current API
I was sure it was already present I'll add it, I think I'll use the property name "sensitive", so you can already add it to your code and it will be ignored until I add it to the API

brianw, Monday 18 June 2012 à 02:09


Subscription date : 25 April 2012
Messages : 270
fabounet :
indeed, you're right, there is nothing in the current API
I was sure it was already present I'll add it, I think I'll use the property name "sensitive", so you can already add it to your code and it will be ignored until I add it to the API :)


I think what I might do is take the load/clear/save url list functionality and move it into the editing utility for the url list (since in reality it is editing specific functionality) instead of having it in the right click menu. Under normal operation one would just use the applet to drag and drop a url or add from clipboard anyway and the loading/saving/clearing is more advanced features that one would expect to be specific to the editor function.

The other functions in the right click like abort, pause/resume, and add from clipboard could have the sensitive flag added without adverse effects but the url editing features, especially clearing the list, must be disabled if there is an active download otherwise there are issues.

matttbe, Friday 14 June 2013 à 22:36


Subscription date : 24 January 2009
Messages : 12573
Hello Brian,

It seems there is a bug with your applet, can you have a look there: bg_topic.php?t=7036?

Applets | Applets

Subjects Author Language Messages Last message
[Locked] YoutubeDl applet [Bug #285]
brianw English 14 matttbe [Read]
14 June 2013 à 22:36


Glx-Dock / Cairo-Dock List of forums Applets | Applets YoutubeDl applet Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.