Skip to content

Commit

Permalink
fix: LRC timing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotCHEN37 committed Jan 2, 2025
1 parent 51f6e4f commit a9171b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MxMDL
> Latest version: [v1.3](https://github.com/ElliotCHEN37/RMxLRC/releases/latest)
> Latest version: [v1.3.1](https://github.com/ElliotCHEN37/RMxLRC/releases/latest)
## History
The project was gradually derived from GMxLRC.<br>
Expand All @@ -13,7 +13,7 @@ usage: main.py [-h] [-g] [-k TOKEN] [-a ARTIST] [-t TITLE] [-l ALBUM]
[-d DIRECTORY] [-s SLEEP]
[filepath]
MxMDL v1.3 by ElliotCHEN37. Download synced lyrics from Musixmatch freely!
MxMDL v1.3.1 by ElliotCHEN37. Download synced lyrics from Musixmatch freely!
positional arguments:
filepath Path to an audio file
Expand All @@ -40,13 +40,18 @@ optional arguments:
```

## Changelog
<h3>v1.3</h3>
<h3>v1.3.1</h3>
FIX:<br>
1. LRC file timing
<details>
<summary><h3>v1.3</h3></summary>
NEW:<br>
1. Using "♪ Instrumental ♪" for instrumental songs<br>
2. Output type<br>
3. Save lyrics as SRT file<br>
OPT:<br>
1. Adjust arguments<br>
</details>
<details>
<summary><h3>v1.2</h3></summary>
NEW:<br>
Expand Down
4 changes: 2 additions & 2 deletions Source/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import time

BASE_URL = "https://apic-desktop.musixmatch.com/ws/1.1"
APPVER = "1.3"
APPVER = "1.3.1"

def refresh_token():
try:
Expand Down Expand Up @@ -85,7 +85,7 @@ def write_to_file(filename, lyrics_data, output_type="lrc", synced=True):
if output_type == "lrc":
for line in lyrics_data:
timestamp = format_time(line['startTime']) if synced else ''
f.write(f"{timestamp}{line['text']}\n")
f.write(f"[{timestamp}]{line['text']}\n")
elif output_type == "srt":
for i, line in enumerate(lyrics_data):
start_time = format_time_srt(line['startTime'])
Expand Down
4 changes: 2 additions & 2 deletions Source/version.rc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(1, 0, 0, 0),
prodvers=(1, 3, 0, 0),
prodvers=(1, 3, 1, 0),
mask=0x3f,
flags=0x0,
OS=0x40004,
Expand All @@ -21,7 +21,7 @@ VSVersionInfo(
StringStruct(u'LegalCopyright', u'\xa9 ElliotCHEN37 2024 Licensed under MIT License'),
StringStruct(u'OriginalFilename', u'MxMDL_Windows_x64.exe'),
StringStruct(u'ProductName', u'MxMDL'),
StringStruct(u'ProductVersion', u'1.3')])
StringStruct(u'ProductVersion', u'1.3.1')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down

0 comments on commit a9171b8

Please sign in to comment.