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

TV4 channels - enhance look and feel #1271

Closed
matsarv opened this issue Dec 29, 2019 · 28 comments
Closed

TV4 channels - enhance look and feel #1271

matsarv opened this issue Dec 29, 2019 · 28 comments

Comments

@matsarv
Copy link

@matsarv matsarv commented Dec 29, 2019

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 [...]

No problem, just some small enhancements for a great product.

Describe the solution you'd like

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

Some minor enhancement are requested and I will provide code for the requested changes below that I use on my own system.

  • Add info on when episode expire. (also in #1269)
  • Add three dots to extra folders.
  • Change display name for program title.
  • Display Fanart to Program, Season and Episodes. (also in #1268)
  • Add Tags to TvShows.
  • Change Swedish language file strings.po
  • Remove date on program folder name list.

All requested changes are visualized in the images and the code below.

change1

change2

change3

tv4channels-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.

Thanks for a great addon, daily using Retrospect.
Regards Mats

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 29, 2019

Thanks for the extensive request with code!

  • Add info on when episode expire. (also in #1269) --> See that issue
  • Add three dots to extra folders. --> It makes no sense to include that here. They only exist to hack/fix messed up sorting.
  • Change display name for program title.
  • Display Fanart to Program, Season and Episodes. (also in #1268) --> See that issue
  • Add Tags to TvShows. --> but it only shows the TV Shows?
  • Change Swedish language file strings.po --> @Snaah and @Sopor need to comment on this. I already changed this soooooo often.
  • Remove date on program folder name list. --> Just did that for Kodi Leia and up (did not work before).
@basrieter basrieter self-assigned this Dec 29, 2019
@basrieter basrieter added this to To do in Retrospect Development via automation Dec 29, 2019
@basrieter basrieter added this to the v5.1.4 milestone Dec 29, 2019
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 29, 2019

Please use this zip and manually replace the Retrospect files with the newer versions inside the zip. Finally restart Kodi. It should contain the "checked" items.

retrospect-patch-20191229.231137.zip

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 29, 2019

Regarding " Add three dots to extra folders":
As you mention it messes up sorting if the dots are not there.
I have linked all search pages in Retrospect Favorites. Without the dots the TV4 channels will end up far from the other search links. This is the look with the dots. (When the listing brakes, often the search is working)

Image4

Regarding "Add Tags to TvShows" and the language file:
I have tried to fins some common name between channels.

[Retrospect]
change5

[Webben]
change6

retrospect-patch-20191229.231137.zip

I did a quick update of all the files from "retrospect-patch-20191229.231137.zip" to check the changes.
Retrospect didn't start. What i could see, the "chn_svt.py" dit not compile to "chn_svt.pyo".

It's getting to late so I will look into this tomorrow

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

I just tried this zip on my home Kodi and phone and it worked on both devices. So double check the zip. You cannot install it from zip but need to manually replace the original files with the ones from the zip.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 30, 2019

I have now tested the code and all marked changes above is working OK.

I did find two small enhancements when I checked the changes.

TV4: Add "set_info_label" to show duration i a small black box at bottom
This is used in both SVT and SBS.
time1

SBS: Include title in the item.name for the Show
This is used in both SVT and TV4.
show1

Here comes the code for the changes:
showandduration.txt

PS.
TV4: Please add three dots to extra folders

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 30, 2019

The Layout will change after adding \lib\plugin.py (also in #1268)

By removing "episodes" or use "tvshows" in "plugin.py" it's will alter the layout in a bad way.

contentType = "episodes"
contentType-episodes

All images from channels are in rectanular shape and will fit in the layout used with "episodes". It will display 18 boxes. This looks very good.

contentType = "tvshows"
contentType-tvshows

The layout for images in "tvshows" are in square box and this will crop the images so the text will dissapear at left and right. It will only display 12 boxes.

It will also change the default view settings in Retrospect, and that is not any good.

Please reinsert the contentType "episodes" in plugin.py
self.contentType = "episodes"

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

The Layout will change after adding \lib\plugin.py (also in #1268)

By removing "episodes" or use "tvshows" in "plugin.py" it's will alter the layout in a bad way.

contentType = "episodes"
contentType-episodes

All images from channels are in rectanular shape and will fit in the layout used with "episodes". It will display 18 boxes. This looks very good.

contentType = "tvshows"
contentType-tvshows

The layout for images in "tvshows" are in square box and this will crop the images so the text will dissapear at left and right. It will only display 12 boxes.

It will also change the default view settings in Retrospect, and that is not any good.

Please reinsert the contentType "episodes" in plugin.py
self.contentType = "episodes"

You need to tell me where you see this (how do I navigate to that) as I already reverted that in the plugin.py I added here above.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

I have now tested the code and all marked changes above is working OK.

I did find two small enhancements when I checked the changes.

TV4: Add "set_info_label" to show duration i a small black box at bottom
This is used in both SVT and SBS.
time1

SBS: Include title in the item.name for the Show
This is used in both SVT and TV4.
show1

Here comes the code for the changes:
showandduration.txt

I added the duration. The name of the show will only included in the listings that contain multiple shows. The fact that SVT/TV4 does how them is because they include it in their metadata. So that I won't change.

PS.
TV4: Please add three dots to extra folders

No extra dots I am afraid. The dots are ugly hacks that I don't like. What I can is strip them of in the favourites! That would make much more sense. Could you create a seperate issue for that? As it is a generic request.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 30, 2019

The Layout will change after adding \lib\plugin.py (also in #1268)
By removing "episodes" or use "tvshows" in "plugin.py" it's will alter the layout in a bad way.
contentType = "episodes"

All images from channels are in rectanular shape and will fit in the layout used with "episodes". It will display 18 boxes. This looks very good.
contentType = "tvshows"

The layout for images in "tvshows" are in square box and this will crop the images so the text will dissapear at left and right. It will only display 12 boxes.
It will also change the default view settings in Retrospect, and that is not any good.
Please reinsert the contentType "episodes" in plugin.py
self.contentType = "episodes"

You need to tell me where you see this (how do I navigate to that) as I already reverted that in the plugin.py I added here above.

In the attached zip, retrospect-patch-20191229.231137.zip on row 61 in plugin.py the setting is remarked,

self.contentType = "tvshows"

Just checked again, it is not enough to change the above to back to "episodes". I had to pick the plugin.py from 5.1.3 to get the old layout back.
If you have new zip with latest changes, i could try that.

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Dec 30, 2019

@matsarv Really nice enhancements!

strings.po: Some of the changes you suggest were discussed thoroughly before. Could you create a new issue with your suggestions to discuss this? It will get messy here.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

In the attached zip, retrospect-patch-20191229.231137.zip on row 61 in plugin.py the setting is remarked,

self.contentType = "tvshows"

Just checked again, it is not enough to change the above to back to "episodes". I had to pick the plugin.py from 5.1.3 to get the old layout back.
If you have new zip with latest changes, i could try that.

I know it is commented, because I hardcoded them now for all folders listings to be "episodes", but for the channel listing it is "tvshows" now. So please tell me exactly how you navigate to the situation where you think it is not OK? Because for me, it all looks OK on my end.

Keep in mind that every change in Python files require a Kodi restart because Retrospect uses the caching of the language-invoker in Kodi.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

@matsarv try this favourites.py:

favourites.zip

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 30, 2019

I have compared the 5.1.3 and the new one. I can see what you have done. The channel listing will now use "tvshows" and the rest will use "episodes". This is OK since all channel images in Retrospect are square and looks nice with this. (I have created new rectangled images for channel images for the "episodes" layout, so they don't look so nice anymore, but this is my problem to handle, edit plugin.py or make new images). This problem is now solved.

I will have a look at favorites.py

@Snaah I will start a new issue so we can discuss this, next year!

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 30, 2019

If I changed the code as below in favorites.py it removes the dots (the :. is not present and \a.: needs to be removed)

            # clean up the .: from titles
            if ".:" in item.name:
                item.name = item.name.strip("\a.: ")

With the above changes , it works for me.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 30, 2019

Great! So for now:

  • Add info on when episode expire. (also in #1269) --> See that issue
  • Add three dots to extra folders. --> Fixed in Favourite listing
  • Change display name for program title.
  • Display Fanart to Program, Season and Episodes. (also in #1268) --> See that issue
  • Add Tags to TvShows. --> but it only shows the TV Shows?
  • Change Swedish language file strings.po --> @Snaah and @Sopor need to comment on this. I already changed this soooooo often.
  • Remove date on program folder name list. --> Just did that for Kodi Leia and up (did not work before).
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 31, 2019

Will be in the next version.

@basrieter basrieter closed this Dec 31, 2019
Retrospect Development automation moved this from To do to Done Dec 31, 2019
@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Dec 31, 2019

@matsarv Perfect! I agree with you on most.

While all these changes already are underway for TV4 Play, I might as well slip in two more instead of new issues:

  1. Retrospect already has the Categories (Kategorier). Could we also have the sections listed on the start page of tv4play.se, like Sista chansen (Last chance), Långfilm på TV4 Play (Movies on TV4 Play) and Välgjorda dokumentärer (Well-made documentaries).

  2. I suggest to revert having the extra step of "TV-program" to get to the listings.

Happy New Year!

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 31, 2019

@matsarv Perfect! I agree with you on most.

While all these changes already are underway for TV4 Play, I might as well slip in two more instead of new issues:

  1. Retrospect already has the Categories (Kategorier). Could we also have the sections listed on the start page of tv4play.se, like Sista chansen (Last chance), Långfilm på TV4 Play (Movies on TV4 Play) and Välgjorda dokumentärer (Well-made documentaries).
  2. I suggest to revert having the extra step of "TV-program" to get to the listings.

Happy New Year!

  1. I don't understand this one.
  2. Nope: as already mentioned before: I will most likely move most channels that have multiple selection options (Progams A-Z, Categories, Most Recent, etc) to this format, instead of having those "special" folders listed at the top of a long list of programs.
@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Dec 31, 2019

@matsarv Perfect! I agree with you on most.
While all these changes already are underway for TV4 Play, I might as well slip in two more instead of new issues:

Retrospect already has the Categories (Kategorier). Could we also have the sections listed on the start page of tv4play.se, like Sista chansen (Last chance), Långfilm på TV4 Play (Movies on TV4 Play) and Välgjorda dokumentärer (Well-made documentaries).
I suggest to revert having the extra step of "TV-program" to get to the listings.

Happy New Year!

I don't understand this one.
Nope: as already mentioned before: I will most likely move most channels that have multiple selection options (Progams A-Z, Categories, Most Recent, etc) to this format, instead of having those "special" folders listed at the top of a long list of programs.

  1. I agree. I really wait for the program list on SVT Play moves to a Program A-Ö folder. It takes forever on a Raspberry or Android
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 31, 2019

  1. I agree. I really wait for the program list on SVT Play moves to a Program A-Ö folder. It takes forever on a Raspberry or Android

This is one of the reasons.

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Dec 31, 2019

  1. Retrospect shows the Kategorier, which are in the top menu:
    image

But it does not show the sections/tags further down on the starting page:
image
image

  1. Doesn't the option "Group list if it exceeds # folders" solve that problem? On all my devices, including Android and Android TV, I don't think the loading time is too long. But that depends on how long "forever" is. :) Could a solution be to move the programs without folders to a separate folder?
@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 31, 2019

Those are not in the main API I call. So for now they won't be in there. Please create a new issue for this if you figure out what API call produces these main page categories and their content.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Dec 31, 2019

Oh, and the "Group By" is only a display thing. It will still retrieve all data and create all possible list items. So there is no speed improvement at all.

@Snaah

This comment has been minimized.

Copy link
Contributor

@Snaah Snaah commented Jan 1, 2020

APIs are over my head. "Mest sedda programmen", a "section" from the start page, is already in Retrospect. Strange that TV4 doesn't have the rest of the "sections" from the start page in its API.

Ok.

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

Since it's not release I will add this. We introduced a small bug here.
We missed to add the episone_text if i was present.
Both Season 1 and 2 was missing episode text.

tv4episode-TestCode.txt (may be improved)

Below is how it look when the code changed. Checked around, many of program had episode text.

tv4episode

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 4, 2020

Exactly this is why I don't like manually tweaking the texts that the stations provide:

if is_episodic:
	name_info = name
	name = result_set["title"].split("del")[0]
	name = name.strip()
	episode_split = name_info.replace(name,"")
	episode_find = episode_split.find("-")
	if (5 < episode_find < 9):
		episode_name = episode_split.split("-")[1]
		episode_name = episode_name.strip() 
		name = "{} - s{:02d}e{:02d} - {}".format(name, season, episode, episode_name)
	else:
		name = "{} - s{:02d}e{:02d}".format(name, season, episode)

We fix it for this specific case, but miss out on many others that might exist. But let me check.

@basrieter

This comment has been minimized.

Copy link
Collaborator

@basrieter basrieter commented Jan 4, 2020

Try this:

chn_tv4se.zip

@matsarv

This comment has been minimized.

Copy link
Author

@matsarv matsarv commented Jan 4, 2020

Checked many program and it looking really good.

basrieter added a commit that referenced this issue Jan 4, 2020
@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.