Opened 12 years ago

Closed 10 years ago

#4623 closed enhancement (wontfix)

storage group changes for mythvideo

Reported by: George Nassas <gnassas@…> Owned by: cpinkham
Priority: minor Milestone: 0.23
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This is a precursor patch for supporting storage groups from within mythvideo. The two main changes are:

1) hold back edits until ::save() is called (applies to StorageGroup?, StorageGroupEditor? & StorageGroupListEditor?). This is so you can create/edit storage groups from within a ConfigurationWizard? - actions aren't applied until the user gets to the last panel and clicks "Finish".

2) support programmatic create/add/delete of storage groups and storage group directories. The DB convert for mythvideo needs a non-GUI way to create and populate storage groups based on the value(s) in settings.VideoStartupDir?.

I also updated mythtv-setup to put up a "Save Changes?" dialog after groups have been edited. It looks pretty hokey. It would have been better to stuff StorageGroupListEditor? into a ConfigurationWizard? but I thought of it too late and am anxious to move on to the video portion of this.

There is now a kludge argument in the StorageGroup? constructor. When the Init routine can't find any local dirs for a group it will fall back to the directories in the "Default" group. This doesn't work when creating new groups - your new group always picks up the "Default" dirs to start. The kludge argument suppresses that behaviour. Probably the fallback approach needs a rethink but that's for another patch.

It wasn't clear to me if storage group directories are supposed to end with a /. Initially I was stripping them but non-/ storagegroup.dirname entries caused Very Bad Things (tm) to happen so the code strips trailing slashes for display and restores them for DB updates. My database has been updated so many times I don't know what the original values were. Just thought I'd mention it.

Attachments (2)

pluginSGs.patch (28.1 KB) - added by George Nassas <gnassas@…> 12 years ago.
19997.sg.patch (27.3 KB) - added by gnassas@… 11 years ago.
updated for current svn

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by George Nassas <gnassas@…>

Attachment: pluginSGs.patch added

comment:1 Changed 12 years ago by cpinkham

Owner: changed from Isaac Richards to cpinkham
Status: newassigned

I'm not sure if you had planned to or not, but can we keep the MythVideo? patches in a separate ticket from this one? I think I'd prefer to look over the patches like this, but will defer to Anduin for the changes in MythVideo? itself.

comment:2 Changed 12 years ago by George Nassas <gnassas@…>

Yes, there will be two tickets.

One other thing: when I listed the changes I forgot the most obvious one - there's now a method to return a list of all files in all the directories of a group. It returns a QMap of QString (directory) and QStringList (files under that directory).

comment:3 Changed 12 years ago by cpinkham

Milestone: unknown0.22

Changed 11 years ago by gnassas@…

Attachment: 19997.sg.patch added

updated for current svn

comment:4 Changed 10 years ago by cpinkham

Milestone: 0.220.23

Not sure what of this is or will be necessary with the other work going on that will be going into 0.23, so I'm pushing this off to indicate that it will be done or closed by 0.23.

comment:5 Changed 10 years ago by stuartm

Component: mythtvMythTV - General

comment:6 Changed 10 years ago by robertm

Resolution: wontfix
Status: assignedclosed

George,

Thanks for the effort on this. Since it's different enough from what ended up in trunk I'm going to close this for now, though if any of the ideas herein are relevant to future work we can always refer to it. Thanks.

Note: See TracTickets for help on using tickets.