Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12949 closed Patch - Bug Fix (fixed)

musicscanner: Compare music_directory.path as binary

Reported by: Ian Campbell <ijc@…> Owned by: paulh
Priority: minor Milestone: 0.28.1
Component: Plugin - MythMusic Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

SQL string comparisons are case insensitive by default (who knew!), meaning that a music rescan will not pickup a renamed directory if it differs only in the case. Use BINARY rather than arranging for a case-sensitive comparison because the latter still considers 'a' and 'á' equal but for paths we need literal binary sameness. Apply the same logic to music_songs.filename, although I've not tripped over a related issue there.

I have runtime tested this with the fixes/0.28 branch and build tested against master, the tip of both is identical for the file in question so I hope this is acceptable.

github ref: ​https://github.com/ijc25/mythtv/commit/a469ce48ee00392d8a3f07dfead7e8af976706dd

github git-am ref: ​https://github.com/ijc25/mythtv/commit/a469ce48ee00392d8a3f07dfead7e8af976706dd.patch

Change History (3)

comment:1 Changed 3 years ago by Stuart Auchterlonie

Milestone: unknown0.28.1

comment:2 Changed 3 years ago by Ian Campbell <ijc@…>

Resolution: fixed
Status: newclosed

In 258ba1fc3e6ab39c93450f276406671599f63a5d/mythtv:

musicscanner: Compare music_directory.path as binary

SQL string comparisons are case insensitive by default (who knew!), meaning
that a music rescan will not pickup a renamed directory if it differs only in
the case.

Use BINARY rather than arranging for a case-sensitive comparison because the
latter still considers 'a' and 'á' equal but for paths we need literal binary
sameness.

Apply the same logic to music_songs.filename, although I've not tripped over a
related issue there.

Fixes #12949.

Signed-off-by: Paul Harrison <pharrison@…>

comment:3 Changed 3 years ago by Ian Campbell <ijc@…>

In adf730061311ef0e6a4763cfe3d204fb89e79351/mythtv:

musicscanner: Compare music_directory.path as binary

SQL string comparisons are case insensitive by default (who knew!), meaning
that a music rescan will not pickup a renamed directory if it differs only in
the case.

Use BINARY rather than arranging for a case-sensitive comparison because the
latter still considers 'a' and 'á' equal but for paths we need literal binary
sameness.

Apply the same logic to music_songs.filename, although I've not tripped over a
related issue there.

Fixes #12949.

Signed-off-by: Paul Harrison <pharrison@…>
(cherry picked from commit 258ba1fc3e6ab39c93450f276406671599f63a5d)

Note: See TracTickets for help on using tickets.