[banshee] [AppleDevice] Create the Podcasts playlist if needed
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [AppleDevice] Create the Podcasts playlist if needed
- Date: Fri, 24 Sep 2010 18:45:30 +0000 (UTC)
commit 0cbcf9b2b845cfabd6650192eae9aef665a3d16e
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Sep 23 15:39:39 2010 -0500
[AppleDevice] Create the Podcasts playlist if needed
.../Banshee.Dap.AppleDevice/AppleDeviceSource.cs | 8 +++++++-
.../AppleDeviceTrackInfo.cs | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
index 5fb5c3e..4f099bb 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -174,6 +174,12 @@ namespace Banshee.Dap.AppleDevice
}
}
+ if (SupportsPodcasts && MediaDatabase.PodcastsPlaylist == null) {
+ MediaDatabase.Playlists.Add (new GPod.Playlist (Catalog.GetString ("Podcasts")) {
+ IsPodcast = true
+ });
+ }
+
foreach (var ipod_track in MediaDatabase.Tracks) {
try {
var track = new AppleDeviceTrackInfo (ipod_track);
@@ -561,7 +567,7 @@ namespace Banshee.Dap.AppleDevice
playlist.Tracks.Remove (track.IpodTrack);
}
- if (track.IpodTrack.MediaType == GPod.MediaType.Podcast) {
+ if (SupportsPodcasts && track.IpodTrack.MediaType == GPod.MediaType.Podcast) {
MediaDatabase.PodcastsPlaylist.Tracks.Remove (track.IpodTrack);
}
diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
index ddcabb4..15cc0e0 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceTrackInfo.cs
@@ -264,7 +264,7 @@ namespace Banshee.Dap.AppleDevice
database.Tracks.Add (IpodTrack);
database.MasterPlaylist.Tracks.Add (IpodTrack);
- if (HasAttribute (TrackMediaAttributes.Podcast)) {
+ if (HasAttribute (TrackMediaAttributes.Podcast) && database.Device.SupportsPodcast) {
database.PodcastsPlaylist.Tracks.Add (IpodTrack);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]