summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Cort <tcort@gentoo.org>2006-09-09 12:57:11 +0000
committerThomas Cort <tcort@gentoo.org>2006-09-09 12:57:11 +0000
commita1c65e8008980c0f7ad22afc88df5e75236fb33e (patch)
tree3506c62ea88781c16abfd8cfabfcde636e5a62fd /media-plugins
parentHard mask OpenAFS' current development branch (diff)
downloadhistorical-a1c65e8008980c0f7ad22afc88df5e75236fb33e.tar.gz
historical-a1c65e8008980c0f7ad22afc88df5e75236fb33e.tar.bz2
historical-a1c65e8008980c0f7ad22afc88df5e75236fb33e.zip
Added ipod detection patch from Frittella Laurento <mrfree@infinito.it>.
Package-Manager: portage-2.1-r2
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/quodlibet-ipod/ChangeLog6
-rw-r--r--media-plugins/quodlibet-ipod/Manifest20
-rw-r--r--media-plugins/quodlibet-ipod/files/0.4-ipod-detect.patch133
-rw-r--r--media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild4
4 files changed, 152 insertions, 11 deletions
diff --git a/media-plugins/quodlibet-ipod/ChangeLog b/media-plugins/quodlibet-ipod/ChangeLog
index 501d332cfa00..88217a0a9b3d 100644
--- a/media-plugins/quodlibet-ipod/ChangeLog
+++ b/media-plugins/quodlibet-ipod/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-plugins/quodlibet-ipod
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/quodlibet-ipod/ChangeLog,v 1.1 2006/09/09 12:48:35 tcort Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/quodlibet-ipod/ChangeLog,v 1.2 2006/09/09 12:57:11 tcort Exp $
+
+ 09 Sep 2006; Thomas Cort <tcort@gentoo.org> +files/0.4-ipod-detect.patch,
+ quodlibet-ipod-0.4.ebuild:
+ Added ipod detection patch from Frittella Laurento <mrfree@infinito.it>.
*quodlibet-ipod-0.4 (09 Sep 2006)
diff --git a/media-plugins/quodlibet-ipod/Manifest b/media-plugins/quodlibet-ipod/Manifest
index ec21abc19320..76369dff0624 100644
--- a/media-plugins/quodlibet-ipod/Manifest
+++ b/media-plugins/quodlibet-ipod/Manifest
@@ -1,12 +1,16 @@
+AUX 0.4-ipod-detect.patch 4279 RMD160 1d398ff411611002158eeb36f2658c075de7a2ec SHA1 34561ef8ccfe621f3830c7c1be1f1511be03ef7a SHA256 434103922acb47d4e64777d7db93feabc4488f6ccf8e4edc685fb46cbe73c1e4
+MD5 0a1f7a7e83de4179ad5b9a73432fe48b files/0.4-ipod-detect.patch 4279
+RMD160 1d398ff411611002158eeb36f2658c075de7a2ec files/0.4-ipod-detect.patch 4279
+SHA256 434103922acb47d4e64777d7db93feabc4488f6ccf8e4edc685fb46cbe73c1e4 files/0.4-ipod-detect.patch 4279
DIST quodlibet-ipod-0.4.tar.gz 8317 RMD160 cac3fedeac863d6ae44c7793f6c61a862861913a SHA1 82032fd8a09cec7f6ddf2ef1b95ef5c9a2efa6a2 SHA256 2ef0a7e622ac865a7029952efc44596f27484140b51a3d4f97f3e41251312f76
-EBUILD quodlibet-ipod-0.4.ebuild 1272 RMD160 a4bad17753a070ef975580648076e0d9b41a7b23 SHA1 b96abf3edc964cc35c15ebbe113d15875a8fd6ed SHA256 54ea05abbadfba7c956ab1757c5f35b0c38296dd6340af595d01a95221ce7268
-MD5 0fea84803243fd621a22d3eaf691ab86 quodlibet-ipod-0.4.ebuild 1272
-RMD160 a4bad17753a070ef975580648076e0d9b41a7b23 quodlibet-ipod-0.4.ebuild 1272
-SHA256 54ea05abbadfba7c956ab1757c5f35b0c38296dd6340af595d01a95221ce7268 quodlibet-ipod-0.4.ebuild 1272
-MISC ChangeLog 541 RMD160 eb82bd798ce8158d7693a3cb56367afd193a20e8 SHA1 bfad3ed8f01ac3662b8ce575d4164e7e93a7c69e SHA256 37782f148978272ce34591b69ecf94875ef11dbde67da113f97359b95fde2edb
-MD5 27240114ebdc04069edb63ff72308153 ChangeLog 541
-RMD160 eb82bd798ce8158d7693a3cb56367afd193a20e8 ChangeLog 541
-SHA256 37782f148978272ce34591b69ecf94875ef11dbde67da113f97359b95fde2edb ChangeLog 541
+EBUILD quodlibet-ipod-0.4.ebuild 1278 RMD160 dd2aa9f1554dd1e86125f7cfb4a59e89676e31db SHA1 37060e4b1e073bca67606c432e7c439ed41bbb9a SHA256 2c5311145c36a6892c77bb1e6be2c5a0f1bea603181d7adb14d45e59a25debe3
+MD5 d0df3dac05d364ffb0e8b0792070f2f9 quodlibet-ipod-0.4.ebuild 1278
+RMD160 dd2aa9f1554dd1e86125f7cfb4a59e89676e31db quodlibet-ipod-0.4.ebuild 1278
+SHA256 2c5311145c36a6892c77bb1e6be2c5a0f1bea603181d7adb14d45e59a25debe3 quodlibet-ipod-0.4.ebuild 1278
+MISC ChangeLog 722 RMD160 43b885d77e91a7e9e9a1e8b29832174fb65e02d4 SHA1 d960bb1205194111a1245d5539a0f3ba51d86b20 SHA256 9f1f62767e479e91e3523298f9d5bb7004293d73e01dc1961ed884a8908e064a
+MD5 37cb39ccd688da58342cb027061675de ChangeLog 722
+RMD160 43b885d77e91a7e9e9a1e8b29832174fb65e02d4 ChangeLog 722
+SHA256 9f1f62767e479e91e3523298f9d5bb7004293d73e01dc1961ed884a8908e064a ChangeLog 722
MISC metadata.xml 248 RMD160 c697218a44606450b98f7b5417564b6b3cde6e16 SHA1 b9e67799079f43398e144e3106351ece7bd7074a SHA256 fedcb689a47bc5b2be227c6d50698926c0d2c27836d7281fd9be10cefdcfa4d2
MD5 bb06a2f53cdc5a7c45ee2dd9511e4b08 metadata.xml 248
RMD160 c697218a44606450b98f7b5417564b6b3cde6e16 metadata.xml 248
diff --git a/media-plugins/quodlibet-ipod/files/0.4-ipod-detect.patch b/media-plugins/quodlibet-ipod/files/0.4-ipod-detect.patch
new file mode 100644
index 000000000000..df003e565305
--- /dev/null
+++ b/media-plugins/quodlibet-ipod/files/0.4-ipod-detect.patch
@@ -0,0 +1,133 @@
+--- ipod/main.old 2006-08-05 12:14:07.245399000 +0200
++++ ipod/main.py 2006-08-05 12:33:46.595399000 +0200
+@@ -23,6 +23,7 @@
+ from qltk import ErrorMessage
+
+ import gpod
++import dbus
+
+ class iPodMain(SongsMenuPlugin):
+ PLUGIN_VERSION = '0.4'
+@@ -34,18 +35,58 @@
+ win = None
+ complete = True
+
++ def detect_ipod(self):
++ bus = dbus.SystemBus()
++ try:
++ hal_manager_obj = bus.get_object('org.freedesktop.Hal',
++ '/org/freedesktop/Hal/Manager')
++ hal_manager = dbus.Interface(hal_manager_obj,
++ 'org.freedesktop.Hal.Manager')
++ dev_udi_list = hal_manager.FindDeviceStringMatch ('portable_audio_player.type', 'ipod')
++ for udi in dev_udi_list:
++ vol_udi_list = hal_manager.FindDeviceStringMatch ('info.parent', udi)
++
++ for vol_udi in vol_udi_list:
++ vol_obj = bus.get_object ('org.freedesktop.Hal', vol_udi)
++ vol = dbus.Interface (vol_obj, 'org.freedesktop.Hal.Device')
++
++ if not vol.GetProperty('volume.is_mounted'):
++ continue;
++
++ return (vol.GetProperty('block.device').encode('ascii'),
++ vol.GetProperty('volume.mount_point').encode('ascii'))
++ except None:
++ print 'HAL is down.'
++
++ return ('-', '-')
++
++ def get_ipod_path(self):
++ path = '-'
++ try:
++ path = config.get('plugins', 'ipod_path')
++ except: pass
++
++ if '-' == path:
++ (dev, path) = self.detect_ipod()
++
++ return path
++
++ def get_ipod_dev(self):
++ path = '-'
++ try:
++ path = config.get('plugins', 'ipod_device')
++ except: pass
++
++ if '-' == path:
++ (dev, path) = self.detect_ipod()
++
++ return dev
++
+ def plugin_songs(self, songs):
+ if self.win:
+ self.win.window.focus()
+ return
+
+- try: config.get('plugins', 'ipod_path')
+- except:
+- ErrorMessage(
+- widgets.main, 'Error', 'You have to set the mountpoint first!'
+- ).run()
+- return
+-
+ self.complete = True
+ self.win = self.create_window()
+ self.load_db()
+@@ -118,9 +159,9 @@
+ label = gtk.Label()
+ label.set_alignment(1, 0)
+ label.set_justify(gtk.JUSTIFY_RIGHT)
+- try: path = config.get('plugins', 'ipod_path')
++ try: path = self.get_ipod_path()
+ except: path = '-'
+- try: device = config.get('plugins', 'ipod_device')
++ try: device = self.get_ipod_dev()
+ except: device = '-'
+ label.set_markup('<span size="smaller">Mount point: <b>%s</b>\nDevice: <b>%s</b></span>'
+ % (path, device))
+@@ -223,7 +264,7 @@
+ buttons[0].set_sensitive(three)
+
+ def update_model(self):
+- path = config.get('plugins', 'ipod_path')
++ path = self.get_ipod_path()
+ if os.path.isdir(path):
+ try:
+ file = open(os.path.join(path, 'iPod_Control/Device/SysInfo'))
+@@ -242,7 +283,7 @@
+ self.refresh()
+
+ def update_space(self):
+- path = config.get('plugins', 'ipod_path')
++ path = self.get_ipod_path()
+ if os.path.isdir(path):
+ if self.db: songs = len(gpod.sw_get_tracks(self.db))
+ else: songs = '?'
+@@ -264,7 +305,7 @@
+ self.refresh()
+
+ def load_db(self):
+- path = config.get('plugins', 'ipod_path')
++ path = self.get_ipod_path()
+ self.db = gpod.itdb_parse(path, None)
+ if self.db:
+ return True
+@@ -291,7 +332,7 @@
+
+ def create_db(self):
+ db = gpod.itdb_new();
+- gpod.itdb_set_mountpoint(db, config.get('plugins', 'ipod_path'))
++ gpod.itdb_set_mountpoint(db, self.get_ipod_path())
+
+ master = gpod.itdb_playlist_new('iPod', False)
+ gpod.itdb_playlist_set_mpl(master)
+@@ -301,7 +342,7 @@
+
+ def eject(self):
+ try:
+- device = config.get('plugins', 'ipod_device')
++ device = self.get_ipod_dev()
+ except:
+ ErrorMessage(
+ widgets.main, 'Error', 'You have to set the device first!'
diff --git a/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild b/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild
index d21a82b053c0..d022e8707bf1 100644
--- a/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild
+++ b/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild,v 1.1 2006/09/09 12:48:35 tcort Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/quodlibet-ipod/quodlibet-ipod-0.4.ebuild,v 1.2 2006/09/09 12:57:11 tcort Exp $
inherit python eutils
@@ -28,7 +28,7 @@ pkg_setup() {
src_unpack() {
unpack "${A}"
- epatch "${FILESDIR}"/ipod-detect.patch
+ epatch "${FILESDIR}"/${PV}-ipod-detect.patch
}
src_install() {