Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 5 of 5

Thread: Changing the defaults used when an Autotimer is created via the REC button menu

  1. #1

    Title
    Junior Member
    Join Date
    Jun 2022
    Posts
    7
    Thanks
    1
    Thanked 1 Time in 1 Post

    Changing the defaults used when an Autotimer is created via the REC button menu

    I am using the default skin (Vix-Night-1080 skin) and I would like to change the defaults that are used when an Autotimer is created via the REC button "Timer menu". The default creates an Autotimer with the "Restrict to Days" set to "Enabled" and I would like to change it so that it defaults to "Disabled", ie any Autotimer set up via the Rec Button menu will repeat every day.
    I've not found an option for this (have I missed it?) so I suspect its hardcoded somewhere.
    I am not familiar with Python but looking through the Openvix repository I think the relevent code are lines 267-270 in EpgSelectionBase.py

    def addAutoTimerSilent(self, event, service):
    try:
    from Plugins.Extensions.AutoTimer.AutoTimerEditor import addAutotimerFromEventSilent
    addAutotimerFromEventSilent(self.session, evt=event, service=service)


    Could someone be kind enough to answer the following:

    1. I've probably missed it, but where is the code for Plugins.Extensions.AutoTimer.AutoTimerEditor held?
    2. Other than Day/time (I assume) what other data is in the event parameter?
    3. Is there a guide/posting on to how to debug python code running on an Enigma box, ie how do you see the contents of varibles, set breakpoints etc. etc?

    Any help gratefully received.

  2. #2
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    11,988
    Thanks
    1,906
    Thanked 4,209 Times in 2,786 Posts
    1. At oe-alliance/enigma2-plugins.

    3. Print(var). You will see print statements everywhere in the code. Switch on debug logs in the system menu. Download the logs from the receiver by ftp. The print statements will be in the logs.

  3. #3
    adm's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Sep 2014
    Location
    Southend on Sea, UK
    Posts
    1,390
    Thanks
    48
    Thanked 518 Times in 401 Posts
    Quote Originally Posted by AB2022 View Post
    I am using the default skin (Vix-Night-1080 skin) and I would like to change the defaults that are used when an Autotimer is created via the REC button "Timer menu". The default creates an Autotimer with the "Restrict to Days" set to "Enabled" and I would like to change it so that it defaults to "Disabled", ie any Autotimer set up via the Rec Button menu will repeat every day.
    I've not found an option for this (have I missed it?) so I suspect its hardcoded somewhere.
    Maybe

    menu/timers/autotimers/press menu again/Edit new timer defaults
    Xtrend ET10K, 2 x satellite tuners 28.2 (Sky FTA), 2 x hybrid (UK Freeview), Zgemma H9S (satellite)

  4. #4

    Title
    Junior Member
    Join Date
    Jun 2022
    Posts
    7
    Thanks
    1
    Thanked 1 Time in 1 Post
    Huevos - tx for the reply - I shall investigate and see what I can find out.
    adm - tx for the suggestion - unfortunately though you can set a default for "Restrict to days" in that menu, it then gets superceded when a Autotimer is created via the REC button.

  5. #5

    Title
    Junior Member
    Join Date
    Jun 2022
    Posts
    7
    Thanks
    1
    Thanked 1 Time in 1 Post
    Just an update if anyone is interested
    After some trial and error it turned out to be a simple change to get the Autotimers created via the REC button to record everyday. All you need to do is comment out line 1739 in AutoTimerEditor.py (found in https://github.com/oe-alliance/enigm.../autotimer/src)
    so the statement
    newTimer.include = includes
    is changed to
    #newTimer.include = includes

    This stops the default Autotimer "Use other Filters" setting being overwritten to include a Day filter.

    However the change makes the Autotimer created via the REC button record the program on any day at ANY time so it will record repeats if they are shown at a different time on the same/different day.

    If you don't want this it can be partially overcome by setting the Autotimer Default (menu/timers/autotimers/press menu again/ Edit new timer defaults ) "Only match during timespan" to "enable" (ignoring the resulting Begin & End timespan times that are then displayed as they will be replaced with EPG data when the autotimer is set).
    This will confine the Autotimer to record the program on any day if it starts within a time window of 60 min before the scheduled start and 60 min after the scheduled end. eg if the program selected in the EPG starts at 8pm and is 30 min long, the Autotimer will look for the program everyday between 7pm (start - 60min) & 9.30pm (end + 60min).
    The +/- 60min is hardcoded so if you want an narrower time window you need to amend lines 1717 & 1718 in AutoTimerEditor.py

    1717 begin = evt.getBeginTime() - 3600
    1718 end = begin + evt.getDuration() + 7200

    Line 1717 sets the start of the window so change 3600 to the number of secs before the scheduled start that you want.
    Line 1718 sets the end of the window so change 7200 to the number of secs after the scheduled End that you want the window to end PLUS the number you used in line 1717.
    For example I've gone for a window that starts 10 min before and ends 10min after the program so I replaced 3600 in 1717 with 600 and 7200 in 1718 with 1200 (ie 600 + the 600 from line 1717).

    Just for completeness I also amended the descriptions in the Timer Menu that appears when REC button is pressed to better reflect the new Timer behaviour by amending lines 347 and 348 in EpgSelectionBase.py (found in https://github.com/OpenViX/enigma2/b...lectionBase.py )

    347 [[_("Add Timer"), addTimerFromEventSilent, self.session, self.refreshTimerActionButton, event, service],
    ("Add Timer") changed to ("Record Once")

    348 [_("Add AutoTimer"), self.addAutoTimerSilent, event, service]])
    ("Add Autotimer") to ("Record Repeating")

    I'm assuming that if a future Openvix update contains changes made to either AutoTimerEditor or EpgSelectionBase my changes will be overwritten and I will need to repeat the above changes using the NEW source files?
    Last edited by AB2022; 23-06-22 at 16:10.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.