Jump to content


Photo

SQLite EPG trouble! Please help!

DM600

  • Please log in to reply
48 replies to this topic

Re: SQLite EPG trouble! Please help! #21 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 7 October 2009 - 11:24

Here is the site where is xmltv files stored
www.sharobg.com/dimitarcc/

there are
Discovery_Science.xmltv
AXN_SciFi.xmltv
AXN_Crime.xmltv

please someone help me writing the script and config files becasue 3 days i am trying and nothing!
Please someone!
Thanks so much in advance!

p.s. xmltv files are utf-8 files

Re: SQLite EPG trouble! Please help! #22 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 7 October 2009 - 11:38

I believe db_epg doesn't have utf-8 support yet
If you are a programmer, have a look at the db_epg sources on openpli.pli-images.org, perhaps you can fix it

Re: SQLite EPG trouble! Please help! #23 doglover

  • Rytec EPG Team
  • 17,120 posts

+644
Excellent

Posted 7 October 2009 - 13:12

I tried to import the XMLTV file from the Cartoon Network.

Retrieve is OK.

But the conversion is not: See below the XMLTV parse error.

Using a timeOffset of 0 seconds.
Retrieving 168 hours of data for each channel
#count:1
20091007
Connecting to sharobg.com[91.196.125.77]:80
rytecxmltv 100% |*****************************| 53771 00:00 ETA
#cur:0
#cur:0
/var/bin/db_epg -t xmltv -d /media/hdd/epg.db -f /media/hdd/rytecxmltv -o 0 -h
Setting encoding to ISO-8859-1
XMLTV parse error: /media/hdd/rytecxmltv: not well-formed at line 1

The conversion tool does not understand the XMLTV file.

Willy

PS: during the import I set the import name to rytecxmltv as the rest of my script is based on this name.

Re: SQLite EPG trouble! Please help! #24 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 7 October 2009 - 13:22

btw my EPG is in Cyrillic characters.... what encoding i should use?
Hmmm we probably there is the trouble!
I will try to see what is wrong!
Thanks!
btw how did you get this log?

Re: SQLite EPG trouble! Please help! #25 doglover

  • Rytec EPG Team
  • 17,120 posts

+644
Excellent

Posted 7 October 2009 - 13:51

I have run my script from a telnet session.

Your batch file should be run with a command simular to this:


bg_pack.sh

And then you get a log in the telnet screen.

I saw the cyrillic characters in the fle. I opened the imported file to take a look at the file structure. As far as I can see this file should import, except for the utp-8 encoding.

Willy

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: SQLite EPG trouble! Please help! #26 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 7 October 2009 - 14:48

as i mentioned before when i use $chanId inside path like /tmp/$chanId.xmltv i get /tmp/$chanId(and here i get extra character as i read that i unix style line end).xmltv.
Becasue i am windows programmer and for now is very difficult understand unix shell scrip can someone give a code that from $chanId to strip last character(the line ending) and save the resulting string to a new string?

For example

tmp = $chanId;
tmp1 = ..............(the strip procedure)(tmp) or something ( i am very little knowledge about unix shell scripts!
Thanks so much in advance!

Re: SQLite EPG trouble! Please help! #27 lwlford

  • Member
  • 1 posts

0
Neutral

Posted 7 October 2009 - 15:01

Your batch file should be run with a command simular to this:


bg_pack.sh

And then you get a log in the telnet screen.

I saw the cyrillic characters in the fle. I opened the imported file totake a look at the file structure. As far as I can see this file shouldimport, except for the utp-8 encoding.


I tried it but still the problem is there.


lwlford

Re: SQLite EPG trouble! Please help! #28 WanWizard

  • PLi® Core member
  • 69,121 posts

+1,763
Excellent

Posted 7 October 2009 - 15:09

Becasue i am windows programmer and for now is very difficult understand unix shell scrip

I was as well, until I saw the light. :)

Just use a decent editor that will allow you to save in the proper format. When I still used Windows, I did all my coding with UltraEdit, which allows you to save files 'unix-style'.

And if you want to be sure, use the 'dos2unix' command on your box (p.e. 'dos2unix test.dat' converts the lines in the file test.dat to have linux-style line ends).

This issue is that your channel file (your .dat file) contains the wrong type of line-ends, which is read by your while-loop, which causes that character to end up in $chanId. It is not an issue in your script, nor should you try to fix it there.

Re: SQLite EPG trouble! Please help! #29 doglover

  • Rytec EPG Team
  • 17,120 posts

+644
Excellent

Posted 7 October 2009 - 15:34

All good and well to try to read the files from the net. If you cannot convert them to the box you are nowhere

But:

I tried to read one file. Succeeded. But failed miserably converting them to the SQlite database.
The database convertor does not understand utf-8 files.

