Enigma2 plugin to to play various online streams (mostly Latvian).

12345678910111213141516171819202122
  1. # * GNU General Public License for more details.
  2. # *
  3. # * You should have received a copy of the GNU General Public License
  4. # * along with this program; see the file COPYING. If not, write to
  5. # * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  6. # * http://www.gnu.org/copyleft/gpl.html
  7. # *
  8. # */
  9. import re
  10. __name__='simple'
  11. __priority__ = -2
  12. def supports(url):
  13. return not _regex(url) == None
  14. # returns the steam url
  15. def resolve(url):
  16. if supports(url):
  17. return [{'url':url}]
  18. def _regex(url):
  19. return re.search('\.(flv|mp4|avi|wmv)$',url,re.IGNORECASE | re.DOTALL)