-
-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BPM metadata enhancement Related to #1036. Adds BPM to the stored metadata about MediaFiles. Displays BPM in the following locations: - Listing songs in the song list (desktop, sortable) - Listing songs in playlists (desktop, sortable) - Listing songs in albums (desktop) - Expanding song details When listing, shows a blank field if no BPM is present. When showing song details, shows a question mark. Updates test MP3 file to have BPM tag. Updated test to ensure tag is read correctly. Updated localization files. Most languages just use "BPM" as discovered during research on Wikipedia. However, a couple use some different nomenclature. Spanish uses PPM and Japanese uses M.M. * Enhances support for BPM metadata extraction - Supports reading floating point BPM (still storing it as an integer) and FFmpeg as the extractor - Replaces existing .ogg test file with one that shouldn't fail randomly - Adds supporting tests for both FFmpeg and TagLib * Addresses various issues with PR #1087. - Adds index for BPM. Removes drop column as it's not supported by SQLite (duh). - Removes localizations for BPM as those will be done in POEditor. - Moves BPM before Comment in Song Details and removes BPM altogether if it's empty. - Omits empty BPM in JSON responses, eliminating need for FunctionField. - Fixes copy/paste error in ffmpeg_test.
- Loading branch information
1 parent
fb33aa4
commit 30bb3f7
Showing
13 changed files
with
90 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package migrations | ||
|
||
import ( | ||
"database/sql" | ||
|
||
"github.com/pressly/goose" | ||
) | ||
|
||
func init() { | ||
goose.AddMigration(upAddBpmMetadata, downAddBpmMetadata) | ||
} | ||
|
||
func upAddBpmMetadata(tx *sql.Tx) error { | ||
_, err := tx.Exec(` | ||
alter table media_file | ||
add bpm integer; | ||
create index if not exists media_file_bpm | ||
on media_file (bpm); | ||
`) | ||
if err != nil { | ||
return err | ||
} | ||
notice(tx, "A full rescan needs to be performed to import more tags") | ||
return forceFullRescan(tx) | ||
} | ||
|
||
func downAddBpmMetadata(tx *sql.Tx) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters