Opened 14 years ago

Closed 14 years ago

#6582 closed patch (fixed)

Exclude special groups from disk space reporting

Reported by: sphery <mtdean@…> 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)

mythtv-6582-skip_special_storage_groups_in_status_page.patch (1.4 KB) - added by sphery <mtdean@…> 14 years ago.
mythtv-6582-skip_special_storage_groups_in_status_page.2.patch (1.4 KB) - added by sphery 14 years ago.
Updated patch. Works for systems with LiveTV Storage Group defined.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by sphery <mtdean@…>

comment:1 Changed 14 years ago by eric.bosch@…

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.

Changed 14 years ago by sphery

Updated patch. Works for systems with LiveTV Storage Group defined.

comment:2 Changed 14 years ago by sphery

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 sphery

Resolution: wontfix
Status: newclosed

comment:4 Changed 14 years ago by Janne Grunau

Milestone: unknown0.22
Resolution: wontfix
Status: closednew

comment:5 Changed 14 years ago by Janne Grunau

Resolution: fixed
Status: newclosed

(In [21674]) do not report disk space statistics for special storage groups on the backend status page.

Closes #6582

Note: See TracTickets for help on using tickets.