Jump to content

Save IntroSkip Metadata inside NFO


rbjtech
Go to solution Solved by Cheesegeezer,
FrostByte
Message added by FrostByte,

You can use the Intros Backup/Restore plugin by Cheesey Productions as a solution until this is added to core.

 

 

Recommended Posts

Cheesegeezer

Writing the JSON files is super quick.  

image.png.8b4e9f4e79c27b611492427633136b8d.png

This was the time taken to write 1463 items to the IntrosBackupFolder.

Pretty small foot print

image.png.3ee27d20f4e976bc881d98dae0682c49.png

json file created for each episode

image.png.bd0e07c30ca04c7cb355636e0f14754a.png

image.png.5344c95bc4ea0483aa21dd440fbd8a65.png

 

Link to comment
Share on other sites

Cheesegeezer
5 minutes ago, rbjtech said:

Understood - I guess I'm trying to save you some work 🤪 - but as we have no idea on when the core solution will be provisioned, this could turn into 'the' solution..

Thanks Dave - I look forward to testing it as I have one or two episodes .. 🤔

I'm also having difficulty finding access to the NFO in the code at the moment.  It seems sensible to add this to the NFO anyways, just need to figure out how.

@Luke @ebr is this something i can do from a c# interface or is this purely a Library.db feature and I should leave alone, because the NFO is extracted from the Library.db and saved in the mediafolder if the user ticks the box.  

Appreciate any pointers guys.

Link to comment
Share on other sites

rbjtech
5 minutes ago, Cheesegeezer said:

I'm also having difficulty finding access to the NFO in the code at the moment.  It seems sensible to add this to the NFO anyways, just need to figure out how.

@Luke @ebr is this something i can do from a c# interface or is this purely a Library.db feature and I should leave alone, because the NFO is extracted from the Library.db and saved in the mediafolder if the user ticks the box.  

Appreciate any pointers guys.

Many use external media managers to change the NFO - and emby then picks up the changes.

So I don't believe there is any danger in modifying the NFO directly ?

Link to comment
Share on other sites

Cheesegeezer
1 minute ago, rbjtech said:

Many use external media managers to change the NFO - and emby then picks up the changes.

