#!/usr/bin/python
# -*- coding: utf-8 -*-

from util import streamproxy_encode3, streamproxy_decode3
dt2ts = lambda dt: int(time.mktime(dt.timetuple()))
ts2dt = lambda ts: datetime.datetime.fromtimestamp(ts)
import time, datetime, pytz
from datetime import datetime as dt

# "20190302203000 +0200" panorāma
print dt2ts(dt.now())
print dt2ts(dt(2019, 3, 2, 20, 30))
#print urlp
# ltc::content/live-streams/101?include=quality
print streamproxy_encode3("playstream", "ltc::content/catchup/101?start=1551551400")
# http://localhost:8880/playstream/ltc%3A%3Acontent%2Fcatchup%2F101%3Fstart%3D1551551400/

print streamproxy_encode3("playstream", "replay::tiesraide/ltv1")
print streamproxy_encode3("playstream", "tvdom::tiesraides/ltv1/")
print streamproxy_encode3("playstream", "tvplay::asset/10311641")
print streamproxy_encode3("playstream", "xtv::rigatv24/video/Zw4pVPqr7OX-festivals_mainam_pasauli_sakam_ar_sevi")
print streamproxy_encode3("playstream", "iplayer::episodes/b094f49s")
#cmd, data, headers, qs = streamproxy_decode3(urlp)