Warning: session_start(): open(/tmp/sess_j44028alinloudvqnngbcqnpg5, O_RDWR) failed: No space left on device (28) in /www/H01/htdocs/lib/base/lib_base.php on line 280
Moodbar Generator [DEPRECATED] openDesktop.org
-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   
 
Home
Apps
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


-
- Content .- Fans (6) .- Knowledge Base  . 

Moodbar Generator [DEPRECATED]

   0.21  

Amarok 2.0 Script

Score 78%
devenvdevenv
Dvenv
Downloads:  253
Submitted:  May 22 2010
Updated:  Jan 11 2011

Description:

Amarok2 script.

DEPRECATED: please use this one - http://kde-apps.org/content/show.php?action=content&content=135625&PHPSESSID=69aa9cc0c1c0dd1cb15cbe6a1047a00d

Automatically generates moodbar files for currently playing song.




LicenseLGPL
Source(moodbar_generator)
Donate
Send to a friend
Subscribe
Other  Content  from devenv
Report inappropriate content



-

 code change

 
 by maurinux on: May 23 2010
 
Score 50%

Hi,
i had change a little bit your code, in this way if a .mood file exists the script doesn't recreate it.

here is the code:


if (!QFile.exists(mood)) {
args = ["-o", mood, path];
QProcess.startDetached("moodbar",args);

}


Reply to this

-

 Re: code change

 
 by devenv on: May 23 2010
 
Score 50%
devenvdevenv
Dvenv

Nice one, updated.
Any idea how to make it update mood files before the next track? I don't think it always works for new tracks.


Reply to this

-

 amarok 2.3.1 git bug

 
 by HessiJames on: May 23 2010
 
Score 50%

i'm using a git snapshot of amarok and when this script is enabled, the currently playing song gets deleted.
since the script is really short, i guess the bug lies within amarok, but you should be careful as long as this bug exists.
https://bugs.kde.org/show_bug.cgi?id=238584


Reply to this

-

 Re: amarok 2.3.1 git bug

 
 by devenv on: May 23 2010
 
Score 50%
devenvdevenv
Dvenv

Wow, this is unexpected.
The only files related stuff is checking for file existence and running moodbar...
So I guess it's either in the amarok or in moodbar...
Do you have the latest dev. ver. of moodbar too?


Reply to this

-

 Re: Re: amarok 2.3.1 git bug

 
 by HessiJames on: May 23 2010
 
Score 50%

no, moodbar is version 0.1.2 and it works without problems. it must be an amarok bug. but whoever's fault it is, it's causing damage.


Reply to this

-

 Re: Re: Re: amarok 2.3.1 git bug

 
 by krohlas on: May 24 2010
 
Score 50%

I'm one of the Amarok bug triagers.

I tried hard to reproduce the bug, but I was not able to. So I have no idea what is causing this or if it's an false alarm.

Two other things:
1. That script implements functionality which most users want to see in Amarok. You should really move it to Amarok Git. I would then also help to add a "create all .mood files for the collection" tool.

2. It fails if the file name contains more than one dot. The regexp to determine the name of the mood file cuts the path at the very first dot.


Reply to this

-

 Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 24 2010
 
Score 50%
devenvdevenv
Dvenv

Thanks for the bug report - fixed.

I don't think it's good enough solution to move it to amarok src, it's more like a hack. The mood files should be in .kde4 dir somewhere in my taste, and mood files generation shouldn't happen when a track starts to play but on collection update. So there is some work to do...


Reply to this

-

 Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by krohlas on: May 24 2010
 
Score 50%

We want to encourage all script authors to move the sources to our git. There is a special playground directory for stuff that is not part of the default distribution.

Apart from that: your script is already as good as Amarok 1.4 was in the area of creating .mood files. And it is definitely an improvement of the current situation in Amarok 2.

If it was in git I would help to create a "calculate moods for all files in collection" tool with it. ^^


Reply to this

-

 Re: Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 25 2010
 
Score 50%
devenvdevenv
Dvenv

I'll try to find time to move it there soon, seems like a lot of fun anyway :)



-

 Re: Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 26 2010
 
Score 50%
devenvdevenv
Dvenv

