Skip to content

fix summary - #1077

Closed
Belfagor2005 wants to merge 7 commits into
OpenPLi:python3from
OwnerPlugins:python3
Closed

fix summary#1077
Belfagor2005 wants to merge 7 commits into
OpenPLi:python3from
OwnerPlugins:python3

Conversation

@Belfagor2005

Copy link
Copy Markdown
Contributor

The code used the Python 2 cmp() function, which doesn't exist in Python 3.
Fix: Replaced with functools.cmp_to_key() or key functions for sort().
'<' not supported between instances of 'str' and 'float'.
Problem: The byDateFunc() function sometimes returned a float (timestamp) and sometimes a string (fallback to name).
Fix: Used a tuple (priority, value) to ensure consistent sorting:
(0, timestamp) for elements with a valid date.
(1, name) for elements without a date.

Il codice usava la funzione cmp() di Python 2 che non esiste in Python 3
Fix: Sostituito con functools.cmp_to_key() oppure con funzioni key per sort()
'<' not supported between instances of 'str' and 'float'
Problema: La funzione byDateFunc() restituiva a volte float (timestamp) e a volte string (fallback su nome)
Fix: Usato una tupla (priority, value) per garantire ordinamento coerente:
(0, timestamp) per elementi con data valida
(1, nome) per elementi senza data
@Hains

Hains commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

Where is cmp() ? What is the actually fix? Seems a copy/pase from OE-A (but I could be wrong).

@Belfagor2005

Copy link
Copy Markdown
Contributor Author

you have right..
i change cmp with correct code..
I tested on last openpli9 and all work same.
i pul new code ..
wait

@Belfagor2005

Copy link
Copy Markdown
Contributor Author

for me work..
actrual fix compare..
On 1 message are

The code used the Python 2 cmp() function, which doesn't exist in Python 3.
Fix: Replaced with functools.cmp_to_key() or key functions for sort().
'<' not supported between instances of 'str' and 'float'.
Problem: The byDateFunc() function sometimes returned a float (timestamp) and sometimes a string (fallback to name).
Fix: Used a tuple (priority, value) to ensure consistent sorting:
(0, timestamp) for elements with a valid date.
(1, name) for elements without a date.

thank's

@WanWizard

Copy link
Copy Markdown
Member

@Hains This is still open, is this still relevant? And if so, can it be merged (squashed to remove those merge commits)?

Change poster visibility in imdb/src/plugin.py for the TitleReviewsRefine branch: replace self["poster"].show() with self["poster"].hide(). Ensures the poster is hidden when extra/details/cast labels are displayed, keeping the UI consistent.
@WanWizard

Copy link
Copy Markdown
Member

This PR is becoming a right mess, and now you sneak an IMDB change in here?

@Belfagor2005

Copy link
Copy Markdown
Contributor Author

Not secretly, I had no idea it was open on another PR.
Delete, close, you decide.

@WanWizard

Copy link
Copy Markdown
Member

Ah, ok.

Need to close this, can't do partial merges in Github.

@WanWizard WanWizard closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants