Giter VIP home page Giter VIP logo

Comments (18)

basrieter avatar basrieter commented on June 28, 2024 1

I added the badge and descriptions (not yet live stuff). Please check: https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1719.zip

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024 1

I added the live indicator: https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1719.zip

from plugin.video.retrospect.

create-issue-branch avatar create-issue-branch commented on June 28, 2024

Branch bug-1719 was created for issue: "SVTPlay missing description on Recent"

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

Please download https://github.com/retrospect-addon/plugin.video.retrospect/archive/refs/heads/bug-1719.zip and see if it fixes the issue.

from plugin.video.retrospect.

dobbelina avatar dobbelina commented on June 28, 2024

Thanks for the quick response.
Have downloaded bug-1719.zip.
Description has returned to items under Categories, however not on Recent
which is the main gateway for me using the addon.
It worked on the old api.

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

I have descriptions, but they are the same as the title.....but that is what the API gives me. So can't fix that:
image

from plugin.video.retrospect.

dobbelina avatar dobbelina commented on June 28, 2024

Thanks for trying.
Getting the description for Categories was a big improvement anyway, thanks.

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

I will create an update soon.

from plugin.video.retrospect.

matsarv avatar matsarv commented on June 28, 2024

The changes you made did the work. Now it picks up the wide thumbs and fanart with the text same as in the old API. Thanks for that.

I have looked into missing of the description and some more things like LIVE in Currently playing a.s.o.
Here is some test code I came up with. Both must be addend to get the result as in below pictures.

Add (LIVE) to title to Currently playing.

In the def create_api_episode_type(self, result_set, add_parent_title=False):

Row 657 After:
            self.__set_expire_time(valid_to, item)

Insert:
        live_just_now = result_set.get('longDescription')
        if 'Live just nu' in live_just_now:
            item.name = "{} [COLOR gold](LIVE)[/COLOR]".format(item.name)

Add Badge and Description to Teaser.

In the def create_api_teaser_type(self, result_set):

Row 583 Replace:
        if "longDescription" not in new_result_set:
            new_result_set["longDescription"] = result_set.get("description")

With:
        if "longDescription" not in new_result_set:
            badge = result_set.get("badge")
            if badge is None:
                new_result_set["longDescription"] = result_set['images']['wide']['description']
            else:
                new_result_set["longDescription"] = "[COLOR gold]{}[/COLOR][CR][CR]{}".format(result_set.get("badge", {}).get("altText", None),result_set['images']['wide']['description'])

The description is stored in the diffrent images type so maybe result_set['images']['wide']['description'] should be fetched as the images is doing now.


Currently playing:

Currently playing

Last chance:

Last chance

Recent:

Recent

Series:

Series

from plugin.video.retrospect.

dobbelina avatar dobbelina commented on June 28, 2024

Awesome, thanks @matsarv & @basrieter for the description!

from plugin.video.retrospect.

matsarv avatar matsarv commented on June 28, 2024

The description works perfectly now!

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

Great! Let me add the live stuff too.

from plugin.video.retrospect.

dobbelina avatar dobbelina commented on June 28, 2024

I am very happy with the description added to Recent/Senaste but there seems to be 2 different descriptions, one short and one long.
Example below shows the same movie accessed from Recent followed by Categories=>Filmer, see the 3 screenshots below that illustrates the difference.
If it can be fixed great, if not then that's fine to and thanks for the effort fixing it in the first place 👍
image
And
image
And
image

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

I understand the issue, however: that full description is just not present in the recent API! Sorry!

from plugin.video.retrospect.

matsarv avatar matsarv commented on June 28, 2024

Working! (live) is shown as before.

from plugin.video.retrospect.

basrieter avatar basrieter commented on June 28, 2024

Great! I will create a release tomorrow.

from plugin.video.retrospect.

matsarv avatar matsarv commented on June 28, 2024

I see you haven't merge this issue into the master yet.
After used it for some time I've noticed that 'Currently playing' have duplicated info in the description so I removed it. I've also added the play time into the program title.

Before:

before-current

After:

after-current

If you got the time, consider make theese changes. If not, it's not essential for the functions.


Testcode for 'Currently playing'

Changes in def create_api_teaser_type(self, result_set):

Row 563
from:
        new_result_set = result_set["item"]
to:
        new_result_set = result_set["item"]
        duration_formatted = result_set.get("durationFormatted")
Row 569
from:
            new_result_set["name"] = "{} - {}".format(title, sub_heading)
to:
            if ("Idag" in sub_heading 
                or "Ikväll" in sub_heading 
                or "Imorgon" in sub_heading):
                sub_heading_time = sub_heading.split(" ")[1]
                sub_heading_day = sub_heading.split(" ")[0]
                new_result_set["name"] = "{} - {} - {} {}".format(sub_heading_time,title,sub_heading_day,duration_formatted)
            else:
                new_result_set["name"] = "{} - {}".format(title,sub_heading)

Remarked ( not in use anymore? )

            # See if we need to filter out some of the headings? Defaults to True
            # if self.parentItem.metaData.get(self.__filter_subheading, True) and (
            #         "Idag" in sub_heading
            #         or "Ikväll" in sub_heading
            #         or "Igår" in sub_heading
            #         or sub_heading.endswith(" sek")
            #         or sub_heading.endswith(" min")
            #         or sub_heading.endswith(" tim")):
            #     Logger.trace("Ignoring subheading: %s", sub_heading)
            #     new_result_set["name"] = title
Row 597:
from:
            new_result_set["longDescription"] = description

to:
            new_result_set["longDescription"] = description

        if bool(sub_heading):
            if badge:
                new_result_set["longDescription"] = f"[COLOR gold]{badge}[/COLOR]"

from plugin.video.retrospect.

matsarv avatar matsarv commented on June 28, 2024

I see you haven't merge this issue into the master yet. After used it for some time I've noticed that 'Currently playing' have duplicated info in the description so I removed it. I've also added the play time into the program title.

Before:

[image]

After:

[image]

If you got the time, consider make theese changes. If not, it's not essential for the functions.

Testcode for 'Currently playing'

Skipp this proposal. It seems to have affects in other areas.

from plugin.video.retrospect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.