User Tools

Site Tools


linux:scripts:bulk_update_banshee_podcasts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux:scripts:bulk_update_banshee_podcasts [2011/04/03 11:32]
amon
linux:scripts:bulk_update_banshee_podcasts [2011/06/02 21:40] (current)
amon [My Procedure]
Line 46: Line 46:
 cp banshee.db banshee.db.$(date +%F).backup cp banshee.db banshee.db.$(date +%F).backup
  
-#generate statements+#generate statements ​(roadhouse)
 for FILE in `ls /​home/​amon/​Podcasts/​The\ Roadhouse/| grep roadhouse`; do \ for FILE in `ls /​home/​amon/​Podcasts/​The\ Roadhouse/| grep roadhouse`; do \
     echo "​UPDATE PodcastEnclosures SET LocalPath = '/​home/​amon/​Podcasts/​The Roadhouse/​$FILE',​ DownloadStatus = 3 WHERE LocalPath IS NULL AND Url LIKE '​%$FILE%';"​ ;\     echo "​UPDATE PodcastEnclosures SET LocalPath = '/​home/​amon/​Podcasts/​The Roadhouse/​$FILE',​ DownloadStatus = 3 WHERE LocalPath IS NULL AND Url LIKE '​%$FILE%';"​ ;\
Line 52: Line 52:
     echo "​UPDATE CoreTracks SET Uri = '​file:///​home/​amon/​Podcasts/​The%20Roadhouse/​$FILE'​ WHERE Uri LIKE '​http:​%$FILE';"​ ;\     echo "​UPDATE CoreTracks SET Uri = '​file:///​home/​amon/​Podcasts/​The%20Roadhouse/​$FILE'​ WHERE Uri LIKE '​http:​%$FILE';"​ ;\
     done > updateALL.sql     done > updateALL.sql
 +
 +#generate statements (Friday night comedy)
 +for FILE in `ls /​home/​amon/​Podcasts/​Friday\ Night\ Comedy\ from\ BBC\ Radio\ 4/| grep .mp3`; do \
 +    echo "​UPDATE PodcastEnclosures SET LocalPath = '/​home/​amon/​Podcasts/​Friday Night Comedy from BBC Radio 4/​$FILE',​ DownloadStatus = 3 WHERE LocalPath IS NULL AND Url LIKE '​%$FILE%';"​ ;\
 +    echo "​UPDATE PodcastItems SET IsRead = 1 WHERE Title LIKE '​%$FILE%';"​ ;\
 +    echo "​UPDATE CoreTracks SET Uri = '​file:///​home/​amon/​Podcasts/​Friday%20Night%20Comedy%20from%20BBC%20Radio%204/​$FILE'​ WHERE Uri LIKE '​http:​%$FILE';"​ ;\
 +    done >> updateALL.sql
 +
  
 #check statements #check statements
linux/scripts/bulk_update_banshee_podcasts.txt · Last modified: 2011/06/02 21:40 by amon