Skip to content

Commit

Permalink
remove abs addition on file handler + makedirs
Browse files Browse the repository at this point in the history
  • Loading branch information
geo-martino committed Jan 16, 2024
1 parent 85dd85c commit e754343
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
paths:
- musify/**

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ python -m pip install musify
## Currently Supported

- **Music Streaming Services**: `Spotify`
- **Audio filetypes**: `.m4a` `.mp3` `.flac` `.wma`
- **Audio filetypes**: `.mp3` `.m4a` `.wma` `.flac`
- **Local playlist filetypes**: `.xautopf` `.m3u`
- **Local Libraries**: `MusicBee`

Expand Down
5 changes: 2 additions & 3 deletions musify/shared/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections.abc import Iterable
from datetime import datetime
from glob import glob
from os.path import join, dirname, splitext, split, basename, isfile, sep, isdir, isabs
from os.path import join, dirname, splitext, split, basename, isfile, sep, isdir
from typing import Any

from tqdm.auto import tqdm
Expand Down Expand Up @@ -250,8 +250,7 @@ def __init__(
filename = "{}.log"
filename = filename.replace("\\", sep) if sep == "/" else filename.replace("/", sep)
self.filename = filename.format(dt_str) if "{}" in filename else filename
if not isabs(self.filename):
self.filename = join(PACKAGE_ROOT, self.filename)
os.makedirs(dirname(self.filename), exist_ok=True)

self.delta = TimeMapper(when.lower())(interval) if when and interval else None
self.count = count
Expand Down

0 comments on commit e754343

Please sign in to comment.