1.14.0 Recordings import assigns wrong channels (1 Viewer)

Johannes Franke

New Member
January 11, 2016
3
0
Home Country
Germany Germany
Hi everyone,

I found a problem with MP 1.9.0 which apparently is still around with 1.13.0 and wanted to let you know about my findings.
I have a DVB-S setup (Hauppauge Win-TV 5500 HVR) and the previous scan revealed a lot of TV and radio stations. The scanner appears to add the radio stations first into the channels table so they get a lower record ID than the TV stations which reside in the same table. This is the result of a SELECT * FROM channel WHERE displayName = 'RTL2'

Code:
idChannel isRadio isTv timesWatched   totalTimeWatched  grabEpg lastGrabTime     sortOrder visibleInGuide externalId displayName epgHasGaps channelNumber
      142       1    0             0  01.01.2000 00:00        0 01.01.2000 00:00     10000              1            RTL2                 0         10000
      384       0    1             0  01.01.2000 00:00        1 11.01.2016 11:06         5              1            RTL2                 0         10000

I picked RTL2 because it is where I found the issue. But this is just a representative example. The problem will occur whenever a radio and TV station share the same displayName.
Recordings are supposed to go to a large harddrive that does not contain the Windows system installation. So the recordings base folder had to be redirected to the other harddrive. After that, I cleared all invalid records in the configuration wizard and clicked Change Channel to refresh the list of available recordings for import. All are shown as expected. Just to mention it, each .ts file has an accompanying .xml file containing the recording info.
After importing them, I found that not all recordings are shown in the MediaPortal client, even though a record for each exists in the recording table, and no files remained in the list of files to be imported. The ones not shown both have idChannel = 142.
I imagine that the following happened during the import:

  1. for each .ts file, the respective .xml file is looked up and, if found, parsed
  2. the .xml file has the channel name in it
  3. the channel name is looked up by name (displayName, to be exact) in the channel table
  4. actually this would result in multiple channel records matching but the first wins which unfortunately is the radio channel, not the TV
  5. the id of the first channel record is used for the new record in the recordings table and goes into the idChannel column
  6. when MediaPortal queries the available recordings, there is probably an inner join between the recordings and the channels table that excludes the radio-related channels
  7. as a result, the list of recordings is incomplete
Probably this might be fixed if in step 3 the query would be changed to retrieve the channel matching the given name AND having isTv = 1. Eventually this is all about video recordings, not radio (at least for me). Unfortunately, the actual source of the recording (radio or TV) cannot be found out from the XML data because there is no respective information in there. But at least a small analysis of the .ts file might reveal whether it contains pure audio (--> radio) or audio and video (--> TV).
So far, the only fix is changing the idChannel value from 142 to 384 wherever 142 is assigned...

The problem has been around for some time. Maybe I am not the first one to notice and address it. In that case, sorry for the time wasted.

Best regards,
Johannes
 

Users who are viewing this thread

Top Bottom