Jump to content

Python script: Emby MDBList Collection Creator


Recommended Posts

Posted

@242Movies@rbjtechI'm working on a plugin.

My aim is to make it extremely user friendly. Flow goes something like this:

  1. You install the plugin and grab your secret key from the plugin.
  2. Hop on a website, log in and add your secret key.
  3. On the website you browse lists and define your collections. 
  4. The plugin connects to my API periodically and syncs your collections to your Emby client. 


If it goes well I want to add bunch of other features.

  • Like 3
Posted (edited)

I'm looking forward to it but MDBList does have a limit as to how many API calls you can make and it's fairly low with the free plan.

BTW I see we can import external lists from Trakt, Rottentomatoes, IMDB, etc.. into MDBList but only one can be active at a time.

I imported a list I created on IMDB for skateboarding videos, deleted it after if population on my Emby server, then imported a list of Criterion Collection videos from Trakt

 

I noticed it also tried to import an empty list I created on MDBlist that I didn't specify in the script but it must have seen attached to my account

 

EDIT: I also used EMBY's Sort Title under Metadata edit to modifiy the order that collections appear on the home screen


image.png.7b7f5c401437db26e21aa11d84a040bb.png

Edited by 242Movies
Added more info
Posted
7 hours ago, 242Movies said:

I noticed it also tried to import an empty list I created on MDBlist that I didn't specify in the script but it must have seen attached to my account

# Set to True to enable automatic downloading of your lists from https://mdblist.com/mylists/
download_my_mdblist_lists_automatically = True

If you don't want your own lists imported, then set the above to False ;)

 

  • Like 1
Posted
13 hours ago, Amything said:

@242Movies@rbjtechI'm working on a plugin.

My aim is to make it extremely user friendly. Flow goes something like this:

  1. You install the plugin and grab your secret key from the plugin.
  2. Hop on a website, log in and add your secret key.
  3. On the website you browse lists and define your collections. 
  4. The plugin connects to my API periodically and syncs your collections to your Emby client. 


If it goes well I want to add bunch of other features.

Thanks @Amything

The only concern I would personally have here is it's yet another website login acting as a man in the middle.

My thoughts on the Plugin was to just effectively automate the creation of the config file (minus the emby API bit obviously, as you would no longer need that).

I've already added MDBList as a 'ProviderID' in Emby - so it has a link back to the source - so these are also held as values in the database under that ProviderIdType. - see https://emby.media/community/index.php?/topic/118487-any-c-gurus-out-there-help-needed-for-externalid-class/

 The Python script works great - but I'd like the schedule and logging to be included in Emby.

image.png.7b3117cdf25984934040b5e055f8b4d1.png

Posted

@rbjtechInteresting that you can link back to the list, I had no idea.

I'm not really up to the login part, but I'm 90% sure I will use Emby Connect with Javascript (so nothing is sent to my server). That way there is probably no need for any secret key in the plugin either. An alternative login has to be available for those that don't want to use Connect.

I am working on it full time and will monetize this in some way similar to how MDBlist does it so it won't be to everyone's liking. Probably no ones liking actually 😅.   
 

  • Thanks 1
Posted (edited)

@Amything

Could we have an option in config to specify backdrop image for collection please ?

Great script btw !

Edited by kikinjo
Posted (edited)
21 hours ago, kikinjo said:

@Amything

Could we have an option in config to specify backdrop image for collection please ?

Great script btw !

We already do ?

Some example here -

 

Edited by rbjtech
Posted

@kikinjo@rbjtech

Do you mean like the image behind the collection? I've never tried that until now. I just try to edit collection images and add a "banner" and "art" image, nothing happened in the web view at least. Can't test clients right now.

Posted
5 minutes ago, Amything said:

@kikinjo@rbjtech

Do you mean like the image behind the collection? I've never tried that until now. I just try to edit collection images and add a "banner" and "art" image, nothing happened in the web view at least. Can't test clients right now.

I believe it's 'fanart.png' , 'fanart2.png' etc - but I wouldn't personally use that.

