-
 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    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


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

Random Album

   1.0  

Amarok 2.0 Script

Score 70%
Downloads:  292
Submitted:  May 9 2009
Updated:  Mar 3 2011

Description:

An amarok script that monitors the playlist, and, when it's finished, repopulates it with a random album from the collection. Differently from amarok's built-in "random album" mode, you don't need to keep the whole collection in the playlist; so when you add new stuff to the collection the script will automatically pick it up, and it's easy to manually enqueue songs into the current playlist without the "random mode" triggering whenever the current album finishes playing.

This script is inspired and very loosely based on the randomalbum.py script for amarok 1.4, available at the following URL:

http://www.kde-apps.org/content/show.php?content=42764




Changelog:

* Version 1.0:
. some tweaking to the monitoring code to make the script behave better in amarok 2.4.

* Version 0.9:
. monitor track changes, so that skipping the last track on a playlist will also make the script load a new album. Suggested by kronos003 (irc.freenode.net).

* Version 0.8:
. add support for genre filtering (contributed by Ghislain Mary)


* Version 0.7:
. minor update to work around an issue where playback wouldn't start when loading a new album. Delay the start of the playback a little to let amarok's UI properly refresh.


* Version 0.6:
. persist the list of played albums so that the same album isn't played after restarting amarok.
. if running in amarok 2.3.1, respect the "stop playing after current track" setting.


* Version 0.5:
. fix an issue with path filtering not doing what it was supposed to do in some cases
. remove some code that caused the script to freak out when stopping playback when the last track of a playlist was active.


* Version 0.4:
. Reworked the SQL queries; they should work better on databases that did not look like mine.
. Added option to filter the albums being loaded according to a string (matched against the album path).


* Version 0.3:
. Add new action to enable / disable the playlist monitor.


* Version 0.2:
. Updated to work with amarok 2.1. Hasn't been tested with 2.0.2...


* Version 0.1:
Initial version. What works:
. loading and enqueueing a random album.

Known issues:
. the playlist sometimes doesn't repaint correctly after an update. Clicking somewhere on the playlist fixes it (looks like an Amarok problem).
. only tested on my setup, so I don't know how it will work with collections spanning different devices, etc.




LicenseGPL
Send to a friend
Subscribe
Other  Apps  from mvanzin
Report inappropriate content



goto page:  1  2 

-
.

 Great script but...

 
 by skiron on: May 10 2009
 
Score 50%

Hi!
First of all, thank you for updating the old amaroK 1.4 script to amaroK 2.
I really like this feature, and in my opinion, it should be built in amaroK.

And I'm sorry to come with bad news... But once installed and enabled, when the last title in the playlist is finished, amaroK goes crazy: it loads a new album and in the milliseconds after it erases the playlist and loads another album an so on for 20 to 40 seconds. It changes album so fast that the "current played title" info (in the middle panel) has no time to refresh to every new title. At the end, one title is finally played, but the playlist is empty (there is even no the current played title).

I really love to have this script working, so if you need any test, don't hesitate to ask !!
I'm running on Kubuntu 9.04 - amaroK 2.0.1

(I've got a log of the execution, but it's quite big, so I won't post it here, but if you need it, just ask ;-) )


Reply to this

-

 Re: Great script but...

 
 by mvanzin on: May 11 2009
 
Score 50%

Thanks for the comments. I'm using Amarok 2.0.2, so there's a chance that something may have changed that makes the script work on that release...

In any case, you can send the output to my e-mail (it's at the top of the script's main.js) so I can see if someone interesting pops up.

One thing you can try is to increase the delay between detecting the end of the playlist and replacing it; on line 199 of main.js, change:

timer.start(10);

To:

timer.start(200);

(Or some other value.) Without this timer Amarok got really confused when the script ran, so maybe something similar is happening in your case.


Reply to this

-
.

 Re: Re: Great script but...

 
 by skiron on: May 11 2009
 
Score 50%

So, I tried to change the value you told me. The only change it made is that a title was played the amount of time written before the playlist was refreshed... :-(

So I simply updgraded to amarok 2.0.2, and now it works just as it should !!!

Thanks for your answer!!

I would like now to ask for an improvement:
it would be wonderful if one can choose the type of the new album loaded. For example, I would like that the new album has the same genre (style) that the one just played. But it could be the same artist or the same year...


Reply to this

-

 good

 
 by jajaxor on: Jun 9 2009
 
Score 50%

hi ! (sorry for my bad english)

nice script ;)

I see that is in amarok nightly :P

But I can't load album with amarok 2.1 and your script :-/ (same problem on amarok nightly...)


Reply to this

-

 Re: good

 
 by mvanzin on: Jun 10 2009
 
Score 50%

Good timing on your part since I just upgraded to 2.1 and had to fix the script. :-)


Reply to this

-
.

 Re: Re: good

 
 by jajaxor on: Jun 11 2009
 
Score 50%

HI !

nice !! it's ok now ;)

but; stupid question, how stop loading of random album ?
I activate "stop after this track" but another album was loading et continu playing :-/


Reply to this

-

 Re: Re: Re: good

 
 by mvanzin on: Jun 12 2009
 
Score 50%

I stared at the script API for a while and couldn't see a way to detect that "stop after track" is enabled... so I guess the only way to stop the script currently is to go to the script manager and stop it there.

I'll look at adding an easier way to stop the script.


Reply to this

-
.

 Re: Re: Re: Re: good

 
 by jajaxor on: Jun 12 2009
 
Score 50%

ok thanks ;)


Reply to this

-
.

 not working

 
 by Hilikus on: Jul 2 2009
 
Score 50%

The script is not working for me under amarok 2.1.1 on ubuntu 9.01

When i have something in my list and click load random album the list is cleared but nothing appears in it
if i hit play after that nothing happens so the list is really empty


