Opened 14 years ago
Closed 14 years ago
#6582 closed patch (fixed)
Exclude special groups from disk space reporting
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | MythTV - General | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The attached patch expands the list of storage groups excluded in the disk space reporting (as originally introduced in [19695] ). The patch simply excludes every storage group specified in StorageGroup::kSpecialGroups . With the proliferation of special groups (LiveTV, DB Backups, Videos, Trailers, Coverart, Fanart, Screenshots, Banners), the status page can become quite a mess (and its total misleading) without the patch.
Note that this is still a bit of a hack. A better approach would rely on storage group types, but until that's implemented, this approach works since all currently-existing special storage groups are non-TV groups.
I did not use a prepared statement to include the list of group names in the query since doing so would require dynamically adding placeholders (as each placeholder is treated as a single element, so it's impossible to add a list with a single placeholder). Currently this works fine since none of the special groups have single quotes (or other database-special characters). If that changes in the future, this code will have to be changed. If you'd prefer the prepared statement approach, please let me know.
Attachments (2)
Change History (7)
Changed 14 years ago by
Attachment: | mythtv-6582-skip_special_storage_groups_in_status_page.patch added |
---|
comment:1 Changed 14 years ago by
Changed 14 years ago by
Attachment: | mythtv-6582-skip_special_storage_groups_in_status_page.2.patch added |
---|
Updated patch. Works for systems with LiveTV Storage Group defined.
comment:2 Changed 14 years ago by
Closing as wontfix since Storage-Group-types functionality is currently being coded and provides a much better solution.
FWIW, the updated patch fixes the issue in the original patch so it works even on systems with the LiveTV Storage Group defined (fixes the problem mentioned by Eric). It's there in case anyone wants to use the patch locally until the SG-types functionality is finished.
comment:3 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:4 Changed 14 years ago by
Milestone: | unknown → 0.22 |
---|---|
Resolution: | wontfix |
Status: | closed → new |
I tried this patch for 6846, and it did not work. In addition, it broke ability to switch between tuners on master/slave backend, causing master backend to crash after switching between tuners on master and slave.