Can you give me an example of one of the media managers (i'm so not in touch with all this stuff LOL!).  If they are altering already populated fields that emby has generated then yes I agree that emby will pick them up.

But we would be adding "NEW" fields... so this is where my concern is.

1 minute ago, rbjtech said:

So I don't believe there is any danger in modifying the NFO directly ?

 

Link to comment
Share on other sites

rbjtech
8 minutes ago, Cheesegeezer said:

Can you give me an example of one of the media managers (i'm so not in touch with all this stuff LOL!).  If they are altering already populated fields that emby has generated then yes I agree that emby will pick them up.

But we would be adding "NEW" fields... so this is where my concern is.

 

Tiny Media Manager (TMM), all the Arr's (Radarr,Sonarr) etc - they all use the 'Kodi' NFO 'standard' - but it's a loose standard, you can add what you like as the majority of fields are optional.

https://kodi.wiki/view/NFO_files

https://kodi.wiki/view/NFO_files/TV_shows

Edited by rbjtech
  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
26 minutes ago, rbjtech said:

Many use external media managers to change the NFO - and emby then picks up the changes.

So I don't believe there is any danger in modifying the NFO directly ?

So i've added options now.  You can save to JSON or Save to NFO

image.thumb.png.5301d958df3e424e58b1f694e0aa1a13.png

 

you can see below that the info is written to the NFO file also now.

 

image.png.4a7394db47b48e4af78fb3b50f7118f9.png

  • Like 2
Link to comment
Share on other sites

elpoolet
1 hour ago, Cheesegeezer said:

Writing the JSON files is super quick.  

image.png.8b4e9f4e79c27b611492427633136b8d.png

This was the time taken to write 1463 items to the IntrosBackupFolder.

Pretty small foot print

image.png.3ee27d20f4e976bc881d98dae0682c49.png

json file created for each episode

image.png.bd0e07c30ca04c7cb355636e0f14754a.png

image.png.5344c95bc4ea0483aa21dd440fbd8a65.png

 

Wow!!! 

Amazing work! 

The json filename is indépendant from the media filename? Right? 

 

And last but not least : do you provide the plug-in somewhere? 

Again, many thanks for this work!!! 

 

As I'm a software developer, I guess how many hours does it takes to you in order to achieve this? 

Link to comment
Share on other sites

Cheesegeezer
9 minutes ago, elpoolet said:

Wow!!! 

Amazing work!

cheers

9 minutes ago, elpoolet said:

The json filename is indépendant from the media filename? Right?

yeah the json filename is just Series folowed by Season#Episode#

9 minutes ago, elpoolet said:

 

And last but not least : do you provide the plug-in somewhere? 

Again, many thanks for this work!!!

not yet, i think the backup side is almost complete but may need to cater for multiversions.

9 minutes ago, elpoolet said:

 

As I'm a software developer, I guess how many hours does it takes to you in order to achieve this? 

I’m pretty comfortable with the emby ecosystem so maybe an hour to do the backup side. The restore side will be a bit longer. 
 

what languages are you proficient with?

Edited by Cheesegeezer
Link to comment
Share on other sites

elpoolet
16 minutes ago, Cheesegeezer said:

cheers

yeah the json filename is just Series folowed by Season#Episode#

not yet, i think the backup side is almost complete but may need to cater for multiversions.

I’m pretty comfortable with the emby ecosystem so maybe an hour to do the backup side. The restore side will be a bit longer. 
 

what languages are you proficient with?

I'm used to develop with Windev (a French IDE), C# (oftenly used to create .Net assemblies), and RPG (an AS/400 specific language).

  • Like 1
Link to comment
Share on other sites

elpoolet
18 minutes ago, Cheesegeezer said:

I’m pretty comfortable with the emby ecosystem so maybe an hour to do the backup side. The restore side will be a bit longer. 

I'm not. Many times, I think Iit would be intereting to create plugins I wanted in order to improve Emby for a behaviour that don't meet my specific wishes....
But I never take the time necessary to do this.

Link to comment
Share on other sites

1 hour ago, elpoolet said:

and RPG (an AS/400 specific language)

Wow.  First language I learned and on that same hardware.  How in the world does that still exist in 2022...?

  • Haha 1
Link to comment
Share on other sites

sydlexius
2 hours ago, ebr said:

Wow.  First language I learned and on that same hardware.  How in the world does that still exist in 2022...?

That is IBM's entire raison d'etre!

Link to comment
Share on other sites

Cheesegeezer

Sorry guys, so i had some actual work to do!!!

Anyways.  Can you take a look at the UI config and see that it makes sense to you? Us coders have a terrible time explaining ourselves hahahaha.

 

image.thumb.png.c22bd6bc7b880934ddb5407089d1370d.png

 

if the Backup folder path is empty and you try to enable JSON output then you get this Alert and slider sets back to off

image.png.49f2d3321eadbc4d80ef299c8d107c7e.png

 

Finally the Restore Settings

image.thumb.png.a17965e288aa05c08c3feb9b7b9b789f.png

 

With my minimal testing, it's works like a charm.

Let me know about the UI.  But i don't need a bunch of English Teachers decending on me... LOL! :D 

Link to comment
Share on other sites

rbjtech

 

image.png.abb6db519c0c120c84e90734fcc2404b.png

I've only ever 'saved metadata' with the media Folders - thus that's where my NFO's are.

If the library option to save NFO with the media folders is not ticked - I'm assuming it saves the NFO's locally ? - but haven't tested this.

I would remove the term 'users media Folder' and replace with just 'Media Folder' (as this then covers 'local' NFO files as well).

Edited by rbjtech
Link to comment
Share on other sites

Cheesegeezer
3 minutes ago, rbjtech said:

 

image.png.abb6db519c0c120c84e90734fcc2404b.png

I've only ever 'saved metadata' with the media Folders - thus that's where my NFO's are.

If the library option to save NFO with the media folders is not ticked - I'm assuming it saves the NFO's locally ? - but haven't tested this.

nope - if it’s not ticked then nothing will be written to NFO file

3 minutes ago, rbjtech said:

I would remove the term 'users media Folder' and replace with just 'Media Folder' (as this then covers 'local' NFO files as well).

Gotcha 😉 

  • Like 2
Link to comment
Share on other sites

GrimReaper
5 minutes ago, rbjtech said:

 

image.png.abb6db519c0c120c84e90734fcc2404b.png

I've only ever 'saved metadata' with the media Folders - thus that's where my NFO's are.

If the library option to save NFO with the media folders is not ticked - I'm assuming it saves the NFO's locally ? - but haven't tested this.

I would remove the term 'users media Folder' and replace with just 'Media Folder' (as this then covers 'local' NFO files as well).

NFOs are saved with media only, if library option is unticked - no NFOs are created, it's db-only setup in that case. 

Edited by GrimReaper
  • Agree 1
Link to comment
Share on other sites

Cheesegeezer
Just now, GrimReaper said:

NFOs are saved with media only, if library option is unticked - no NFOs are created, it's db-only setup in that case. 

And how are they written is that during a library scan or metadata scan? Do you know?

Link to comment
Share on other sites

GrimReaper
1 minute ago, Cheesegeezer said:

And how are they written is that during a library scan or metadata scan? Do you know?

For new items, upon initial scan/import. For existing items, it needs to be triggered manually (Edit Metadata>Save). For all items, any change in metadata will trigger rewrite. 

Link to comment
Share on other sites

Cheesegeezer
2 minutes ago, GrimReaper said:

For new items, upon initial scan/import. For existing items, it needs to be triggered manually (Edit Metadata>Save). For all items, any change in metadata will trigger rewrite. 

I’m just trying to figure a way to trigger this if the user hasn’t got the setting enabled or do i just fire an alert to let them know that they won’t be able to save the marker to nfo files

Link to comment
Share on other sites

GrimReaper
4 minutes ago, Cheesegeezer said:

I’m just trying to figure a way to trigger this if the user hasn’t got the setting enabled or do i just fire an alert to let them know that they won’t be able to save the marker to nfo files

Hm, I've seen users that deliberately don't want NFOs to be written - just as I've seen those that don't know that that option even exists. Not to impose NFO writing on the first group and educate second group - I'd say warning notice should be the way to go. 

Edited by GrimReaper
  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

rbjtech
16 minutes ago, Cheesegeezer said:

nope - if it’s not ticked then nothing will be written to NFO file

Gotcha 😉 

15 minutes ago, GrimReaper said:

NFOs are saved with media only, if library option is unticked - no NFOs are created, it's db-only setup in that case. 

Right - ok, thought that might be the case, thus the question mark. 🤪

Yea I would simply put on the Plugin page that this plugin requires the use of NFO files and leave it at that.

  • Thanks 1
Link to comment
Share on other sites

Cheesegeezer
2 minutes ago, rbjtech said:

Right - ok, thought that might be the case, thus the question mark. 🤪

Yea I would simply put on the Plugin page that this plugin requires the use of NFO files and leave it at that.

I think an alert rather than a line of text. I have come to learn over all the plugins I’ve written, that about 3% actually read anything on the config ui.  
 

cheers fellas I’ll pop that on now.

  • Agree 1
Link to comment
Share on other sites

Cheesegeezer

So just to keep you lot in the loop.

Waiting on some final testing before i release this to the catalogue.

Cheers

Link to comment
Share on other sites

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