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

SE SVT channels - enhance look and feel #1273

Closed
matsarv opened this issue Jan 1, 2020 · 39 comments
Closed

SE SVT channels - enhance look and feel #1273

matsarv opened this issue Jan 1, 2020 · 39 comments

Comments

@matsarv
Copy link

@matsarv matsarv commented Jan 1, 2020

Feature Request

Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

One small problem, se below.

Describe the solution you'd like

A clear and concise description of what you want to happen.

Some enhancement are requested for change, code added.

  • Change name in .: Categories :. Film
  • Add fanart and description to folders in Genrer

svtchannel-CodeForChanges.txt

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@matsarv matsarv added the enhancement label Jan 1, 2020
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 1, 2020

The first change I could do. Same with the description. However, I am a bit lost with the fanart part:


Add fanart and description to folders in Genrer

replace row 312: item.description = result_set.get('description')
to:
item.description = result_set.get('longDescription')

    image_info = result_set.get("image")
    if image_info:
        item.thumb = self.__get_thumb(image_info, width=720)
        item.fanart = self.__get_thumb(image_info)
    image_info = result_set.get("image")
    if image_info:
        item.thumb = self.__get_thumb(image_info)

Could you explain a bit more, seems like there is some duplicate code here? Perhaps tell me where I can see the result of this change?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 1, 2020

The first change I could do. Same with the description. However, I am a bit lost with the fanart part:

Add fanart and description to folders in Genrer
replace row 312: item.description = result_set.get('description')
to:
item.description = result_set.get('longDescription')
image_info = result_set.get("image")
if image_info:
item.thumb = self.__get_thumb(image_info, width=720)
item.fanart = self.__get_thumb(image_info)
image_info = result_set.get("image")
if image_info:
item.thumb = self.__get_thumb(image_info)

Could you explain a bit more, seems like there is some duplicate code here? Perhaps tell me where I can see the result of this change?

An example:
under Genre / Action & äventyr (old code)
svtgenrenofanart
under Genre / Action & äventyr (new code)
svtgenrefanart
Image, fanart and description added when it's a folder.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 1, 2020

There were som new items under the Category, here is the new list.
category.txt

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 1, 2020

Thanks! I was confused by the duplicate code! Please try this:

chn_svt.zip

@basrieter basrieter self-assigned this Jan 1, 2020
@basrieter basrieter added this to To do in Retrospect Development via automation Jan 1, 2020
@basrieter basrieter modified the milestones: v5.1.2, v5.1.4 Jan 1, 2020
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 1, 2020

I also added the new categories, but that is not in the zip yet

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 1, 2020

OK, the image, fanart and descrition was is there
As you see in the pictures, there is a problem with the sorting order when it first sort folders and then single program. I use to miss programs due to this, forget that programs is shown after folders.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 1, 2020

You can enable the mixing of videos/folder in the Retrospect settings:

image

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 1, 2020

OK, I have totally missed that one. Good work!

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Jan 1, 2020

That option doesn't solve the "problem" though, as the A-Ö folders all begin with "Titlar med...".

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 1, 2020

Disable the grouping of folders!

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Jan 1, 2020

I know. My comment was to @matsarv .

Disabling the grouping makes a very long list that is hard to handle. Would placing the shows without folder in a special folder be doable?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 2, 2020

I know. My comment was to @matsarv .
Disabling the grouping makes a very long list that is hard to handle. Would placing the shows without folder in a special folder be doable?

@Snaah With the mix it's OK, no special folder is neded, only that the program list ends up in a Program A-Ö folder eventually.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 2, 2020

Found another missing set_date for enhancement:

  • Add valid from date to episodes.
  • Remove sub_heading for episodes.

When using sub_heading the episode name will be changed next two days after relese, so it was marked unwatched. With this change there will be release date and duration for the episode.

svtchannelsetdate-CodeForChanges.txt

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 2, 2020

I added the date, but not the subheading. I really can't help it that they change the subheading. But leaving it out can cause episodes to be indistinguishable from each other. Where is this causing you issues?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 2, 2020

sub_heading
28. will have 1 jan 2020 tomorrow
29. will have Igår 16:16 tomorrow
29. will have 2 jan 2020 day after tomorrow

This may be possible:
get_program.txt
Just a thought from my side

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 2, 2020

You need to gell me how to get there, so I can check myself.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 2, 2020

