Page 2 of 15 FirstFirst 123412 ... LastLast
Results 11 to 20 of 145

Thread: Conky Banshee Python Script

  1. #11
    Join Date
    Feb 2008
    Location
    Arkansas, USA
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Conky Banshee Python Script

    Quote Originally Posted by kaivalagi View Post
    <name> needs replacing with YOUR username
    It was/is, I just left it out because I don't like to share it with the world.
    Quote Originally Posted by kaivalagi View Post
    if it is then you need to make sure you are running conky v1.7.1+, as previous versions do not support the image tag in your conkyrc
    I had just unistalled conky and recompiled it from source to make sure I had images enabled.
    Code:
    Conky 1.7.1.1 compiled Mon Aug 17 18:31:57 CDT 2009 for Linux 2.6.28-14-generic (i686)
    
    Compiled in features:
    
    System config file: /usr/local/etc/conky/conky.conf
    
     X11:
      * Xdamage extension
      * XDBE (double buffer extension)
      * Xft
    
     Music detection:
      * MPD
      * MOC
    
     General:
      * OpenMP
      * math
      * hddtemp
      * portmon
      * RSS
      * Lua
      * nvidia
      * config-output
      * Imlib2
      * ALSA mixer support
      * apcupsd
    Quote Originally Posted by kaivalagi View Post
    If "conkyBanshee --datatype=CA" run in the terminal return the album art then the problem is not with my script but with the scripting surrounding it...
    My husband ended up being able to fix it by changing it to this:
    Code:
    ${execi cp "`conkyBanshee --datatype=CA | sed -e 's/\\\//g'`" /home/<name>/.album/image.jpg}${image /home/<name>/.album/image.jpg -p 0,2 -s 64x64}
    Apparently it was having troubles calling the different image names from the ~/.album folder so now when the images get copied, they're all named image.jpg.
    Apparently that was the only thing that was wrong when I posted that yesterday. It works now, and I'm happy.

  2. #12
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Banshee Python Script

    Quote Originally Posted by zyxyellowxyz View Post
    My husband ended up being able to fix it by changing it to this:
    Code:
    ${execi cp "`conkyBanshee --datatype=CA | sed -e 's/\\\//g'`" /home/<name>/.album/image.jpg}${image /home/<name>/.album/image.jpg -p 0,2 -s 64x64}
    Apparently it was having troubles calling the different image names from the ~/.album folder so now when the images get copied, they're all named image.jpg.
    Apparently that was the only thing that was wrong when I posted that yesterday. It works now, and I'm happy.
    Good times

  3. #13
    Join Date
    Oct 2008
    Location
    Miami, Fl, USA
    Beans
    59

    Re: Conky Banshee Python Script

    Hey K,

    I have two problems with the Banshee script and I was hoping you might help me with it.


    1. Whenever banshee is playing a song that lacks just a year,genre,or track number conkyBanshee will not display at all.

    2. When banshee is playing a song that does have all of the tags the datatypes PP and LE are displaying as question marks.

    edit: The above was using the -n option. With the -n option removed #2 still happens. And the #1 scenario with the -n option removed is all unknowns even if some of the tags are known.(screen-shot #3)



    Please help me out.

    Thanks,

    D.
    Attached Images Attached Images
    Last edited by WiseGuy1020; August 24th, 2009 at 10:23 PM.

  4. #14
    Join Date
    Oct 2008
    Location
    Miami, Fl, USA
    Beans
    59

    Re: Conky Banshee Python Script

    the datatypes PP and LE are displaying fine after a reinstall.

    But when conkyBanshee comes across a song that does not have all the tags filled out it displays unknown for every datatype.

    Thanks for your help. I am using a bunch of your other scripts and they all work perfectly.

    D.

  5. #15
    Join Date
    Aug 2006
    Beans
    8
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: Conky Banshee Python Script

    I solved the year problem like this:

    get the tar.gz file from
    https://launchpad.net/~m-buck/+archi...-archive-extra

    Edited conkyBanshee.py from the tar.gz after the lines:

    Code:
                            title = props["name"]
                            album = props["album"]
                            artist = props["artist"]
    I added the following code:
    Code:
                            try:
                                year = str(props["year"])
                                tracknumber = str(props["track-number"])
                                genre = props["genre"]
                            except:
                                year = "?"
                                tracknumber = "?"
                                genre = "?"
    and removed these lines:
    Code:
     
                            year = str(props["year"])
                            tracknumber = str(props["track-number"])
                            genre = props["genre"]
    lastly run the setup

    ( I already had conkyBanshee installed using the apt method, so I just executed the command:
    Code:
    sudo cp conkyBanshee.py /usr/share/conkybanshee/conkyBanshee.py
    )

  6. #16
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Banshee Python Script

    Quote Originally Posted by kedde View Post
    I solved the year problem like this:

    get the tar.gz file from
    https://launchpad.net/~m-buck/+archi...-archive-extra

    Edited conkyBanshee.py from the tar.gz after the lines:
    Nice call...I don't use Banshee plus all my music is tagged properly so I need some heads up on the underlying issues from someone he is a little more techy that yourself

    Your above fix will work but could result in all ?'s when only once tag isn't available - I suggest for now that you wrap each call with it's own try/catch block...I have a busy weekend so won't get a fix out anytime soon, maybe next week.

    Is the underlying issue that any dbus call for tag data that isn't there will throw an exception? If that is the case it sounds like a bug with the Banshee dbus service to me...it needs raising with them I don't think any of the other dbus services I use in python has this behaviour...

  7. #17
    Join Date
    Sep 2009
    Location
    Ithaca, NY
    Beans
    1

    Re: Conky Banshee Python Script

    I'm working on this right now. I'm listening to SomaFM, so the Album and Cover values are blank too. Here is code that seems to be working, (starting at line 142 of conkyBanshee.py)
    Code:
                            try:
                                title = props["name"]
                            except:
                                title = "?"
    
                            try:
                                album = props["album"]
                            except:
                                album = "?"
    
                            try:
                                artist = props["artist"]
                            except:
                                artist = "?"
    
                            try:
                                year = str(props["year"])
                            except:
                                year = "?"
    
                            try:
                                tracknumber = str(props["track-number"])
                            except:
                                tracknumber = "?"
    
                            try:
                                genre = props["genre"]
                            except:
                                genre = "?"
    And at line 176 (after the above changes), for the coverart:
    Code:
                            # get coverart url or file link
                            if "artwork-id" in props:
                                coverart = os.path.join(os.path.expanduser("~/.cache/album-art/"),str(props["artwork-id"]) +".jpg")
                                if coverart.find("http://") != -1:
                                    coverart = ""
                            else:
                                coverart = ""
    My apologies if this is messy or just plain wrong. I'm a perl/PHP sort of girl, and this is my first time playing with python. It seems to work, so I figured I'd share!
    Last edited by tekniklr; September 26th, 2009 at 03:32 AM. Reason: Forgot coverart code.

  8. #18
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Banshee Python Script

    Quote Originally Posted by tekniklr View Post
    I'm working on this right now. I'm listening to SomaFM, so the Album and Cover values are blank too.

    ...

    My apologies if this is messy or just plain wrong. I'm a perl/PHP sort of girl, and this is my first time playing with python. It seems to work, so I figured I'd share!
    Thanks, code looks okay to me, although I think try/catch block aren't necessary looking at the code again...this sort of thing is better:

    Code:
    if "name" in props:
        title = props["name"]
    else:
        title = None
    Later on in the code null values are handled based on the --nounknownoutput option, so setting it to None if not available makes sense.

    I'm gonna start making the changes you, kedde and WiseGuy1020 highlighted and I'll post the deb package here before publishing so you guys can test it to make sure all is good

    Edit: @All users who posted issues, a new deb package and tarball are attached here. The deb package will install on Jaunty (and poss' Intrepid), please test and let me know of any issues. If all is okay a proper package for all Ubuntu versions will be released. Cheers

    Edit Again: No response back but I have been running the new conkyBanshee locally all day without issues so I am starting to get the package published soon...3 hrs for a built to start on launchpad
    Attached Files Attached Files
    Last edited by kaivalagi; September 26th, 2009 at 07:07 PM.

  9. #19
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Banshee Python Script

    UPDATE

    The script has had the following changes made:

    • Updated music info retrieval to stop unnecessary exceptions

    Package changes can be seen here: http://launchpadlibrarian.net/324925...source.changes

    All apt packages are now available and the first post has been updated

    Chimo

  10. #20
    Join Date
    Oct 2005
    Beans
    80

    Re: Conky Banshee Python Script

    Hi,
    The cover doesn't display and the position is not good.

    script:
    Code:
    use_xft yes
    xftfont Liberation Sans:size=8
    override_utf8_locale yes
    
    text_buffer_size 2048
    update_interval 1
    total_run_times 0
    double_buffer yes
    no_buffers yes
    net_avg_samples 1
    cpu_avg_samples 1
    
    own_window_class Conky
    own_window yes
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    default_color 2B2B2B
    draw_shades no
    
    color0 1E1C1A
    color1 E07A1F
    color2 1E1C1A
    
    alignment bottom_right
    gap_x 25
    gap_y 40
    minimum_size 182 0
    maximum_width 182
    
    imlib_cache_size 0
    
    TEXT
    ${font Liberation Sans:style=Bold:size=8}SYSTEM $stippled_hr${font}
    ${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}Kernel:  ${alignr}${color2}${kernel}${color}
    ${goto 32}Uptime: ${alignr}${color2}${uptime}${color}
    ${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -15}${voffset -1}${goto 32}CPU1: ${font Liberation Sans:style=Bold:size=8}${color1}${cpu cpu1}%${color}${font} ${alignr}${color2}${cpugraph cpu1 8,60 CE5C00 E07A1F}${color}
    ${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Liberation Sans:style=Bold:size=8}${color1}$memperc%${color}${font}
    ${offset 1}${voffset 2}${color2}${membar 4,18}${color}${goto 32}${voffset -2}F: ${color2}${memeasyfree}${color} U: ${color2}${mem}${color}
    ${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}Processes: ${color2}${alignr 13}CPU${alignr}RAM${color}
    ${voffset -1}${goto 42}${color2}${top name 1}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 1}${alignr }${top mem 1}${color}${font}
    ${voffset -1}${goto 42}${color2}${top name 2}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 2}${alignr }${top mem 2}${color}${font}
    ${voffset -1}${goto 42}${color2}${top name 3}${color}${font Liberation Sans:style=Bold:size=8}${color1} ${goto 124}${top cpu 3}${alignr }${top mem 3}${color}${font}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}DATE $stippled_hr${font}
    ${voffset -12}${goto 28}${font Arial Black:size=38}${color2}${time %H}${color}${font}${voffset -28}${font Liberation Sans:style=Bold:size=11}${color2}${time :%M}${time :%S}${color}${font}
    ${voffset -3}${goto 100}${font Liberation Sans:style=Bold:size=8}${color2}${time %A}${color}${font}
    ${voffset -1}${goto 100}${time %d %B %Y}
    ${voffset 2}${color0}${font Poky:size=15}d${font}${color}${voffset -6}${font Liberation Mono:size=8}${execpi 10800 DJS=`date +%_d`; cal | sed 's/^/${alignc} /' | sed s/" $DJS "/" "'${font Liberation Mono:style=bold:size=8}${color1}'"$DJS"'${color}${font}${font Liberation Mono:size=8}'" "/}${font}${font}${voffset -14}
    ${voffset -2}${font Liberation Sans:style=Bold:size=8}PHOTO $stippled_hr${font}
    ${execi 10800 ~/.conky/conkyPhoto.sh}${image /tmp/conkyPhoto.png -s 150x150 -p 20,330}${voffset 142}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}BANSHEE $stippled_hr${font}
    ${execi 10 ~/.conky/conkyCover.sh}${execpi 10 ~/.conky/conkyBanshee.py -t ~/.conky/conkyPlayer.template}
    ${voffset 4}${font Liberation Sans:style=Bold:size=8}WEATHER $stippled_hr${font}
    ${if_existing /proc/net/route wlan0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${else}${if_existing /proc/net/route eth0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${endif}${else}${if_existing /proc/net/route ppp0}
    ${execpi 10800 ~/.conky/conkyForecast.py --location=CAXX0243 -t ~/.conky/conkyForecast.template}
    ${endif}${else}${voffset 4}${color0}${font PizzaDude Bullets:size=12}4${font}${color}${goto 32}Weather Unavailable${endif}${endif}
    Attached Images Attached Images

Page 2 of 15 FirstFirst 123412 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •