The branch, frodo has been updated
via 3269ed3eb23b4417b865f7499d501421e09e8892 (commit)
via 999550b90f57fbd19be1e0a7e9839d044754efe0 (commit)
via 50d097cde23edd7789970de8b6f7c3a8a0dceaa5 (commit)
via c1608f8cccca43dd35721a9c082746a6abbf167c (commit)
via e83ccceabd3346922247f08632bfec79668d5ccd (commit)
from d1b910a4adc31942f31f53f966624315a4364bde (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=3269ed3eb23b4417b865f7499d501421e09e8892
commit 3269ed3eb23b4417b865f7499d501421e09e8892
Author: beenje <beenje@...>
Date: Sun Mar 10 07:37:28 2013 +0100
[plugin.video.mlslive] updated to version 1.0.1
diff --git a/plugin.video.mlslive/addon.xml b/plugin.video.mlslive/addon.xml
index af28260..f5dfc83 100644
--- a/plugin.video.mlslive/addon.xml
+++ b/plugin.video.mlslive/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.mlslive" name="MLS Live" version="1.0.0" provider-name="Micah Galizia">
+<addon id="plugin.video.mlslive" name="MLS Live" version="1.0.1" provider-name="Micah Galizia">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
diff --git a/plugin.video.mlslive/changelog.txt b/plugin.video.mlslive/changelog.txt
index 79e62a7..d4590b0 100644
--- a/plugin.video.mlslive/changelog.txt
+++ b/plugin.video.mlslive/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 1.0.1[/B]
+
+- fix the live stream WS calls. Now all live games work.
+
[B]Version 1.0.0[/B]
- initial revision. Plays live and on-demand matches from the MLS Live service.
diff --git a/plugin.video.mlslive/mlslive.py b/plugin.video.mlslive/mlslive.py
index cf7070f..787a56a 100644
--- a/plugin.video.mlslive/mlslive.py
+++ b/plugin.video.mlslive/mlslive.py
@@ -23,6 +23,7 @@ class MLSLive:
"""
Initialize the MLSLive class.
"""
+ self.PUBLISH_POINT = 'http://live.mlssoccer.com/mlsmdl/servlets/publishpoint'
self.LOGIN_PAGE = 'https://live.mlssoccer.com/mlsmdl/secure/login'
self.GAMES_PAGE_PREFIX = 'http://mobile.cdn.mlssoccer.com/iphone/v5/prod/games_for_week_'
self.GAMES_PAGE_SUFFIX = '.js'
@@ -165,7 +166,7 @@ class MLSLive:
@param game the game data dictionary
@return true if the game is live, otherwise, false
"""
- if game['gameStatus'][:4] == 'LIVE':
+ if (game['gameStatus'][:4] == 'LIVE') or (game['gameStatus'][:4] == 'HALF'):
return True
return False
@@ -218,7 +219,6 @@ class MLSLive:
@return a string containing the game XML data
"""
game_xml_url = self.GAME_PREFIX + game_id + self.GAME_SUFFIX
- self.jar = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.jar))
try:
resp = opener.open(game_xml_url)
@@ -271,27 +271,30 @@ class MLSLive:
@param game_id the game id
@return the live stream
"""
- game_xml = self.getGameXML(game_id)
+ values = { 'type' : 'game',
+ 'gt' : 'live',
+ 'id' : game_id }
+ uri = self.PUBLISH_POINT + '?' + urllib.urlencode(values)
+ opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.jar))
+ # set the user agent to get the HLS stream
+ opener.addheaders = [('User-agent', 'Sony')]
try:
- dom = xml.dom.minidom.parseString(game_xml)
+ resp = opener.open(uri)
except:
- print "Unable to parse game XML for game " + game_id
+ print "Unable to get live game XML configuration"
return ""
- rss_node = dom.getElementsByTagName('rss')[0]
- chan_node = rss_node.getElementsByTagName('channel')[0]
- url = ""
- for item in chan_node.getElementsByTagName('item'):
+ game_xml = resp.read()
- # get the group list and make sure its valid
- group_list = item.getElementsByTagName('media:group')
- if group_list == None or len(group_list) == 0:
- continue
+ try:
+ dom = xml.dom.minidom.parseString(game_xml)
+ except:
+ print "Unable to parse game XML for game " + game_id
+ return ""
- # get the content node and then the URL
- content_node = group_list[0].getElementsByTagName('media:content')[0]
- url = content_node.getAttribute('url')
- break
+ result_node = dom.getElementsByTagName('result')[0]
+ path_node = result_node.getElementsByTagName('path')[0]
+ stream_url = path_node.firstChild.nodeValue
- return url
+ return stream_url.split('?')[0]
diff --git a/plugin.video.mlslive/test.py b/plugin.video.mlslive/test.py
index c809a80..3cb6bbf 100755
--- a/plugin.video.mlslive/test.py
+++ b/plugin.video.mlslive/test.py
@@ -58,7 +58,7 @@ if options.game != None:
sys.exit(0)
-print "OFfset = " + str(options.offset)
+print "Offset = " + str(options.offset)
#games = my_mls.getGames()
games = my_mls.getGames(options.offset)
teams = my_mls.getTeams()
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=999550b90f57fbd19be1e0a7e9839d044754efe0
commit 999550b90f57fbd19be1e0a7e9839d044754efe0
Author: beenje <beenje@...>
Date: Sun Mar 10 07:37:25 2013 +0100
[plugin.video.rofl_to] updated to version 0.1.0
diff --git a/plugin.video.rofl_to/LICENSE.txt b/plugin.video.rofl_to/LICENSE.txt
index e920057..03b0f8f 100644
--- a/plugin.video.rofl_to/LICENSE.txt
+++ b/plugin.video.rofl_to/LICENSE.txt
@@ -1,281 +1,281 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+-------------------------------------------------------------------------
diff --git a/plugin.video.rofl_to/addon.py b/plugin.video.rofl_to/addon.py
index 6330f83..960c49c 100644
--- a/plugin.video.rofl_to/addon.py
+++ b/plugin.video.rofl_to/addon.py
@@ -1,139 +1,136 @@
-from xbmcswift2 import Plugin, xbmc
-from resources.lib.api import RoflApi, NetworkError
-
-__addon_id__ = 'plugin.video.rofl_to'
-__addon_name__ = 'Rofl.to'
-
-plugin = Plugin(__addon_name__, __addon_id__, __file__)
-
-
-STRINGS = {
- 'page': 30000,
- 'category': 30001,
- 'all': 30002,
-}
-
-
-@...('/')
-def show_root():
- sort_methods = rofl_api.get_sort_methods()
- items = [{
- 'label': sort_method.get('title'),
- 'path': plugin.url_for(
- 'show_videos',
- sort_method=sort_method['path'],
- category='all',
- page='1',
- ),
- } for sort_method in sort_methods]
- return plugin.finish(items)
-
-
-@...>/')
-def show_categories(sort_method):
- categories = rofl_api.get_categories()
- items = [{
- 'label': category.get('title'),
- 'path': plugin.url_for(
- 'show_videos',
- sort_method=sort_method,
- category=category.get('path'),
- page='1',
- ),
- } for category in categories]
- return plugin.finish(items, update_listing=True)
-
-
-@...>/')
-def show_videos(sort_method, category, page):
- videos, has_next_page = rofl_api.get_videos(
- sort_method=sort_method,
- category=category,
- page=page,
- )
-
- items = []
- items.append({
- 'label': '[[ %s: %s ]]' % (_('category'), _(category)),
- 'path': plugin.url_for(
- 'show_categories',
- sort_method=sort_method,
- ),
- })
- if int(page) > 1:
- prev_page = str(int(page) - 1)
- items.append({
- 'label': '<< %s %s <<' % (_('page'), prev_page),
- 'path': plugin.url_for(
- 'show_videos',
- sort_method=sort_method,
- category=category,
- page=prev_page,
- ),
- })
-
- items.extend([{
- 'label': video.get('title'),
- 'thumbnail': video.get('thumb'),
- 'path': plugin.url_for(
- 'play_video',
- video_id=video['video_id'],
- ),
- 'info': {
- 'duration': video.get('duration'),
- },
- 'is_playable': True,
- } for video in videos])
-
- if has_next_page:
- next_page = str(int(page) + 1)
- items.append({
- 'label': '>> %s %s >>' % (_('page'), next_page),
- 'path': plugin.url_for(
- 'show_videos',
- sort_method=sort_method,
- category=category,
- page=next_page,
- ),
- })
-
- update_listing = int(page) > 1 or category != 'all'
- return plugin.finish(items, update_listing=update_listing)
-
-
-@...>')
-def play_video(video_id):
- playback_url = rofl_api.get_video_url(video_id)
- return plugin.set_resolved_url(playback_url)
-
-
-def get_language():
- xbmc_language = xbmc.getLanguage().lower()
- log('xbmc_language=%s' % xbmc_language)
- if xbmc_language.startswith('english'):
- lang = 'en'
- elif xbmc_language.startswith('german'):
- lang = 'de'
- else:
- lang = 'en'
- return lang
-
-
-def _(string_id):
- if string_id in STRINGS:
- return plugin.get_string(STRINGS[string_id])
- else:
- log('String is missing: %s' % string_id)
- return string_id
-
-
-def log(msg):
- print('%s addon: %s' % (__name__, msg))
-
-
-if __name__ == '__main__':
- rofl_api = RoflApi(get_language())
- try:
- plugin.run()
- except NetworkError:
- log('NetworkError')
+from xbmcswift2 import Plugin, xbmc
+from resources.lib.api import RoflApi, NetworkError
+
+plugin = Plugin()
+
+
+STRINGS = {
+ 'page': 30000,
+ 'category': 30001,
+ 'all': 30002,
+}
+
+
+@plugin.route('/')
+def show_root():
+ sort_methods = rofl_api.get_sort_methods()
+ items = [{
+ 'label': sort_method.get('title'),
+ 'path': plugin.url_for(
+ 'show_videos',
+ sort_method=sort_method['path'],
+ category='all',
+ page='1',
+ ),
+ } for sort_method in sort_methods]
+ return plugin.finish(items)
+
+
+@plugin.route('/<sort_method>/')
+def show_categories(sort_method):
+ categories = rofl_api.get_categories()
+ items = [{
+ 'label': category.get('title'),
+ 'path': plugin.url_for(
+ 'show_videos',
+ sort_method=sort_method,
+ category=category.get('path'),
+ page='1',
+ ),
+ } for category in categories]
+ return plugin.finish(items, update_listing=True)
+
+
+@plugin.route('/<sort_method>/<category>/<page>/')
+def show_videos(sort_method, category, page):
+ videos, has_next_page = rofl_api.get_videos(
+ sort_method=sort_method,
+ category=category,
+ page=page,
+ )
+
+ items = []
+ items.append({
+ 'label': '[[ %s: %s ]]' % (_('category'), _(category)),
+ 'path': plugin.url_for(
+ 'show_categories',
+ sort_method=sort_method,
+ ),
+ })
+ if int(page) > 1:
+ prev_page = str(int(page) - 1)
+ items.append({
+ 'label': '<< %s %s <<' % (_('page'), prev_page),
+ 'path': plugin.url_for(
+ 'show_videos',
+ sort_method=sort_method,
+ category=category,
+ page=prev_page,
+ ),
+ })
+
+ items.extend([{
+ 'label': video.get('title'),
+ 'thumbnail': video.get('thumb'),
+ 'path': plugin.url_for(
+ 'play_video',
+ video_id=video['video_id'],
+ ),
+ 'stream_info': {
+ 'video': {'duration': video['duration']},
+ },
+ 'is_playable': True,
+ } for video in videos])
+
+ if has_next_page:
+ next_page = str(int(page) + 1)
+ items.append({
+ 'label': '>> %s %s >>' % (_('page'), next_page),
+ 'path': plugin.url_for(
+ 'show_videos',
+ sort_method=sort_method,
+ category=category,
+ page=next_page,
+ ),
+ })
+
+ update_listing = int(page) > 1 or category != 'all'
+ return plugin.finish(items, update_listing=update_listing)
+
+
+@plugin.route('/play/<video_id>')
+def play_video(video_id):
+ playback_url = rofl_api.get_video_url(video_id)
+ return plugin.set_resolved_url(playback_url)
+
+
+def get_language():
+ xbmc_language = xbmc.getLanguage().lower()
+ log('xbmc_language=%s' % xbmc_language)
+ if xbmc_language.startswith('english'):
+ lang = 'en'
+ elif xbmc_language.startswith('german'):
+ lang = 'de'
+ else:
+ lang = 'en'
+ return lang
+
+
+def _(string_id):
+ if string_id in STRINGS:
+ return plugin.get_string(STRINGS[string_id])
+ else:
+ log('String is missing: %s' % string_id)
+ return string_id
+
+
+def log(msg):
+ plugin.log.info('%s addon: %s' % (__name__, msg))
+
+
+if __name__ == '__main__':
+ rofl_api = RoflApi(get_language())
+ try:
+ plugin.run()
+ except NetworkError:
+ log('NetworkError')
diff --git a/plugin.video.rofl_to/addon.xml b/plugin.video.rofl_to/addon.xml
index e0bf7c5..02a3ed8 100644
--- a/plugin.video.rofl_to/addon.xml
+++ b/plugin.video.rofl_to/addon.xml
@@ -1,19 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.rofl_to" name="Rofl.to" version="0.0.1" provider-name="Tristan Fischer (sphere@...)">
- <requires>
- <import addon="xbmc.python" version="2.0"/>
- <import addon="script.module.beautifulsoup" version="3.0.8"/>
- <import addon="script.module.xbmcswift2" version="1.1.1" />
- </requires>
- <extension point="xbmc.python.pluginsource" library="addon.py">
- <provides>video</provides>
- </extension>
- <extension point="xbmc.addon.metadata">
- <language>en de</language>
- <platform>all</platform>
- <summary lang="de">Luste Videos</summary>
- <summary lang="en">Funny Videos</summary>
- <description lang="de">Hier gibt es täglich neue Lustige Videos + Clips.</description>
- <description lang="en">Daily updated funny videos + clips. Your #1 resource for fun videos.</description>
- </extension>
+<addon id="plugin.video.rofl_to" name="Rofl.to" version="0.1.0" provider-name="Tristan Fischer (sphere@...)">
+ <requires>
+ <import addon="xbmc.python" version="2.1.0"/>
+ <import addon="script.module.beautifulsoup" version="3.0.8"/>
+ <import addon="script.module.xbmcswift2" version="2.4.0"/>
+ </requires>
+ <extension point="xbmc.python.pluginsource" library="addon.py">
+ <provides>video</provides>
+ </extension>
+ <extension point="xbmc.addon.metadata">
+ <language>en de</language>
+ <platform>all</platform>
+ <summary lang="ar">ÙÙØ¯ÙÙÙØ§Øª Ù
ضØÙØ©</summary>
+ <summary lang="be">Funny Videos</summary>
+ <summary lang="ca">Videos divertits</summary>
+ <summary lang="da">Sjove Videoer</summary>
+ <summary lang="de">Luste Videos</summary>
+ <summary lang="el">ÎÏÏεία ÎίνÏεο</summary>
+ <summary lang="en">Funny Videos</summary>
+ <summary lang="es">Videos divertidos</summary>
+ <summary lang="fa_IR">ÙÛÙÙ
Ø®ÙØ¯Ù دار</summary>
+ <summary lang="fr">Vidéos amusantes</summary>
+ <summary lang="gl">VÃdeos divertidos</summary>
+ <summary lang="hu">Vicces videók</summary>
+ <summary lang="it">Video divertenti</summary>
+ <summary lang="ko">ì¬ë¯¸ìë ëìì</summary>
+ <summary lang="lt">Linksma vaizdo įrašai</summary>
+ <summary lang="pl">Åmieszne filmiki</summary>
+ <summary lang="pt">VÃdeos Divertidos</summary>
+ <summary lang="pt_BR">VÃdeos Engraçados</summary>
+ <summary lang="ro">Videoclipuri Comice</summary>
+ <summary lang="ru">СмеÑное видео</summary>
+ <summary lang="sk">Zábavné videá</summary>
+ <summary lang="sv">Roliga videor</summary>
+ <description lang="ar">ÙÙØ¯ÙÙÙØ§Øª Ù
ضØÙØ© Ù Ù
ÙØ§Ø·Ø¹ Ù
ØØ¯Ø«Ø© ÙÙÙ
ÙØ§. Ù
صدر٠#1 ÙÙÙÙØ¯ÙÙÙØ§Øª اÙÙ
ضØÙØ©</description>
+ <description lang="be">Daily updated funny videos + clips. Your #1 resource for fun videos.</description>
+ <description lang="ca">Videos divertits actualitzats diariament. La vostra font #1 per videos divertits.</description>
+ <description lang="da">Dagligt opdaterede sjove videoer og klip. Din #1 kilde til sjove videoer</description>
+ <description lang="de">Hier gibt es täglich neue Lustige Videos + Clips.</description>
+ <description lang="el">ÎαθημεÏινά ανανεÏÏιμα αÏÏεία βίνÏεο + κλιÏ. ΠνοÏμεÏο 1 Ïηγή αÏÏείÏν βίνÏεο.</description>
+ <description lang="en">Daily updated funny videos + clips. Your #1 resource for fun videos.</description>
+ <description lang="es">Videos + clips divertidos actualizados a diario. Tu recurso número 1 de videos divertidos.</description>
+ <description lang="fa_IR">ÙÛÙÙ
ÙØ§Û Ø®ÙØ¯Ù دار Ú©Ù ÙØ± Ø±ÙØ² Ø¢Ù¾Ø¯ÛØª Ù
Û Ø´ÙÙØ¯ + Ú©ÙÛÙ¾. Ù
ÙØ¨Ø¹ #1 Ø¨Ø±Ø§Û Ø®ÙØ¯Ù ٠سر گرÙ
Û.</description>
+ <description lang="gl">VÃdeos e clips actualizados diariamente. O teu principal recurso de vÃdeos divertidos.</description>
+ <description lang="hu">Ma feltöltött vicces videók és klipek. A mulatságos videók elsÅdleges forrása.</description>
+ <description lang="it">Video divertenti aggiornati quotidianamente. La tua risorsa numero #1 per video esilaranti.</description>
+ <description lang="ko">ì¬ë¯¸ìë ëììì´ ë§¤ì¼ ì
ë°ì´í¸ë©ëë¤. ì¬ë¯¸ìë ë¹ëì¤ì #1 ì¬ì´í¸.</description>
+ <description lang="lt">Kasdien naujausi/atnaujinami juokingi video + clipai. Jūsų # 1 įdomus video.</description>
+ <description lang="pl">Codziennie aktualizowane Åmieszne filmy oraz klipy. Numer 1 wÅród zabawnych filmów.</description>
+ <description lang="pt">VÃdeos e clipes divertidos, actualizados diariamente. O seu recurso número um para vÃdeos de humor.</description>
+ <description lang="pt_BR">VÃdeos engraçador atualizados diariamente + clips. Sua fonte número #1 para vÃdeos divertidos.</description>
+ <description lang="ro">Videoclipuri comice actualizate zilnic. Sursa ta numÄrul 1 de videoclipuri comice.</description>
+ <description lang="ru">ÐженеделÑно обновлÑемÑе ÑмеÑнÑе видео + клипÑ. Твой #1 ÑеÑÑÑÑ Ð´Ð»Ñ Ð²ÐµÑелÑÑ
видео.</description>
+ <description lang="sk">Denne aktualizované zábavné videá a klipy. Váš prvý zdroj zábavných videÃ.</description>
+ <description lang="sv">Dagligen uppdaterade roliga videor + klipp. Din första källa för roliga videor.</description>
+ </extension>
</addon>
diff --git a/plugin.video.rofl_to/changelog.txt b/plugin.video.rofl_to/changelog.txt
index b2a122f..eeafe41 100644
--- a/plugin.video.rofl_to/changelog.txt
+++ b/plugin.video.rofl_to/changelog.txt
@@ -1,2 +1,8 @@
-0.0.1 (04.10.2012)
- - Initial Release
+0.1.0 (09.03.2013)
+ - fixed duration
+ - migrated to xbmcswift2 v2.4.0
+ - code cosmetics
+ - updated translations
+
+0.0.1 (04.10.2012)
+ - Initial Release
diff --git a/plugin.video.rofl_to/resources/language/English/strings.xml b/plugin.video.rofl_to/resources/language/English/strings.xml
index fd0000e..bf3f31a 100644
--- a/plugin.video.rofl_to/resources/language/English/strings.xml
+++ b/plugin.video.rofl_to/resources/language/English/strings.xml
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- Translated using Transifex web application. For support, or if you would like to to help out, please visit your language team! -->
+<!-- English language-Team URL: http://www.transifex.com/projects/p/xbmc-addons/language/en/ -->
+<!-- Report language file syntax bugs at: alanwww1@... -->
+
<strings>
<string id="30000">Page</string>
<string id="30001">Category</string>
diff --git a/plugin.video.rofl_to/resources/language/German/strings.xml b/plugin.video.rofl_to/resources/language/German/strings.xml
index f82f5cb..5af7102 100644
--- a/plugin.video.rofl_to/resources/language/German/strings.xml
+++ b/plugin.video.rofl_to/resources/language/German/strings.xml
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- Translated using Transifex web application. For support, or if you would like to to help out, please visit your language team! -->
+<!-- German language-Team URL: http://www.transifex.com/projects/p/xbmc-addons/language/de/ -->
+<!-- Report language file syntax bugs at: alanwww1@... -->
+
<strings>
<string id="30000">Seite</string>
<string id="30001">Kategorie</string>
diff --git a/plugin.video.rofl_to/resources/lib/api.py b/plugin.video.rofl_to/resources/lib/api.py
index a5b6e86..544a76e 100644
--- a/plugin.video.rofl_to/resources/lib/api.py
+++ b/plugin.video.rofl_to/resources/lib/api.py
@@ -62,11 +62,12 @@ class RoflApi():
m = re.search(re_length, div.a['title'])
if m:
d = m.groupdict()
- duration = '%d:%02i' % (
- int(d.get('mins') or 0), int(d.get('secs') or 0),
+ duration = (
+ int(d.get('mins') or 0) * 60
+ + int(d.get('secs') or 0)
)
else:
- duration = '0:00'
+ duration = 0
video = {
'title': div.h2.a.string.strip(),
'video_id': self.__pathify(div.a['href']),
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=50d097cde23edd7789970de8b6f7c3a8a0dceaa5
commit 50d097cde23edd7789970de8b6f7c3a8a0dceaa5
Author: beenje <beenje@...>
Date: Sun Mar 10 07:37:21 2013 +0100
[plugin.audio.shoutcast] updated to version 2.1.1
diff --git a/plugin.audio.shoutcast/addon.py b/plugin.audio.shoutcast/addon.py
index f814c13..a8265aa 100644
--- a/plugin.audio.shoutcast/addon.py
+++ b/plugin.audio.shoutcast/addon.py
@@ -63,7 +63,7 @@ def show_top500_stations():
@plugin.route('/genres/', name='show_genre')
@plugin.route('/genres/<parent_genre_id>/', name='show_subgenre')
def show_genre(parent_genre_id=None):
- show_subgenres = plugin.get_setting('show_subgenres') == 'true'
+ show_subgenres = plugin.get_setting('show_subgenres', bool)
genres = get_cached(api.get_genres, parent_genre_id, TTL=1440)
items = []
if show_subgenres and parent_genre_id:
@@ -164,8 +164,8 @@ def __add_stations(stations):
icon = 'special://home/addons/%s/icon.png' % addon_id
my_stations_ids = my_stations.keys()
items = []
- show_bitrate = plugin.get_setting('show_bitrate_in_title') == 'true'
- choose_random = plugin.get_setting('choose_random_server') == 'true'
+ show_bitrate = plugin.get_setting('show_bitrate_in_title', bool)
+ choose_random = plugin.get_setting('choose_random_server', bool)
for i, station in enumerate(stations):
station_id = str(station['id'])
if not station_id in my_stations_ids:
@@ -245,7 +245,7 @@ def _(string_id):
if __name__ == '__main__':
- limit = int(plugin.get_setting('limit'))
+ limit = plugin.get_setting('limit', int)
api.set_limit(limit)
try:
plugin.run()
diff --git a/plugin.audio.shoutcast/addon.xml b/plugin.audio.shoutcast/addon.xml
index 8e4a838..7b5699a 100644
--- a/plugin.audio.shoutcast/addon.xml
+++ b/plugin.audio.shoutcast/addon.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.audio.shoutcast" name="SHOUTcast 2" version="2.1.0" provider-name="Tristan Fischer (sphere@...)">
+<addon id="plugin.audio.shoutcast" name="SHOUTcast 2" version="2.1.1" provider-name="Tristan Fischer (sphere@...)">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
- <import addon="script.module.xbmcswift2" version="1.3.0"/>
+ <import addon="script.module.xbmcswift2" version="2.4.0"/>
<import addon="script.module.xmltodict" version="0.2.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
@@ -19,6 +19,7 @@
<summary lang="en">more than 50.000 free internet radio stations</summary>
<summary lang="es">Más de 50.000 emisoras de radio por Internet gratuitas</summary>
<summary lang="fr">plus de 50.000 radios internet gratuites</summary>
+ <summary lang="gl">máis de 50.000 emisoras de radio por internet de balde</summary>
<summary lang="hu">Több mint 50.000 ingyenes internet rádió</summary>
<summary lang="it">più di 50.000 stazioni radio libere su internet</summary>
<summary lang="ko">50,000ê° ì´ìì ë¬´ë£ ì¸í°ë· ë¼ëì¤ ë°©ì¡ ì²ì·¨</summary>
@@ -29,6 +30,7 @@
<summary lang="pt_BR">Mais de 50.000 estações de rádio na internet gratuÃtas</summary>
<summary lang="sk">Viac než 50.000 voľných internetových rádio stanÃc</summary>
<summary lang="sv">mer än 50.000 fria internetradiostationer</summary>
+ <summary lang="zh">è¶
è¿50.000å
è´¹ç½ç»çµå°</summary>
<description lang="be">With this Add-on you can browse more than 50.000 free internet radio stations. Current Features:[CR]- Top 500 Stations[CR]- Browse by genre (and subgenre if enabled in settings)[CR]- Search Station by name[CR]- Search Stations by current playing track[CR]- You can manage a "My Stations"-list[CR]- bitrate and amount of listeners visible and sortable[CR]- 500 Stations on each Page (can be changed in the settings)[CR]- uses cache (24h genre, 1h station listings)</description>
<description lang="da">Med denne addon kan du udforske mere end 50.000 gratis internetradiostationer. Nuværende funktioner:[CR]- Top 500 Stationer[CR]- Gennemse efter genre (og undergenre hvis det er aktiveret i indstillinger)[CR]- Søg efter navn på Station[CR]- Søg efter Station ud fra nummeret der spiller[CR]- Du kan administrere en "My Stations"-liste[CR]- bitrate og antal lyttere vises og kan sorteres[CR]- 500 Stationer på hver side (kan ændres i indstillinger)[CR]- bruger cache (24 timer for genre, 1 time for lister)</description>
<description lang="de">Dieses Add-on ermöglicht dir Zugriff auf über 50.000 kostenlose Internet Radio Sender.[CR]Aktuelle Features:[CR]- Top 500 Sender[CR]- Nach Genre browsen[CR]- Sender nach Name suchen[CR]- Sender nach aktuellem Track suchen[CR]- Sender per Kontext Menu in die "Meine Sender"-Liste kopieren[CR]- Anzeige der Bitrate und Anzahl Höhrer[CR]- 500 Sender pro Seite[CR]- Schnell durch lokalen Cache</description>
@@ -36,6 +38,7 @@
<description lang="en">With this Add-on you can browse more than 50.000 free internet radio stations. Current Features:[CR]- Top 500 Stations[CR]- Browse by genre (and subgenre if enabled in settings)[CR]- Search Station by name[CR]- Search Stations by current playing track[CR]- You can manage a "My Stations"-list[CR]- bitrate and amount of listeners visible and sortable[CR]- 500 Stations on each Page (can be changed in the settings)[CR]- uses cache (24h genre, 1h station listings)</description>
<description lang="es">Con este Add-on pueden escucharse más de 50.000 emisoras de radio por Internet gratuitas. CaracterÃsticas:[CR]- Las 500 mejores emisoras.[CR]- Búsqueda por género (y por subgéneros si se habilita en la configuración).[CR]- Búsqueda de emisoras por nombre.[CR]- Búsqueda de emisoras que reproducen una canción.[CR]- Posibilidad de administrar un directorio con "Mis emisoras".[CR]- Directorios ordenados que muestran bitrate y cantidad de oyentes.[CR]- 500 emisoras en cada página (la cantidad puede cambiarse en la configuración).[CR]- Uso de caché (24h género, 1h directorio de emisoras).</description>
<description lang="fr">Avec cette extension vous pouvez accéder à plus de 50.000 station radio internet gratuite. Possibilités actuelles :[CR]- Top 500 stations[CR]- Naviguer par genre (et sous-genre si le réglage est activé)[CR]- Rechercher une station par nom[CR]- Rechercher une station jouant la piste en cours[CR]- Création d'une liste de stations favorites[CR]- Bitrate et nombre d'auditeurs visibles et triables[CR]- 500 stations par page (modifiable dans les réglages)[CR]- Utilisation d'un cache (24h par genre, 1h par station)</description>
+ <description lang="gl">Grazas a este complemento pode buscar máis de 50.000 emisoras de radio por internet de balde. CaracterÃsticas:[CR]- Mellores 500 Emisoras[CR]- Buscar por xénero (e subxénero se esta habilitado na configuración)[CR]- Buscar Emisoras por nome[CR]- Buscar Emisoras pola pista en reprodución actual[CR]- Pode xestionar a listaxe "As miñas Emisoras"[CR]- taxa de bits e número de ointes visÃbeis e ordenábel[CR]- 500 Emisoras en cada páxina (pódese trocar na configuración)[CR]- usar a caché (24h para xénero, 1h para listaxe de emisoras)</description>
<description lang="hu">Ezzel a kiegészÃtÅvel választhatsz több mint 50.000 ingyenes rádió adó közül. Jelenlegi szolgáltatások:[CR]- Top 500 állomás[CR]-Műfajonkénti (és alműfajonkénti) keresés[CR]- Név szerinti állomáskeresés[CR]- Ãllomáskeresés az éppen játszott szám alapján[CR]- Az "én állomásaim" lista kezelése[CR]- MinÅség és hallgatottság szerinti rendezés[CR]- 500 adó minden oldalon (a szám beállÃtható)[CR]- GyorsÃtótár használata (24óra a műfajokra, 1óra az állomásokra)</description>
<description lang="it">Con questo Add-on puoi sfogliare più di 50.000 stazioni radio libere su internet. Caratteristiche attuali:[CR]- Migliori 500 stazioni[CR]- Sfoglia per genere (e sottogenere se abilitato nelle impostazioni)[CR]- Cerca le stazioni per nome[CR]- Cerca le stazioni per traccia in esecuzione[CR]- Puoi gestire un lista "Mie Stazioni"[CR]- bitrate e quantità di ascoltatori visibile e riordinabile[CR]- 500 Stazioni in ogni pagina (può essere modificato nelle impostazioni)[CR]- cache utilizzata (24h genere, 1h ascolto)</description>
<description lang="ko">ì´ ì ëì¨ì¼ë¡ 50,000ê° ì´ìì ë¬´ë£ ì¸í°ë· ë¼ëì¤ ë°©ì¡ì íìí ì ììµëë¤. íì¬ ê¸°ë¥:[CR]- Top 500 ë°©ì¡êµ[CR]- ì¥ë¥´(ì¤ì ìì íì±ííë©´ íì ì¥ë¥´)ë¡ íì[CR]- ë°©ì¡êµëª
ì¼ë¡ ê²ì[CR]- íì¬ í¸ëì ë°©ì¡ì¤ì¸ ë°©ì¡êµ ê²ì[CR]- "ë´ ë°©ì¡êµ" ëª©ë¡ ê´ë¦¬[CR]- ë¹í¸ë ì´í¸ì ì²ì·¨ìì íìì ì ë ¬[CR]- íì´ì§ë¹ 500 ë°©ì¡êµ íì (ì¤ì ìì ë³ê²½ ê°ë¥)[CR]- ìºì ì¬ì© (ì¥ë¥´ 24ìê°, ë°©ì¡êµ 리ì¤í¸ 1ìê°)</description>
@@ -46,5 +49,6 @@
<description lang="pt_BR">Com este add-on que você pode navegar em mais de 50.000 estações de rádio da Internet gratuitas. CaracterÃsticas atuais: [CR] - Top 500 Estações [CR] - Procurar por género (e subgênero se habilitado nas configurações) [CR] - Pesquisar Estação pelo nome [CR] - Estações de pesquisa por faixa atual [CR] - Você pode gerenciar uma lista de "Minhas Estações" [CR] - bitrate e quantidade de ouvintes visÃvel e classificáveis ââ[CR] - 500 estações em cada página (pode ser alterado nas configurações) [CR] - usa cache (gênero 24h, ouvintes estação 1h)</description>
<description lang="sk">S týmto doplnok môžete prehliadaÅ¥ vyÅ¡e 50.000 voľných internetových rádio stanÃc. Momentálne podporuje: - Top 500 stanÃc - Prehliadanie podľa žánru (a pod-žánru, ak povolené v nastaveniach) - hľadanie stanice podľa mena - hľadanie stanice podľa práve hranej skladby - Môžete spravovaÅ¥ zoznam "Moje stanice" - zobrazenie a zoradenie podľa dátového toku a poÄtu poslucháÄov - 500 stanÃc na každej strane (môže byÅ¥ zmenené v nastaveniach) - použÃva medzi-pamäť (24h pre žánre, 1h pre zoznam stanÃc)</description>
<description lang="sv">Med detta tillägg kan du bläddra bland mer än 50.000 fria internetradiostationer. Nuvarande funktioner:[CR]- Topp 500 stationer[CR]- Bläddra efter genre (och undergenre, om det är påslaget i inställningar)[CR]- Sök station efter namn[CR]- Sök stationer som spelar låt[CR]- Du kan hantera "Mina stationer"-lista[CR]- bitrate och antal lyssnare är synligt och sorterbart[CR]- 500 stationer på varje sida (kan ändras i inställningar)[CR]- använder buffert (24 genre, 1 timmes stationlista)</description>
+ <description lang="zh">ä½ å¯ä»¥ä½¿ç¨æ¬æä»¶æµè§è¶
è¿50.000å
è´¹ç½ç»çµå°ãå½ååè½ï¼[CR]- 500强çµå°[CR]- æç±»å«æµè§ï¼å¯è®¾ç½®åç±»ï¼[CR]- æååæç´¢çµå°[CR]- æå½åææ¾æ²ç®æç´¢çµå°[CR]- 管çâæççµå°â-å表[CR]- ææ¯ç¹çåæ¶å¬äººæ°æåº[CR]- æ¯é¡µ500个çµå°ï¼å¯è®¾ç½®ï¼[CR]- 使ç¨ç¼åï¼24å°æ¶ç±»å«ï¼1å°æ¶ç«ç¹å表ï¼</description>
</extension>
</addon>
diff --git a/plugin.audio.shoutcast/changelog.txt b/plugin.audio.shoutcast/changelog.txt
index 1b9c8f2..4758a99 100644
--- a/plugin.audio.shoutcast/changelog.txt
+++ b/plugin.audio.shoutcast/changelog.txt
@@ -1,3 +1,7 @@
+2.1.1
+ - updated translations
+ - migrated to xbmcswift2 v2.4.0
+
2.1.0
- Rename Add-on to "SHOUTcast" to match guidelines
- Changed to xbmcswift2 v1.3
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=c1608f8cccca43dd35721a9c082746a6abbf167c
commit c1608f8cccca43dd35721a9c082746a6abbf167c
Author: beenje <beenje@...>
Date: Sun Mar 10 07:37:19 2013 +0100
[plugin.video.itunes_podcasts] updated to version 1.1.4
diff --git a/plugin.video.itunes_podcasts/addon.py b/plugin.video.itunes_podcasts/addon.py
index f2814d4..2ea7c42 100644
--- a/plugin.video.itunes_podcasts/addon.py
+++ b/plugin.video.itunes_podcasts/addon.py
@@ -42,6 +42,9 @@ STRINGS = {
@plugin.route('/')
def show_root():
content_type = plugin.request.args['content_type']
+ if not content_type:
+ url = plugin.url_for(endpoint='show_content_types')
+ return plugin.redirect(url)
if isinstance(content_type, (list, tuple)):
content_type = content_type[0]
items = (
@@ -61,9 +64,24 @@ def show_root():
return plugin.finish(items)
+@plugin.route('/content_types/')
+def show_content_types():
+ items = (
+ {'label': _('video'), 'path': plugin.url_for(
+ endpoint='show_root',
+ content_type='video'
+ )},
+ {'label': _('audio'), 'path': plugin.url_for(
+ endpoint='show_root',
+ content_type='audio'
+ )}
+ )
+ return plugin.finish(items)
+
+
@plugin.route('/<content_type>/genres/')
def show_genres(content_type):
- show_subgenres = plugin.get_setting('show_subgenres') == 'true'
+ show_subgenres = plugin.get_setting('show_subgenres', bool)
genres = api.get_genres(flat=show_subgenres)
items = []
for genre in genres:
@@ -83,7 +101,7 @@ def show_genres(content_type):
@plugin.route('/<content_type>/podcasts/by-genre/<genre_id>/')
def show_podcasts(content_type, genre_id):
- num_podcasts_list = int(plugin.get_setting('num_podcasts_list'))
+ num_podcasts_list = plugin.get_setting('num_podcasts_list', int)
podcasts = api.get_podcasts(
content_type=content_type,
genre_id=genre_id,
@@ -145,7 +163,7 @@ def search(content_type):
@plugin.route('/<content_type>/podcasts/search/<search_string>/')
def search_result(content_type, search_string):
- num_podcasts_search = int(plugin.get_setting('num_podcasts_search'))
+ num_podcasts_search = plugin.get_setting('num_podcasts_search', int)
podcasts = api.search_podcast(
search_term=search_string,
limit=num_podcasts_search
@@ -199,7 +217,7 @@ def __add_podcasts(content_type, podcasts):
finish_kwargs = {
'sort_methods': ('PLAYLIST_ORDER', 'TITLE', 'DATE')
}
- if plugin.get_setting('force_viewmode_podcasts') == 'true':
+ if plugin.get_setting('force_viewmode_podcasts', bool):
finish_kwargs['view_mode'] = 'thumbnail'
return plugin.finish(items, **finish_kwargs)
@@ -228,7 +246,7 @@ def __add_podcast_items(content_type, podcast_id, podcast_items):
finish_kwargs = {
'sort_methods': ('PLAYLIST_ORDER', 'TITLE', 'DATE', 'SIZE')
}
- if plugin.get_setting('force_viewmode_items') == 'true':
+ if plugin.get_setting('force_viewmode_items', bool):
finish_kwargs['view_mode'] = 'thumbnail'
return plugin.finish(items, **finish_kwargs)
diff --git a/plugin.video.itunes_podcasts/addon.xml b/plugin.video.itunes_podcasts/addon.xml
index 1845b44..dcc1a4b 100644
--- a/plugin.video.itunes_podcasts/addon.xml
+++ b/plugin.video.itunes_podcasts/addon.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.itunes_podcasts" name="Apple iTunes Podcasts" version="1.1.3" provider-name="Tristan Fischer (sphere@...)">
+<addon id="plugin.video.itunes_podcasts" name="Apple iTunes Podcasts" version="1.1.4" provider-name="Tristan Fischer (sphere@...)">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
- <import addon="script.module.xbmcswift2" version="1.3.0"/>
+ <import addon="script.module.xbmcswift2" version="2.4.0"/>
<import addon="script.module.feedparser" version="0.5.7"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
diff --git a/plugin.video.itunes_podcasts/changelog.txt b/plugin.video.itunes_podcasts/changelog.txt
index c0ab945..f7f6dd5 100644
--- a/plugin.video.itunes_podcasts/changelog.txt
+++ b/plugin.video.itunes_podcasts/changelog.txt
@@ -1,3 +1,9 @@
+1.1.4
+ - updated translations
+ - readded content type switch
+ - fix some podcasts
+ - changed to xbmcswift2 v2.4.0
+
1.1.3
- fix date of podcasts
- fix sorting of podcasts and podcast_items
diff --git a/plugin.video.itunes_podcasts/resources/lib/api.py b/plugin.video.itunes_podcasts/resources/lib/api.py
index f395538..f9eeee1 100644
--- a/plugin.video.itunes_podcasts/resources/lib/api.py
+++ b/plugin.video.itunes_podcasts/resources/lib/api.py
@@ -176,6 +176,12 @@ class ItunesPodcastApi():
else:
return ''
+ def __format_size(size_str):
+ if size_str and str(size_str).isdigit():
+ return int(size_str)
+ else:
+ return 0
+
def __get_enclosure_link(node):
if isinstance(node, (list, tuple)):
for item in node:
@@ -203,7 +209,7 @@ class ItunesPodcastApi():
'summary': item.get('summary'),
'author': item.get('author'),
'item_url': link['url'],
- 'size': int(link.get('length', 0) or 0),
+ 'size': __format_size(link.get('length', '')),
'thumb': item.get('image', {}).get('href') or fallback_thumb,
'duration': link.get('duration', '0:00'),
'pub_date': __format_date(item.get('published_parsed')),
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=e83ccceabd3346922247f08632bfec79668d5ccd
commit e83ccceabd3346922247f08632bfec79668d5ccd
Author: beenje <beenje@...>
Date: Sun Mar 10 07:37:18 2013 +0100
[plugin.video.hdtrailers_net] updated to version 1.1.1
diff --git a/plugin.video.hdtrailers_net/addon.py b/plugin.video.hdtrailers_net/addon.py
index 356e88d..7a51e89 100644
--- a/plugin.video.hdtrailers_net/addon.py
+++ b/plugin.video.hdtrailers_net/addon.py
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from xbmcswift2 import Plugin
+from xbmcswift2 import Plugin, xbmcgui
from resources.lib import scraper
STRINGS = {
@@ -27,7 +27,14 @@ STRINGS = {
'top_ten': 30004,
'all_by_initial': 30005,
'opening': 30006,
- 'coming_soon': 30007
+ 'coming_soon': 30007,
+ 'download': 30008,
+ 'already_downloaded': 30009,
+ 'download_in_progress': 30010,
+ 'no_download_path': 30130,
+ 'want_set_now': 30131,
+ 'network_error': 30150,
+ 'download_not_possible': 30151
}
plugin = Plugin()
@@ -122,28 +129,30 @@ def show_movies(source):
movie_id=movie['id']
),
} for i, movie in enumerate(movies)])
- content_setting = int(plugin.get_setting('content_type'))
- content_type = ('videos', 'movies')[content_setting]
+ content_type = plugin.get_setting(
+ 'content_type', choices=('videos', 'movies')
+ )
plugin.set_content(content_type)
finish_kwargs = {
'sort_methods': ('PLAYLIST_ORDER', 'TITLE'),
'update_listing': 'update' in plugin.request.args
}
- if plugin.get_setting('force_viewmode') == 'true':
- finish_kwargs['view_mode'] = 'thumbnail'
+ if plugin.get_setting('force_viewmode', bool):
+ finish_kwargs['view_mode'] = 'thumbnail'
return plugin.finish(items, **finish_kwargs)
@plugin.route('/videos/<movie_id>/')
def show_videos(movie_id):
movie, trailers, clips = scraper.get_videos(movie_id)
-
- resolution_setting = int(plugin.get_setting('resolution'))
- resolution = ('480p', '720p', '1080p')[resolution_setting]
- show_trailer = plugin.get_setting('show_trailer') == 'true'
- show_clips = plugin.get_setting('show_clips') == 'true'
- show_source_in_title = plugin.get_setting('show_source_in_title') == 'true'
+ downloads = plugin.get_storage('downloads')
+ resolution = plugin.get_setting(
+ 'resolution', choices=('480p', '720p', '1080p')
+ )
+ show_trailer = plugin.get_setting('show_trailer', bool)
+ show_clips = plugin.get_setting('show_clips', bool)
+ show_source_in_title = plugin.get_setting('show_source_in_title', bool)
videos = []
if show_trailer:
@@ -154,10 +163,17 @@ def show_videos(movie_id):
items = []
for i, video in enumerate(videos):
if resolution in video.get('resolutions'):
+ url = video['resolutions'][resolution]
if show_source_in_title:
title = '%s (%s)' % (video['title'], video['source'])
else:
title = video['title']
+ if url in downloads:
+ import xbmcvfs # FIXME: import from swift after fixed there
+ if xbmcvfs.exists(downloads[url]):
+ title = '%s - %s' % (title, _('already_downloaded'))
+ else:
+ title = '%s - %s' % (title, _('download_in_progress'))
items.append({
'label': title,
'thumbnail': movie['thumb'],
@@ -167,11 +183,18 @@ def show_videos(movie_id):
'date': video['date'],
'count': i,
},
+ 'context_menu': [
+ (_('download'), 'XBMC.RunPlugin(%s)' % plugin.url_for(
+ endpoint='download_video',
+ source=video['source'],
+ url=url
+ ))
+ ],
'is_playable': True,
'path': plugin.url_for(
endpoint='play_video',
source=video['source'],
- url=video['resolutions'][resolution]
+ url=url
),
})
@@ -183,21 +206,75 @@ def show_videos(movie_id):
@plugin.route('/video/<source>/<url>')
def play_video(source, url):
+ downloads = plugin.get_storage('downloads')
+ if url in downloads:
+ local_file = downloads[url]
+ # download was already started
+ import xbmcvfs # FIXME: import from swift after fixed there
+ if xbmcvfs.exists(local_file):
+ # download was also finished
+ log('Using local file: %s' % local_file)
+ return plugin.set_resolved_url(local_file)
+ playable_url = _get_playable_url(source, url)
+ log('Using URL: %s' % playable_url)
+ return plugin.set_resolved_url(playable_url)
+
+
+@plugin.route('/video/<source>/<url>/download')
+def download_video(source, url):
+ import SimpleDownloader
+ sd = SimpleDownloader.SimpleDownloader()
+ playable_url = _get_playable_url(source, url)
if source == 'apple.com':
- url = '%s|User-Agent=QuickTime' % url
+ sd.common.USERAGENT = 'QuickTime'
+ playable_url = playable_url.split('|')[0]
elif source == 'youtube.com':
- import re
- video_id = re.search(r'v=(.+)&?', url).groups(1)
- url = (
- 'plugin://plugin.video.youtube/'
- '?action=play_video&videoid=%s' % video_id
+ plugin.notify(msg=_('download_not_possible'))
+ return
+ download_path = plugin.get_setting('download_path')
+ while not download_path:
+ try_again = xbmcgui.Dialog().yesno(
+ _('no_download_path'),
+ _('want_set_now')
)
+ if not try_again:
+ return
+ plugin.open_settings()
+ download_path = plugin.get_setting('download_path')
+ filename = playable_url.split('?')[0].split('/')[-1]
+ if filename == 'makeplaylist.dll':
+ filename = playable_url.split('=')[-1] # yahoo...
+ params = {
+ 'url': playable_url,
+ 'download_path': download_path
+ }
+ sd.download(filename, params)
+ downloads = plugin.get_storage('downloads')
+ downloads[url] = xbmc.translatePath(download_path + filename)
+ downloads.sync()
+
+
+def _get_playable_url(source, raw_url, download_mode=False):
+ if source == 'apple.com':
+ raw_url = '%s|User-Agent=QuickTime' % raw_url
+ elif source == 'youtube.com':
+ import re
+ video_id = re.search(r'v=(.+)&?', raw_url).groups(1)
+ if download_mode:
+ raw_url = (
+ 'plugin://plugin.video.youtube/'
+ '?action=download&videoid=%s' % video_id
+ )
+ else:
+ raw_url = (
+ 'plugin://plugin.video.youtube/'
+ '?action=play_video&videoid=%s' % video_id
+ )
elif source == 'yahoo-redir':
import re
- vid, res = re.search('id=(.+)&resolution=(.+)', url).groups()
- url = scraper.get_yahoo_url(vid, res)
- log('Using URL: %s' % url)
- return plugin.set_resolved_url(url)
+ vid, res = re.search('id=(.+)&resolution=(.+)', raw_url).groups()
+ raw_url = scraper.get_yahoo_url(vid, res)
+ return raw_url
def _(string_id):
diff --git a/plugin.video.hdtrailers_net/addon.xml b/plugin.video.hdtrailers_net/addon.xml
index c06edb0..92247e4 100644
--- a/plugin.video.hdtrailers_net/addon.xml
+++ b/plugin.video.hdtrailers_net/addon.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.hdtrailers_net" name="HD-Trailers.net" version="1.0.2" provider-name="Tristan Fischer (sphere@...)">
+<addon id="plugin.video.hdtrailers_net" name="HD-Trailers.net" version="1.1.1" provider-name="Tristan Fischer (sphere@...)">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
- <import addon="script.module.xbmcswift2" version="1.3.0"/>
+ <import addon="script.module.xbmcswift2" version="2.4.0"/>
<import addon="script.module.beautifulsoup" version="3.0.8"/>
+ <import addon="script.module.simple.downloader" version="1.9.4"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>video</provides>
diff --git a/plugin.video.hdtrailers_net/changelog.txt b/plugin.video.hdtrailers_net/changelog.txt
index cb3d59c..e9ee0a6 100644
--- a/plugin.video.hdtrailers_net/changelog.txt
+++ b/plugin.video.hdtrailers_net/changelog.txt
@@ -1,3 +1,12 @@
+1.1.1
+ - fix downloading on yahoo-redir, apple, yahoo
+
+1.1.0
+ - added possibility to download trailers
+ - play already downloaded trailers from local path
+ - indicate if trailer is already downloaded or download still in progress
+ - changed to xbmcswift2 v2.4.0
+
1.0.2
- fixed playback of yahoo trailers (some shown with source "hd-trailers.net")
diff --git a/plugin.video.hdtrailers_net/resources/language/English/strings.xml b/plugin.video.hdtrailers_net/resources/language/English/strings.xml
index 2515a99..37e56dc 100644
--- a/plugin.video.hdtrailers_net/resources/language/English/strings.xml
+++ b/plugin.video.hdtrailers_net/resources/language/English/strings.xml
@@ -12,6 +12,9 @@
<string id="30005">Library (All by Initial)</string>
<string id="30006">Opening this week</string>
<string id="30007">Coming Soon</string>
+ <string id="30008">Download this Trailer</string>
+ <string id="30009">[B]DOWNLOADED[/B]</string>
+ <string id="30010">[B]download in progress[/B]</string>
<!-- Settings -->
<string id="30100">Force ViewMode "Thumbnail"</string>
@@ -25,4 +28,13 @@
<string id="30120">Content-Type (Skin related)</string>
<string id="30121">Videos</string>
<string id="30122">Movies</string>
+ <string id="30123">Download-Path</string>
+
+ <!-- OK Dialogs -->
+ <string id="30130">No download path</string>
+ <string id="30131">Do you want to you set it now?</string>
+
+ <!-- Notify -->
+ <string id="30150">Network Error</string>
+ <string id="30151">Download not possible atm</string>
</strings>
diff --git a/plugin.video.hdtrailers_net/resources/lib/scraper.py b/plugin.video.hdtrailers_net/resources/lib/scraper.py
index eb0a315..a280421 100644
--- a/plugin.video.hdtrailers_net/resources/lib/scraper.py
+++ b/plugin.video.hdtrailers_net/resources/lib/scraper.py
@@ -24,7 +24,7 @@ from BeautifulSoup import BeautifulSoup
MAIN_URL = 'http://www.hd-trailers.net/'
NEXT_IMG = 'http://static.hd-trailers.net/images/mobile/next.png'
PREV_IMG = 'http://static.hd-trailers.net/images/mobile/prev.png'
-USER_AGENT = 'XBMC Add-on HD-Trailers.net v0.1.0'
+USER_AGENT = 'XBMC Add-on HD-Trailers.net v1.1.0'
SOURCES = (
'apple.com',
diff --git a/plugin.video.hdtrailers_net/resources/settings.xml b/plugin.video.hdtrailers_net/resources/settings.xml
index 188c21c..b66e445 100644
--- a/plugin.video.hdtrailers_net/resources/settings.xml
+++ b/plugin.video.hdtrailers_net/resources/settings.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
+ <setting id="download_path" type="folder" label="30123" source="auto" option="writeable"/>
<setting id="force_viewmode" type="bool" label="30100" default="true"/>
<setting id="content_type" type="enum" label="30120" default="0" lvalues="30121|30122"/>
<setting id="show_trailer" type="bool" label="30101" default="true"/>
-----------------------------------------------------------------------
Summary of changes:
plugin.audio.shoutcast/addon.py | 8 +-
plugin.audio.shoutcast/addon.xml | 8 +-
plugin.audio.shoutcast/changelog.txt | 4 +
.../language/Chinese (Simple)/strings.xml | 27 +
.../resources/language/Croatian/strings.xml | 8 +
.../resources/language/Galician/strings.xml | 27 +
plugin.video.hdtrailers_net/addon.py | 123 ++++-
plugin.video.hdtrailers_net/addon.xml | 5 +-
plugin.video.hdtrailers_net/changelog.txt | 9 +
.../resources/language/English/strings.xml | 12 +
.../resources/lib/scraper.py | 2 +-
plugin.video.hdtrailers_net/resources/settings.xml | 1 +
plugin.video.itunes_podcasts/addon.py | 28 +-
plugin.video.itunes_podcasts/addon.xml | 4 +-
plugin.video.itunes_podcasts/changelog.txt | 6 +
plugin.video.itunes_podcasts/resources/lib/api.py | 8 +-
plugin.video.mlslive/addon.xml | 2 +-
plugin.video.mlslive/changelog.txt | 4 +
plugin.video.mlslive/mlslive.py | 39 +-
plugin.video.mlslive/test.py | 2 +-
plugin.video.rofl_to/LICENSE.txt | 562 ++++++++++----------
plugin.video.rofl_to/addon.py | 275 +++++-----
plugin.video.rofl_to/addon.xml | 73 ++-
plugin.video.rofl_to/changelog.txt | 10 +-
.../resources/language/Afrikaans/strings.xml | 10 +
.../resources/language/Albanian/strings.xml | 10 +
.../resources/language/Amharic/strings.xml | 9 +
.../resources/language/Arabic/strings.xml | 10 +
.../resources/language/Basque/strings.xml | 10 +
.../resources/language/Belarusian/strings.xml | 10 +
.../resources/language/Bulgarian/strings.xml | 10 +
.../resources/language/Catalan/strings.xml | 10 +
.../language/Chinese (Simple)/strings.xml | 10 +
.../language/Chinese (Traditional)/strings.xml | 10 +
.../resources/language/Croatian/strings.xml | 10 +
.../resources/language/Czech/strings.xml | 10 +
.../resources/language/Danish/strings.xml | 10 +
.../resources/language/Dutch/strings.xml | 10 +
.../resources/language/English/strings.xml | 4 +
.../resources/language/Esperanto/strings.xml | 8 +
.../resources/language/Estonian/strings.xml | 10 +
.../resources/language/Finnish/strings.xml | 10 +
.../resources/language/French/strings.xml | 10 +
.../resources/language/Galician/strings.xml | 10 +
.../resources/language/German/strings.xml | 4 +
.../resources/language/Greek/strings.xml | 10 +
.../resources/language/Hebrew/strings.xml | 10 +
.../language/Hindi (Devanagiri)/strings.xml | 8 +
.../resources/language/Hungarian/strings.xml | 10 +
.../resources/language/Icelandic/strings.xml | 10 +
.../resources/language/Indonesian/strings.xml | 9 +
.../resources/language/Italian/strings.xml | 10 +
.../resources/language/Japanese/strings.xml | 10 +
.../resources/language/Korean/strings.xml | 10 +
.../resources/language/Lithuanian/strings.xml | 10 +
.../resources/language/Macedonian/strings.xml | 10 +
.../resources/language/Norwegian/strings.xml | 10 +
.../resources/language/Persian (Iran)/strings.xml | 10 +
.../resources/language/Persian/strings.xml | 9 +
.../resources/language/Polish/strings.xml | 10 +
.../language/Portuguese (Brazil)/strings.xml | 10 +
.../resources/language/Portuguese/strings.xml | 10 +
.../resources/language/Romanian/strings.xml | 10 +
.../resources/language/Russian/strings.xml | 10 +
.../language/Serbian (Cyrillic)/strings.xml | 10 +
.../resources/language/Serbian/strings.xml | 10 +
.../resources/language/Slovak/strings.xml | 10 +
.../resources/language/Slovenian/strings.xml | 10 +
.../language/Spanish (Argentina)/strings.xml | 10 +
.../language/Spanish (Mexico)/strings.xml | 10 +
.../resources/language/Spanish/strings.xml | 10 +
.../resources/language/Swedish/strings.xml | 10 +
.../resources/language/Thai/strings.xml | 10 +
.../resources/language/Turkish/strings.xml | 10 +
.../resources/language/Ukrainian/strings.xml | 10 +
.../resources/language/Vietnamese/strings.xml | 9 +
plugin.video.rofl_to/resources/lib/api.py | 7 +-
77 files changed, 1252 insertions(+), 502 deletions(-)
create mode 100644 plugin.audio.shoutcast/resources/language/Chinese (Simple)/strings.xml
create mode 100644 plugin.audio.shoutcast/resources/language/Croatian/strings.xml
create mode 100644 plugin.audio.shoutcast/resources/language/Galician/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Afrikaans/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Albanian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Amharic/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Arabic/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Basque/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Belarusian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Bulgarian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Catalan/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Chinese (Simple)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Chinese (Traditional)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Croatian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Czech/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Danish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Dutch/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Esperanto/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Estonian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Finnish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/French/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Galician/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Greek/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Hebrew/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Hindi (Devanagiri)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Hungarian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Icelandic/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Indonesian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Italian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Japanese/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Korean/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Lithuanian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Macedonian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Norwegian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Persian (Iran)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Persian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Polish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Portuguese (Brazil)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Portuguese/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Romanian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Russian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Serbian (Cyrillic)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Serbian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Slovak/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Slovenian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Spanish (Argentina)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Spanish (Mexico)/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Spanish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Swedish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Thai/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Turkish/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Ukrainian/strings.xml
create mode 100644 plugin.video.rofl_to/resources/language/Vietnamese/strings.xml
hooks/post-receive
--
Plugins
|