Kodi Community Forum

Full Version: IPTV Recorder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Last attempt for now in 0.0.30.
If reading the xml header encoding doesn't work it will use chardet to guess the encoding.
<?xml encoding=""

I'm not convinced chardet knows what it is doing as it detected utf8 as ascii but the rest of the addon still managed to output some Korean programs correctly.
here's the first line of my XML file

<tv generator-info-name="WebGrab+Plus/w MDB & REX Postprocess -- version V2.0.4 -- generator-info-url="http://www.webgrabplus.com">

the next line is the first channel id
Good.
It shows the difference between c and python.
c takes 10 times as long to program as python but is 10 times quicker to run.
If you can't find an equivalent python library in c, make that 100 times longer to write.
(2018-04-16, 15:02)wigee Wrote: [ -> ]here's the first line of my XML file

<tv generator-info-name="WebGrab+Plus/w MDB & REX Postprocess -- version V2.0.4 -- generator-info-url="http://www.webgrabplus.com">

the next line is the first channel id
 Could you post of pm me a link to the file.
Now I've spent all this time on it I'd like to actually know what the encoding is and how they have implemented it.
It might be a BOM or just luck.
Thanks for the pm.

The xmltv is a standard webgrab file with utf8 encoding and a utf8 BOM too.
The first line does include the encoding:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version V2.0.4 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">

I don't know why the program title error happened earlier as all the <title>'s are on one line and none are empty.

Let me know if anything else goes wrong.
0.0.31 does a case insensitive match on channels with missing ids.
I'm staring to see some real lazy-arse xmltv/m3u combinations out there. Wink
This should find a few more playable channels in your epg.
Can anything be done about the naming of recordings in the future?

For example this is the file name that gets auto generated: CBS+-+Living+Biblically%3A+Show+Hospitality+%5BCOLOR+grey%5D2018-04-16+21%3A30%3A00+-+2018-04-16+22%3A00%3A00%5B%2FCOLOR%5D

Thanks for the hard work
(2018-04-17, 03:40)hotshot2k3 Wrote: [ -> ]Can anything be done about the naming of recordings in the future?

For example this is the file name that gets auto generated: CBS+-+Living+Biblically%3A+Show+Hospitality+%5BCOLOR+grey%5D2018-04-16+21%3A30%3A00+-+2018-04-16+22%3A00%3A00%5B%2FCOLOR%5D

Thanks for the hard work


What’s wrong with it? [emoji3]
(2018-04-17, 03:40)hotshot2k3 Wrote: [ -> ]Can anything be done about the naming of recordings in the future?

For example this is the file name that gets auto generated: CBS+-+Living+Biblically%3A+Show+Hospitality+%5BCOLOR+grey%5D2018-04-16+21%3A30%3A00+-+2018-04-16+22%3A00%3A00%5B%2FCOLOR%5D

Thanks for the hard work
 I can do anything I like with it. You can too. Wink It's all open source and relatively easy python code.

What do you want it to look like?