Posted

I've got this running in docker, when I start up the container is just get "SUMMARY: Added 0 to collections and removed 0" I dont have any other errors. I just have the standard MDBList in the default config.cfg to test it and it wont crate any collections. Any tips on how to troubleshoot 

twitchstick
Posted

I believe I have the container setup in UnRaid using the instructions posted. What is the command to run the container. 

I used the command below and a bunch of random containers popped up.  

docker run -v /mnt/user/appdata/emby-mdblist-collection/config.cfg:/app/config.cfg:rw ghcr.io/jonjonsson/emby-mdblist-collection-creator:latest

 

Posted
On 12/7/2024 at 6:44 PM, Amything said:

@kikinjo@rbjtech

Do you mean like the image behind the collection? I've never tried that until now. I just try to edit collection images and add a "banner" and "art" image, nothing happened in the web view at least. Can't test clients right now.

Yes exactly, image behind the collection background basically.  In emby terms that image is called backdrop.

lightsout
Posted

This is really sweet glad I found it. I assume there is no way to make a collection that shows stuff not in ones emby library? I mostly know what I have from Netflix/Amazon etc. Would be sweet to have a way to populate things from those lists not in my library (dreaming here and even make requests to overseer/jellyseer from the ui)

Posted
1 hour ago, lightsout said:

This is really sweet glad I found it. I assume there is no way to make a collection that shows stuff not in ones emby library? I mostly know what I have from Netflix/Amazon etc. Would be sweet to have a way to populate things from those lists not in my library (dreaming here and even make requests to overseer/jellyseer from the ui)

Install the Trakt plugin and let it upload your collection to their website

Then search the Trakt site for lists like Top 250 movies/TV, Trending Movies/TV, Rottentomatoes lists, Criterion Collection, etc... and then tell it to hide movies that you have collected

It will just show the ones you need to complete your collection

 

BTW, thanks again for this plugin
I wish I had something like this from years ago

Trakt Capture.JPG

lightsout
Posted
On 9/19/2024 at 8:11 AM, Amything said:

OK interesting. I can´t replicate this. "ValueError: Invalid isoformat string: '2024-08-16T14:11:22.0000000+00:00'".

That is a valid isoformat string for me. What python version do you have? (python.exe --version)

I am also seeing this

 

date = datetime.fromisoformat(iso_date.replace("Z", "+00:00"))
ValueError: Invalid isoformat string: '2024-12-16T16:24:31.0000000+00:00'

 

python.exe --version
Python 3.9.0

 

lightsout
Posted
5 minutes ago, 242Movies said:

Install the Trakt plugin and let it upload your collection to their website

Then search the Trakt site for lists like Top 250 movies/TV, Trending Movies/TV, Rottentomatoes lists, Criterion Collection, etc... and then tell it to hide movies that you have collected

It will just show the ones you need to complete your collection

 

BTW, thanks again for this plugin
I wish I had something like this from years ago

Trakt Capture.JPG

Thanks, would this translate to actually seeing the movies in emby. Or are you referring to viewing them within Trakt?

Posted
7 minutes ago, lightsout said:

Thanks, would this translate to actually seeing the movies in emby. Or are you referring to viewing them within Trakt?

View them on the Trakt website to see what you need to complete your collection

Plex does have a feature where it shows movies that are not in your collection when you click on the name of an actor or director but they don't show whether you have it or not until you click on it. It's not faded or X'd or anything

Theoretically it's possible but it would be confusing and perhaps frustrating for non-savvy users trying to play things if it were implemented directly into Emby

lightsout
Posted
17 minutes ago, 242Movies said:

View them on the Trakt website to see what you need to complete your collection

Plex does have a feature where it shows movies that are not in your collection when you click on the name of an actor or director but they don't show whether you have it or not until you click on it. It's not faded or X'd or anything

Theoretically it's possible but it would be confusing and perhaps frustrating for non-savvy users trying to play things if it were implemented directly into Emby

