EPG/Scheduler case sensitive (1 Viewer)

fstruijs

MP Donator
  • Premium Supporter
  • January 20, 2009
    24
    1
    Breda
    Netherlands Netherlands
    Country flag
    Hello,

    Recently I have noticed that sometimes TV programs are not recorded because the EPG does not consistently use uppercase or lowercase characters in the program name. Is it possible to make the scheduler in MediaPortal not case sensitive?

    Kind regards,
    Frank
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,252
    2,599
    Stuttgart
    Germany Germany
    Country flag
    Hello,

    Recently I have noticed that sometimes TV programs are not recorded because the EPG does not consistently use uppercase or lowercase characters in the program name. Is it possible to make the scheduler in MediaPortal not case sensitive?

    Kind regards,
    Frank
    @morpheus_xx is that possible?
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,722
    7,104
    Germany Germany
    Country flag
    Recently I have noticed that sometimes TV programs are not recorded because the EPG does not consistently use uppercase or lowercase characters in the program name. Is it possible to make the scheduler in MediaPortal not case sensitive?
    Can you please explain this a bit further? What kind of schedule did you add? What was the original title, what the wrong cased one?

    SQLite does support NOCASE collation, but it seems to work only with ASCII characters. See here for issues with France words How to set Sqlite3 to be case insensitive when string comparing?.

    For the main MP2 database we use our own collation (like here), which does in principle use C# method to do comparing and sorting. But IIRC it has to be registered before the actual tables are created.
     

    fstruijs

    MP Donator
  • Premium Supporter
  • January 20, 2009
    24
    1
    Breda
    Netherlands Netherlands
    Country flag
    Hi,

    I added a recurring recording schedule from the TV Guide in MP2.

    While adding the recording, I choose the option "record every time on this channel".

    Sometimes, MP2 doesn't record a program because in the TV-Guide (EPG) a lowercase character has been replaced by an uppercase (or the other way around). The provider (who delivers the EPG) is not consistently using exactly the same name for the program.

    For example, I create a recurring recording for "Wheeler Dealers" on Discovery channel. That works fine, until Ziggo, my TV provider, decides to announce the program in the EPG as "Wheeler dealers".

    As a workaround, I create a second recording (see attachments, screen copy from Schedules in the setup tool), but I think this should not be happening.

    Regards,
    Frank
     

    Attachments

    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,236
    1,353
    Southampton
    United Kingdom United Kingdom
    Country flag
    Recently I have noticed that sometimes TV programs are not recorded because the EPG does not consistently use uppercase or lowercase characters in the program name
    Can you please explain this a bit further?
    I recollect this being a problem years ago, when I first started using MP (2014). But I have not noticed it as a problem in recent years (with MP1). However...

    Tonight I scheduled to record a weekly programme that showed precisely this problem. Look at the screen shot below. It is the "Upcoming Episodes" panel in MP1, and if you look closely you will see that lines 1 and 2 in the list spell the title differently from lines 3 and 4 -- the spelling of "the" differs:

    upcoming_episodes.jpg

    However, when TV Server searched the EPG in order to generate the list of upcoming episodes, it clearly did so using a case-insensitive comparison (so it found both spellings of the title). But now look at the red dot at the end of line 1. I scheduled this recording as "weekly on this day of the week", so line 3 should also have a red dot, but it does not. So does this mean that TV Server has failed to schedule the episode with the different spelling? No. :eek:

    Look at the following two screen shots. The one on the left shows the EPG for today, and the screen shot on the right shows the EPG for 7 days from now. Notice that the programme that I scheduled is displayed in red in both screen shots. This indicates that both episodes are scheduled to record:

    epg_today.jpg epg_7_days_ahead.jpg

    So, my conclusion is that in MP1 the only error is that on the "Upcoming Episodes" panel TV Server does not flag correctly the episodes that are scheduled to record -- line 3 is missing the red dot. But the episodes will nevertheless record correctly.

    If MP2 does not record these differently spelled episodes, possibly the MP2 version of TV Server is missing a fix that is present in the MP1 version of TV Server?

    -- from CyberSimian in the UK
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,722
    7,104
    Germany Germany
    Country flag
    Thanks @fstruijs and @CyberSimian for details.

    @CyberSimian, when you are checking this in MP1, what database is used? Probably MySQL. Can you please check how the "programs" table is defined in regards of default charater set and also used collation? See here for details.

    If MySQL uses case insensitive collation here, this has to be ported over to SQLite as well. This can be done by using the custom functions for sorting as I wrote above. Problem is the way TVE3 in MP2 does create the database: it simply copies over an empty template database if none is present. This means we need to create a new template with custom collation and require users to fully setup the TV part again (maybe doing export/import, but anyway a manual process).

    With TVE3.5/EFCore/(x64) I do no longer need this, it creates a new database from code. So we have more control over this process.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,294
    3,777
    Lehmden
    Germany Germany
    Country flag
    Hi.
    require users to fully setup the TV part again
    Most likely this can be avoided by using SQL commands (simple batch script probably running after installation or with a SQLite GUI) on the database. Something like "Alter Column"
    Example from here:
    SQL:
    ALTER TABLE dbo.MyTable
    ALTER COLUMN CharCol VARCHAR(50) COLLATE Latin1_General_100_CI_AI_SC_UTF8
    I yet don't know exactly what to do but I'm sure I would find something and not redo the whole TV database for this...
     

    fstruijs

    MP Donator
  • Premium Supporter
  • January 20, 2009
    24
    1
    Breda
    Netherlands Netherlands
    Country flag
    Gents,

    Thanks for your help.

    Is there anything I can do? Testing, implementing workaround, reproducing, providing logging, etc ...?

    Regards,
    Frank
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,236
    1,353
    Southampton
    United Kingdom United Kingdom
    Country flag
    Can you please check how the "programs" table is defined in regards of default charater set and also used collation?
    Firstly, I know nothing about SQL :eek:. However, I have previously downloaded the MP source code and unzipped it. Looking at that, I have this folder:

    D:\mpsrc\1_25f\MediaPortal-1-master\TvEngine3\TVLibrary\SetupTv

    This folder contains various SQL files, one of which is "create_mysql_database.sql". Looking in that, I find a definition for the "Program" table, namely this one:

    Code:
    --
    -- Definition of table "Program"
    --
    CREATE TABLE "Program" (
      "idProgram" int(11) NOT NULL auto_increment,
      "idChannel" int(11) NOT NULL,
      "startTime" datetime NOT NULL,
      "endTime" datetime NOT NULL,
      "title" varchar(2000) NOT NULL,
      "description" text NOT NULL,
      "seriesNum" varchar(200) NOT NULL,
      "episodeNum" varchar(200) NOT NULL,
      "genre" varchar(200) NOT NULL,
      "originalAirDate" datetime NOT NULL,
      "classification" varchar(200) NOT NULL,
      "starRating" int(11) NOT NULL,
      "notify" bit(1) NOT NULL,
      "parentalRating" int(11) NOT NULL,
      PRIMARY KEY  ("idProgram"),
      UNIQUE KEY "idProgramBeginEnd" ("idChannel","startTime","endTime")
    ) ENGINE=INNODB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
    #

    So CHARSET is specified , but COLLATE is not. I searched the entire file to see if COLLATE was specified anywhere (I searched for the string "collat"). There are several occurrences, but they look to me as though they are commented out, as they occur within /* */ pairs (are those comment delimiters in SQL?).

    -- from CyberSimian in the UK
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,722
    7,104
    Germany Germany
    Country flag
    Hi.

    Most likely this can be avoided by using SQL commands (simple batch script probably running after installation or with a SQLite GUI) on the database. Something like "Alter Column"
    Example from here:
    SQL:
    ALTER TABLE dbo.MyTable
    ALTER COLUMN CharCol VARCHAR(50) COLLATE Latin1_General_100_CI_AI_SC_UTF8
    I yet don't know exactly what to do but I'm sure I would find something and not redo the whole TV database for this...
    Yes this is usually the way to go. But unfortunately this is not supported in SQLite. You have to do it in multiple steps (rename, add, update, drop).

    Is there anything I can do? Testing, implementing workaround, reproducing, providing logging, etc ...?
    Can you zip and upload your database file here? It's stored as: C:\ProgramData\Team MediaPortal\MP2-Server\Database\MP2TVE_3.s3db.

    I will try to do the changes manually to Programs table only.
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    D Problem getting Schedules Direct EPG to load data Installation, configuration support 4
    G Q about scheduling weekly series when epg lists duplicate back to back episodes each week General Support 2
    J Understanding what EPG shows about schedules General 8
    M Guide mapping schedules direct, tvguide, epg buddy How to get correct entry to the correct channel? Electronic Program Guide 0
    P EPG Schedule hours off TV-Server 0
    Jean R. How to schedule a recording based on date/time instead of EPG Newcomers Forum 2
    A Few "Continuity error..." after EPG scan General Support 2
    R 1.27.0 Digiguide for epg for DVBS Electronic Program Guide 0
    CyberSimian Split programmes in the UK DVB-T EPG TV-Server 0
    C MP2 - V2.3.1 EPG view: incorrect displayed fonts Submit: Bug Reports 2
    R Deadlock in TV Server if recording while importing EPG TV-Server 10
    C MP2 - V2.3 Nereus: EPG context menu not available anymore at a running program General 8
    P MP2 - V2.3 EPG Frustration................ General 26
    cbr954rr Clickfinder epg import wrong channels? General 0
    cbr954rr EPG Genre map categories do not match tv server categories General 4
    cbr954rr Rename epg-genre category General 5
    M Add Radio channels and EPG to Mediaportal xmlTV 3
    M EPG color by length of TV-show MediaPortal 1 Talk 1
    D Downloading EPG XML file: Installation, configuration support 0
    D EPG No Data General Support 2
    D [solved] EPG Data off by -20 hours? General 10
    F Mini EPG more information? WMC Skin 4
    N No TV or EPG on fresh install General 0
    framug No color in TVGuide when XMLTV without DVB EPG MediaPortal 1 Talk 59
    T Freesat EPG in UK anyone? Electronic Program Guide 78

    Similar threads

    Top Bottom