The reason it is like that is because Windows has a hard time with non-ascii characters and special file characters have to be encoded (< > : " / \ | ? *).
The file name is url encoded with pluses for spaces.
Luckily Kodi can translate url encoded filenames without any addon intervention.
To make it unique the channel name, title, start and stop times have to be included.
The colors make it easy to read in the addon or Kodi's Recordings folder.

There is an easily readable json file with more meta info in the Recordings folder.
If you want to rename it just load that data into python and use that.

If you come up with a workable alternative that meets all the criteria above I'll add it in for you.
Try 0.0.32 for a start.
There is an option for Plain File Names in Settings \ Jobs and Rules.

That will create file names like this:
Code:
5USA - Law %26 Order - 2018-04-17 11-15 - 12-10.ts
Non-ascii characters are still url encoded to stop Windows craziness but it is more human readable.
I am a noob, but i hope i can Test it out Wink

First,.. One question, i downloadet the ffmpeg zip File for Android from your Link in the Start post, can i install it in kodi like any other zip File or have i to unzip it first, and if so in wich folder i have to install it ?

sorry for that noob question
(2018-04-17, 13:02)bladerunner82 Wrote: [ -> ]I am a noob, but i hope i can Test it out Wink

First,.. One question, i downloadet the ffmpeg zip File for Android from your Link in the Start post, can i install it in kodi like any other zip File or have i to unzip it first, and if so in wich folder i have to install it ?

sorry for that noob question
 Hi.
You need to extract the ffmpeg program from the zip file and put it somewhere where you can browse to it in
Settings \ Jobs and Rules \ ffmpeg exe
So if you downloaded the zip in Android to the Downloads folder just extract it there and point "ffmpeg exe" to that extracted ffmpeg file.

The first time IPTV Recorder tries to record on Android it will try to copy ffmpeg to the kodi system data storage path so that it can be run from Kodi.
/data/data/org.xbmc.kodi/ffmpeg
Android has restrictions on where you can run programs from for security reasons.
Here is the XMLTV data:

xml:
    <programme start="20180420043000 -0400" stop="20180420050000 -0400" channel="C510wlnydt.zap2it.com">
        <title lang="en">The Game</title>
        <sub-title lang="en">Keep Your Friends Close and Your Prostitute Closer</sub-title>
        <desc lang="en">Melanie attempts to foster goodwill between her and Janay; Tasha's new relationship.</desc>
        <credits>
            <actor role="Jason Pitts">Coby Bell</actor>
            <actor role="Malik Wright">Hosea Chanchez</actor>
            <actor role="Tasha Mack">Wendy Raquel Robinson</actor>
            <actor role="Keira Michelle Whitaker">Lauren London</actor>
            <actor role="Bryce &quot;Blue&quot; Westbrook">Jay Ellis</actor>
            <actor role="Chardonnay Pitts">Brandy Norwood</actor>
            <actor role="Derwin Davis">Pooch Hall</actor>
            <actor role="Melanie Barnett">Tia Mowry</actor>
            <actor role="Kelly Pitts">Brittany Daniel</actor>
            <producer>Kelsey Grammer</producer>
            <producer>Mara Brock Akil</producer>
            <producer>Steve Stark</producer>
            <producer>Salim Akil</producer>
            <producer>Kenny Smith</producer>
        </credits>
        <date>20120306</date>
        <category lang="en">Football</category>
        <category lang="en">Comedy drama</category>
        <length units="minutes">30</length>
        <icon src="https://zap2it.tmsimg.com/assets/p9031807_e_v5_ab.jpg"/>
        <url>https://tvlistings.zap2it.com//overview.html?programSeriesId=SH00848609&amp;tmsId=EP008486090092</url>
        <episode-num system="common">S05E09</episode-num>
        <episode-num system="dd_progid">EP00848609.0092</episode-num>
        <episode-num system="xmltv_ns">4.8.</episode-num>
        <previously-shown start="20120306000000"/>
        <subtitles type="teletext"/>
        <rating>
            <value>TV-14</value>
        </rating>
    </programme>

The TVDB scaper needs a name like this: The Game S05E09  ( <title lang="en">The Game</title> <episode-num system="common">S05E09</episode-num> )
Maybe something like a TVDB naming option in settings. TVDB also needs a folder to be made in order to scrape.
So if a Folder can be made for the recording based of the title and then the recording is named according to TVDB standards it would help Kodi keep organized

Hmm this can become complicated, maybe there could a question when you schedule a recording asking if this is a TV show or a Movie
If you want to pull the recordings in to the Kodi library it would be better with an nfo file.

I've been using the xmltv_ns episode number as the actual season and episode numbers.
Are you sure they are 0 based and not 1 based like the common numbers?
How do they deal with specials?
TVDB uses S00 for specials
I am not sure if the xmltv from zap2it uses that that episode naming

https://kodi.wiki/view/Video_library/Nam...how_Folder