ZLuckyTraveler 0 Posted November 3, 2024 Posted November 3, 2024 This is very cool. @AmythingWould be possible for you to make a docker image for this application, so we can containerize and run via Docker?
rbjtech 5282 Posted November 3, 2024 Posted November 3, 2024 9 hours ago, ZLuckyTraveler said: This is very cool. @AmythingWould be possible for you to make a docker image for this application, so we can containerize and run via Docker? It's not an application - it's a Python script ?
ZLuckyTraveler 0 Posted November 3, 2024 Posted November 3, 2024 7 hours ago, rbjtech said: It's not an application - it's a Python script ? Script, application, program, whatever it is isn’t really pertinent to the question being asked. It’s just semantics.
Amything 122 Posted November 8, 2024 Author Posted November 8, 2024 @ZLuckyTraveler@neoKushan (on Github) added Docker image to the repository. More info in the Readme https://github.com/jonjonsson/Emby-MDBList-Collection-Creator/blob/main/README.md Commit info https://github.com/jonjonsson/Emby-MDBList-Collection-Creator/pull/6#issuecomment-2464859572 @rbjtechKinda agree with you that it's complicating things But there is clearly some demand for it and easy enough to ignore if you don't want to use it. 2
Kushan 2 Posted November 8, 2024 Posted November 8, 2024 (edited) Yup, I am working with @Amything to enable you to deploy this as a docker container instead of running it as a standalone script, it should be available soon under `ghcr.io/jonjonsson/emby-mdblist-collection-creator:latest` (Assuming there's no problems with the code I just submitted) Edited November 8, 2024 by Kushan 1
hthgihwaymonk 34 Posted November 9, 2024 Posted November 9, 2024 I think it was asked once before and responded with no, but figured I'd check again. Does this script support including custom collection posters yet? thanks
Amything 122 Posted November 9, 2024 Author Posted November 9, 2024 5 hours ago, hthgihwaymonk said: Does this script support including custom collection posters yet? No, the script does not do anything with the collection posters. The posters are a one time thing so you just have to put in the work
hthgihwaymonk 34 Posted November 9, 2024 Posted November 9, 2024 47 minutes ago, Amything said: No, the script does not do anything with the collection posters. The posters are a one time thing so you just have to put in the work Thanks, I appreciate the quick reply. Posters are not a one time thing, at least for me. I like variety But I have that automated already, I was just curious if it was implemented here just to compare the code. Thanks again
Amything 122 Posted November 10, 2024 Author Posted November 10, 2024 51 minutes ago, hthgihwaymonk said: I have that automated already What are you using? I haven’t looked into that at all tbh.
hthgihwaymonk 34 Posted November 10, 2024 Posted November 10, 2024 5 minutes ago, Amything said: What are you using? I haven’t looked into that at all tbh. Just some python I wrote to make collections
hthgihwaymonk 34 Posted November 10, 2024 Posted November 10, 2024 What I've found is you have to add/update the poster after the collection has been initially created. But I've not looked at that part of the code in almost a year, so there may be a better way
rbjtech 5282 Posted November 10, 2024 Posted November 10, 2024 7 hours ago, hthgihwaymonk said: What I've found is you have to add/update the poster after the collection has been initially created. But I've not looked at that part of the code in almost a year, so there may be a better way If you are happy to share the code, then maybe you or Amything could add as part of the script ? As a user of the script myself, I'd be willing to spend a little time adding it. I presume you could just put the image url in the config, and it simply extract it and use the emby api to push it post creating the collection as you say - should be fairly easy to do especially as you have a working example.
Amything 122 Posted November 10, 2024 Author Posted November 10, 2024 I'll take a look at collection posters today. Shouldn't take too much time. 1
hthgihwaymonk 34 Posted November 10, 2024 Posted November 10, 2024 (edited) 7 hours ago, rbjtech said: If you are happy to share the code, then maybe you or Amything could add as part of the script ? As a user of the script myself, I'd be willing to spend a little time adding it. I presume you could just put the image url in the config, and it simply extract it and use the emby api to push it post creating the collection as you say - should be fairly easy to do especially as you have a working example. 'Movies - Popular': {'sort': '_a1', 'poster': 'Trends/Movies - Popular.png', 'library_type': 'Movie', 'type': 'mdblist'}, 'Movies - Alien': {'sort': '_f', 'poster': 'Collections/Alien Complete Collection.png', 'library_type': 'Movie', 'type': 'tmdb', 'collection_id': '8091'} and then - # update poster collection_poster = getattr(config, selected_collection)[collection_name]['poster'] with open(f'{collection_poster_pathj}/{collection_poster}', 'rb') as file: image_data = file.read() image_data_base64 = base64.b64encode(image_data) headers = {"X-Emby-Token": emby_api_key, "Content-Type": "image/jpeg"} url = f"{emby_server_url}/Items/{itemID}/Images/Primary" response = requests.post(url, headers=headers, data=image_data_base64) if response.status_code == 204: print(f'Successfully updated Poster for Collection "{collection_name}"') else: print(f'Error updating collection poster for "{collection_name}": {response.text}') That updates the poster Edited November 10, 2024 by hthgihwaymonk 2
Amything 122 Posted November 10, 2024 Author Posted November 10, 2024 @rbjtech@hthgihwaymonkI added poster support. Let me know what you think. I couldn't figure out a way to get enough information on which poster was currently being used with the API. To prevent uploading the same poster over and over I'm storing which file is used in a local cfg file (stored in a "temp" directory). Example: [Oscars 2024] source = https://mdblist.com/lists/squint/the-96th-academy-awards poster = https://plexcollectionposters.com/images/2019/01/31/oscars9a7c2bc47188f883.png Can use local path or url. https://plexcollectionposters.com/ seems to be a good source. Know any others? 1
hthgihwaymonk 34 Posted November 10, 2024 Posted November 10, 2024 I use https://theposterdb.com/ or create my own. and I'll leave the testing to @rbjtechas I don't use your script
rbjtech 5282 Posted November 11, 2024 Posted November 11, 2024 (edited) 12 hours ago, Amything said: @rbjtech@hthgihwaymonkI added poster support. Let me know what you think. I couldn't figure out a way to get enough information on which poster was currently being used with the API. To prevent uploading the same poster over and over I'm storing which file is used in a local cfg file (stored in a "temp" directory). Example: [Oscars 2024] source = https://mdblist.com/lists/squint/the-96th-academy-awards poster = https://plexcollectionposters.com/images/2019/01/31/oscars9a7c2bc47188f883.png Can use local path or url. https://plexcollectionposters.com/ seems to be a good source. Know any others? Brilliant - thanks for adding this ! It's working great - I just tested with the above example. It's a shame mdblist doesn't have metadata for a free image as 'finding an image' per collection is a bit of a pita. edit - ah, no different to kometa, but that has the bonus of image assets as part of the package. Kometa (PMM) But the mechanism to get them and inject them into emby is done - so good job ! Edited November 11, 2024 by rbjtech 1
sh0rty 714 Posted November 14, 2024 Posted November 14, 2024 (edited) On 11/11/2024 at 12:07 AM, Amything said: @rbjtech@hthgihwaymonkI added poster support. Let me know what you think. I couldn't figure out a way to get enough information on which poster was currently being used with the API. To prevent uploading the same poster over and over I'm storing which file is used in a local cfg file (stored in a "temp" directory). Example: [Oscars 2024] source = https://mdblist.com/lists/squint/the-96th-academy-awards poster = https://plexcollectionposters.com/images/2019/01/31/oscars9a7c2bc47188f883.png Can use local path or url. https://plexcollectionposters.com/ seems to be a good source. Know any others? What's the syntax for local path? Mounted local directory into /app/posters in the docker container. services: emby-mdblist-collection-creator: image: ghcr.io/jonjonsson/emby-mdblist-collection-creator:latest container_name: emby-mdblist-collection-creator restart: unless-stopped volumes: - ./Docker/Data/emby-mdblist-collection-creator/config.cfg:/app/config.cfg - ./Docker/Data/emby-mdblist-collection-creator/posters:/app/posters This is an example: [- HBO Shows -] Source = https://mdblist.com/lists/garycrawfordgc/hbo-shows poster = /app/posters/hbo.png Frequency = 100 update_items_sort_names = False When exec into it, the poster file is shown, but not used when creating or updating a collection. Or isn't this not yet available in the container? Second question: When I set hours_between_refresh = 6 in the container cfg file. It will pull every 6 hours the list queries and injects it into Emby? Thanks again for this awesome project! Edited November 14, 2024 by shorty1483
rbjtech 5282 Posted November 14, 2024 Posted November 14, 2024 4 minutes ago, shorty1483 said: Second question: When I set hours_between_refresh = 6 in the container cfg file. It will pull every 6 hours the list queries and injects it into Emby? Personally, I set mine to 0 (don't wait for a refresh, just finish and exit) and then schedule it to run with the OS scheduler. Much more control that way imo.
sh0rty 714 Posted November 14, 2024 Posted November 14, 2024 33 minutes ago, rbjtech said: Personally, I set mine to 0 (don't wait for a refresh, just finish and exit) and then schedule it to run with the OS scheduler. Much more control that way imo. Yeah, did that to when on my Windows machine. But since the Docker Container runs anyway...
Amything 122 Posted November 14, 2024 Author Posted November 14, 2024 59 minutes ago, shorty1483 said: When exec into it, the poster file is shown, but not used when creating or updating a collection. Or isn't this not yet available in the container? What do you mean when you that the poster is shown when you exec into it? If the readme says version 1.8 at the top you should be good. Is there no error produced? Quote Second question: When I set hours_between_refresh = 6 in the container cfg file. It will pull every 6 hours the list queries and injects it into Emby? Yep that is correct. It's an overkill for static or near static lists so you can use the frequency parameter in the config to skip over those. 1
sh0rty 714 Posted November 15, 2024 Posted November 15, 2024 18 hours ago, Amything said: What do you mean when you that the poster is shown when you exec into it? If the readme says version 1.8 at the top you should be good. Is there no error produced? I mean the volume with the selhosted poster images is correctly mounted into the container /app/posters path and I can see the poster file inside the container (hbo.png), but when setting it in config.cfg, it is not imported into Emby when the collection creator creates the collection. If the above path syntax in my config from previous post, I will check permissions.
rbjtech 5282 Posted November 15, 2024 Posted November 15, 2024 (edited) On 10/11/2024 at 23:07, Amything said: Can use local path or url. https://plexcollectionposters.com/ seems to be a good source. Know any others? I found the original Kometa (previously PMM) images on github - It's a bit cheeky to use them, I'd like to get the OK from the author but they are open source .. Currently I've just cloned the repo and thus have all the images local that I reference. (1000's of them !) btw - for Windows users in the config file it's :- poster = D:\Kometa\seasonal\christmas.jpg Note - no quotes, so no spaces will likely be allowed in the file path, nor file name unless python is space friendly.. ? Edited November 15, 2024 by rbjtech 2
rbjtech 5282 Posted November 15, 2024 Posted November 15, 2024 (edited) It's starting to come together - the uniform images make it all look SOOOO much nicer (and easier to find stuff) .. Edited November 15, 2024 by rbjtech
hthgihwaymonk 34 Posted November 15, 2024 Posted November 15, 2024 3 hours ago, rbjtech said: It's starting to come together - the uniform images make it all look SOOOO much nicer (and easier to find stuff) .. uniform images with collections is the only way to go, glad you got is going 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now