-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c68197
commit bd18c2b
Showing
13 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 techiejohn/pilotjohn at gearsdown.com | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import time | ||
import urllib | ||
import xbmc | ||
import xbmcaddon | ||
from BeautifulSoup import BeautifulSoup | ||
|
||
print "Starting..." | ||
|
||
# setup | ||
cs_url = "http://admin.gamaxmedia.hu/player-inside-full?streamid=dunalive&userid=mtva" | ||
cs_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25" | ||
cs_name = xbmcaddon.Addon().getAddonInfo("id") | ||
cs_file = os.path.join(xbmc.translatePath("special://temp"), cs_name + ".session") | ||
cs_delay = 5 | ||
|
||
class CsatornakURLopener(urllib.FancyURLopener): | ||
version = cs_agent | ||
|
||
print "Session: " + cs_file | ||
|
||
# tries to limit deadlocks due to multiple runs | ||
# fcntl for file locking may not be available on some platforms | ||
if os.path.exists(cs_file) and time.time() - os.path.getmtime(cs_file) < cs_delay: | ||
print "Recently ran, exiting." | ||
sys.exit(0) | ||
else: | ||
with open(cs_file, "a+"): | ||
os.utime(cs_file, None) | ||
|
||
cs_player = xbmc.Player() | ||
|
||
# stop playing and wait | ||
cs_player.stop() | ||
while cs_player.isPlaying(): | ||
xbmc.sleep(10) | ||
|
||
# load and parse stream | ||
print "Loading: " + cs_url | ||
|
||
urllib._urlopener = CsatornakURLopener() | ||
cs_page = urllib.urlopen(cs_url) | ||
cs_soup = BeautifulSoup(cs_page.read()) | ||
|
||
cs_page.close() | ||
|
||
cs_stream = cs_soup.source['src'] | ||
|
||
# play stream | ||
print "Playing: " + cs_stream | ||
cs_player.play(cs_stream) | ||
print "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="plugin.video.DunaTV" name="DunaTV" version="0.0.1" provider-name="IslandJohn"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.6.0"/> | ||
<import addon="script.module.beautifulsoup" version="3.2.1"/> | ||
</requires> | ||
<extension point="xbmc.python.script" library="addon.py" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary>Duna TV</summary> | ||
<description>Stream Duna TV live.</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import time | ||
import urllib | ||
import xbmc | ||
import xbmcaddon | ||
from BeautifulSoup import BeautifulSoup | ||
|
||
print "Starting..." | ||
|
||
# setup | ||
cs_url = "http://admin.gamaxmedia.hu/player-inside-full?streamid=dunaworldlive&userid=mtva" | ||
cs_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25" | ||
cs_name = xbmcaddon.Addon().getAddonInfo("id") | ||
cs_file = os.path.join(xbmc.translatePath("special://temp"), cs_name + ".session") | ||
cs_delay = 5 | ||
|
||
class CsatornakURLopener(urllib.FancyURLopener): | ||
version = cs_agent | ||
|
||
print "Session: " + cs_file | ||
|
||
# tries to limit deadlocks due to multiple runs | ||
# fcntl for file locking may not be available on some platforms | ||
if os.path.exists(cs_file) and time.time() - os.path.getmtime(cs_file) < cs_delay: | ||
print "Recently ran, exiting." | ||
sys.exit(0) | ||
else: | ||
with open(cs_file, "a+"): | ||
os.utime(cs_file, None) | ||
|
||
cs_player = xbmc.Player() | ||
|
||
# stop playing and wait | ||
cs_player.stop() | ||
while cs_player.isPlaying(): | ||
xbmc.sleep(10) | ||
|
||
# load and parse stream | ||
print "Loading: " + cs_url | ||
|
||
urllib._urlopener = CsatornakURLopener() | ||
cs_page = urllib.urlopen(cs_url) | ||
cs_soup = BeautifulSoup(cs_page.read()) | ||
|
||
cs_page.close() | ||
|
||
cs_stream = cs_soup.source['src'] | ||
|
||
# play stream | ||
print "Playing: " + cs_stream | ||
cs_player.play(cs_stream) | ||
print "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="plugin.video.DunaWorld" name="DunaWorld" version="0.0.1" provider-name="IslandJohn"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.6.0"/> | ||
<import addon="script.module.beautifulsoup" version="3.2.1"/> | ||
</requires> | ||
<extension point="xbmc.python.script" library="addon.py" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary>Duna World</summary> | ||
<description>Stream Duna World live.</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import time | ||
import urllib | ||
import xbmc | ||
import xbmcaddon | ||
from BeautifulSoup import BeautifulSoup | ||
|
||
print "Starting..." | ||
|
||
# setup | ||
cs_url = "http://admin.gamaxmedia.hu/player-inside-full?streamid=mtv1live&userid=mtva" | ||
cs_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25" | ||
cs_name = xbmcaddon.Addon().getAddonInfo("id") | ||
cs_file = os.path.join(xbmc.translatePath("special://temp"), cs_name + ".session") | ||
cs_delay = 5 | ||
|
||
class CsatornakURLopener(urllib.FancyURLopener): | ||
version = cs_agent | ||
|
||
print "Session: " + cs_file | ||
|
||
# tries to limit deadlocks due to multiple runs | ||
# fcntl for file locking may not be available on some platforms | ||
if os.path.exists(cs_file) and time.time() - os.path.getmtime(cs_file) < cs_delay: | ||
print "Recently ran, exiting." | ||
sys.exit(0) | ||
else: | ||
with open(cs_file, "a+"): | ||
os.utime(cs_file, None) | ||
|
||
cs_player = xbmc.Player() | ||
|
||
# stop playing and wait | ||
cs_player.stop() | ||
while cs_player.isPlaying(): | ||
xbmc.sleep(10) | ||
|
||
# load and parse stream | ||
print "Loading: " + cs_url | ||
|
||
urllib._urlopener = CsatornakURLopener() | ||
cs_page = urllib.urlopen(cs_url) | ||
cs_soup = BeautifulSoup(cs_page.read()) | ||
|
||
cs_page.close() | ||
|
||
cs_stream = cs_soup.source['src'] | ||
|
||
# play stream | ||
print "Playing: " + cs_stream | ||
cs_player.play(cs_stream) | ||
print "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="plugin.video.MTV1" name="MTV1" version="0.0.1" provider-name="IslandJohn"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.6.0"/> | ||
<import addon="script.module.beautifulsoup" version="3.2.1"/> | ||
</requires> | ||
<extension point="xbmc.python.script" library="addon.py" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary>MTV 1</summary> | ||
<description>Stream MTV 1 live.</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import time | ||
import urllib | ||
import xbmc | ||
import xbmcaddon | ||
from BeautifulSoup import BeautifulSoup | ||
|
||
print "Starting..." | ||
|
||
# setup | ||
cs_url = "http://admin.gamaxmedia.hu/player-inside-full?streamid=mtv2live&userid=mtva" | ||
cs_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25" | ||
cs_name = xbmcaddon.Addon().getAddonInfo("id") | ||
cs_file = os.path.join(xbmc.translatePath("special://temp"), cs_name + ".session") | ||
cs_delay = 5 | ||
|
||
class CsatornakURLopener(urllib.FancyURLopener): | ||
version = cs_agent | ||
|
||
print "Session: " + cs_file | ||
|
||
# tries to limit deadlocks due to multiple runs | ||
# fcntl for file locking may not be available on some platforms | ||
if os.path.exists(cs_file) and time.time() - os.path.getmtime(cs_file) < cs_delay: | ||
print "Recently ran, exiting." | ||
sys.exit(0) | ||
else: | ||
with open(cs_file, "a+"): | ||
os.utime(cs_file, None) | ||
|
||
cs_player = xbmc.Player() | ||
|
||
# stop playing and wait | ||
cs_player.stop() | ||
while cs_player.isPlaying(): | ||
xbmc.sleep(10) | ||
|
||
# load and parse stream | ||
print "Loading: " + cs_url | ||
|
||
urllib._urlopener = CsatornakURLopener() | ||
cs_page = urllib.urlopen(cs_url) | ||
cs_soup = BeautifulSoup(cs_page.read()) | ||
|
||
cs_page.close() | ||
|
||
cs_stream = cs_soup.source['src'] | ||
|
||
# play stream | ||
print "Playing: " + cs_stream | ||
cs_player.play(cs_stream) | ||
print "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<addon id="plugin.video.MTV2" name="MTV2" version="0.0.1" provider-name="IslandJohn"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.6.0"/> | ||
<import addon="script.module.beautifulsoup" version="3.2.1"/> | ||
</requires> | ||
<extension point="xbmc.python.script" library="addon.py" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<summary>MTV 2</summary> | ||
<description>Stream MTV 2 live.</description> | ||
<platform>all</platform> | ||
</extension> | ||
</addon> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.