The branch, eden has been updated
via 16b1e2c6c5ef724cea7b563e8b619dd87d47aed6 (commit)
from 550822f2f843f58c126a5fe09064aea9a76da6e0 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=16b1e2c6c5ef724cea7b563e8b619dd87d47aed6
commit 16b1e2c6c5ef724cea7b563e8b619dd87d47aed6
Author: beenje <[email protected]>
Date: Fri Oct 12 23:05:40 2012 +0200
[plugin.video.eyetv.parser] updated to version 2.1.3
diff --git a/plugin.video.eyetv.parser/addon.py
b/plugin.video.eyetv.parser/addon.py
index a0574fe..ed6a796 100755
--- a/plugin.video.eyetv.parser/addon.py
+++ b/plugin.video.eyetv.parser/addon.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
# http://www.gnu.org/copyleft/gpl.html
-from xbmcswift import xbmcgui
+from xbmcswift import xbmcgui, xbmc
from resources.lib.eyetv_parser import Eyetv
from resources.lib.eyetv_live import EyetvLive
from config import plugin
@@ -24,6 +24,7 @@ from config import plugin
BIT_RATE = ('320', '800', '1200', '2540', '4540')
+
def create_eyetv_live():
"""Return an Eyetvlive instance initialized with proper settings
@@ -39,16 +40,27 @@ def create_eyetv_live():
password = ''
return EyetvLive(server, bitrate, password)
+
@plugin.route('/', default=True)
def show_homepage():
- """Default view showing available categories"""
- items = [
- # Live TV
- {'label': plugin.get_string(30020), 'url': plugin.url_for('live_tv')},
- # Recordings
- {'label': plugin.get_string(30021), 'url':
plugin.url_for('show_recordings')},
- ]
- return plugin.add_items(items)
+ """Default view showing enabled categories"""
+ livetv = plugin.get_setting('livetv')
+ recordings = plugin.get_setting('recordings')
+ if livetv == 'true' and recordings != 'true':
+ return live_tv()
+ elif livetv != 'true' and recordings == 'true':
+ return show_recordings()
+ else:
+ # Show both categories if they are both enabled
+ # (or both disabled)
+ items = [
+ # Live TV
+ {'label': plugin.get_string(30020), 'url':
plugin.url_for('live_tv')},
+ # Recordings
+ {'label': plugin.get_string(30021), 'url':
plugin.url_for('show_recordings')},
+ ]
+ return plugin.add_items(items)
+
@plugin.route('/live/')
def live_tv():
@@ -63,6 +75,7 @@ def live_tv():
} for channel in channels]
return plugin.add_items(items)
+
@plugin.route('/watch/<serviceid>/')
def watch_channel(serviceid):
"""Resolve and play the chosen channel"""
@@ -70,6 +83,7 @@ def watch_channel(serviceid):
url = live.get_channel_url(serviceid)
return plugin.set_resolved_url(url)
+
@plugin.route('/recordings/')
def show_recordings():
"""Shows all recordings from archive path"""
diff --git a/plugin.video.eyetv.parser/addon.xml
b/plugin.video.eyetv.parser/addon.xml
index dced9eb..52cfbaa 100644
--- a/plugin.video.eyetv.parser/addon.xml
+++ b/plugin.video.eyetv.parser/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.eyetv.parser"
name="EyeTV parser"
- version="2.1.2"
+ version="2.1.3"
provider-name="beenje">
<requires>
<import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.video.eyetv.parser/changelog.txt
b/plugin.video.eyetv.parser/changelog.txt
index 6d5f977..8a4ea4b 100644
--- a/plugin.video.eyetv.parser/changelog.txt
+++ b/plugin.video.eyetv.parser/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 2.1.3[/B]
+
+- Added settings to disable a category
+(give direct access to Live TV or Recordings)
+
[B]Version 2.1.2[/B]
- Changed server setting type from ipaddress to text
diff --git a/plugin.video.eyetv.parser/resources/language/English/strings.xml
b/plugin.video.eyetv.parser/resources/language/English/strings.xml
index cfdec12..8d37ab5 100644
--- a/plugin.video.eyetv.parser/resources/language/English/strings.xml
+++ b/plugin.video.eyetv.parser/resources/language/English/strings.xml
@@ -6,6 +6,7 @@
<string id="30002">EyeTV Server</string>
<string id="30003">Use password protection</string>
<string id="30004">Password</string>
+ <string id="30005">Enabled</string>
<string id="30010">Sort by</string>
<string id="30011">recorded date</string>
<string id="30012">reverse recorded date</string>
diff --git a/plugin.video.eyetv.parser/resources/lib/eyetv_live.py
b/plugin.video.eyetv.parser/resources/lib/eyetv_live.py
index a64fe44..132db1a 100644
--- a/plugin.video.eyetv.parser/resources/lib/eyetv_live.py
+++ b/plugin.video.eyetv.parser/resources/lib/eyetv_live.py
@@ -31,6 +31,7 @@ from config import plugin
EYETVPORT = 2170
+
class EyetvLive:
"""Class to watch live TV using EyeTV iPhone access"""
diff --git a/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
b/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
index 284c926..de83689 100644
--- a/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
+++ b/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
@@ -27,7 +27,7 @@ try:
import xbmcvfs
except ImportError:
import shutil
- copyfile = shutil.copyfile
+ copyfile = shutil.copyfile
else:
copyfile = xbmcvfs.copy
@@ -48,6 +48,7 @@ def clean_xml(filename):
f.write(clean)
f.close()
+
class Plist:
"""Simple class to read Apple's plist format
@@ -57,7 +58,7 @@ class Plist:
# collections
"array": lambda x: [v.text for v in x],
"dict": lambda x:
- dict((x[i].text, x[i+1].text) for i in range(0, len(x), 2)),
+ dict((x[i].text, x[i + 1].text) for i in range(0, len(x), 2)),
"key": lambda x: x.text or "",
# simple types
diff --git a/plugin.video.eyetv.parser/resources/settings.xml
b/plugin.video.eyetv.parser/resources/settings.xml
index f4e93f5..2ee43a9 100644
--- a/plugin.video.eyetv.parser/resources/settings.xml
+++ b/plugin.video.eyetv.parser/resources/settings.xml
@@ -2,13 +2,15 @@
<settings>
<!--Live TV-->
<category label="30020">
- <setting id="server" type="text" default="localhost" label="30002" />
- <setting id="bitrate" type="enum"
lvalues="30015|30016|30017|30018|30019" default="4" label="30014" />
- <setting id="passwdEnabled" type="bool" default="false" label="30003"
/>
- <setting id="password" type="text" option="hidden" default=""
enable="eq(-1,true)" label="30004" />
+ <setting id="livetv" type="bool" default="true" label="30005" />
+ <setting id="server" type="text" default="localhost" label="30002"
enable="eq(-1,true)" />
+ <setting id="bitrate" type="enum"
lvalues="30015|30016|30017|30018|30019" default="4" label="30014"
enable="eq(-2,true)" />
+ <setting id="passwdEnabled" type="bool" default="false" label="30003"
enable="eq(-3,true)" />
+ <setting id="password" type="text" option="hidden" default=""
enable="eq(-1,true) + eq(-4,true)" label="30004" />
</category>
<category label="30021">
- <setting id="archivePath" type="folder" source="auto" default=""
label="30001" />
- <setting id="sortMethod" type="enum" label="30010" default="0"
lvalues="30011|30012|30013" />
+ <setting id="recordings" type="bool" default="true" label="30005" />
+ <setting id="archivePath" type="folder" source="auto" default=""
label="30001" enable="eq(-1,true)" />
+ <setting id="sortMethod" type="enum" label="30010" default="0"
lvalues="30011|30012|30013" enable="eq(-2,true)" />
</category>
</settings>
-----------------------------------------------------------------------
Summary of changes:
plugin.video.eyetv.parser/addon.py | 32 ++++++++++++++-----
plugin.video.eyetv.parser/addon.xml | 2 +-
plugin.video.eyetv.parser/changelog.txt | 5 +++
.../resources/language/English/strings.xml | 1 +
.../resources/lib/eyetv_live.py | 1 +
.../resources/lib/eyetv_parser.py | 5 ++-
plugin.video.eyetv.parser/resources/settings.xml | 14 +++++----
7 files changed, 42 insertions(+), 18 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons