Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add icons to movistar plus #2440

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

davidclaeysquinones
Copy link
Contributor

This PR adds program icons to the movistar provider

@davidclaeysquinones
Copy link
Contributor Author

This PR also includes some important fixes for the provider

@davidclaeysquinones
Copy link
Contributor Author

there is still some work to do with the images since the use of the new api

Copy link
Collaborator

@freearhey freearhey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failed:

npm test -- movistarplus.es  

> test
> run-script-os movistarplus.es


> test:default
> TZ=Pacific/Nauru npx jest --runInBand movistarplus.es

 FAIL  sites/movistarplus.es/movistarplus.es.test.js
  ✕ can generate valid url (9 ms)
  ✕ can parse response (2 ms)
  ✕ can handle empty guide

  ● can generate valid url

    expect(received).toBe(expected) // Object.is equality

    Expected: "https://www.movistarplus.es/programacion-tv/2022-03-11?v=json"
    Received: "https://comunicacion.movistarplus.es/wp-admin/admin-ajax.php"

      13 |
      14 | it('can generate valid url', () => {
    > 15 |   expect(url({ date })).toBe('https://www.movistarplus.es/programacion-tv/2022-03-11?v=json')
         |                         ^
      16 | })
      17 |
      18 | it('can parse response', () => {

      at Object.<anonymous> (sites/movistarplus.es/movistarplus.es.test.js:15:25)

  ● can parse response

    TypeError: Cannot read properties of undefined (reading 'length')

      87 |   const data = json.channelsProgram;
      88 |
    > 89 |   if(data.length != 1)
         |           ^
      90 |     return []
      91 |   return data[0];
      92 | }

      at parseItems (sites/movistarplus.es/movistarplus.es.config.js:89:11)
      at parser (sites/movistarplus.es/movistarplus.es.config.js:30:17)
      at Object.<anonymous> (sites/movistarplus.es/movistarplus.es.test.js:21:18)

  ● can handle empty guide

    TypeError: Cannot read properties of undefined (reading 'length')

      87 |   const data = json.channelsProgram;
      88 |
    > 89 |   if(data.length != 1)
         |           ^
      90 |     return []
      91 |   return data[0];
      92 | }

      at parseItems (sites/movistarplus.es/movistarplus.es.config.js:89:11)
      at parser (sites/movistarplus.es/movistarplus.es.config.js:30:17)
      at Object.<anonymous> (sites/movistarplus.es/movistarplus.es.test.js:49:18)

Test Suites: 1 failed, 1 total
Tests:       3 failed, 3 total
Snapshots:   0 total
Time:        3.614 s
Ran all test suites matching /movistarplus.es/i.

@davidclaeysquinones
Copy link
Contributor Author

davidclaeysquinones commented Nov 25, 2024

I'm aware that the test currently fails.
The underlying API's had to be changed in order to keep working.
I've had time to rework the code but not the tests.
Since now another API is used the test suite for this provider must be rewritten completely.

Edit:
The change is recent and since I noticed users where having issues I put the code into this PR so that they could be referred to it. I'm fully aware of the work that must be completed before being mergeable again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants