OK
Rating:
0.00
Thread Listing » AWN Plugin development
Banshee cover art plugin
#25089 by 987poiuytrewq (0.2136) posted on 3:45am Monday, June 08th, 2009
Hi all, after being annoyed at the little love that banshee receives by plugins, I decided to write my own plugin for awn. It is in the form of a python script that you run independently of awn and banshee and connects via dbus. I don't have that much programming experience especially with contributing to projects, so I didn't make a plugin for either programme. If anyone knows how to make it into a plugin for banshee though, I would look into it. I'd appreciate any testing you can do as well. Thanks, you can find at at launchpad: http://launchpad.net/awnbanshee/trunk/first-release/
[Q]



Installation directions etc are included.
[Q]



EDIT: I just read that awn 0.4 will include no dbus backend. Why remove this feature, it is amazingly useful for writing a quick plugin? Also, does anyone know what form the new API will take i.e. will it be easy to port from dbus -> plugin.
[Q]



*Edited at 3:09am, 06/18/09
Score: 0.18 points (Interesting)
Any particular reason?
#25090 by malept (1.0000) posted on 10:45am Monday, June 08th, 2009
( no avatar )
987poiuytrewq said:
EDIT: I just read that awn 0.4 will include no dbus backend. Why remove this feature, it is amazingly useful for writing a quick plugin? Also, does anyone know what form the new API will take i.e. will it be easy to port from dbus -> plugin.
[Q]



Where did you read this? There's no way in hell I'd let Awn 0.4.0 be released without the D-Bus plugin API, as mentioned in my latest blog post:
[Q]



[Q]

--
/
Score: 0 points
Any particular reason?
#25091 by gilir (0.9999) posted on 10:52am Monday, June 08th, 2009
FYI, there is also a Banshee plugin in the awn-extras branch, written in Mono.
[Q]

Score: 0 points
Any particular reason?
#25094 by 987poiuytrewq (0.2136) posted on 1:57am Tuesday, June 09th, 2009
Oh, sorry malept I must have misinterpreted it when you said in your blog
[Q]



The D-Bus plugin API that was in 0.2.x and 0.3.x will be deprecated in the 0.4 series, and removed in the 0.6 series. There will be a new API in the 0.4 series.
[Q]



I thought that meant that DBus was going to be removed from awn, but I now see you mean that there will be a new DBus API in 0.4. I'm glad it isn't going to be removed! Also, can I just say thanks for awn, easily best taskbar / dock / launcher on Linux, Mac or Windows, and I've been through a lot of them.
[Q]



@gilir I tried using the awn-extras Banshee plugin, but I couldn't get it to work properly, I think it wasn't compatible with banshee 1.x
[Q]








*Edited at 1:59am, 06/09/09
Score: 0 points
Any particular reason?
#25120 by Rizzly (0.1981) posted on 4:44am Friday, June 19th, 2009
( no avatar )
Thanks a bunch for the plugin!
[Q]



I have one problem though, I've installed all required components, started awnbanshee.py without any problem. BUT, the icon for Banshee refuses to change, I've made sure to set the name of the launcher to Banshee, as it is set in awnbanshee.py. I've also tried removing the launcher and run with an application icon, but it just refuses to work.
[Q]



I don't get the controls nor cover art. Though I have noticed that I sometimes get the cover-art when I close Banshee, it flickers past fast and then changes back to the Banshee icon.
[Q]



I'm using your latest release, and have also tried your older ones, but none of them worked. I'm using Banshee 1.4.3.
[Q]



I get the feeling it has something to do with the title of Banshee changing when I'm playing any tracks (because it changes the title of banshee to what song i'm playing). When I close Banshee, might it be that the titles changes back to Banshee and then shows the cover-art before returning to the old logo? Is that what I'm seeing?
[Q]



Could this be the problem? Is there any solution that you know of?
[Q]



Kind regards!
[Q]

Score: 0 points
Any particular reason?
#25121 by 987poiuytrewq (0.2136) posted on 6:39am Friday, June 19th, 2009
I don't think that it's to do with the title of Banshee changing, as the script picks up the song title and artist from Banshee and then figures out the title of the window. However, I think what you're seeing is the frames of animation from what the icon was when a song was playing (but actually never got set) back to the default icon. You're right that this is because the title changes back to "Banshee". To see if this is the case, try setting the interval between animation frames to something large, like 1 second. You're not using a different language other than english are you, because the window title is hard coded to be "Title by Artist" and the by in the middle would be different if it's not in english. This might also cause the buttons not to be added since they are added when there is no song playing and the title is "Banshee Media Player".
[Q]



I'm not entirely sure what the problem is, but if you run awnbanshee.py in a terminal, it should print out a whole load of diagnostic information as it goes, could you paste here any error messages, and/or points where the script hangs, or in fact the whole log if there are no obvious errors? I'm using Banshee 1.4.3 too, so that shouldn't be a problem.
[Q]



Also, could you look at the directory in which the script is located, and you should see the icons being generated as awnicon.png and animation frames in the ./Animations directory. are these icons being generated, but just not set in awn? If they're not being generated, make sure you set all shell scripts to be executable.
[Q]



Run the script in a terminal, and see what it throws out.
[Q]



*Edited at 6:39am, 06/19/09
Score: 0 points
Any particular reason?
#25123 by Rizzly (0.1981) posted on 1:20pm Sunday, June 21st, 2009
( no avatar )
I think we stumbled upon the problem then. I'm using a swedish translation of Banshee. I've already checked the terminal, I do not get any errors, and if I look in the directory for awnbanshee I see the covers changing as they should.
[Q]



To help you change the code (if you would want to) "title by artist" would be "titel av artist" and "Banshee mediaplayer" would be "Mediaspelaren Banshee".
[Q]



Perhaps you could let the user change these strings at the top of awnbanshee.py, just like you change the other options there.
[Q]

Score: 0 points
Any particular reason?
#25145 by 987poiuytrewq (0.2136) posted on 4:14am Sunday, June 28th, 2009
Hi Rizzly, I did as you suggested and added user-configurable strings for "by" and "Banshee Media Player". I have it working on my (English) Banshee 1.4.3. Could you let me know if it works for you now? Just download AwnBanshee-1.3.tar.gz and install over the older version.
[Q]

Score: 0 points
Any particular reason?
#25146 by Rizzly (0.1981) posted on 9:00am Sunday, June 28th, 2009
( no avatar )
Works like a charm, thanks a lot!
[Q]



I've noticed that the controls seem to be bugged though. I have to run Banshee and have a song playing before I open awnbanshee.py, or the controls won't show up.
[Q]



I don't know what the problem is here, but I get the feeling it might have to do with changes in language as well? All the controls have different (at least visual) names in Swedish.
[Q]



Again, thanks for your great work! It's a small thing, but adds so much to the overall feel of the awn-dock :).
[Q]

Score: 0 points
Any particular reason?
#25147 by 987poiuytrewq (0.2136) posted on 2:55am Monday, June 29th, 2009
Thanks, coming from other, windows, docks I found the level of plugins for awn disappointing, so I decided to contribute my own.
[Q]



I don't *think* it's a language issue, as only banshee's internal names are used for control, not the display names. I couldn't reproduce this bug so I can't figure out what might be causing it. Could you tell me the specific steps (from startup) to take to reproduce it?
[Q]

Score: 0 points
Any particular reason?
#25148 by Rizzly (0.1981) posted on 7:10am Monday, June 29th, 2009
( no avatar )
I can't really explain it further than I've already done I'm afraid.
[Q]



If you start awnbanshee.py before Banshee is running and playing a song, I don't get the controls.
[Q]



To me it seems it does not know the controls are there until a song is played. There does not seem to be anything checking for controls when I start Banshee or start playing a song.
[Q]



I think that might be where the problem lies, that awnbanshee only checks for the controls at startup?
[Q]



If it would make a periodic check, say - when Banshee starts and when a new song is played - perhaps that might solve the problem?
[Q]

Score: 0 points
Any particular reason?
#25175 by carpediem (0.1837) posted on 9:24am Sunday, July 05th, 2009
( no avatar )
I think I know the problem, as I had the same problem. In Ubuntu, the default launcher for Banshee has the following command:
[Q]



banshee-1 --redirect-log --device-activate=%u
[Q]



When run, the script continues to say, "Waiting for banshee...". I changed the launcher to use simply:
banshee-1
[Q]



And it worked. The extra parameters are what break it (not the -1 part).
[Q]

Score: 0 points
Any particular reason?
#25177 by 987poiuytrewq (0.2136) posted on 2:33am Monday, July 06th, 2009
@Rizzly: there is no way to check if controls are already present, but only whether they were added correctly. So, I chose not to add controls again as this could result in duplicate controls that would do nothing.
I have managed to duplicate the problem (I think) I had the script starting from the wrong working directory. It now checks it's own directory and changes it if needed. This causes the problem as the script adds buttons and then crashes, so the controls do nothing.
I booted into Swedish, and noticed that "Shuffle" and "Repeat All" were still in English. You can now set these to their Swedish names.
[Q]



@carpediem: the debugging string doesn't pick up the name of the launcher, so it will always say exactly "Waiting for banshee..." But I had the command set to just banshee-1 and it worked, thanks for spotting this for me, adding to the README
[Q]



In any case, the script at least will tell you whether buttons have been added and you can now start it from any directory e.g. in a startup script.
[Q]



@Rizzly, does the 1.4 version now work for you if you set the launcher command to banshee-1?
[Q]



*Edited at 2:34am, 07/06/09
Score: 0 points
Any particular reason?
#25182 by Rizzly (0.1981) posted on 7:35pm Tuesday, July 07th, 2009
( no avatar )
Perfect! I almost have nothing more to ask for except one little thing: The possibility to change letters for keyboard shortcut on next, previous and play. If it is possible.
[Q]



Thank you so much for making this plugin, and for making updates on such a short notice!
[Q]

Score: 0 points
Any particular reason?
#25183 by 987poiuytrewq (0.2136) posted on 1:23am Wednesday, July 08th, 2009
Thanks, and thank you for helping me iron out some bugs.
[Q]



Unfortunately that's not really possible. You can either have a system default button, which gives you a named button with an icon, and overrides any custom name you give the button. Alternatively, you can have a custom name with no icon, I opted for an icon as it looks neater.
[Q]



If you really want to have no icon and a custom name, you can change lines 58, 59 and 60, for example replacing
[Q]



 
prevID = awn.AddTaskMenuItemByName(taskName, "gtk-media-previous","Previous")
[Q]
 



with e.g.
[Q]



 
prevID = awn.AddTaskMenuItemByName(taskName, "none","_Föregående")
[Q]
 



where the underscore goes before the letter to make a keyboard shortcut, in this case f. These keyboard shortcuts only work if the context menu is visible though.
[Q]



Do you know you can set system wide keyboard shortcuts for banshee (in Ubuntu at least) if you enable the Multimedia Keys plugin, and then go to System > Preferences > Keyboard Shortcuts and then changing the sound shortcuts to key combinations of your choice.
[Q]



*Edited at 1:25am, 07/08/09
Score: 0 points
Any particular reason?
#25184 by Rizzly (0.1981) posted on 5:40am Wednesday, July 08th, 2009
( no avatar )
Thanks for the help, and the Multimedia Keys are very usefull indeed!
[Q]



I seem to have discovered another annoying problem however. Before 1.4 I could autostart awnbanshee.py by making a small bash script for it:
[Q]



 

cd /home/username/AwnBanshee
./awnbanshee.py
[Q]
 



I put a link to this file in ubuntus autostart-application. After the update (wich as far as I understand, now should not need this script anyway?) awnbanshee.py won't autostart. The autostart does not work with the script or with a direct link to awnbanshee.py.
[Q]



*Edited at 5:40am, 07/08/09
Score: 0 points
Any particular reason?
#25185 by 987poiuytrewq (0.2136) posted on 5:48am Wednesday, July 08th, 2009
Hmmm, the update had the exact opposite fact for me, it made autostarting work properly! But the script seems to be oddly sensitive to the exact way in which you start it. The only change should be that you don't need to cd into the correct directory anymore. Try using this script:
[Q]



 

#! /bin/bash
~/AwnBanshee/awnbanshee.py &
[Q]
 



I think the ampersand stops it closing with the shell, but I'm not really sure.
[Q]



*Edited at 5:48am, 07/08/09
Score: 0 points
Any particular reason?
#25186 by mhr3 (0.9971) posted on 12:58pm Wednesday, July 08th, 2009
As a note, we'll probably drop some of the DBus methods in Awn 0.4, and AddTaskMenuItemByName is one of them, as Awn-Rhythmbox-menu was the only plugin using it...
[Q]



You might want to place it in try block or something.
[Q]

Score: 0 points
Any particular reason?
#25187 by 987poiuytrewq (0.2136) posted on 6:20am Thursday, July 09th, 2009
I'd prefer it if some form of adding menu items remained even if not over DBus as I can see a lot of potential. I suppose it's not integral to the banshee plugin, just an added feature though. I'll probably rewrite it for awn 0.4 anyway, thanks for the heads up.
[Q]



