Komet / MediaElch

Media Manager for Kodi
https://mediaelch.github.io/mediaelch-doc/about.html
GNU Lesser General Public License v3.0
856 stars 97 forks source link

Posters/Fanart scraped by MediaElch not shown in Kodi (for movie sets) #1243

Open bugwelle opened 3 years ago

bugwelle commented 3 years ago
psonnosp commented 3 years ago

Images should use the short format (banner.jpg, clearart.png, clearlogo.png, fanart.jpg, landscape.jpg and poster.jpg) and be saved in separate sub-folders for each set.

And when you are there changing things it would be great if you could add the possibility to set a banner and logo.

Thanks for all your hard work :)

bugwelle commented 3 years ago

and be saved in separate sub-folders for each set.

I think that's not done at the moment. Thanks.

bugwelle commented 3 years ago

https://kodi.wiki/view/Movie_set_information_folder https://kodi.wiki/view/Movie_sets_artwork

Wow. It is a separate folder now... I'm afraid that this would be a major new feature for MediaElch.

We would need to have a folder for movie sets as well. Two options:

  1. Have the user select a folder in which all collections should be moved
    Drawbacks: What if the user wants to split them into multiple folders?
  2. Have a separate "movie set" types just like we already do for movies/tv shows, ...
    Drawbacks: How are movie sets added? Should we only add them to that folder if the user modifies a movie set that was detected by MediaElch? How to handle multiple of such folders?
psonnosp commented 3 years ago

Without knowing the inner workings is it really that big of a difference compared to now? You "just" have to make ME mirror the Movie Sets tab by creating folders in the folder currently named Artwork Folder-field in the settings and save the images in the corresponding sub folder.

  1. Both v18 and v19 work with one main folder with subfolders for each set, and v18 also supports to have them all in a single folder, but none of them support having them in multiple main folders so this isn't really an issue, or am I missing something?
  2. What do you mean with multiple folders? You can only have one folder for each set.
bugwelle commented 3 years ago

@psonnosp Oh my... Thank you very much for your input. Indeed, I totally forgot about MediaElch's artwork folder while writing the comment above.

You reminded me that MediaElch already has that. I simply didn't use it before and that's why I didn't think of it. :) Yes, that makes it a lot easier. I'll have to look into it again.

bugwelle commented 3 years ago

It bothers me that I didn't think of this before... But that's why open communication on GitHub is so great. There's always someone who has good feedback. 👍

psonnosp commented 3 years ago

One of the good things with never being able to not give your opinion about stuff, sometimes someone actually benefits from it 😄 I'm happy it helped, cheers!

bugwelle commented 3 years ago

I'll go through this issue step by step.

First: How does it currently work in MediaElch?

  1. I've reset MediaElch's settings:
    # macOS
    rm "$HOME/Library/Preferences/com.kvibes.MediaElch.plist"
  2. Add a movie directory with Harry Potter movies
  3. Scrape movies using TMDb
  4. Go to "Movie Sets"
  5. Select "Harry Potter Selection"
  6. Add images from fanart.tv
  7. Save movie set
  8. Look into movie directory, there are two new files:
    • baseFileName -fanart.jpg
    • baseFileName -poster.jpg (Notice the space!)

That is just wrong... Also the default for "Artwork next to movies" is just "folder.jpg" (try changing the value and changing it back to see the defaults). That means that only one file for all movie sets can be created?

Just to be sure I'm currently building MediaElch v2.4.x from 2016 before I started working on ME. :)

bugwelle commented 3 years ago

Ok, the old version has the same quirks.

I propose the following:

Artwork next to movies:

Separate artwork directory:


If there are users that want to have an artwork directory with a flat hierarchy (i.e. the current "Separate artwork directory" behavior), please let me know.

I think I will remove the option to set custom filenames, unless someone wants them. Kodi has (as far as I can see) strict naming conventions that we need to follow.

psonnosp commented 3 years ago

Are you sure about the artwork next to movies part? Can't find any info about that kind of usage, is that for v18? Either way I would skip that if I were the one coding and it takes a lot of time to fix since you can make use of the separate artwork directory in v18 if I understand the documentation right so feels kind of redundant to have them both.

bugwelle commented 3 years ago

Are you sure about the artwork next to movies part?

I'd keep it for backwards compatibility. :)

Can't find any info about that kind of usage, is that for v18?

Probably pre v16. MediaElch only supported Kodi up to v16 when I started. :) Internally, there are some variables named imageNamesForFrodo (which is Kodi v12).

Either way I would skip that if I were the one coding and it takes a lot of time to fix since you can make use of the separate artwork directory in v18 if I understand the documentation right so feels kind of redundant to have them both.