Yeah I get the confusing part, and I could see my wife and kids getting annoyed. But this feature feels half done imo when discovery is not an option. (Not a complaint at all, I understand this is not the intention of this script.)

Posted
1 hour ago, lightsout said:

 

python.exe --version
Python 3.9.0

 

hey @lightsout, if you update to 3.11 or more it will work.

  • Agree 1
Posted
2 hours ago, lightsout said:

This is really sweet glad I found it. I assume there is no way to make a collection that shows stuff not in ones emby library? I mostly know what I have from Netflix/Amazon etc. Would be sweet to have a way to populate things from those lists not in my library (dreaming here and even make requests to overseer/jellyseer from the ui)

It's an interesting idea - and something that could technically be implemented by taking the delta from the script (ie those items that are 'missing') and create a new collection using  associated strm files instead.

Unfortunately, this is where embys functionality lets it down (similiar to Plex I guess), as it will then simply class that item as 'real' as there is no way in emby to say that it's missing or 'virtual' - so people will try and play it.  You could just point all the strm files to an empty MKV - so it just returns you to the selection screen, but it's a bit of a hack..

Posted

@Amything

Not sure if you are taking Feature Requests ;) but it would be great to add the date the collection was updated to the 'Overview' section.   Then I know it's not a stale collection.

Sadly while Emby has this as metadata, there is no way to show it ..

An example below - this was manually added by me to the metadata overview field (empty on mdb created collections).

image.png.c36b5837f3d8b23449ead71b926eec71.png

image.png.2986430e47fec9b0d029d8c361658e4b.png

Adding other info into this section might also be useful - such as the more complex refresh options ?

Adding ProviderId's would also be the icing on the cake - as I'm needing to manually add these for them to appear as 'Links' to the mdb source...

image.png.a6591623fa1f4b39a4d53f6d7d169198.png

 

 

 

  • Like 1
lightsout
Posted
2 hours ago, Amything said:

hey @lightsout, if you update to 3.11 or more it will work.

ok thank you

 

lightsout
Posted
2 hours ago, Amything said:

hey @lightsout, if you update to 3.11 or more it will work.

Somehow I have 3.9 and 3.11 installed on a windows machine. When I issue the command for this app for whatever reason it calls 3.9. Not sure how to fix it without breaking something else. Seems like i always have odd issues with python as certain apps want to work with certain versions. Yours makes sense wanting the newest version, but I have had others that wanted older versions.

Posted

@lightsoutI feel your pain. You can create a python environment that uses the higher Python version.  AI is good with helping with this, specify your problem and that you would like to use python environments but regardless it's not exactly straight forward to be honest. Plugin version is a few weeks away and this type of stuff will not be needed.

@rbjtechYou are a wealth of information!  The script is taking a backseat to plugin work at the moment but I have been meaning to add description support. I could add something like {month} {day} {time} as variables in the description.

For the plugin I was thinking that it would report back the missing media and be able to show those on the plugin web page at least. But maybe there are better ideas like using the trailer along with a custom "Coming soon" overlay on the poster. I have not looked into STRM files at all, can these be Youtube urls perhaps? MDBList includes trailer information so it would be somewhat straight forward.

  • Thanks 1
lightsout
Posted
3 hours ago, Amything said:

@lightsoutI feel your pain. You can create a python environment that uses the higher Python version.  AI is good with helping with this, specify your problem and that you would like to use python environments but regardless it's not exactly straight forward to be honest. Plugin version is a few weeks away and this type of stuff will not be needed.

@rbjtechYou are a wealth of information!  The script is taking a backseat to plugin work at the moment but I have been meaning to add description support. I could add something like {month} {day} {time} as variables in the description.

For the plugin I was thinking that it would report back the missing media and be able to show those on the plugin web page at least. But maybe there are better ideas like using the trailer along with a custom "Coming soon" overlay on the poster. I have not looked into STRM files at all, can these be Youtube urls perhaps? MDBList includes trailer information so it would be somewhat straight forward.

Oh that's great I'll just wait it out. I'm in no rush.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...