*Edited at 6:21am, 07/09/09
Score: 0 points
Any particular reason?
#25189 by Rizzly (0.1981) posted on 2:23pm Thursday, July 09th, 2009
( no avatar )
This startup problem is very odd I must say, and with your proposed script it didn't work either. I also tried adding the script to /etc/init.d/ without any success.
[Q]



Also, about starting the plugin in general. As of now it does not matter when I start it as long as ubuntu is started and I'm in a session, neither did it before. So it seems that the problem only surfaces when I try to have it as an autostart application, wich is odd.
[Q]



If you are using ubuntu, does it work for you?
[Q]



*Edited at 2:28pm, 07/09/09
Score: 0 points
Any particular reason?
#25191 by carpediem (0.1837) posted on 3:41pm Thursday, July 09th, 2009
( no avatar )
I use a script in Ubuntu as you described:
[Q]



cd /home/username/AwnBanshee
./awnbanshee.py
[Q]



That script is autostarted using Preferences > Startup Applications (formerly Sessions).
[Q]



Working perfectly for me (because I made the change to the Banshee launcher as I describe above).
[Q]

Score: 0 points
Any particular reason?
#25192 by carpediem (0.1837) posted on 9:45pm Thursday, July 09th, 2009
( no avatar )
I think I spoke too soon. I rebooted, and it didn't run properly. The process was probably running otherwise from my tinkering. If I run the same script using the Run Application dialog, it's fine.
[Q]



So, I just said screw it, and changed my script to this:
#!/bin/bash
cd /home/dmartin/Applications/AwnBanshee
./awnbanshee.py &
banshee-1
[Q]



And then I changed my Banshee launcher to actually call the script. That works without fail, though I suspect it have the danger of having the script run more than once. But, at any rate, it works for me.
[Q]



One thing I'm wondering, AWN supports python plugins. Seems this might be simple to turn into an actual AWN plugin, but I've never made one so I don't really know.
[Q]

Score: 0 points
Any particular reason?
#25193 by Rizzly (0.1981) posted on 5:08am Friday, July 10th, 2009
( no avatar )
Thanks for the temporary fix Carpediem!
[Q]

Score: 0 points
Any particular reason?
#25199 by 987poiuytrewq (0.2136) posted on 6:12am Monday, July 13th, 2009
I still haven't figured out why this happens or what is the best way to start it up, but if you use carpediem's script, you could call the ./restart script to ensure only one instance of awnbanshee.py is running at one time.
[Q]

Score: 0 points
Any particular reason?
#25589 by elastic (0.1855) posted on 1:16pm Monday, November 09th, 2009
( no avatar )
Hey, the controls work fine but with every theme I get the error massage:
[Q]



AwnBanshee/Themes/none/iconify: line xx: convert: command not found
[Q]



any ideas ?
[Q]



Score: 0 points
Any particular reason?
#25592 by 987poiuytrewq (0.2136) posted on 4:49pm Monday, November 09th, 2009
It sounds like you haven't got ImageMagick installed, which is a dependency try
[Q]



sudo apt-get install imagemagick
[Q]

Score: 0 points
Any particular reason?
#25613 by elastic (0.1855) posted on 12:18pm Thursday, November 12th, 2009
( no avatar )
ImageMagick solved the problem - you should put that info in the readme ...
[Q]



tanks a lot ...
[Q]

Score: 0 points
Any particular reason?
#25616 by 987poiuytrewq (0.2136) posted on 4:04pm Thursday, November 12th, 2009
I think it is mentioned in the INSTALL file, fir the next release I will mention in the README as well. At some point I will solve the problem of starting the scriptautomatically, or I may turn it into an awn plugin proper.
[Q]

Score: 0 points
Any particular reason?
#33694 by Josemari (0.9979) posted on 7:26am Saturday, June 02nd, 2012
( no avatar )
You can travel to sites of varied developers online many different sorts along with models of dresses, long prom dresses Mother of the Bride Dresses party dresses for plus sized ladies. You are able to read through all sorts of dresses, and definately will also get appealing delivers on your decided on dress.
[Q]

Score: 0 points
Any particular reason?
Thread Listing » AWN Plugin development » Banshee cover art plugin

Post A Reply:

Powered by Metaforum ©2004-2012
Get your own Free AJAX Forum Messageboard by visiting the offical site.
.