And I need to see more than just this example. If it is not generic, it is a no-go. I don't like doing these specific changes. If it is in the API that the show has a title and a subtitle, then that is how it is. Interpreting "positionInSeason" might work for this specific items, but might fail for many others.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 2, 2020

In program list, goto:
/ Backstage / Säsong 2 /
/ Belinder auktioner /
/ Min fantastiska vännina /
Check today and tomorrow.
Maybe it's to risky to add.....

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 2, 2020

I removed the SubHeading (as most of the info is available now anyways) and I try to parse the season info and set it in the appropriate Kodi InfoLabels:

chn_svt.zip

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 3, 2020

Not any good.
All the "extra_items" is not working anymore.
(PS. No needed to add "sub_heading" to "longDescription" as you say above info is available)

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 3, 2020

Please be more specific. What folders don't work anymore?

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 3, 2020

Right, found it. However, this is also caused by the change:
image

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 3, 2020

So if I remove the subheading this happens:

image

Instead of:

image

As you can see, some of the items actually loose information.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 3, 2020

Ok, please try this:

chn_svt.zip

I basically ignore subheadings if:

  • they end with " min" or " tim"
  • contain "Ikvall"
  • contain "Idag"

Except for these special folders as they need this data to distinguish or give more information:

  • Last Chance
  • Recent
  • Most Viewed
  • Search
@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 3, 2020

It's hard to know all the impact. Looks promising.
Everything seems to work OK after plenty of testing.

I did find some small adding during testing that could be added:

  • Fanart in Category
  • Filter out Igår
  • Fix item.name if a Season

svtepisode-CodeForChanges.txt

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Jan 3, 2020

@matsarv Ok. For me that list becomes too hard to overlook. Instead I mostly use the search function. Great work you both are doing!

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 4, 2020

Thanks @matsarv. Do you have some examples for the 'Fix item.name if a Season'?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

Here is two examples:

Before:

Andra åket
aa1
Shetland
sh1

After:

Andra åket
aa2
Shetland
sh2

The sorting gets correct and as for Shetland, i has no Season (only one season=single), but now ju see it from Season 5.

It would be nice to have the program name also, as in the other channels.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 4, 2020

Program name is difficult as it can be multiple levels up (with seasons and so). But here are the other changes:

chn_svt.zip

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

I did some testing and everything works OK

Is it possible to get the program title?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

Sorry, missed your comment on Program name above

@basrieter basrieter closed this in d13c876 Jan 4, 2020
basrieter added a commit that referenced this issue Jan 4, 2020
basrieter added a commit that referenced this issue Jan 4, 2020
Retrospect Development automation moved this from To do to Done Jan 4, 2020
@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

Sorry, I did a code compare and found one thing you did not add from my test code.
When session info, I used the "nameRaw" instead. The episode number is allready there.

add after row 540: item.set_season_info(episode_info[1], episode_info[4])
                item.name = result_set.get("nameRaw")

Andra åket

Before:
andraaket

After:
andraaket2

Sorry, but this must be the last for this time

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 4, 2020

Nope, I can't use the "nameRaw" as it is empty very often. But please tell me where this is, so I can check and see what is going on?

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

If you meen the code:

after row 540: item.set_season_info(episode_info[1], episode_info[4])
add:
                item.name = result_set.get("nameRaw")

If you mean the programs:

Andra åket / Season 2
Annedroider
Backstage
Bamse
Banerang
Belinders auktioner
Branden

….and is goes on.

One more, we added check for "tim" and "min" and now I just seen that program "Bon" even had "sek" as last word.

after row 436: or "Igår" in sub_heading
add:
                    or sub_heading.endswith(" sek")
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 5, 2020

If you mean the programs:

Andra åket / Season 2
Annedroider
Backstage
Bamse
Banerang
Belinders auktioner
Branden

So that is what I meant. But take Trex: it has an empty nameRaw and so this is the result:

image

But I was able to fix that too:

chn_svt.zip

But to be honest, further than this I don't what to go. If we get more specific we might end up hard coding stuff for specific shows.

basrieter added a commit that referenced this issue Jan 5, 2020
@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 5, 2020

I agree with you. I'll check the new file tomorrow.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 5, 2020

It's looking very good now. Everything is OK.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 5, 2020

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 5, 2020

Thanks for the info. Did a refresh on the plugin page, and it got installed.

@basrieter basrieter removed the tobereleased label Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.