Description: Attention: The script is not working anymore, because the service of the site youtubia.com is not functioning as well. Youtube/Google is constantly trying to make the download of videos more difficult, so a tool like this script has to play catch up, and that's not pretty. Don't download unless you want to solve the problem.
With this service you can search for YouTube clips and add them to your playlist. It seems you need at least amarok 2.0.2 for this script to do its job. If someone has a patch to make it work with pre 2.0.2 versions, that would be great, too.Last changelog:
- included some changes made by panzi - and with these changes it runs on 2.1(svn), too!
I replaced the Youtube download service and got this excelent script working again.
Here's the diff (main.js.diff):
185c185
< var url = new QUrl("http://www.youtubia.com/flv_returner.php?video_id="+youtube_id);
---
> var url = new QUrl("http://www.3outube.com/mp4/?v="+youtube_id);
I have successfully installed the plugin and searching works. I can add songs to my playlist but there it ends. Amarok wont play the files. If I press play like 3 times a message shows up telling me "Too many errors encountered in playlist. Playback stopped." It does however show the startframe of the song/video in the playlist. The length of the song says 0:00, but it's the same on the screenshot so..
I'm new at arch so it just might be me doing something stupid! I do think it's a problem with the codec. Do I need some special-codec? It works fine in Firefox and Konqueror, but I guess that just shows that mplayer is able to play the file.. Any help would be appreciated!
I'm using Amarok 2.0.2 on ArchLinux.
Thank you very much for this fine script, I like it very much!
Unfortunately, it doesn't work in WinXP for me: In the stable release of Amarok it crashes the application at startup (I have to delete it manually), in 2.1svn search etc. work, but when I play I get just noise instead of sound.
It looks like this is a problem of Directshow (for that one not forget one is in Win ;-)), similar to the known problem with mp3 playback.
Does anyone have a solution/patch for it?
It didn't work for me (using 2.1-SVN) so I worked on it. It now doesn't need youtuba anymore. However, for some reason you have to click [+] twice (or three times, but one of the times its [-]).
Here you can download my version:
http://twoday.tuwien.ac.at/pub/files/youtube_service.amarokscript.tar
Thanks for your work. I merged your changes and released version 0.1.1. Maybe it works with 2.1 now, but that has still to be tested. I didn't include your code to get rid of youtubia because of the following reasons:
- When I started to write the script I wanted to do what you did, but I had to realize that you'd be always at the merci of youtube changing its code to prevent just that. This would mean, that an uphill battle would begin.
- With this solution you can't get a 'permalink' to the video, so that the link in your playlist works 'forever'. I realize that this problem isn't totally solved with youtubia either. But at least the problem is shifted to them. :-)
- To download directly from youtube you need at least one more download PER music clip to extract the correct id etc. pp. This is a LOT more overhead and reduces the script performance to a great deal.
- The solution over youtubia is simple and seems to work quite good. I love simplicity.
Hmm...searching doesn't seem to work on my installation. Also, it would be nice if you renamed the archive so that one can install it with the amarok script tool. In other words, it should have the amarokscript.tar.bz2 file ending. It would make it possible even for noobs to install it.
However, as searching does not seem to work, I can't test it any further now.
works with 2.0.1, but there are a few bugs in 2.0.1, which can cause this script to crash. Updating to 2.0.2 is highly recommended.
Also, to search you need to click on the expand button of one of the four 'order by' categories. This behaviour is preset by amarok, so I can't change that.
well, the only explanation at the moment is that 2.0.1 sucks. I started writing this script with 2.0.1 and half of my problems were solved as soon as there was an mandriva update to 2.0.2.
I don't see myself doing workarounds for 2.0.1 bugs, maybe someone with 2.0.1 can do that and send me a patch. :)
Hope you don't blame that on me.
Ratings & Comments
17 Comments
I replaced the Youtube download service and got this excelent script working again. Here's the diff (main.js.diff): 185c185 < var url = new QUrl("http://www.youtubia.com/flv_returner.php?video_id="+youtube_id); --- > var url = new QUrl("http://www.3outube.com/mp4/?v="+youtube_id);
I have successfully installed the plugin and searching works. I can add songs to my playlist but there it ends. Amarok wont play the files. If I press play like 3 times a message shows up telling me "Too many errors encountered in playlist. Playback stopped." It does however show the startframe of the song/video in the playlist. The length of the song says 0:00, but it's the same on the screenshot so.. I'm new at arch so it just might be me doing something stupid! I do think it's a problem with the codec. Do I need some special-codec? It works fine in Firefox and Konqueror, but I guess that just shows that mplayer is able to play the file.. Any help would be appreciated! I'm using Amarok 2.0.2 on ArchLinux.
If i try to start Amarok trough the terminal i get this line over and over again. QString::arg: Argument missing: Amarok - No track playing., 0:00
Thank you very much for this fine script, I like it very much! Unfortunately, it doesn't work in WinXP for me: In the stable release of Amarok it crashes the application at startup (I have to delete it manually), in 2.1svn search etc. work, but when I play I get just noise instead of sound. It looks like this is a problem of Directshow (for that one not forget one is in Win ;-)), similar to the known problem with mp3 playback. Does anyone have a solution/patch for it?
Thanks for your comment. I don't test on Windows though.
Works fine with Amarok 2.1 from trunk. Nice work! :-)
Thanks for reporting!
It didn't work for me (using 2.1-SVN) so I worked on it. It now doesn't need youtuba anymore. However, for some reason you have to click [+] twice (or three times, but one of the times its [-]). Here you can download my version: http://twoday.tuwien.ac.at/pub/files/youtube_service.amarokscript.tar
Thanks for your work. I merged your changes and released version 0.1.1. Maybe it works with 2.1 now, but that has still to be tested. I didn't include your code to get rid of youtubia because of the following reasons: - When I started to write the script I wanted to do what you did, but I had to realize that you'd be always at the merci of youtube changing its code to prevent just that. This would mean, that an uphill battle would begin. - With this solution you can't get a 'permalink' to the video, so that the link in your playlist works 'forever'. I realize that this problem isn't totally solved with youtubia either. But at least the problem is shifted to them. :-) - To download directly from youtube you need at least one more download PER music clip to extract the correct id etc. pp. This is a LOT more overhead and reduces the script performance to a great deal. - The solution over youtubia is simple and seems to work quite good. I love simplicity.
Wow, that's a really nice idea. I'll be sure to try this one out. Thanks.
Hmm...searching doesn't seem to work on my installation. Also, it would be nice if you renamed the archive so that one can install it with the amarok script tool. In other words, it should have the amarokscript.tar.bz2 file ending. It would make it possible even for noobs to install it. However, as searching does not seem to work, I can't test it any further now.
Which version of amarok are you using, it's 2.0.2 here. Thanks for the information about renaming the file, I just wondered how to do that.
No, I'm currently using 2.0.1. Not backwards compatible?
works with 2.0.1, but there are a few bugs in 2.0.1, which can cause this script to crash. Updating to 2.0.2 is highly recommended. Also, to search you need to click on the expand button of one of the four 'order by' categories. This behaviour is preset by amarok, so I can't change that.
Clicked the expanders, but still no search results. It doesn't seem to have crashed either though.
well, the only explanation at the moment is that 2.0.1 sucks. I started writing this script with 2.0.1 and half of my problems were solved as soon as there was an mandriva update to 2.0.2. I don't see myself doing workarounds for 2.0.1 bugs, maybe someone with 2.0.1 can do that and send me a patch. :) Hope you don't blame that on me.
You can also directly drag'n drop one of the search orders to your playlist. Can give great results if you searched for an album name for example.