True. But we would have to give the user some sort of notification that they have to first set an artwork directory. Maybe some text in red on the "movie sets" page?

Furthermore, do we want to have an upgrade process? Otherwise users will have to re-load all movie posters. A no-go IMHO. (Unless, of course, nobody uses that feature).

warchild13 commented 3 years ago

Presently artwork works fine for Kodi Matrix (except for sets) except that Kodi no longer acknowlesges the extraartwork subfolder. I've been moving the fanart1 (etc) to the main movie directory and it works fine.

psonnosp commented 3 years ago

Are you sure about the artwork next to movies part?

I'd keep it for backwards compatibility. :)

Can't find any info about that kind of usage, is that for v18?

Probably pre v16. MediaElch only supported Kodi up to v16 when I started. :) Internally, there are some variables named imageNamesForFrodo (which is Kodi v12).

Either way I would skip that if I were the one coding and it takes a lot of time to fix since you can make use of the separate artwork directory in v18 if I understand the documentation right so feels kind of redundant to have them both.

True. But we would have to give the user some sort of notification that they have to first set an artwork directory. Maybe some text in red on the "movie sets" page?

Wouldn't it be a good idea to connect it all with the setting for what Kodi version the NFO should be created as since they depend on each other anyway? If you want v19 NFOs there's no reason for the movie sets to be created for v18.

Furthermore, do we want to have an upgrade process? Otherwise users will have to re-load all movie posters. A no-go IMHO. (Unless, of course, nobody uses that feature).

Why would you have to reload all posters? The already set artwork wont go anywhere if you don't completely wipe your install. I don't think ME need to be involved in moving to a new version of Kodi, when setting it up it get kind of obvious that you'll need to change where you store your movie set artwork anyway. How would it even be done in ME? Working directly with the Texture##.db? Would be nice to have ME do that for some other things so if this would open up for that further on I'd say go for it 😉

bugwelle commented 3 years ago

Wouldn't it be a good idea to connect it all with the setting for what Kodi version the NFO should be created as since they depend on each other anyway? If you want v19 NFOs there's no reason for the movie sets to be created for v18.

Errr... yes of course. :)

Why would you have to reload all posters? The already set artwork wont go anywhere if you don't completely wipe your install.

What I thought about is: What if we change the default behavior? Or what if the user changes from one mode to the other? MediaElch will look only at places for images as defined in the settings. So MediaElch won't load old (already scraped) images. :/

I don't think ME need to be involved in moving to a new version of Kodi, when setting it up it get kind of obvious that you'll need to change where you store your movie set artwork anyway. How would it even be done in ME? Working directly with the Texture##.db? Would be nice to have ME do that for some other things so if this would open up for that further on I'd say go for it wink

I was more talking about MediaElch itself and not Kodi. :)

I'll write it all down in a document and will ask you for review if that's ok. Then we have a specification how MediaElch should/will implement it. However, I don't have time for that in the next two weeks.

psonnosp commented 3 years ago

Wouldn't it be a good idea to connect it all with the setting for what Kodi version the NFO should be created as since they depend on each other anyway? If you want v19 NFOs there's no reason for the movie sets to be created for v18.

Errr... yes of course. :)

Just to clarify, as it is now you can have the two settings set to whatever you like without interconnection. You can have NFO set for v19 but still have the artworks set to be stored next to the movies and that shouldn't be possible since the two systems can't coexist anyway. So if you choose v19 NFO there shouldn't be an option for how you want your movie sets artwork to be stored since there only is one way that works.

Why would you have to reload all posters? The already set artwork wont go anywhere if you don't completely wipe your install.

What I thought about is: What if we change the default behavior? Or what if the user changes from one mode to the other? MediaElch will look only at places for images as defined in the settings. So MediaElch won't load old (already scraped) images. :/

Well then we don't change the default 😉 But have a pop up or something explain what you as a user have to do to make artwork for movie sets created for v18 and earlier to display when/if you change the NFO setting to v19. You can either move the files manually or export the library and have Kodi create the folder structure for you and populate it with the correct images. If you after that decide to revert to v18 you can just have Artwork Beef look in that folder instead of next to the movies.

I don't think ME need to be involved in moving to a new version of Kodi, when setting it up it get kind of obvious that you'll need to change where you store your movie set artwork anyway. How would it even be done in ME? Working directly with the Texture##.db? Would be nice to have ME do that for some other things so if this would open up for that further on I'd say go for it wink

I was more talking about MediaElch itself and not Kodi. :)

