Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-19-2006, 05:55 AM   #1
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
amarok podcasts - finding info via dcop?

Does anyone know if it's possible to get a list of podcasts using amarok's dcop interface (and how to do it)?

I want to automate cleaning up of downloaded podcasts, but I can't find a way to get info about downloaded podcasts via dcop.
Old 09-20-2006, 03:58 AM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Original Poster
Rep: Reputation: 63
OK, it feels a little creepy answering my own post, but I thought someone might found what I discovered useful.

The collection database can be queried through dcop using a command something like this:

$ dcop amarok collection query "SELECT ... FROM ..."
There's a partial page on the amarok wiki describing the collection database, but it's apparently a little out of date, and at any rate incomplete. To explore the database you can use the sqlite3 command line client. The version of sqlite3 which ships with ubuntu dapper doesn't like the newer format of collections.db which amarok 1.4.2, so you'll need to build the new version of sqlite from source or something. It's probably prudent to work on a copy of the collection.db file:

$ cd /tmp
$ cp ~/.kde/share/apps/amarok/collection.db .
$ sqlite3 collection.db
SQLite version 3.3.7
Enter ".help" for instructions
sqlite> .tables
admin            devices          lyrics           related_artists
album            directories      playlists        statistics
amazon           embed            podcastchannels  tags
artist           genre            podcastepisodes  uniqueid
composer         images           podcastfolders   year
The structure of individual tables can be found using the .schema command:

sqlite> .schema podcastchannels
CREATE TABLE podcastchannels (url VARCHAR(1024) UNIQUE,title VARCHAR(255),weblink VARCHAR(1024),image VARCHAR(1024),comment TEXT,copyright VARCHAR(255),parent INTEGER,directory VARCHAR(255),autoscan BOOL, fetchtype INTEGER, autotransfer BOOL, haspurge BOOL, purgecount INTEGER );
CREATE INDEX url_podchannel ON podcastchannels( url );
sqlite> .schema podcastepisodes
CREATE TABLE podcastepisodes (id INTEGER PRIMARY KEY , url VARCHAR(1024) UNIQUE,localurl VARCHAR(1024),parent VARCHAR(1024),guid VARCHAR(1024),title VARCHAR(255),subtitle VARCHAR(255),composer VARCHAR(255),comment TEXT,filetype VARCHAR(255),createdate VARCHAR(255),length INTEGER,size INTEGER,isNew BOOL );
CREATE INDEX localurl_podepisode ON podcastepisodes( localurl );
CREATE INDEX url_podepisode ON podcastepisodes( url );
So a typical dcop query you might use to find all podcasts with downloaded episodes might look like this:

$ query="SELECT,
FROM podcastchannels, podcastepisodes
WHERE podcastepisodes.parent = podcastchannels.url
AND podcastepisodes.localurl LIKE 'file%';"
$ dcop amarok collection query "$query"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding info for X setup? Zeno McDohl Linux - Newbie 4 01-19-2006 02:25 PM
Amarok info on torsmo jaakkop Linux - Software 0 12-14-2005 02:05 PM
amaroK not finding music dwerner04 Linux - Software 1 01-28-2005 05:45 AM
finding info about modem? deepika Linux - Newbie 3 10-30-2003 03:26 PM
finding virus info edsmithers Linux - General 3 08-07-2003 03:56 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration