Opened 14 years ago

Closed 14 years ago

#1733 closed patch (fixed)

Fix 3 small metadata related bugs in MythMusic

Reported by: Colin Guthrie <mythtv@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.20
Component: mythmusic Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

While explaining something to Joggi on the ML today, I noticed that when Mythmusic was doing it's scan for new music, it did not correctly remove the stale DB entries for files that no longer exist.

The removeFromDB method diligently strips of the directory name from the filename before the query, but then just binds the original filename to the query before executing it...

The attached patch fixes this.

One patch you don't need to review Isaac, can I have write access now ;) Just kidding :p

Attachments (2)

remove_stale_metadata.diff (475 bytes) - added by Colin Guthrie <mythtv@…> 14 years ago.
Patch to fix the issue
mythmusic_triple_fix.diff (2.7 KB) - added by Colin Guthrie <mythtv@…> 14 years ago.
Fix three bugs relating to metadata (full comment to follow)

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by Colin Guthrie <mythtv@…>

Attachment: remove_stale_metadata.diff added

Patch to fix the issue

Changed 14 years ago by Colin Guthrie <mythtv@…>

Attachment: mythmusic_triple_fix.diff added

Fix three bugs relating to metadata (full comment to follow)

comment:1 Changed 14 years ago by Colin Guthrie <mythtv@…>

Milestone: 0.20
Summary: Fix removal of stale metadata in mythmusic's scanFix 3 small metadata related bugs in MythMusic
Version: head

Please now ignore the first patch "remove_stale_metadata.diff".

While the new diff addresses three kinda separate issues, the patch is combined as the issues are very simple to analyse in diff format and are all related to metadata handling.

Description:

The fixes in mythmusic/metadata.cpp address the incorrect usage of the method QString::remove which will actually edit the original data which is not what is intended. This corrects this thinko.

The fixes in mythmusic/editmetadata.cpp are a cosmetic change which will prevent certain options relating to saving metadata appearing when the filename contains : (somewhat odd considering MM on it's own does not allow this to happen but I presume MFD does as there is special consideration for : in other areas of the code).

The fixes in mythmusic/main.cpp is the same fix as originally posted but uses the same variable name as used in two places in metadata.cpp for consistency. Fixes the removal of stale metadata from the DB during scan.

If someone feels like it's worth it, this can probably go into fixes without conflict (tho' not tested).

comment:2 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [10045]) Patch fixes 3 bugs in mythmusic:

  • removal of stale entries in the db.
  • Only allow saving of local metadata.
  • Fix some bad QString usage in metadata.cpp.

Closes #1733.

Note: See TracTickets for help on using tickets.