rpms/rhythmbox/F-7 rhythmbox-0.10.1-podcasts.patch, NONE, 1.1 rhythmbox.spec, 1.114, 1.115
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Mon Sep 24 13:46:22 UTC 2007
Author: hadess
Update of /cvs/pkgs/rpms/rhythmbox/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25642
Modified Files:
rhythmbox.spec
Added Files:
rhythmbox-0.10.1-podcasts.patch
Log Message:
* Mon Sep 24 2007 - Bastien Nocera <bnocera at redhat.com> - 0.10.1-2.fc7
- Add patch from upstream to mark Podcasts as such when uploading them to
an iPod (#302691)
rhythmbox-0.10.1-podcasts.patch:
--- NEW FILE rhythmbox-0.10.1-podcasts.patch ---
diff -up rhythmbox-0.10.1/plugins/ipod/rb-ipod-source.c.podcast rhythmbox-0.10.1/plugins/ipod/rb-ipod-source.c
--- rhythmbox-0.10.1/plugins/ipod/rb-ipod-source.c.podcast 2007-09-24 02:18:38.000000000 -0400
+++ rhythmbox-0.10.1/plugins/ipod/rb-ipod-source.c 2007-09-24 02:30:19.000000000 -0400
@@ -50,6 +50,8 @@
#define PHONE_PRODUCT_ID 0x4810
#endif
+static const char *ITDB_PLAYLIST_DATA = "itdb-playlist";
+
static GObject *rb_ipod_source_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties);
@@ -96,6 +98,7 @@ typedef struct
GList *playlists;
gboolean needs_shuffle_db;
+ RBStaticPlaylistSource *podcast_pl;
guint load_idle_id;
} RBiPodSourcePrivate;
@@ -324,6 +327,11 @@ add_rb_playlist (RBiPodSource *source, I
}
priv->playlists = g_list_prepend (priv->playlists, playlist_source);
+ g_object_set_data_full (g_object_ref (playlist_source),
+ ITDB_PLAYLIST_DATA, playlist, g_object_unref);
+ if (itdb_playlist_is_podcasts(playlist)) {
+ priv->podcast_pl = RB_STATIC_PLAYLIST_SOURCE (playlist_source);
+ }
rb_shell_append_source (shell, playlist_source, RB_SOURCE (source));
g_object_unref (shell);
@@ -352,6 +360,10 @@ load_ipod_playlists (RBiPodSource *sourc
}
#ifdef ENABLE_IPOD_WRITING
+
+#define MEDIATYPE_AUDIO 0x0001
+#define MEDIATYPE_PODCAST 0x0004
+
static Itdb_Track *
create_ipod_song_from_entry (RhythmDBEntry *entry, const char *mimetype)
{
@@ -378,6 +390,12 @@ create_ipod_song_from_entry (RhythmDBEnt
track->app_rating = track->rating;
track->playcount = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_PLAY_COUNT);
+ if (rhythmdb_entry_get_pointer (entry, RHYTHMDB_PROP_TYPE) == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
+ track->mediatype = MEDIATYPE_PODCAST;
+ } else {
+ track->mediatype = MEDIATYPE_AUDIO;
+ }
+
return track;
}
#endif
@@ -964,6 +982,23 @@ impl_build_dest_uri (RBRemovableMediaSou
return NULL;
}
+static void
+add_to_podcasts (RBiPodSourcePrivate *priv, Itdb_Track *song)
+{
+ gchar *filename;
+ Itdb_Playlist *ipod_playlist;
+
+ if (priv->podcast_pl == NULL)
+ return;
+
+ ipod_playlist = g_object_get_data (G_OBJECT (priv->podcast_pl), ITDB_PLAYLIST_DATA);
+ itdb_playlist_add_track (ipod_playlist, song, -1);
+
+ filename = ipod_path_to_uri (priv->ipod_mount_path, song->ipod_path);
+ rb_static_playlist_source_add_location (priv->podcast_pl, filename, -1);
+ g_free (filename);
+}
+
static gboolean
impl_track_added (RBRemovableMediaSource *source,
RhythmDBEntry *entry,
@@ -987,6 +1022,9 @@ impl_track_added (RBRemovableMediaSource
itdb_track_add (priv->ipod_db, song, -1);
itdb_playlist_add_track (itdb_playlist_mpl (priv->ipod_db),
song, -1);
+ if (song->mediatype == MEDIATYPE_PODCAST) {
+ add_to_podcasts (priv, song);
+ }
add_ipod_song_to_db (isource, db, song);
itdb_schedule_save (isource);
Index: rhythmbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhythmbox/F-7/rhythmbox.spec,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- rhythmbox.spec 23 Aug 2007 21:34:21 -0000 1.114
+++ rhythmbox.spec 24 Sep 2007 13:45:48 -0000 1.115
@@ -3,7 +3,7 @@
Name: rhythmbox
Summary: Music Management Application
Version: 0.10.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL
Group: Applications/Multimedia
URL: http://www.gnome.org/projects/rhythmbox/
@@ -48,6 +48,7 @@
Patch1: rhythmbox-first-time-load.patch
Patch2: rhythmbox-enable-stores.patch
Patch3: rhythmbox-0.10-shops-resizing.patch
+Patch4: rhythmbox-0.10.1-podcasts.patch
%description
Rhythmbox is an integrated music management application based on the powerful
@@ -65,6 +66,7 @@
%patch2 -p0 -b .enable-stores
cd ../
%patch3 -p0 -b .dont-resize-stores
+%patch4 -p1 -b .ipod-podcasts
%build
@@ -153,6 +155,10 @@
%{_libexecdir}/rhythmbox-metadata
%changelog
+* Mon Sep 24 2007 - Bastien Nocera <bnocera at redhat.com> - 0.10.1-2.fc7
+- Add patch from upstream to mark Podcasts as such when uploading them to
+ an iPod (#302691)
+
* Thu Aug 23 2007 - Ray Strode <rstorde at redhat.com> - 0.10.1-1.fc7
- update to 0.10.1 at the request of Andre Klapper
(http://mail.gnome.org/archives/distributor-list/2007-August/msg00008.html)
More information about the fedora-extras-commits
mailing list