MP2 - Source code for TvEngine3? (currently only available as package) (1 Viewer)

Tuggax

Portal Member
June 16, 2017
5
9
Australia Australia
I very recently downloaded the source code for MP2 and wanted to experiment and tweak the recording logic (i.e. change how the different "ScheduleRecordingType(s)" work) on my home setup.

Unfortunately, in MP2 the tv engine is only available as a package (MediaPortal\Packages\MediaPortal.TvEngine.Core3.3.0.16.2\lib) so I'm unable to perform my tweaks.

Is the code for this package publicly available and if so how can I download it?

Thanks in advance!
 

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,390
    6,966
    Germany Germany
    Country flag
    @Tuggax did you come further with my information?

    I'm curious to know you intentions, what do you plan to change? Did you create an own fork yet for development?
     

    Tuggax

    Portal Member
    June 16, 2017
    5
    9
    Australia Australia
    Thank you @morpheus_xx for your earlier reply, your link was exactly what I was trying to get.

    I initially just took a copy of the source code to see it I could get it compiling and after some trial and error I was up and running.

    Firstly, a brief description of the problem I'm trying to solve:

    In Australia (where I live) the TV guide is lacking important information and TV shows are constantly changing their airing time week-to-week.

    The main problem with the TV guide and program scheduling is as follows:

    1) The TV guide doesn't contain series or episode information (so I can't filter out duplicates).

    2) Popular (i.e. reality TV and nightly current affair) shows often air at night time and than again around lunchtime the following day.

    3) The shows that repeat at lunchtime have the exact same title as the original

    4) Reality shows will often air at 19:00 on weekdays and 19:30 on Sunday nights (and once eliminations start will air only Sun & Mon etc)​

    As a result I either forced to use the "Record Every Time" schedules and get stuck with multiple repeats or alternatively I have to manually (on a weekly basis) set up recordings to account for time shifts in air time.

    My solution:

    For the three schedules types (EveryTimeOnThisChannel, EveryTimeOnEveryChannel, WeeklyEveryTimeOnThisChannel) that record on title (and not time) I have implemented an optional "recording time window" for the schedule.

    Note, this was an option I used in MCE all the time (before I switched to Windows 10 & MP2).

    When enabled, only shows that match with the title and additionally fall within this "recording time window" are recorded. It's still work in progress but so far is working exactly as I had hoped and even shows the filtered list correctly in both MP and Kodi GUIs.

    As an example, I've created a EveryTimeOnThisChannel schedule to record "The Voice" at 19:30 and have a 4 hr recording window (2 hours before/after the start time). This now successfully avoids recording the lunchtime airings and at the same time is also recording the Sunday 19:00 show.

    Lastly, today I created myself a GitHub account, forked your code and clone to my hard drive.

    Hopefully will find some time soon to checkin my changes (made so far) and to see if this is of interest to the MP2 community.

    Cheers!
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,615
    2,385
    Stuttgart
    Germany Germany
    Country flag
    For the three schedules types (EveryTimeOnThisChannel, EveryTimeOnEveryChannel, WeeklyEveryTimeOnThisChannel) that record on title (and not time) I have implemented an optional "recording time window" for the schedule.

    Note, this was an option I used in MCE all the time (before I switched to Windows 10 & MP2).

    When enabled, only shows that match with the title and additionally fall within this "recording time window" are recorded. It's still work in progress but so far is working exactly as I had hoped and even shows the filtered list correctly in both MP and Kodi GUIs.

    As an example, I've created a EveryTimeOnThisChannel schedule to record "The Voice" at 19:30 and have a 4 hr recording window (2 hours before/after the start time). This now successfully avoids recording the lunchtime airings and at the same time is also recording the Sunday 19:00 show.
    Is this not, what @Brownard has just implemented 1-2 weeks before? (But not visible for public),
     

    HTPCSourcer

    MP2 Product Manager
  • Team MediaPortal
  • May 16, 2008
    11,431
    2,333
    Germany Germany
    Country flag
    Is this not, what @Brownard has just implemented 1-2 weeks before?
    @Brownard's work added manual schedules to record a certain time window independently of the guide content. This allows recording even if there is no guide content at all, but it won't record any specific show only.

    @Tuggax is adding functionality to record a given show - guide content required! - within a predefined time window. It would be interesting to see this in practice to better assess the behavior.

    But not visible for public
    The test builds are accessible, aren't they? So @Tuggax could also use the latest WiP 2.1.1 version.

    @Tuggax , in the end you are doing something that under MP1 can be achieved with the Plugin TvWishList. It might be worthwhile to look at the description of it in the MP1 section to understand what it does. Among others you can define shows that you won't to be automatically scheduled, based on title, channel, time, format, and much more. It also allows the use of RegEx definitions, hence its scope is pretty unlimited.

    There had been some work to port it to MP2 but it stalled and currently nobody is working on it. We would more than appreciate if you managed to bring this back on stream.
     

    Tuggax

    Portal Member
    June 16, 2017
    5
    9
    Australia Australia
    @HTPCSourcer, thanks for the information.

    I'll try and have a look into TvWishList when I get the chance.

    In the meantime, I checked in my WIP changes into my fork:

    GitHub - Tuggax/MediaPortal-1: MediaPortal turns your HTPC into a very advanced media center, or Home Theater PC (HTPC)

    At this early stage I've updated the TvEngine to only record matching titles that fall inside a 4 hour window (2 hrs either side of the schedule's startTime).

    The 4 hour window is currently hard coded so further development is required and would include:

    1) Having the window time setting (currently defined as minute offset from start time - 120 mins [2hrs]) saved in the database (i.e. New column in the schedule table with a default of 0. A zero value indicates there is no offset defined and it would record all shows regardless of time)

    2) Update the schedule interfaces to allow this property to be set and updated

    3) Update MP2 and Kodi GUIs to allow this option to be set
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,390
    6,966
    Germany Germany
    Country flag
    One question to the logic:
    I think it would be better to have an option to use this filtering or not. Personally I record all airings of episodes, because there are less ads in repeated airings at night. So adding the filter generally would break this.

    I also recommend a look at TVWhishList, its a plugin and would not require changes to the core logic.
     

    Tuggax

    Portal Member
    June 16, 2017
    5
    9
    Australia Australia
    To clarify, in production code (i.e. code checked into the main dev branch) the default setting would be 0 which would NOT perform any filtering and leave the functionality exactly how it is in the current release (Record ALL matching titles).

    Likewise, GUIs would need to be updated to include an extra DropDownList option with the default setting set to record All Shows (i.e. setting the property to 0 and thus no filtering)

    An example of the DropDownList option:

    Shows to record => [All Shows], [30 mins either side of Start Time], [60 mins either side of Start Time], [90 mins either side of Start Time], [120 mins either side of Start Time]

    And just to be clear, [All Shows] == 0 in the code.

    However, in my fork, for test purposes only I currently have it hard coded to 120 mins either side of the start time and in my home (kodi front end) setup and it works just great (if I do say so myself ;-)

    Does that make more sense?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    H MP2 database won't keep in synch with recordings General 2
    H [solved] MP2 Wiedergabe von Aufnahmen und Live TV geht nicht Allgemeines Support- und Diskussionsforum 6
    ge2301 [WiP] MP2Web - A platform independent web client for MP2 MediaPortal 2 57
    F Problems with new install of MP2 Newcomers Forum 3
    catalpa Bug MP2-837 Allgemeines Support- und Diskussionsforum 2
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    bigboss97 Does anyone has a SoundGraph imon remote file for MP2 to share? General 0
    ge2301 Android based client for MP2 MediaPortal 2 3
    R MP2 GUI Issues General 7
    P [solved] MP2 new install, 2 x hdhomerun tuners, client on same PC unable to view TV & recordings Newcomers Forum 8
    Lichloathe MP2 importing keyart instead of poster General 0
    Lichloathe Trakt for MP2 question General 7
    C Streaming/transcoding MP2 vs MP1? General 1
    P MP 2 - Request to add an additional TV series Filename protocal Feature Requests 0
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    CyberSimian MP2 synchronising of stoptime MediaPortal 1 Talk 5
    M Initial Setup MP2 (On Wndows 10) General 2
    R [solved] MP2 Client ist extrem langsam Allgemeines Support- und Diskussionsforum 5
    D [solved] EPG Buddy for MP2 - Does it work? General 5
    T Amazon und Netflix in MP2 - Wie? Allgemeines Support- und Diskussionsforum 6
    J [solved] How to in MP2 General 19
    M [fixed] [MP2-831] 12h time format shown in TV Guide with Swedish language settings Submit: Bug Reports 27
    Volker MP2 Rewind / zurückspulen bei Live TV funktioniert nicht Allgemeines Support- und Diskussionsforum 3
    B [solved] MP2.2.3 TV Guide not scrolling with mouse wheel General 2
    T [solved] MP2 Switch off visualisation when listening to audio....PLEASE!!! General 23
    Similar threads

























    Top Bottom