[Python-apps-commits] r2086 - in packages/emesene/trunk/debian (2 files)
pochu-guest at users.alioth.debian.org
pochu-guest at users.alioth.debian.org
Sun Dec 21 17:17:39 UTC 2008
Date: Sunday, December 21, 2008 @ 17:17:38
Author: pochu-guest
Revision: 2086
+ Add ${misc:Depends} to Depends to remove lintian warning.
* debian/patches/currentSong_plugin_support_amarok2.patch:
- Add plugin from http://www.emesene.org/trac/ticket/1955
to support Amarok2. It uses DBus instead of DCOP, so after
Lenny is released we can remove python-dcop from Suggests.
Added:
packages/emesene/trunk/debian/patches/currentSong_plugin_support_amarok2.patch
Modified:
packages/emesene/trunk/debian/changelog
Modified: packages/emesene/trunk/debian/changelog
===================================================================
--- packages/emesene/trunk/debian/changelog 2008-12-21 15:09:18 UTC (rev 2085)
+++ packages/emesene/trunk/debian/changelog 2008-12-21 17:17:38 UTC (rev 2086)
@@ -2,11 +2,16 @@
[ Marco Rodrigues ]
* debian/control:
- + Add ${misc:Depends} to Depends to remove
- lintian warning.
+ + Add ${misc:Depends} to Depends to remove lintian warning.
- -- Marco Rodrigues <gothicx at sapo.pt> Sat, 13 Dec 2008 15:04:59 +0000
+ [ Emilio Pozuelo Monfort ]
+ * debian/patches/currentSong_plugin_support_amarok2.patch:
+ - Add plugin from http://www.emesene.org/trac/ticket/1955
+ to support Amarok2. It uses DBus instead of DCOP, so after
+ Lenny is released we can remove python-dcop from Suggests.
+ -- Emilio Pozuelo Monfort <pochu at ubuntu.com> Sun, 21 Dec 2008 18:13:09 +0100
+
emesene (1.0.1-2) unstable; urgency=low
[ Sandro Tosi ]
Added: packages/emesene/trunk/debian/patches/currentSong_plugin_support_amarok2.patch
===================================================================
--- packages/emesene/trunk/debian/patches/currentSong_plugin_support_amarok2.patch (rev 0)
+++ packages/emesene/trunk/debian/patches/currentSong_plugin_support_amarok2.patch 2008-12-21 17:17:38 UTC (rev 2086)
@@ -0,0 +1,77 @@
+Index: plugins_base/currentSong/Amarok2.py
+===================================================================
+--- plugins_base/currentSong/Amarok2.py (revisión: 0)
++++ plugins_base/currentSong/Amarok2.py (revisión: 0)
+@@ -0,0 +1,60 @@
++# -*- coding: utf-8 -*-
++
++# This file is part of emesene.
++#
++# Emesene is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# emesene is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with emesene; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++# Creator: Otávio Souza <leader at kinuxlinux.org>
++
++import os
++import CurrentSong
++
++import dbus
++
++class Amarok2(CurrentSong.CurrentSong):
++ def __init__(self):
++ CurrentSong.CurrentSong.__init__(self)
++ if self.isRunning():
++ self.amarok = dbus.SessionBus().get_object('org.kde.amarok','/Player');
++ self.track = dbus.SessionBus().get_object('org.kde.amarok','/TrackList');
++
++ self.check()
++
++ def isRunning(self):
++ if os.popen('ps -A | grep amarok').read() == "":
++ self.running = False
++ else:
++ self.running = True
++
++ return self.running
++
++ def isPlaying(self):
++ if self.isRunning():
++ return bool(self.amarok.PositionGet() > 0)
++ else:
++ return False
++
++ def getStatus(self):
++ return (True , 'Ok')
++
++ def check(self):
++ if self.isPlaying():
++ self.info = self.track.GetMetadata(self.track.GetCurrentTrack());
++ self.artist = str(self.info['artist'])
++ self.album = str(self.info['album'])
++ self.title = str(self.info['title']);
++ return True
++ else:
++ return False;
++
+Index: plugins_base/currentSong/__init__.py
+===================================================================
+--- plugins_base/currentSong/__init__.py (revisión: 1525)
++++ plugins_base/currentSong/__init__.py (copia de trabajo)
+@@ -19,6 +19,7 @@
+ from os import name
+ if name == 'posix':
+ from Amarok import Amarok
++ from Amarok2 import Amarok2
+ from Exaile import Exaile
+ from Xmms import Xmms
+ from Banshee import Banshee
More information about the Python-apps-commits
mailing list