I know you were and I didn't mean the update of Kodi itself but the library. ME should just be able to handle the different folder structures for v18 and v19 and that there's no need for ME to be involved in the transition between the two, that should be up to the end-user to fix with the tools and options already available in Kodi and add-ons.

I suggest you create a poll in the ME-thread over at the Kodi forums to see how many that uses the different options so you don't end up having wasted time on something no one or few will use.

I'll write it all down in a document and will ask you for review if that's ok. Then we have a specification how MediaElch should/will implement it. However, I don't have time for that in the next two weeks.

Sure, looking forward to it 😃

bugwelle commented 3 years ago

I noticed while writing everything up that we have some bad defaults. One issue was introduced here: https://github.com/Komet/MediaElch/pull/799/files#r621456538

Will be fixed by https://github.com/Komet/MediaElch/pull/1299

psonnosp commented 3 years ago

You should change every default to the long filename <movie file name>-<arttype>.<ext> since that's what Kodi use as default. Don't know how you solve it with full BD and DVD though since they use the short version and I can't be to much help either since it's nothing I use. And extra fanart should not be in a separate folder, the naming of it is correct but it should be placed next to everything else. Maybe this shouldv'e been in a new issue but you brought it up 😉

ticao2 commented 3 years ago

English is not my native language. So I don't know if I understood this conversation correctly between you two. Is there a chance that ME would abandon the method of storing art in the same folder as the Movies media files? I believe that there are many ME users who do not use KODI. And they use ME to make a scraper that will be used in other media center programs. I personally prefer the artwork to be next to the Movie media file. I have several external hard drives that I take to the country house. And there I connect to the media center that has an ME installed. If the arts are not in the movie folder ...

PS: Sorry for my text errors.

ticao2 commented 3 years ago

As for the question of collection arts. A long time ago there was no problem. I believe that in ME v4. The collection arts were stored in the collection folder. Example:

Lord of the Ring Collection
    Movie 1 folder
    Movie 2 folder
    Movie 3 folder
    Lord of the Ring Collection-poster.jpg
    Lord of the Ring Collection-fanart.jpg

I'm not sure if the file name was the name of the collection or just poster.jpg and fanart.jpg. It was enough to indicate to the ME where the image file was.

So it seems to me that the problem is that the ME identifies that a folder is a Collection. Regardless of where this folder is. Perhaps a file within a folder may indicate to ME that it is a Collection folder. A file with the name of the collection and a specific extension. For example: Collection Name.collection or Collection Name.set or Collection Name.movieset .

Whether all of the collection folders are as KODI needs, in a single directory, or spread out over the folders of your film library, it would make no difference.

And of course, I have no idea how much work this means. :-)

PS1: KODI recognizes that files with a .disc extension indicate that this folder refers to a movie that is on physical media on its shelf. PS2: Sorry for the errors in my text.

codesnippy commented 2 years ago

Ok, the old version has the same quirks.

I propose the following:

  • There are two modes: "Artwork next to movies" and "Separate artwork directory"
  • The defaults for both are changed
  • The default is "Artwork next to movies" simply because otherwise the user would have to configure a directory first. And MediaElch does not yet have a "Quick Start" dialog or similar.

Artwork next to movies:

  • Default "Poster" filename: <setName>-folder.jpg Previously, the default was "folder.jpg". However, I don't see how that could have ever worked?
  • Default "Fanart" filename: <setName>-folder.jpg
  • Emit a warning if no <setName> placeholder is used in this mode. Because if there isn't a <setName>, all movie set images would have the same filename, i.e. all movie sets would have the same poster.

Separate artwork directory:

  • This mode currently puts all images (with correct filenames) with correct filesnames into one directory. It does not create subdirectories.
  • I'll change it so that subdirectories are created and the filenames will be banner.jpg, etc. (whatever Kodi wants)

If there are users that want to have an artwork directory with a flat hierarchy (i.e. the current "Separate artwork directory" behavior), please let me know.

I think I will remove the option to set custom filenames, unless someone wants them. Kodi has (as far as I can see) strict naming conventions that we need to follow.

I would like to see the option for creating subfolder of name in the option for "Artwork directory" or in the option "Movie Set Poster Filename" and "Movie Set Fanart filname"

Currently I can add the placeholder in the movie and fanart filename but "/folder.jpg" for example does not work to get a folder created with .

This also does not work in the option for Artwork Directory. Would be nice to have this as a option. As Kodi 19 needs the movie set name in the Artwork Directory first. Then poster and fanart files. (https://kodi.wiki/view/Movie_set_information_folder)

Hope this options comes soon. Love the the program a lot.