mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-29 12:35:13 +00:00
docs: strip non-essential comments, fold key facts into docstrings
This commit is contained in:
@@ -90,7 +90,6 @@ class Episode(Title):
|
||||
|
||||
if name is not None:
|
||||
name = name.strip()
|
||||
# ignore episode names that are the episode number or title name
|
||||
if re.match(r"Episode ?#?\d+", name, re.IGNORECASE):
|
||||
name = None
|
||||
elif name.lower() == title.lower():
|
||||
|
||||
@@ -166,12 +166,10 @@ class Song(Title):
|
||||
|
||||
def get_filename(self, media_info: MediaInfo, folder: bool = False, show_service: bool = True) -> str:
|
||||
if folder:
|
||||
# Album folder name: prefer the dedicated "albums" template, fall back to the
|
||||
# legacy "songs" folder template, then to "{artist} - {album} ({year})".
|
||||
template = config.get_folder_template("albums") or config.get_folder_template("songs")
|
||||
if template:
|
||||
context = self.build_template_context(media_info, show_service)
|
||||
spacer = detect_spacer(template) # one style for the whole path
|
||||
spacer = detect_spacer(template)
|
||||
segments = [
|
||||
TemplateFormatter(seg, spacer).format(context)
|
||||
for seg in re.split(r"[\\/]", template)
|
||||
|
||||
Reference in New Issue
Block a user