File: redoPodcasts.rb

package info (click to toggle)
amarok 3.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112,344 kB
  • sloc: cpp: 195,053; xml: 4,329; ansic: 2,634; javascript: 673; ruby: 528; python: 507; sh: 252; makefile: 12
file content (17 lines) | stat: -rw-r--r-- 515 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby

query = `dcop amarok collection query "SELECT url FROM podcastchannels;"`
print "Grabbing podcast feeds from database...\n"

podcasts = query.split("\n")

print "Delete all the podcasts from the playlist browser.  Once done, press something. Don't screw this up."
message = gets()
print "Sure you have removed them?"
message = gets()

podcasts.each do |channel|
    print "Adding podcast: #{channel}\n"
    system("dcop", "amarok", "playlistbrowser", "addPodcast", channel)
end
print "Done.\n"