TVStreams
A tool for creating lists with TV streams.
A tool for creating lists with TV streams.
With this application you can create lists with TV streams from around the web.
Step 1 (Extract/grab streams):
First you need to extract the streams. You can do this by creating a new list. Start by selecting Extract Streams from the menu.
You need to know the file from where you want to grab your streams. This can be a remote file (eg. like a web page) or a local file.
For xml files you need to know the tag where the stream is and optionally the tag for the name of the stream.
(Advanced only) For regular expression you can get more details from android Pattern object.
After you have the streams extracted and saved you can go to step 2 or 3.
Step 2 (Assign Channel):
You can assign a channel by either touching the logo icon or from Edit Channel page. (make sure that you first updated the database otherwise no channels will be available to assign).
Step 3 (Test stream):
You can test the stream by either touching the stream name and select test or from Edit Channel page. This will show additional details about your stream.
This application allows you to create your own custom channels
To create a custom channel you need to create a xml file and import it into TVStreams. Bellow is an example of the content of a xml file with one custom channel:
customchannel.xml<?xml version="1.0" encoding="UTF-8"?>
<TVStreams>
<Channels>
<channel id="1">
<name><![CDATA[Al Jazeera]]></name>
<category>News</category>
<file_name>al_jazeera</file_name>
<epg_module_name>america.aljazeera.com</epg_module_name>
<epg_module_key>none</epg_module_key>
<epg_language>En</epg_language>
<language>En</language>
<country><![CDATA[United States]]></country>
<web><![CDATA[english.aljazeera.net]]></web>
<enabled>true</enabled>
</channel>
</Channels>
</TVStreams>
The id attribute of the channel can be any number between 1 and 99999 inclusiv. If the attribute is not set or is 0 or greater than 99999 then the channel will not be imported.
It is a good idea to use id's that have 5 digits because it increases the chances that your channels will have unique id's that will not be overwrited by other custom channels.
Channel tag | Type | Mandatory | Description |
---|---|---|---|
name | String | Yes | The name of the channel. |
category | String | Yes | The category of the channel. Can be any String but it is recommended to use one of the following: Movies, Documentary, Kids, Sport, Music, Lifestyle, General, News, Adult. |
file_name | String | No | This is the name of the logo file. |
epg_module_name | String | No | The EPG parser file name. |
epg_module_key | String | No | An optional key that will be passed to EPG parser and inserted into url. |
epg_language | String | No | The language of the EPG. |
language | String | No | The language of the channel. |
country | String | No | The country of the channel. |
address | String | No | The address of the channel. |
phone | String | No | The phone of the channel. |
e_mail | String | No | The e-mail of the channel. |
web | String | No | The web address of the channel. |
enabled | boolean | Yes | Whether this channel is enabled or no. Values can be true or false. |
For the app to properly load the custom channel logo, the following conditions must be met.
This application allows you to create your own custom EPG parsers
The EPG module files must be placed on the external storage under the folder TVStreams/epg/.
america.aljazeera.com.xml<?xml version="1.0" encoding="UTF-8"?>
<EPG_MODULE url="http://america.aljazeera.com/bin/ajam/broadcast-schedule.json">
<EVENT eventsgroup="true"><![CDATA[\{"wireEntry"(.*?)\{"entry":]]>
<TITLE mode="regex"><![CDATA[","title":"(.*?)",]]></TITLE>
<TIME mode="regex" timemode="timestamp"><![CDATA["publishedDate":(.*?),"]]></TIME>
<SUBTITLE mode="regex" trim="true"><![CDATA["description":\{"value":"(.*?)",]]></SUBTITLE>
</EVENT>
</EPG_MODULE>
EPG_MODULE is the main group and is mandatory.
EPG_MODULE attributesattribute | Value(s) | Mandatory | Description |
---|---|---|---|
url | ... | Yes | The url of the page containing the EPG. You can insert the channel specific epg_module_key into the url using $MODULE_KEY$ |
You can define your own groups using only uppercase leteres and numbers (eg:DAY or GROUP_1). Do not use TIME, TITLE or SUBTILE as custom groups because these are predefined elements.
Groups specific attributesattribute | Value(s) | Mandatory | Description |
---|---|---|---|
daysgroup | true | false | No | Treat this as days group when using referencesystemdate. |
eventsgroup | true | false | No | Treat this as events group. |
There are 2 types: predefined and custom.
attribute | Value(s) | Mandatory | Description |
---|---|---|---|
mode | regex | comp | Yes | The way that the content of the tag is treated.
For "regex", the capture is surrounded by parentheses. Example (.*?) For "comp", the content of the element must reference one or more previous element(s) surrounded by dollars. Example: $element_1$ $element_2$ |
trim | true | false | No | Trim the result. |
removechars | ... | No | Remove all specified chars from result. |
replace | ... | No | Replace string with other string (initial_string|$|replaced_string). |
removestring | ... | No | Removes all ocurences of specified string from result. |
replaceempty | tag name | No | If the result is empty replace it with the specified tag. |
attribute | Value(s) | Mandatory | Description |
---|---|---|---|
timemode | timestamp | timestampseconds | format | Yes | The mode how the timestamp is captured or created. |
timeformat | ... | (format)Yes | When timemode is set to 'format' then a timeformat must be set. You can get the format symbols from here. |
locale | Language,Country | (format)Yes | When timemode is set to 'format' then a locale must be set. Language - An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length. Country(Optional) - An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. |
timezone | timezone ID | No | When timemode is set to 'format' then a timezone should be set. |
referencesystemyear | true | false | No | Use the system year as reference when building the timestamp. |
referencesystemdate | true | false | No | Use system date as reference when building the timestamp. |
<?xml version="1.0" encoding="UTF-8"?>
<EPG_MODULE url="http://www.devaward.com/tvstreams/example-epg.php?channel=$MODULE_KEY$">
<DAY><![CDATA[(?s)<span>\n(.*?)<td style=\"vertical-align:top;text-align:center\">]]>
<time_1 mode="regex" trim="true"><![CDATA[class="begin_time">(.*?)<]]></time_1>
<date mode="regex" replace="ţ|$|ț"><![CDATA[(?s).*? (.*?)\n </span><br/>]]></date>
<EVENT eventsgroup="true"><![CDATA[(?s)<table><tr><td>(.*?)</td></tr><]]>
<time_2 mode="regex" replaceepmty="time_1"><![CDATA[(?s)class="time_text">(.*?)<]]></time_2>
<TITLE mode="regex"><![CDATA[btxt">(.*?)</]]></TITLE>
<TIME mode="comp" trim="true" timemode="format" timeformat="(d MMMM) H:mm" referencesystemyear="true" timezone="Europe/Madrid" locale="es,ES"><![CDATA[$date$ $time_2$]]></TIME>
<sub_1 mode="regex" trim="true" removechars="()"><![CDATA[class="sub_text">(.*?)</]]></sub_1>
<sub_2 mode="regex" trim="true" removechars="()"><![CDATA[class="extra_text">(.*?)</]]></sub_2>
<sub_3 mode="regex" trim="true"><![CDATA[class="desc_text">(.*?)</]]></sub_3>
<sub_4 mode="comp" trim="true"><![CDATA[$sub_1$ $sub_2$]]></sub_4>
<SUBTITLE mode="comp" removestring="()" replace="<br/>|$| "><![CDATA[$sub_3$ ($sub_4$)]]></SUBTITLE>
</EVENT>
</DAY>
</EPG_MODULE>
Please don't send bug reports about streams or servers being offline. This app and the developer have nothing in common with any streams or servers regardless of their country.