Terje Bratland wrote:
> I understand (most of) this. But my problem is that even though it says s7.e6 it's not recognized as season 7, episode 6 by TVHeadend. It says I have no seasons in my database, only episodes.
If the info dialog in Tvheadend is displaying "s7.e6", then Tvheadend is in fact reading the season information and correctly parsing the XMLTV.
Perhaps there is some misunderstanding about terms here? What are you expecting a result to be? How is it not being recognized as a season in your database, even though it is displaying as one?
I'm not sure I fully understand Tvheadend's terminology, and it seems to contradict itself. I just ran my grabber, and this is what I get:
> 2017-08-21 13:15:53.002 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: grab /usr/bin/tv_grab_zz_sdjson_sqlite
> 2017-08-21 13:15:53.011 spawn: Executing "/usr/bin/tv_grab_zz_sdjson_sqlite"
> 2017-08-21 13:15:53.836 spawn: Opening the local database
> 2017-08-21 13:15:53.865 spawn: Obtaining authentication token for Schedules Direct
> 2017-08-21 13:15:54.581 spawn: Schedules Direct account expires on 2017-11-26T19:50:14
> 2017-08-21 13:15:54.581 spawn: Schedules Direct data last updated on 2017-08-21T18:15:51
> 2017-08-21 13:15:54.582 spawn: Downloading data from Schedules Direct
> 2017-08-21 13:15:54.583 spawn: not downloading lineups from Schedules Direct (data current)
> 2017-08-21 13:15:54.583 spawn: not downloading channel and station maps for lineup USA-CA04768-X (data current)
> 2017-08-21 13:15:54.584 spawn: not downloading station schedule hashes (data current)
> 2017-08-21 13:15:54.598 spawn: not downloading daily schedules (data current)
> 2017-08-21 13:15:54.813 spawn: not downloading programs (data current)
> 2017-08-21 13:15:55.079 spawn: not downloading programs for supplemental data (data current)
> 2017-08-21 13:15:55.079 spawn: Processing data and creating XMLTV output
> 2017-08-21 13:15:55.096 spawn: 177 channels processed
> 2017-08-21 13:16:33.003 epgdb: snapshot start
> 2017-08-21 13:16:33.396 epgdb: queued to save (size 62980276)
> 2017-08-21 13:16:33.396 epgdb: brands 0
> 2017-08-21 13:16:33.396 epgdb: seasons 4735
> 2017-08-21 13:16:33.396 epgdb: episodes 68188
> 2017-08-21 13:16:33.396 epgdb: broadcasts 86134
> 2017-08-21 13:16:33.396 epgdb: save start
> 2017-08-21 13:16:34.239 epgdb: stored (size 7612576)
> 2017-08-21 13:16:47.772 spawn: 90761 program schedules processed
> 2017-08-21 13:16:47.772 spawn: Pruning the local database
> 2017-08-21 13:16:50.955 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: grab took 58 seconds
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: parse took 11 seconds
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: channels tot= 177 new= 0 mod= 4
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: brands tot= 0 new= 0 mod= 0
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: seasons tot=81842 new=81842 mod=81842
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: episodes tot=86131 new=48552 mod=48553
> 2017-08-21 13:17:03.365 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: broadcasts tot=86131 new= 3 mod= 3
As you can see, there's a discrepency between what is reported by my grabber (the lines prefaced with "spawn"), Tvheadend's XMLTV parser (those prefaced with "xmltv") and Tvheadend's internal EPG (those marked "epgdb"). None of them seem to match, and the number of items is not consistent.
Perhaps it's time for a refactoring or restructuring of Tvheadend's EPG DB, making it a bit easier to extend, and allowing all functions of it to apply regardless of source. (Series-link type recordings, incomplete mappings from XMLTV to Tvheadend, allowing other grabbers/sources to directly interact with the database ...)