Compare commits
No commits in common. "61adc43b45220e9349d365861ef86d2a79d0ce88" and "3d83de20c25b4c3ea578f04eb834da4dfa613280" have entirely different histories.
61adc43b45
...
3d83de20c2
1
.envrc
1
.envrc
@ -1,5 +1,4 @@
|
|||||||
layout poetry
|
layout poetry
|
||||||
export LINE_PROFILE=1
|
|
||||||
export MAIL_PASSWORD="ewacyay5seu2qske"
|
export MAIL_PASSWORD="ewacyay5seu2qske"
|
||||||
export MAIL_PORT=587
|
export MAIL_PORT=587
|
||||||
export MAIL_SERVER="smtp.fastmail.com"
|
export MAIL_SERVER="smtp.fastmail.com"
|
||||||
|
|||||||
@ -132,11 +132,7 @@ def get_audio_metadata(filepath: str) -> Dict[str, str | int | float]:
|
|||||||
|
|
||||||
metadata: Dict[str, str | int | float] = {}
|
metadata: Dict[str, str | int | float] = {}
|
||||||
|
|
||||||
try:
|
metadata["mtime"] = os.path.getmtime(filepath)
|
||||||
metadata["mtime"] = os.path.getmtime(filepath)
|
|
||||||
except FileNotFoundError:
|
|
||||||
show_warning(None, "File not found", f"Filepath {filepath} not found")
|
|
||||||
return {}
|
|
||||||
|
|
||||||
# Set start_gap, fade_at and silence_at
|
# Set start_gap, fade_at and silence_at
|
||||||
audio = get_audio_segment(filepath)
|
audio = get_audio_segment(filepath)
|
||||||
@ -204,10 +200,7 @@ def get_tags(path: str) -> Dict[str, Any]:
|
|||||||
Return a dictionary of title, artist, duration-in-milliseconds and path.
|
Return a dictionary of title, artist, duration-in-milliseconds and path.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
tag = TinyTag.get(path)
|
||||||
tag = TinyTag.get(path)
|
|
||||||
except FileNotFoundError:
|
|
||||||
return {}
|
|
||||||
|
|
||||||
return dict(
|
return dict(
|
||||||
title=tag.title,
|
title=tag.title,
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import sys
|
|||||||
# PyQt imports
|
# PyQt imports
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
from sqlalchemy import (
|
from sqlalchemy import (
|
||||||
bindparam,
|
bindparam,
|
||||||
delete,
|
delete,
|
||||||
@ -564,7 +563,6 @@ class PlaylistRows(dbtables.PlaylistRowsTable):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@line_profiler.profile
|
|
||||||
def update_plr_row_numbers(
|
def update_plr_row_numbers(
|
||||||
session: Session, playlist_id: int, sqla_map: List[dict[str, int]]
|
session: Session, playlist_id: int, sqla_map: List[dict[str, int]]
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
@ -44,7 +44,6 @@ from PyQt6.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
import pipeclient
|
import pipeclient
|
||||||
from pygame import mixer
|
from pygame import mixer
|
||||||
from sqlalchemy.exc import IntegrityError
|
from sqlalchemy.exc import IntegrityError
|
||||||
@ -535,7 +534,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
if playlist:
|
if playlist:
|
||||||
playlist.mark_open()
|
playlist.mark_open()
|
||||||
session.commit()
|
|
||||||
return playlist
|
return playlist
|
||||||
else:
|
else:
|
||||||
log.error("Failed to create playlist")
|
log.error("Failed to create playlist")
|
||||||
@ -1021,11 +1019,11 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
session, template, playlist_name
|
session, template, playlist_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Need to ensure that the new playlist is committed to
|
||||||
|
# the database before it is opened by the model.
|
||||||
|
session.commit()
|
||||||
if playlist:
|
if playlist:
|
||||||
playlist.mark_open()
|
playlist.mark_open()
|
||||||
# Need to ensure that the new playlist is committed to
|
|
||||||
# the database before it is opened by the model.
|
|
||||||
session.commit()
|
|
||||||
self.create_playlist_tab(playlist)
|
self.create_playlist_tab(playlist)
|
||||||
else:
|
else:
|
||||||
log.error("Playlist failed to create")
|
log.error("Playlist failed to create")
|
||||||
@ -1069,8 +1067,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
webbrowser.get("browser").open_new_tab(url)
|
webbrowser.get("browser").open_new_tab(url)
|
||||||
|
|
||||||
@line_profiler.profile
|
def paste_rows(self) -> None:
|
||||||
def paste_rows(self, dummy_for_profiling=None) -> None:
|
|
||||||
"""
|
"""
|
||||||
Paste earlier cut rows.
|
Paste earlier cut rows.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -26,7 +26,6 @@ from PyQt6.QtGui import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import line_profiler
|
|
||||||
import obswebsocket # type: ignore
|
import obswebsocket # type: ignore
|
||||||
|
|
||||||
# import snoop # type: ignore
|
# import snoop # type: ignore
|
||||||
@ -737,8 +736,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
self.update_track_times()
|
self.update_track_times()
|
||||||
self.invalidate_rows(row_numbers)
|
self.invalidate_rows(row_numbers)
|
||||||
|
|
||||||
@line_profiler.profile
|
def move_rows(self, from_rows: list[int], to_row_number: int) -> None:
|
||||||
def move_rows(self, from_rows: list[int], to_row_number: int, dummy_for_profiling=None) -> None:
|
|
||||||
"""
|
"""
|
||||||
Move the playlist rows given to to_row and below.
|
Move the playlist rows given to to_row and below.
|
||||||
"""
|
"""
|
||||||
@ -988,8 +986,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
# Update display
|
# Update display
|
||||||
self.invalidate_row(track_sequence.previous.row_number)
|
self.invalidate_row(track_sequence.previous.row_number)
|
||||||
|
|
||||||
@line_profiler.profile
|
def refresh_data(self, session: db.session) -> None:
|
||||||
def refresh_data(self, session: db.session, dummy_for_profiling=None) -> None:
|
|
||||||
"""Populate dicts for data calls"""
|
"""Populate dicts for data calls"""
|
||||||
|
|
||||||
# Populate self.playlist_rows with playlist data
|
# Populate self.playlist_rows with playlist data
|
||||||
|
|||||||
986
poetry.lock
generated
986
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -7,11 +7,11 @@ authors = ["Keith Edmunds <kae@midnighthax.com>"]
|
|||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.11"
|
python = "^3.11"
|
||||||
tinytag = "^1.10.1"
|
tinytag = "^1.10.1"
|
||||||
SQLAlchemy = "^2.0.35"
|
SQLAlchemy = "^2.0.31"
|
||||||
python-vlc = "^3.0.21203"
|
python-vlc = "^3.0.20123"
|
||||||
mysqlclient = "^2.2.4"
|
mysqlclient = "^2.2.4"
|
||||||
mutagen = "^1.47.0"
|
mutagen = "^1.47.0"
|
||||||
alembic = "^1.13.3"
|
alembic = "^1.13.2"
|
||||||
pydub = "^0.25.1"
|
pydub = "^0.25.1"
|
||||||
python-slugify = "^8.0.4"
|
python-slugify = "^8.0.4"
|
||||||
pyfzf = "^0.3.1"
|
pyfzf = "^0.3.1"
|
||||||
@ -22,7 +22,7 @@ pyqtgraph = "^0.13.3"
|
|||||||
colorlog = "^6.8.2"
|
colorlog = "^6.8.2"
|
||||||
alchemical = "^1.0.2"
|
alchemical = "^1.0.2"
|
||||||
obs-websocket-py = "^1.0"
|
obs-websocket-py = "^1.0"
|
||||||
pygame = "^2.6.1"
|
pygame = "^2.6.0"
|
||||||
psutil = "^6.0.0"
|
psutil = "^6.0.0"
|
||||||
pyqt6-webengine = "^6.7.0"
|
pyqt6-webengine = "^6.7.0"
|
||||||
|
|
||||||
@ -39,6 +39,7 @@ flakehell = "^0.9.0"
|
|||||||
mypy = "^1.7.0"
|
mypy = "^1.7.0"
|
||||||
pytest-cov = "^5.0.0"
|
pytest-cov = "^5.0.0"
|
||||||
pytest = "^8.1.1"
|
pytest = "^8.1.1"
|
||||||
|
snoop = "^0.4.3"
|
||||||
black = "^24.3.0"
|
black = "^24.3.0"
|
||||||
types-psutil = "^6.0.0.20240621"
|
types-psutil = "^6.0.0.20240621"
|
||||||
pdbp = "^1.5.3"
|
pdbp = "^1.5.3"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user