Reply to this

-

 Re: not working

 
 by mvanzin on: Jul 4 2009
 
Score 50%

Hmm... I'm running 2.1.1 (didn't even notice it was upgraded) and the script is running fine for me.

I'd need more info to figure out what's wrong in your case; running "amarok --debug" from a terminal and sending me the output would be a start, but better yet would be to send me your ~/.kde/share/apps/amarok/mysqle directory (or the whole of ~/.kde/share/apps/amarok).


Reply to this

-

 Re: Re: not working

 
 by Hilikus on: Jul 6 2009
 
Score 50%

Sorry i didn't reply before. I've been busy
anyway, i took the liberty to fix it myself. the problem was your sql query since in my case the "devices" table is empty so "devices.id = urls.deviceid" was making it return nothing.
urls.deviceid in my case is -1 for every song in my collection

I also added a feature i needed that you can remove if you want to. It uses only albums from a certain directory hierarchy specified in the script since i don't want to have randomly selected "albums" that are only a single song I bought. i want to limit it to *full* albums, which i have in separate directories from singles

Just writing the beginning of the path for full albums will work; to disable this just make the string empty ""

mmm i just realized you can't attach files here. Let me know if you want to see the patch and how i can send it to you

Cheers,
Alejandro


Reply to this

-

 Re: Re: Re: not working

 
 by mvanzin on: Jul 7 2009
 
Score 50%

Yeah, I figured it would be something related to the SQL queries... amarok's DB schema is quite confusing where it relates to URLs, and I haven't yet been able to grok the C++ code enough to understand how to use it correctly.

You can send your patches to my e-mail (it's at the top of main.js) and I can look at integrating them with the code.


Reply to this

-

 problem with amarok 2.3

 
 by jajaxor on: Mar 16 2010
 
Score 50%

hi ! (sorry for my bad english)

I have got a problem with amarok 2.3 and ramdom album 0.5.

album loading is ok.

but, this album have got no cover, no stat !


regards
jaja

Reply to this

-

 Re: problem with amarok 2.3

 
 by mvanzin on: Mar 17 2010
 
Score 50%

I don't think that has any relation to this script. I've had it happen to me in the past even before I had the script. It's pretty annoying having to redownload a lot of cover art, I'll give that to you.

(To break the pattern for me, I just upgraded to 2.3 and this time it didn't lose all my covers. And the script still works. Yay!)


Reply to this

-
.

 feature request

 
 by WillS on: Aug 18 2010
 
Score 63%

First of all, many thanks for this great script. Playing random albums, for me, is the only way to listen music since years. Thanks a million for making it possible with Amarok.

I would like to request a feature. Could you enable your script recognising symlinks, please!? I think this could simplify filtering. For me it is symlinking albums to a 'heavy-rotation-folder'. Would this be possible?

btw.:
What do you exactly mean with
Quote:
. persist the list of played albums so that the same album isn't played after restarting amarok.
??
and when it is reseted?

thanks for audience,

will;


Reply to this

-

 Re: feature request

 
 by mvanzin on: Aug 24 2010
 
Score 50%

If I understand what you're asking for, that would require a significant rewrite of the plugin. Right now the script works with just the information in the amarok database; so if amarok is tracking your symlinks, then the script will pick them up. If it's not, the script has no way of knowing about them.

Doing it differently would require the script to have its own list of places where to find songs. While doable, that's kinda against the purpose of the plugin - it would be reimplementing a lot of logic already inside amarok.

Some previous suggesting of adding bias controls could probably help you, but I really don't know if I'll get to that (since it's not something that really interests me).


About the change you ask about, it just means the script keeps track of albums it has chosen even across sessions. So if you close amarok, open it up again, and choose a new random album, the script will not choose the album that was playing before you closed amarok (something that actually happened to me).


Reply to this

-

 Global shortcuts

 
 by bwo on: Dec 3 2010
 
Score 50%

Great script! The only thing missing is ability to assign global shortcut to "play random album". Now to skip to next random album you have to open Amarok window.

Ah, and also the "automatic load new random album" mode could be easier to turn on/off (menu entry and shortcut, not in the script settings).


Reply to this

-

 Re: Global shortcuts

 
 by mvanzin on: Dec 5 2010
 
Score 50%

I see an option in amarok's keyboard shortcut configuration dialog to assign shortcuts to all of the scripts options. Do you not see that?

I moved the "turn off auto load" option to the config after amarok implemented support to detect "stop after track" from the script API. That way the script can stop easily when you use that option. I'd rather keep the menus less cluttered (since the script API doesn't seem to have support for adding sub-menus, only menu items).


Reply to this

-

 Re: Re: Global shortcuts

 
 by bwo on: Jan 15 2011
 
Score 50%

I see the script options in the list in this dialog, but I can only assign the normal shortcuts (first and alternative), but not the global one (there are no tree expanders in the the 'global shortcut' column for these options). Please check it, maybe it's something with my system. Thank you.


Reply to this

-

 Re: Re: Re: Global shortcuts

 
 by mvanzin on: Jan 15 2011
 
Score 50%

Ah, I see what you mean. Unfortunately this is not something I can control from the script. If you really want that feature, I'd suggest you file a feature request for amarok (at bugs.kde.org).


Reply to this

goto page:  1  2 

Add commentBack






-
-
Do you like or dislike Ubuntu Unity?
 Yes, unity is alien technology!
 It is less confusing than Gnome 3 default, shell.
 Granny thinks it is much more usable than Gnome 2
 Canonical is embarrasing itself with this split project
 Gnome 3 default shell is much better
 I dislike Unity, Gnome 3 default shell is alien technology!
 None of the above, I like the 2Gb for free and Apple alike behavior. Will post a comment instead

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

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.