Enjoy :)
http://gitorious.org/~devenv/amarok/devenvs-moodbar_generator_script

Added you as collaborator, I guessed it's the same username...



-

 Re: Re: amarok 2.3.1 git bug

 
 by HessiJames on: May 24 2010
 
Score 50%

i think i found the cause.

path.replace(/^(.*)\/(.*?)\.(.*?)$/, "$1\/.$2.mood");

just returns the original path causing moodbar to overwrite/delete the input file.
so why am i the only one this is happening to?


Reply to this

-

 Re: Re: Re: amarok 2.3.1 git bug

 
 by krohlas on: May 24 2010
 
Score 50%

Interesting. I added a lot of debug and it works here... Different Qt versions? 4.6.2 here.


Reply to this

-

 Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by HessiJames on: May 24 2010
 
Score 50%

i have qt 4.5.3


Reply to this

-

 Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 25 2010
 
Score 50%
devenvdevenv
Dvenv

Very weird...
I don't think it's qt version issue.
Can you post the filename that is being deleted, I think it might be something escaping related... Hard to believe though.


Reply to this

-

 Re: Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by HessiJames on: May 27 2010
 
Score 50%

it happens to pretty every file, but here are two examples:
/home/daniel/Musik/Sammlung/Trance/Verschiedene Interpreten/Bravo Hits Zima 2007/1 - 07 - Starting Rock - Don't Go.mp3
/home/daniel/Musik/Neu/Amy MacDonald - This Is The Life/09 A Wish for Something More.mp3

i had a closer look at the regex and the use of a * followed by a ? doesn't make sense to me, i tested the regex with kwrite (if it also couldn't handle it) and here the replace buttons are grayed out as long as *? is in the search field.
^(.*)\/(.*)\.(.*)$
does the job.



-

 Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 27 2010
 
Score 50%
devenvdevenv
Dvenv

? after * is making sure this is not greedy selection, it's just to make sure the extension part of the filename is taken right. It should work without it too...
Not sure why regex doesn't work for you there.
Can you add this line:
Amarok.alert(mood);
after the line with regex and check what it shows?


Reply to this

-

 Re: Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by HessiJames on: May 27 2010
 
Score 50%

what do you mean by greedy?
your regex reads like you want to also catch files without extensions, but that would be ^(.*)\/(.*)(\.(.*))?$
i might be wrong, but i think that *? is simply invalid and that newer qt versions can handle this error while older versions can't.
an alert in moodbar generator is unnecessary, i catched all parameters by a wrapper script to moodbar, this is how i figured out, that the regex replace failed.
it works fine with the regex, i wrote in the last post. and if you can explain what you wanted to do with the ? we should be able to add this, too.



-

 Re: Re: Re: Re: Re: Re: amarok 2.3.1 git bug

 
 by devenv on: May 27 2010
 
Score 50%
devenvdevenv
Dvenv

ok.
What amarok expects is the mood file for 'filename.ext' as '.filename.mood'.
So what that line does is return the mood filename.
This regex can't return the same filename as it always appends the original filename with 'mood' and prepends with '.', even if it doesn't parse the filename right for some reason.
For reference on greedy and lazy '*' take a look here:
http://www.regular-expressions.info/reference.html
search for 'lazy star', one before it is the greedy star.
It's not a bug, it's a part of regex, and I really don't think QT removed support for it :)



-
.

 solved?

 
 by janet on: Nov 15 2010
 
Score 50%

Any news on the file deletion issue? I really don't dare to use this as long as that is not clearly out of the way.


Want Debian Sid with spices? Get aptosid at aptosid.com - it simply works :)
Reply to this

-

 DEPRECATED

 
 by devenv on: Jan 11 2011
 
Score 50%
devenvdevenv
Dvenv

Please use this one:
http://kde-apps.org/content/show.php?action=content&content=135625&PHPSESSID=69aa9cc0c1c0dd1cb15cbe6a1047a00d


Reply to this

Add commentBack




-



 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Artwork
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Participate
Groups
Forum
Add Content
Public API
About openDesktop.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2007-2016 openDesktop.org Team  
All rights reserved. openDesktop.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
openDesktop is a trademark of the openDesktop.org Team