NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
1 2 3 4 5 … 93 Next »
StoreMetaData

 
  • 0 Vote(s) - 0 Average
StoreMetaData
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,076
Threads: 957
Joined: May 2006
#1
2021-07-10, 03:40 PM
Is there a technical reason the RecordingsService.StoreMetaData is not available via RecordingsServiceProxy?  I'd like to use in in my NextImport to dump the xml file so I can edit it and then update the event_details field.  I prefer using API functions over hardcoding database and xml writing.

The reason I want to do this is the season finale of Clarice didn't include the S/E information with the metadata.  I'd like to use the XML file as the input for an update, editing that field in the database is cumbersome. 

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#2
2021-07-10, 05:41 PM
For the next build I've moved this call over to the ScheduledRecording itself. You can call recording.StoreMetadata();

You can also call recording.ToString() to get it in xml form.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,076
Threads: 957
Joined: May 2006
#3
2021-07-10, 06:12 PM (This post was last modified: 2021-07-10, 06:12 PM by mvallevand.)
Thanks.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,076
Threads: 957
Joined: May 2006
#4
2021-07-10, 09:47 PM
(2021-07-10, 05:41 PM)sub Wrote: For the next build I've moved this call over to the ScheduledRecording itself. You can call recording.StoreMetadata();

I thought it wasn't working but I guess I will need an optional parameter to bypass

    <StoreSeparateMetadataXml>false</StoreSeparateMetadataXml>

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#5
2021-07-10, 09:54 PM
The default for that has been true for NextPVR v5, so it should save it unless someone has explicitly disabled these xml files by setting that to false. You should probably honor their wishes if they’ve disabled it.

that said, if you want to override their setting, you can use the SettingHelper set override feature (which is temporarily changing a value, but it won’t be saved to the config file)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,076
Threads: 957
Joined: May 2006
#6
2021-07-10, 10:08 PM (This post was last modified: 2021-07-12, 06:46 PM by mvallevand.)
I didn't know I could override defaults thanks. For others that might want this the code it is like this

Code:
.
            SettingsHelper.GetInstance().SetOverride("/Settings/Recording/StoreSeparateMetadataXml", "true");
            ScheduledRecording recording = ScheduledRecording.LoadFromFileName(filename);
            if (recording != null)
                    recording.StoreMetadata();

I am look to create the xml file if it doesn't exist so the user can add or edit missing metadata on specific recordings on demand. Respecting their wishes wouldn't make sense for this use case.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode