Warning: session_start(): open(/tmp/sess_us9qr3mjfu1mjolhsuhgrmhbg3, O_RDWR) failed: No space left on device (28) in /www/H01/htdocs/lib/base/lib_base.php on line 280
Random Album 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 (9) .- Knowledge Base  . 

Random Album

   1.0  

Amarok 2.0 Script

Score 70%
Downloads:  311
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  Content  from mvanzin
Report inappropriate content



goto page: prev   1  2 

-
.

 Love it!

 
 by arch0njw on: Jun 10 2011
 
Score 50%

It makes Amarok 2 more useful! Awesome!


Any sufficiently advanced technology is indistinguishable from magic
Reply to this

-
.

 Album loops

 
 by bitcrazy on: Nov 20 2011
 
Score 50%

Since Amarok 2.5 the randomly selected album stays in the playlist and is played in a loop. I'm not sure, if it is caused by the script or amarok.


If men could get pregnant, abortion would be a sacrament.
Reply to this

-

 Re: Album loops

 
 by mvanzin on: Jan 20 2012
 
Score 50%

Finally got to run amarok 2.5, and I don't see the behavior you're describing. Everything seems to be working like before for me.


Reply to this

-

 Re: Re: Album loops

 
 by mvanzin on: May 1 2012
 
Score 50%

I'm hitting this now with Kubuntu 12.04, so at least I have a system where to debug the issue now.


Reply to this

-

 Re: Album loops

 
 by mvanzin on: Aug 25 2012
 
Score 50%

Just FYI, Amarok 2.6 (or the updated Phonon backend package) seems to make the script behave a lot better.


Reply to this

-
.

 Re: Album loops

 
 by bitcrazy on: Aug 25 2012
 
Score 50%

Yeah, but I'm already at 2.7 GIT. Your script is working fine here.


If men could get pregnant, abortion would be a sacrament.
Reply to this

-

 Tracks added don't belong to the right collection

 
 by arch0njw on: Jun 15 2012
 
Score 50%

This is a nit-pick because I like my "play count" to be updated properly.

I am running Kubuntu 12.04 and Amarok 2.5.0. When I use this script, it is now adding tracks with a "Collection" value of "None" on the "Summary" tab. This means the play could isn't being updated correctly for the tracks which are technically in my "Local Collection".

I hope this is simple to fix. This script is awesome!


Any sufficiently advanced technology is indistinguishable from magic
Reply to this

-

 Same-named Albums

 
 by agt499 on: Jan 16 2013
 
Score 50%

Hi -awesome script for a function that should really be mandatory everywhere.
Just had the first-i-have-ever-noticed experience where two albums by different artists got randomly selected due to the same Album Name, and playt Track 1 Artist 1,Track 1 Artist 2,Track 2 Artist 1,Track 2 Artist 2.
Not sure if this is the script or Amarok (which I'm certain used to discern separate albums with the same name?)

Thanks for the cool script!


Reply to this

-

 Re: Same-named Albums

 
 by mvanzin on: Jan 16 2013
 
Score 50%

Thanks!

As for the problem, it's funny because I have code to work around exactly that situation... if you know how to do it, it would be nice if you were able to manually run the queries used by the getAlbum() function (in main.js) on your database, for the offending album.


Reply to this

-

 Re: Re: Same-named Albums

 
 by agt499 on: Jan 17 2013
 
Score 50%

Hey, thanks for the quick reply.

Not too sure how I should have done it, but here's what I've done:

Right at the start of function getAlbum, I hard-coded aid=1290, and that returned that artists.length=1.

Doesn't sound like the right answer, as the resulting playlist below shows multiple artists (with AlbumArtist tagged also).

If I sort my collection by Album I get the same result -one album with tracks intermingled, so it looks like the schema has regressed to the old 1.4 behavior you reference in the code comments, except that the your just-in-case is no longer working.

If I get more real work done tomorrow I may look to open a bug on Amarok (Version 2.5.0 here).


/m/flac/D/Daft Punk/Daft Punk - 2001 - Discovery/01 - One More Time.flac
/m/flac/E/Electric Light Orchestra/Electric Light Orchestra - 1979 - Discovery/01 - Shine a Little Love.flac
/m/flac/D/Daft Punk/Daft Punk - 2001 - Discovery/02 - Aerodynamic.flac
/m/flac/E/Electric Light Orchestra/Electric Light Orchestra - 1979 - Discovery/02 - Confusion.flac
/m/flac/D/Daft Punk/Daft Punk - 2001 - Discovery/03 - Digital Love.flac
/m/flac/E/Electric Light Orchestra/Electric Light Orchestra - 1979 - Discovery/03 - Need Her Love.flac
/m/flac/D/Daft Punk/Daft Punk - 2001 - Discovery/04 - Harder, Better, Faster, Stronger.flac
/m/flac/E/Electric Light Orchestra/Electric Light Orchestra - 1979 - Discovery/04 - The Diary of Horace Wimp.flac


Reply to this

goto page: prev   1  2 

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