Giter Club home page Giter Club logo

sd2xmltv's People

Contributors

astrilchuk avatar cscashby avatar edit4ever avatar r0m30 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sd2xmltv's Issues

export data to xmltv file

Currently you're embedding most of the program metadata into the description field. It would be appropriate to also export those data fields into the xmltv.xml so the data can be read by the pvr backend.

Each piece of data from the sd download has a place in the xmltv.xml file - original air date or movie date, credits, categories, ratings (tv and star), subtitles, video, audio - it would be nice to include these in the xmltv output.

I realize your initial intent is to deal with the limitations of tvheadend - but tvh improvements (and other pvrs) can handle the data from the xmltv.xml file. Hopefully it's not too hard to add the code to output that info. Thanks!

logging error

I'm getting the following error when trying to run under tvheadend in kodi:

Traceback (most recent call last): File "/storage/.kodi/addons/tools.module.sd2xmltv/sd2xmltv.py", line 376, in <module> logging.config.fileConfig(u"logging.cfg", disable_existing_loggers=True) File "/usr/lib/python2.7/logging/config.py", line 77, in fileConfig File "/usr/lib/python2.7/logging/config.py", line 113, in _create_formatters File "/usr/lib/python2.7/ConfigParser.py", line 607, in get ConfigParser.NoSectionError: No section: 'formatters'

I can run the script under windows - but no log is created. Also - I noticed that in the develop version - the "util" folder is not included in the addon build. I can submit a pull request with the change if you want...I'm currently working on incorporating some kodi settings for your options before I submit.

XMLTV file missing channel icon

The xmltv writer for channel does not include the channel icon information.
The data is in the cache.db map - but is not written out to the xmltv.xml file.

Does tvheadend actually read all those <icon src= > in <programme>?

Hi, sorry to keep pestering, this addon is great at downloading schedules direct, but have you been able to view any of the in within tvheadend? I'm running LibreElec alpha with tvheadend 4.1 (build 2195) and I see the information in xmltv.xml but not in tvheadend or Kodi. Does tvheadend even support URL or only local files?

<programme channel="I2.1.20454.schedulesdirect.org" start="20160902000000" stop="20160902003100">
 <icon src="https://s3.amazonaws.com/schedulesdirect/assets/p185554_b_v3_al.jpg" />
</programme>

Unable to pull lineup or add lineup

When I ssh into openelec on my rasberry pi and try to run the schedules direct script I get a datetime warning and unable to add a lineup see the following....

python sd2xmltv.py -u username -p password -m
2016-10-07 13:29:26,949 main INFO Getting SchedulesDirect token.
2016-10-07 13:29:27,487 main INFO Getting SchedulesDirect status.
2016-10-07 13:29:28,001 root WARNING Key(s) not processed for Status: datetime
2016-10-07 13:29:28,002 main INFO Account will expire on 2016-12-04 06:03:16 (57 days).
2016-10-07 13:29:28,004 main INFO SchedulesDirect last update at 2016-10-07 03:46:00 (9 hours 43 minutes ago).
2016-10-07 13:29:28,005 main INFO Message: No known issues.

Manage Account Options:

  1. List subscribed lineups
  2. Add lineup
  3. Remove lineup
  4. List lineup channels.

Choose an option or 'x' to exit.

2

Add Lineup

Enter 5-digit zip or postal code or 'x' to cancel:

84101
2016-10-07 13:29:51,285 root ERROR {"response":"NO_LINEUPS","code":4102,"serverID":"20141201.web.2","message":"No lineups have been added to this account.","datetime":"2016-10-07T13:29:51Z"}
Traceback (most recent call last):
File "sd2xmltv.py", line 362, in
main()
File "sd2xmltv.py", line 356, in main
app.manage()
File "sd2xmltv.py", line 62, in manage
self._sd.manage()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 298, in manage
self._add_lineup()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 330, in _add_lineup
subscribed_lineups = self.get_subscribed_lineups()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 70, in get_subscribed_lineups
lineups_dict = api.get_subscribed_lineups(self._token)
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/api.py", line 70, in get_subscribed_lineups
if "response" in response and response["response"] == "NO_LINEUPS":
TypeError: string indices must be integers, not str

Unable to add a lineup

Hello, I'm trying to use your script in Libreelec/Openelec and encounter the following error.

python sd2xml.py -u ### -p ### -m

Manage Account Options:

  1. List subscribed lineups
  2. Add lineup
  3. Remove lineup
  4. List lineup channels.

Choose an option or 'x' to exit.

2

Add Lineup

Enter 5-digit zip or postal code or 'x' to cancel:

12345 {obviously not real}
2016-08-31 16:47:37,318 root ERROR {"response":"NO_LINEUPS","code":4102,"serverID":"20141201.web.2","message":"No lineups have been added to this account.","datetime":"2016-08-31T21:47:37Z"}
Traceback (most recent call last):
File "sd2xmltv.py", line 362, in
main()
File "sd2xmltv.py", line 356, in main
app.manage()
File "sd2xmltv.py", line 62, in manage
self._sd.manage()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 298, in manage
self._add_lineup()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 330, in _add_lineup
subscribed_lineups = self.get_subscribed_lineups()
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/schedulesdirect.py", line 70, in get_subscribed_lineups
lineups_dict = api.get_subscribed_lineups(self._token)
File "/storage/.kodi/addons/tools.module.sd2xmltv/libschedulesdirect/api.py", line 70, in get_subscribed_lineups
if "response" in response and response["response"] == "NO_LINEUPS":
TypeError: string indices must be integers, not str

Add channel icon functionality

Compatibility with various skins needs to be addressed. Most icons have transparency and will not display properly on some skins. Perhaps programmatically adding a grey background will address this issue.

sqlite3.connect fails @ libschedulesdirect/cache.py line 13

Your described use case is exactly the same as mine. Trying this I get
sqlite3.OperationalError: unable to open database file

Is there something I should be doing to set up the initial database?
The options don't include an option for the DB path just the output path.

Sorry if this is just an I don't know python question but that may be a lot of it.

Thanks for doing this, I've tried to make a perl add-on to run the xmltv projects dd_na grabber but the dependencies are out of control.

Not an issue - just a thank you!

Wasn't sure where else to write this -- but thank you for creating this! This addon needs to get into the standard Kodi repository. At the very least - it needs to be in the LibreELEC and Openelec repositories. This really solves an issue with EPG in North America and running a grabber on the same machine that TVheadend is on!!

Is there a way to help out with the genre/category section?

Also - definitely looking forward to having the icon pull work as well - that seems to work for mc2xml which is what I had been using before finding your great work!

Is it possible to add "new" notification to data?

I believe the common usage is to use an asterik * to mark new programs. Is there a way to enable this option?

**** you can close this...I've noticed that the "New" information is being passed to the XMLTV file. The issue is with Tvheadend not reading that info correctly.

Line endings

Not sure why but when cloning on Linux / Mac the line endings default to Windows (^M) not Unix.

Running the command sed -i -e 's/\r/\n/g' filename fixes the problem, but it's worth fixing .gitattributes or writing the file correctly so that git will autodetect the file type.

Python AttributeError

I'm seeing a python error as follows:

./sd2xmltv.py -u myuser -p mypassword -m
2017-05-20 11:27:56,755 sd2xmltv INFO     Getting SchedulesDirect token.
2017-05-20 11:27:59,437 sd2xmltv INFO     Getting SchedulesDirect status.
2017-05-20 11:28:01,276 sd2xmltv INFO     Account will expire on 2017-12-31 11:59:59 (X days).
2017-05-20 11:28:01,277 sd2xmltv INFO     SchedulesDirect last update at 2017-05-20 15:15:11 (3 hours 12 minutes ago).
2017-05-20 11:28:01,278 sd2xmltv INFO     Message: No known issues.

Manage Account Options:

1. List subscribed lineups
2. Add lineup
3. Remove lineup
4. List lineup channels.

Choose an option or 'x' to exit.
> 2

Add Lineup

Enter 3-character country/region code or 'x' to cancel:
> us
Enter zip/postal code or 'x' to cancel:
> 90210
Traceback (most recent call last):
  File "./sd2xmltv.py", line 376, in 
    main()
  File "./sd2xmltv.py", line 370, in main
    app.manage()
  File "./sd2xmltv.py", line 62, in manage
    self._sd.manage()
  File "/home/hts/sd2xmltv/libschedulesdirect/schedulesdirect.py", line 306, in manage
    self._add_lineup()
  File "/home/hts/sd2xmltv/libschedulesdirect/schedulesdirect.py", line 336, in _add_lineup
    headends = self.get_headends_by_postal_code(country_code, postal_code)
  File "/home/hts/sd2xmltv/libschedulesdirect/schedulesdirect.py", line 61, in get_headends_by_postal_code
    return [Headend.from_dict(headend) for headend in headends_dict]
  File "/home/hts/sd2xmltv/libschedulesdirect/common/headend.py", line 30, in from_dict
    headend.headend_id = dct.pop("headend")
AttributeError: 'unicode' object has no attribute 'pop'

Dependencies list?

HI,

I understand it has been years since an update on this, but I"m trying to set this up and I have missing dependencies, and I have no idea how to solve them. I've installed python-xmltv in a venv, but I get this error when launching the script from the same venv.

python3 ./sd2xmltv.py --username crono141 --password leoj123 [--output ./xmltv.xml] [--days 14]Traceback (most recent call last):
File "/home/crono141/sd2xmltv/./sd2xmltv.py", line 7, in
from xmltv import XmltvChannel, XmltvProgramme, XmltvWriter
File "/home/crono141/sd2xmltv/xmltv/init.py", line 24, in
from xmltvdocument import XmltvDocument
ModuleNotFoundError: No module named 'xmltvdocument'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.