The option from the convertor:

EPG Converter 0.5
General options:

-?, --help :help(this page)
-d, --database <file> :location of database
-t, --type <type> :type of reader to use (available types are listed below)
Some readers may require additional arguments.
Use -? with the selected type to see a list of options

Supported readers:
cmd Command line reader
epgdat epg.dat Converter
uk_rt UK Radiotimes
xmltv XMLTV Converter

root@dm600pvr ~ # db_epg -t xmltv -?
XMLTV file format
Options:
-f, --file <file> :xmltv file to convert
-l, --lang <code> :language code (according to ISO 639-2)
-h, --hours <hours> :number of hours to store (default 0: no
limit)
-o, --offset <offset> :time offset in seconds (defaults to 0)
-p, --provider <provider> :start of provider name
-m, --map <file> :file with service references for each ch
annel
-g, --genre <file> :file with a list of genre strings (forma
t <genre string>,<value>[,min duration])
--matchname :if enabled, tries to match unknown chann
elnames with entries in database
-e, --export :append mapfile with all unknown channels
-c, --cp <num> :iso8859 codepage, defaults to 0


Willy

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: SQLite EPG trouble! Please help! #30 WanWizard

  • PLi® Core member
  • 69,121 posts

+1,763
Excellent

Posted 7 October 2009 - 16:45

Ah, that's probably my fault, I suggested utf8 earlier (wishful thinking of my part perhaps), but indeed support for utf8 is still on the todo list...

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: SQLite EPG trouble! Please help! #31 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 7 October 2009 - 17:53

so the epg converter use only iso8859? or only iso8859-1?
becasue Cyrillic characters are in iso8859-5. Ca i use iso8859-5 (as a parameter c 5 for the converter)?

Re: SQLite EPG trouble! Please help! #32 doglover

  • Rytec EPG Team
  • 17,120 posts

+644
Excellent

Posted 8 October 2009 - 13:51

so the epg converter use only iso8859? or only iso8859-1?
becasue Cyrillic characters are in iso8859-5. Ca i use iso8859-5 (as a parameter c 5 for the converter)?


You can try. The help for de db_epg convertor does not given any more help.

But there is num option - set it to 5 to try

Willy

Re: SQLite EPG trouble! Please help! #33 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 9 October 2009 - 09:34

Finally i was able to make my xmltv files and to import them in sqlite epg.
Just i was set xmltv file encoding to iso-8895-5 (and also i was convert all my strings to that encoding)
also i was convert all my config and script files to UNIX style (i was use Notepad++) and i was set encoding paramete of db_epg to 5.
And that is all! Now everything working!

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: SQLite EPG trouble! Please help! #34 doglover

  • Rytec EPG Team
  • 17,120 posts

+644
Excellent

Posted 9 October 2009 - 11:11

Glad we could point you in the right direction.

Willy

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: SQLite EPG trouble! Please help! #35 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 9 October 2009 - 11:18

Yes! Thank you for the help!
btw is it possible my config to be upload to PLi download so to can be downloaded from inside Dreambox?

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: SQLite EPG trouble! Please help! #36 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,492 posts

+118
Excellent

Posted 9 October 2009 - 11:31

sure, post you creation here with a small subscryption

on the Glassfibre 1GB DVB-C...


Re: SQLite EPG trouble! Please help! #37 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 9 October 2009 - 12:25

How to pack it? just in archive(zip or tar.gz) or in a special format?

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: SQLite EPG trouble! Please help! #38 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 9 October 2009 - 12:44

Here it is!
I upload my config in ZIP format (since i am windows user)
Just dim_bg.sh have to be placed in /var/bin (chmod 775)
dim_bg.cfg and dim_bg.dat in /var/tuxbox/config/dbepg (chmod 644)
and i was coded epg.db to be in /var/log.
I hope my plugin can be soon downloadable via PLi download manager!
Thanks in advance!

Attached Files


Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: SQLite EPG trouble! Please help! #39 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,492 posts

+118
Excellent

Posted 9 October 2009 - 13:03

which EPG channels should it download?

Bulgarian TV channels?

on the Glassfibre 1GB DVB-C...


Re: SQLite EPG trouble! Please help! #40 DimitarCC

  • PLi® Contributor
  • 1,423 posts

+51
Good

Posted 9 October 2009 - 13:08

Yes that is a config for Bulgarian TV channels (channels that are available in bulgarian language or bulgarian subtitle and are showed in Bulgaria)

Vu+DUO4KSE, DM920UHD, Vu+Uno4KSE, SF8008Mini, Vu+Solo2, Dreambox DM500HD, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)




Also tagged with one or more of these keywords: DM600

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users