Posts by Andro1

    Changes Added to Version 5 (Compared to Version 4)

    1. Addition of no_event_counter Variable:
      • The variable no_event_counter was added to track the number of consecutive failed attempts to find an event.
      • Purpose: To monitor how many times the search fails to find an event within the specified time range.
    2. Addition of max_no_event_attempts Variable:
      • The variable max_no_event_attempts (default value: 10) was added to set the maximum number of failed attempts before stopping the search.
      • Purpose: To prevent infinite searching in cases of large gaps in the event schedule.
    3. Modified Behavior When No Event Is Found:
      • In version 4, the search stopped immediately upon failure using a break statement.
      • In version 5, the behavior is enhanced:
        • total_offset is increased by self.max_search_offset (default: 4 hours) to advance to the next time period.
        • no_event_counter is incremented by one.
        • If no_event_counter reaches max_no_event_attempts, the loop exits using break.
    4. Resetting no_event_counter:
      • When an event is found, no_event_counter is reset to zero.
      • Purpose: To ensure that previous failed attempts do not affect subsequent searches, enabling fresh attempts.
    5. Improved Handling of Event Schedule Gaps:
      • These changes enhance the effectiveness of the event search logic, particularly for channels with periods of no events (e.g., downtime or gaps).
      • The search now spans multiple time periods (up to 10 attempts by default) instead of stopping at the first failure, improving performance for sparse event schedules.

    Final Changes:

    • Improved Performance: Enhanced event searching using Coarse and Fine steps to reduce delays and boost performance.

    • Prevented Duplicates: Tracked event IDs to ensure no duplicates occur.

    • Avoided Infinite Loops: Added a break to stop the loop when no further events are detected.
    • Added Clear Comments: Included code comments to explain the logic and highlight the changes made.

    After testing the codes EventList Converter and EventList Converter_2, I reused srvRef as follows:

    • Reusing "srvRef" improves memory usage and speed for intensive lookups

      By creating the service reference a single time and reusing it, you minimize per-iteration memory allocations and benefit from better cache locality, leading to faster, more memory-efficient EPG searches.

    My time is very busy, however, I’ve dedicated some of it to adding these new features and improvements.


    I truly appreciate the effort you’ve put in, and it was never my intention to make it seem like I ignored your work.

    My main focus was to complete my additions first and ensure they worked properly before reviewing any other changes.


    In r17, you’ll find that your changes from r15 have been merged with mine, along with some additional improvements.


    I had planned to add more features, such as a media browsing section for images and videos, additional reviews, and a new UI.

    However, due to my limited time, I’ll be satisfied with what I’ve done so far and leave it to other developers to add their touch.

    In version 0.1-r13, rating retrieval was added for both standard and advanced search methods.

    1. Error: TypeError: float() argument must be a string or a number

    When using JSON parsing in the IMDBquery function (config.plugins.imdb.parsingmethod.value == "json"), the following occurs:


    • Standard Search ("titleResults":{"results":):
    Code
    self.resultlist.append((str(result_txt), str(result['id']), posterurl, None))
    • Here, the rating (cur[3]) is set to None, causing the error in menuSelectionChanged because float(None) is invalid.


    • Advanced Search ("titleResults":{"titleListItems":):
    Code
    rating_txt = getJsonValues(result, ['ratingSummary', 'aggregateRating'], 0)
    self.resultlist.append((str(result_txt), str(imdb_id), posterurl, rating_txt))
    • In this case, the rating is retrieved correctly (as a number or defaults to 0), avoiding any issues.


    • Cause: The error arises because the rating in self.resultlist can be None during standard search, which is not a valid input for float().
    • Solution: To fix this, the rating in self.resultlist must always have a valid value (a string or number) instead of None. For the standard search, a temporary fix was implemented by assigning a default value of "0":
    Code
    rating_txt = getJsonValues(result, ['ratingSummary', 'aggregateRating'], "0")
    self.resultlist.append((str(result_txt), str(result['id']), posterurl, rating_txt))

    This ensures compatibility with float() and prevents the error. Note that this is a temporary solution until a method to accurately retrieve ratings in standard search is developed.

    2. Error: Insufficient memory (case 4)

    • Issue: This problem affects devices with limited memory (e.g., Dreambox 520). Large poster images (10 MB or more) exceed the device’s capacity, causing Enigma2 to restart without generating a log file.
    • Solution: A new option was added to allow users to select poster sizes:

      • 600px: Ideal for devices with very limited memory.
      • 1200px: A balanced choice for moderate-memory devices.
      • Original: Retained for high-capacity devices.

      This feature enables users to adjust poster resolution based on their device’s capabilities, effectively preventing memory-related crashes.

    Additional Notes

    • The attached plugin (version 0.1-r14) includes these fixes along with minor enhancements.

    Hi,


    I found some errors that need to be reviewed:

    Code
    TypeError: float() argument must be a string or a number
    Insufficient memory (case 4)

    I’ve attached the links where these errors occurred while using the standard search:

    Code
    [IMDB] downloading poster https://m.media-amazon.com/images/M/MV5BZWZlNGE3MjgtNTg4MS00M2NjLTg3NzYtMDNlOWUxNGUxNDhkXkEyXkFqcGc@._V1_.jpg to /tmp/poster.jpg
    [IMDB] showDetails() downloading query https://www.imdb.com/title/tt15000156/

    I’ve fixed it for now, but I’m sure you might have a better way to handle it. :winking_face:

    Maybe this was my mistake, as I tested these changes on an image that already had some differences from the original image. :winking_face:


    However, I found a solution for the original Images that maintains the correct "HH:MM - HH:MM" format while ensuring the text is fully displayed. Instead of relying solely on "00:00 - 00:000" to increase the width, I modified the code in the _buildOptionEntryAddTimeDisplay function as follows:

    With this modification:

    • I used "00:00 - 00:00" as the standard textTpl to match the actual "HH:MM - HH:MM" format.
    • I added a minimum width constraint (max(addtimedisplayWidth, 180)) to ensure enough space for the full text, regardless of font size or screen resolution.

    I tested this solution, and it works well on the original Image without truncating the text, while keeping the correct format. This way, we achieve the goal of calculating the optimal width without needing extra zeros like "00:000", which might not reflect the expected format.


    You might also consider making some adjustments to "buildOptionEntry" to ensure it aligns well with this modification.

    Thank you for your comment! I agree with you that the purpose of textTpl is to calculate the required width for the addtimedisplay text correctly, and the idea of using a string to determine the maximum width makes sense.

    However, I think "00:00 - 00:000" might not be the best choice here, as it doesn’t fully match the actual format of addtimedisplay, which is "HH:MM - HH:MM". Using "00:00 - 00:00" would be sufficient and more accurate to reflect the real format, or perhaps "88:88 - 88:88" if we want to ensure the maximum possible width with proportional fonts.

    Hi,


    I would like to report a formatting issue in the Service List file, located at:

    Code
    /usr/lib/enigma2/python/Components/ServiceList.py

    Issue:

    Within the _buildOptionEntryAddTimeDisplay function, the time display template is defined as:

    Code
    textTpl = "00:00 - 00:000"

    However, the time is actually formatted using:

    Code
    "%02d:%02d - %02d:%02d" % (beginTime[3], beginTime[4], endTime[3], endTime[4])

    This means both the start and end times should be displayed as two-digit values (HH:MM). The extra digit in the end time template ("00:000") is therefore incorrect.


    Impact:

    • The incorrect template may result in inaccurate width calculations.
    • It might also lead to inconsistent UI appearance.


    Suggested fix:

    Change the template to:

    Code
    textTpl = "00:00 - 00:00"

    This change will ensure that the display width is correctly calculated based on the actual time format.


    Best regards.

    Max11

    1. OpenGL ES Issues

    The following messages indicate that your DM520 does not support OpenGL ES:

    Code
    EGL Error: 0 ((null))
    eglGetDisplay not implemented!
    eglGetError not implemented!

    You can verify this by running the following command:

    Code
    journalctl | grep -i "OpenGL" >> /media/hdd/OpenGL.log &

    2. ConfigEnableDisable Warning

    This warning appears because some plugins, such as SoftwareManager and XStreamity, still use ConfigEnableDisable, which has been replaced by ConfigOnOff.

    To fix this in SoftwareManager:

    1. Navigate to the plugin directory:
      Code
      /usr/lib/enigma2/python/Plugins/SystemPlugins/SoftwareManager


    2. Open the UpdateCheck.py file.
    3. Find ConfigEnableDisable and replace it with ConfigOnOff.
    4. Save the changes and restart Enigma2.

    3. Skin Errors

    Skin-related errors indicate that some files are missing from the default skin (skin_default).

    Solution:

    ✔ Manually create the missing files and add them to the path mentioned in the error message.

    ✔ Or, contact the author or switch to a compatible one.

    4. Spinner Issue

    The spinner (loading animation) error is caused by bad code, leading to an infinite loop of missing file errors.

    • Enigma2 keeps searching for files like wait10.png, wait11.png, etc., without stopping.

    Recommendation:

    🚨 This issue is harmless. You can ignore it! 🚨