Hello community,
here is the log from the commit of package python-PyChromecast for
openSUSE:Factory checked in at 2019-01-24 14:03:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyChromecast (Old)
and /work/SRC/openSUSE:Factory/.python-PyChromecast.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyChromecast"
Thu Jan 24 14:03:36 2019 rev:3 rq:662437 version:2.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyChromecast/python-PyChromecast.changes
2018-05-15 10:33:26.692093666 +0200
+++
/work/SRC/openSUSE:Factory/.python-PyChromecast.new.28833/python-PyChromecast.changes
2019-01-24 14:03:38.904035507 +0100
@@ -1,0 +2,20 @@
+Wed Jan 2 12:09:41 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.3.0:
+ * Updated spotify controller description (#232) @Nobyx
+ * Allow users to pass the force_launch flag when launching an app (#237)
@marcosdiez
+ * Better YouTube controller (#236) @ur1katz
+ * Simple event listener example (#241) @hjmsw
+
+-------------------------------------------------------------------
+Wed Dec 26 22:39:21 UTC 2018 - Matej Cepl <[email protected]>
+
+- Fix build failure: %{py_ver} doesn't work, %{py3_ver}
+ does.
+
+-------------------------------------------------------------------
+Tue Dec 4 12:52:18 UTC 2018 - Matej Cepl <[email protected]>
+
+- Remove superfluous devel dependency for noarch package
+
+-------------------------------------------------------------------
Old:
----
PyChromecast-2.2.0.tar.gz
New:
----
PyChromecast-2.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyChromecast.spec ++++++
--- /var/tmp/diff_new_pack.uiUlxS/_old 2019-01-24 14:03:39.352034995 +0100
+++ /var/tmp/diff_new_pack.uiUlxS/_new 2019-01-24 14:03:39.356034991 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-PyChromecast
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,21 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
-%define skip_python2 1
-
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-PyChromecast
-Version: 2.2.0
+Version: 2.3.0
Release: 0
Summary: Python module to talk to Google Chromecast
License: MIT
Group: Development/Languages/Python
URL: https://github.com/balloob/pychromecast
Source:
https://files.pythonhosted.org/packages/source/P/PyChromecast/PyChromecast-%{version}.tar.gz
-BuildRequires: %{python_module devel}
+BuildRequires: %{python_module casttube >= 0.1.0}
BuildRequires: %{python_module protobuf >= 3.0.0}
BuildRequires: %{python_module requests >= 2.0}
BuildRequires: %{python_module setuptools}
@@ -35,6 +34,7 @@
BuildRequires: %{python_module zeroconf >= 0.17.7}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-casttube >= 0.1.0
Requires: python-protobuf >= 3.0.0
Requires: python-requests >= 2.0
Requires: python-six >= 1.10.0
@@ -64,6 +64,6 @@
%license LICENSE
%doc README.rst
%{python_sitelib}/pychromecast
-%{python_sitelib}/PyChromecast-%{version}-py%{py_ver}.egg-info
+%{python_sitelib}/PyChromecast-%{version}-py%{py3_ver}.egg-info
%changelog
++++++ PyChromecast-2.2.0.tar.gz -> PyChromecast-2.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/PKG-INFO
new/PyChromecast-2.3.0/PKG-INFO
--- old/PyChromecast-2.2.0/PKG-INFO 2018-04-09 05:22:10.000000000 +0200
+++ new/PyChromecast-2.3.0/PKG-INFO 2018-09-05 15:02:22.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PyChromecast
-Version: 2.2.0
+Version: 2.3.0
Summary: Python module to talk to Google Chromecast.
Home-page: https://github.com/balloob/pychromecast
Author: Paulus Schoutsen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/PyChromecast.egg-info/PKG-INFO
new/PyChromecast-2.3.0/PyChromecast.egg-info/PKG-INFO
--- old/PyChromecast-2.2.0/PyChromecast.egg-info/PKG-INFO 2018-04-09
05:22:09.000000000 +0200
+++ new/PyChromecast-2.3.0/PyChromecast.egg-info/PKG-INFO 2018-09-05
15:02:22.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: PyChromecast
-Version: 2.2.0
+Version: 2.3.0
Summary: Python module to talk to Google Chromecast.
Home-page: https://github.com/balloob/pychromecast
Author: Paulus Schoutsen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/PyChromecast-2.2.0/PyChromecast.egg-info/requires.txt
new/PyChromecast-2.3.0/PyChromecast.egg-info/requires.txt
--- old/PyChromecast-2.2.0/PyChromecast.egg-info/requires.txt 2018-04-09
05:22:09.000000000 +0200
+++ new/PyChromecast-2.3.0/PyChromecast.egg-info/requires.txt 2018-09-05
15:02:22.000000000 +0200
@@ -1,3 +1,4 @@
requests>=2.0
protobuf>=3.0.0
zeroconf>=0.17.7
+casttube>=0.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/pychromecast/__init__.py
new/PyChromecast-2.3.0/pychromecast/__init__.py
--- old/PyChromecast-2.2.0/pychromecast/__init__.py 2018-02-21
19:32:32.000000000 +0100
+++ new/PyChromecast-2.3.0/pychromecast/__init__.py 2018-07-10
10:42:56.000000000 +0200
@@ -257,11 +257,11 @@
if status:
self.status_event.set()
- def start_app(self, app_id):
+ def start_app(self, app_id, force_launch=False):
""" Start an app on the Chromecast. """
self.logger.info("Starting app %s", app_id)
- self.socket_client.receiver_controller.launch_app(app_id)
+ self.socket_client.receiver_controller.launch_app(app_id, force_launch)
def quit_app(self):
""" Tells the Chromecast to quit current app_id. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/pychromecast/config.py
new/PyChromecast-2.3.0/pychromecast/config.py
--- old/PyChromecast-2.2.0/pychromecast/config.py 2018-04-09
05:21:03.000000000 +0200
+++ new/PyChromecast-2.3.0/pychromecast/config.py 2018-07-10
10:42:56.000000000 +0200
@@ -6,7 +6,7 @@
import requests
APP_BACKDROP = "E8C28D3C"
-APP_YOUTUBE = "YouTube"
+APP_YOUTUBE = "233637DE"
APP_MEDIA_RECEIVER = "CC1AD845"
APP_PLEX = "06ee44ee-e7e3-4249-83b6-f5d0b6f07f34_1"
APP_DASHCAST = "84912283"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/PyChromecast-2.2.0/pychromecast/controllers/spotify.py
new/PyChromecast-2.3.0/pychromecast/controllers/spotify.py
--- old/PyChromecast-2.2.0/pychromecast/controllers/spotify.py 2018-04-09
05:21:03.000000000 +0200
+++ new/PyChromecast-2.3.0/pychromecast/controllers/spotify.py 2018-07-10
10:42:56.000000000 +0200
@@ -1,5 +1,5 @@
"""
-Controller to interface with the DashCast app namespace.
+Controller to interface with Spotify.
"""
import logging
import time
@@ -7,8 +7,6 @@
from . import BaseController
from ..config import APP_SPOTIFY
-logging.basicConfig(level=logging.DEBUG)
-
APP_NAMESPACE = "urn:x-cast:com.spotify.chromecast.secure.v1"
TYPE_STATUS = "setCredentials"
TYPE_RESPONSE_STATUS = 'setCredentialsResponse'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/PyChromecast-2.2.0/pychromecast/controllers/youtube.py
new/PyChromecast-2.3.0/pychromecast/controllers/youtube.py
--- old/PyChromecast-2.2.0/pychromecast/controllers/youtube.py 2017-11-19
19:58:35.000000000 +0100
+++ new/PyChromecast-2.3.0/pychromecast/controllers/youtube.py 2018-07-10
10:42:56.000000000 +0200
@@ -1,59 +1,96 @@
"""
Controller to interface with the YouTube-app.
-
Use the media controller to play, pause etc.
"""
+import threading
+from casttube import YouTubeSession
+
from . import BaseController
+from ..error import UnsupportedNamespace
+from ..config import APP_YOUTUBE
-MESSAGE_TYPE = "type"
+YOUTUBE_NAMESPACE = "urn:x-cast:com.google.youtube.mdx"
+TYPE_GET_SCREEN_ID = "getMdxSessionStatus"
TYPE_STATUS = "mdxSessionStatus"
ATTR_SCREEN_ID = "screenId"
+MESSAGE_TYPE = "type"
class YouTubeController(BaseController):
- """ Controller to interact with Youtube namespace. """
+ """ Controller to interact with Youtube."""
def __init__(self):
super(YouTubeController, self).__init__(
- "urn:x-cast:com.google.youtube.mdx", "233637DE")
+ YOUTUBE_NAMESPACE, APP_YOUTUBE)
+ self.status_update_event = threading.Event()
+ self._screen_id = None
+ self._session = None
- self.screen_id = None
-
- def receive_message(self, message, data):
- """ Called when a media message is received. """
- if data[MESSAGE_TYPE] == TYPE_STATUS:
- self._process_status(data.get('data'))
-
- return True
+ def start_session_if_none(self):
+ """
+ Starts a session it is not yet initialized.
+ """
+ if not (self._screen_id and self._session):
+ self.update_screen_id()
+ self._session = YouTubeSession(screen_id=self._screen_id)
- return False
+ def play_video(self, video_id):
+ """
+ Play video(video_id) now. This ignores the current play queue order.
+ :param video_id: YouTube video id(http://youtube.com/watch?v=video_id)
+ """
+ self.start_session_if_none()
+ self._session.play_video(video_id)
- def play_video(self, youtube_id):
+ def add_to_queue(self, video_id):
+ """
+ Add video(video_id) to the end of the play queue.
+ :param video_id: YouTube video id(http://youtube.com/watch?v=video_id)
"""
- Starts playing a video in the YouTube app.
+ self.start_session_if_none()
+ self._session.add_to_queue(video_id)
- Only works if there is no video playing.
+ def play_next(self, video_id):
"""
- def callback():
- """Plays requested video after app launched."""
- self.start_play(youtube_id)
+ Play video(video_id) after the currently playing video.
+ :param video_id: YouTube video id(http://youtube.com/watch?v=video_id)
+ """
+ self.start_session_if_none()
+ self._session.play_next(video_id)
- self.launch(callback_function=callback)
+ def remove_video(self, video_id):
+ """
+ Remove video(videoId) from the queue.
+ :param video_id: YouTube video id(http://youtube.com/watch?v=video_id)
+ """
+ self.start_session_if_none()
+ self._session.remove_video(video_id)
- def start_play(self, youtube_id):
+ def update_screen_id(self):
"""
- Sends the play message to the YouTube app.
+ Sends a getMdxSessionStatus to get the screenId and waits for response.
+ This function is blocking
+ If connected we should always get a response
+ (send message will launch app if it is not running).
"""
- msg = {
- "type": "flingVideo",
- "data": {
- "currentTime": 0,
- "videoId": youtube_id
- }
- }
+ self.status_update_event.clear()
+ # This gets the screenId but always throws. Couldn't find a better way.
+ try:
+ self.send_message({MESSAGE_TYPE: TYPE_GET_SCREEN_ID})
+ except UnsupportedNamespace:
+ pass
+ self.status_update_event.wait()
+ self.status_update_event.clear()
- self.send_message(msg, inc_session_id=True)
+ def receive_message(self, message, data):
+ """ Called when a media message is received. """
+ if data[MESSAGE_TYPE] == TYPE_STATUS:
+ self._process_status(data.get("data"))
+ return True
+
+ return False
def _process_status(self, status):
""" Process latest status update. """
- self.screen_id = status.get(ATTR_SCREEN_ID)
+ self._screen_id = status.get(ATTR_SCREEN_ID)
+ self.status_update_event.set()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/requirements.txt
new/PyChromecast-2.3.0/requirements.txt
--- old/PyChromecast-2.2.0/requirements.txt 2018-04-09 05:21:03.000000000
+0200
+++ new/PyChromecast-2.3.0/requirements.txt 2018-07-10 10:42:56.000000000
+0200
@@ -1,3 +1,4 @@
requests>=2.0
protobuf>=3.0.0
-zeroconf>=0.17.7
\ No newline at end of file
+zeroconf>=0.17.7
+casttube>=0.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/setup.cfg
new/PyChromecast-2.3.0/setup.cfg
--- old/PyChromecast-2.2.0/setup.cfg 2018-04-09 05:22:10.000000000 +0200
+++ new/PyChromecast-2.3.0/setup.cfg 2018-09-05 15:02:22.000000000 +0200
@@ -4,5 +4,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PyChromecast-2.2.0/setup.py
new/PyChromecast-2.3.0/setup.py
--- old/PyChromecast-2.2.0/setup.py 2018-04-09 05:21:10.000000000 +0200
+++ new/PyChromecast-2.3.0/setup.py 2018-09-05 15:00:24.000000000 +0200
@@ -5,7 +5,7 @@
setup(
name='PyChromecast',
- version='2.2.0',
+ version='2.3.0',
license='MIT',
url='https://github.com/balloob/pychromecast',
author='Paulus Schoutsen',