Refactor ShowDetail component to utilize parseEpisodeName for episode parsing: replace legacy parsing logic with a new function that supports additional episode naming formats. Update sorting and display logic to reflect parsed episode data, enhancing the overall user experience.
This commit is contained in:
@@ -25,6 +25,10 @@ export function parseEpisodeName(name: string, opts?: ParseOptions): ParsedEpiso
|
||||
if (nx) {
|
||||
season = Number(nx[1])
|
||||
episode = Number(nx[2])
|
||||
} else {
|
||||
// Ведущий номер серии: «01. Название», «02 - Название», «03_Название», «4) Название».
|
||||
const lead = name.match(/^\s*(\d{1,3})[\s._)\]-]/)
|
||||
if (lead) episode = Number(lead[1])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user