Warning: session_start(): open(/tmp/sess_c52o1r15ftjkjbrfuauborgs35, O_RDWR) failed: No space left on device (28) in /www/H01/htdocs/lib/base/lib_base.php on line 280
evel's comments 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

-
- evel's profile .- Fan of  .- CV  .- Friends  .- Content (1) .- Latest Comments (3) . 
Re: Re: Re: Re: how to use addMedia??
Nov 19 2010  on content Intelligent Playlist


Martin,
thanks A LOOOOT for your helpfulness, now it works!!
The problem was, as you suggested, in the "file://" prefix (and I also have to erase the first character from the path, because it's a point).
I'm using Amarok 2.3.0, not that old...
Thank you again, also for the useful link to the database structure.

Keep on the good work,
Alberto

.
Re: Re: how to use addMedia??
Nov 19 2010  on content Intelligent Playlist


Thank you very much for the reply!!

I've tried your code, but I get an error. When putting this into the Script Console:

var songs = Amarok.Collection.query("SELECT rpath FROM urls LIMIT 10;" );
for ( var i in songs ){
var path = songs[ i ];
Amarok.Playlist.addMedia( new QUrl( path ) );
}

I get:

not a track no match
amarok: BEGIN: void Playlist::Controller::insertOptioned(Meta::TrackPtr, int)
amarok: END__: void Playlist::Controller::insertOptioned(Meta::TrackPtr, int) - Took 0.00011s

(one error for each track)

The variable path anyway is properly filled, since if I try this:

var songs = Amarok.Collection.query("SELECT rpath FROM urls LIMIT 10;" );
for ( var i in songs ){
var path = songs[ i ];
Amarok.debug( path );
}

I get the right paths printed on the debug message.

Any idea? Have I got to do something to make the "QUrl" work? Actually I import "qt.core" both in my script than in the Script Console...

.
how to use addMedia??
Nov 18 2010  on content Intelligent Playlist

Hey Martin!

First of all, congratulations on the work you've done!

I really hope that you can help me. I'm trying to write an Amarok script and I need to add some local files to the current playlist. The problem is that I don't know how to achieve this using "addMedia", since I can't find a way to select a track from its path. It should be a very easy task, but I didn't find any documentation on this!!
I analyzed your code without luck.
I just need something very simple, like this:

getSongs = Amarok.Collection.query("SELECT `url` FROM `tracks`")
for (var song in getSongs)
Amarok.Playlist.addMedia(new QUrl(decodeURI(getSongs[song])))


Help me pleaseee!!
Thanks you in advance.

Best
Alberto

.


Do you miss your friend here on the website?
Send an invitation email


Search people
Current visitors
New users
Birthdays
Most active users
Back



-



 
 
 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