| ![-](/img/trans.gif) | | spaces May 7 2007 on content Avi 2 iPod / PSP (mp4) | i think the spaces problem could be solved by putting "%filename" instead of %filename (or \"%filename\", I'm not completely sure of how kommander works.) |
| ![.](/img/trans.gif) | | Re: Re: Nice, but May 6 2007 on content Konsole Icons | hi.
if an application tries to use an Icon that you didn't put in your theme (and it is active), kde will use default.kde icon set for that icon (in kde 3 it is crystalsvg) |
| ![.](/img/trans.gif) | | Contacts menu Mar 13 2007 on content Kde4 Mockup | I like specially the Contacts Menu. What would happen when there are hundereds of contacts, though? its kinda what happens with the K Menu right now, isn't it?
Very nice artwork also... But I think that KDE 4 should have a more unique look. It looks a little too Vista, and if that would be the final KDE 4, KDE sure would receive a lot of critics of being copying others things. (Just like Microsoft does). |
| ![.](/img/trans.gif) | | Nice app Mar 5 2007 on content Kwrap |
Nice app! I was playing around a little bit with it, it's very handy!
i did some tweakings, let's see if you like it :). |
| ![.](/img/trans.gif) | | Nice app Mar 5 2007 on content Kwrap |
Nice app! I was playing around a little bit with it, it's very handy!
i did some tweakings, let's see if you like it :). |
| ![.](/img/trans.gif) | | A couple of features Jan 21 2007 on content ReplayGain | Hey this script is very useful, and i made some changes in the main script so that it would apply_replaygain when the replaygain is not available, and it changes the playing volume when it finishes.
I achieved this by putting all the code that was in if sinput.startswith('engineStateChange: playing') in a function, and plus a few troubleshooting i got it working. it would be better, though, if the playing volume was also updated when its manualy apply_replaygain'ed, and that in the configuration dialog you can select wether or not to applyreplaygain when its not available, but I don't have more time right now ;). well, here is the code that I put before the #main_loop comment in amarok_replaygain.py:
def update_volume (is_playing):
#reread amarok config if possible
if not(is_playing) and (amarok_version>=10302):#changing track also sends the playing signal, so to avoid latency and osd messing the config will be read only if the previous state was "stop"
read_amarok_config()
is_playing = True
proft1 = time.time()
song_url = str(amarok_dcop.player.encodedURL()[1])
if debug: flog.write('Get url time: '+str(time.time()-proft1)+'\n')
if song_url.startswith('file:'): #we can only read tags on local files
pregain = float(replaygain_config['pregain'])
mode = replaygain_config['mode']
song_name = urllib.url2pathname(song_url)[5:]
proft = time.time()
song_gain,peak = read_tags(song_name,mode)
if debug: flog.write('Tag reading time: '+str(time.time()-proft)+'\n')
if not(isNaN(song_gain)):
gain = song_gain+pregain
if gain>calibration[0][1]+1:#warn of out of range gain
os.popen('dcop knotify default notify eventname amarok "'+_('Replaygain script warning\ngain too big by ').encode(LC,'replace')+str(gain-calibration[0][1])+'dB" "" "" 16 0')
gain = calibration[0][1]
if (gain+peak > calibration[0][1])and(replaygain_config['no_peak'] == 'false'): #will peak clip?
gain = gain-peak #if so limit gain
if debug: flog.write('Final gain: '+str(gain)+'\n')
else:
amarok_dcop.playlist.popupMessage(_('This song has no replaygain info. Applying replaygain...').encode(LC,'replace'))
gain = float(replaygain_config['gain_default'])+pregain
if replaygain_config['mode'] == 'track':
mymode = TRACK_TAGS
elif replaygain_config['mode'] == 'album':
mymode = ALBUM_TAGS
apply_replaygain([song_url],mymode)
is_playing=update_volume(is_playing)
v = gain2vol(gain)
if v < 5:
os.popen('dcop knotify default notify eventname amarok "'+_('Replaygain script warning\ngain too low by ').encode(LC,'replace')+str(gain-calibration[len(calibration)-1][1])+'dB" "" "" 16 0')
#support crossfade
if is_crossfaded or replaygain_config['smooth'] == 'true':
if amarok_osd and osd_disabled:#if the crossfade thread is running it may have disabled the osd, so we show osd or the song change will not have osd
if (time.time()-last_osd_time) < osd_duration:
amarok_dcop.player.showOSD()
amarok_dcop.player.showOSD() #if osd was showing the first command would hide it so it must be shown again
if debug: flog.write('hide and show osd\n')
else:
amarok_dcop.player.showOSD()
if debug: flog.write('show osd\n')
last_osd_time = time.time()
stop_thread = True #signal crossfade thread to stop if running
timer.cancel() #interrupt thread timer
thread_lock.acquire() #wait till thread has exited
thread_lock.release()
if is_crossfaded:
start_new_thread(do_crossfade,(v,crosstime,thread_lock,timer))
else:
start_new_thread(do_crossfade,(v,float(replaygain_config['smooth_time']),thread_lock,timer))
else: #no crossfade
proft = time.time()
if replaygain_config['no_osd'] == 'true' and amarok_osd:
amarok_dcop.player.enableOSD(False)
vol_upd_list.append(v)
amarok_dcop.player.setVolume(v)
if replaygain_config['no_osd'] == 'true' and amarok_osd:
amarok_dcop.player.enableOSD(True)
if debug: flog.write('Setvolume time: '+str(time.time()-proft)+'\n')
if debug: flog.write('Total trackchange time: '+str(time.time()-proft1)+'\n')
if time.time()-proft1>0.5:
if is_console_dcop:
msgbox(_('Large lag has been detected:\nYou may install kdebindings3-python/python-kde3'),mode='msgbox',nonblock=True,dontagain='kdebindings')
else:
if replaygain_config['no_osd'] == 'true' and amarok_osd:
msgbox(_('Large lag has been detected:\nIt is recomended to disable the script osd control'),mode='msgbox',nonblock=True,dontagain='osd')
else:
msgbox(_('Large lag has been detected:\nYou may try removing or reducing covers'),mode='msgbox',nonblock=True,dontagain='covers')
else:
song_gain = float('NaN')
return is_playing
and in the condtional if sinput.startswith('engineStateChange: playing'):
is_playing = update_volume(is_playing)
hope I help to improve this awesome script! ;) |
| ![.](/img/trans.gif) | | Yeah I like it Nov 26 2006 on content Middle click command line | Yeah I like the idea very much. Many times i need a console just to write one line of commands when I am looking at some folders in Konqueror. It would be very useful. |
| ![.](/img/trans.gif) |
Search people Current visitors New users Birthdays Most active users Back
|
|
| ![-](/img/trans.gif) |
|