Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 Writing the JSON files is super quick. This was the time taken to write 1463 items to the IntrosBackupFolder. Pretty small foot print json file created for each episode
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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.
rbjtech 5284 Posted October 25, 2022 Author Posted October 25, 2022 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 ?
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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 ?
rbjtech 5284 Posted October 25, 2022 Author Posted October 25, 2022 (edited) 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 October 25, 2022 by rbjtech 1
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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 you can see below that the info is written to the NFO file also now. 2
elpoolet 26 Posted October 25, 2022 Posted October 25, 2022 1 hour ago, Cheesegeezer said: Writing the JSON files is super quick. This was the time taken to write 1463 items to the IntrosBackupFolder. Pretty small foot print json file created for each episode 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?
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 (edited) 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 October 25, 2022 by Cheesegeezer
elpoolet 26 Posted October 25, 2022 Posted October 25, 2022 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). 1
elpoolet 26 Posted October 25, 2022 Posted October 25, 2022 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.
ebr 16169 Posted October 25, 2022 Posted October 25, 2022 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...? 1
sydlexius 297 Posted October 25, 2022 Posted October 25, 2022 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!
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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. 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 Finally the Restore Settings 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!
rbjtech 5284 Posted October 25, 2022 Author Posted October 25, 2022 (edited) 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 October 25, 2022 by rbjtech
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 3 minutes ago, rbjtech said: 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 2
GrimReaper 4739 Posted October 25, 2022 Posted October 25, 2022 (edited) 5 minutes ago, rbjtech said: 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 October 25, 2022 by GrimReaper 1
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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?
GrimReaper 4739 Posted October 25, 2022 Posted October 25, 2022 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.
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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
GrimReaper 4739 Posted October 25, 2022 Posted October 25, 2022 (edited) 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 October 25, 2022 by GrimReaper 1 1
rbjtech 5284 Posted October 25, 2022 Author Posted October 25, 2022 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. 1
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 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. 1
Cheesegeezer 3104 Posted October 25, 2022 Posted October 25, 2022 So just to keep you lot in the loop. Waiting on some final testing before i release this to the catalogue. Cheers
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