Commit Graph

165 Commits

Author SHA1 Message Date
dependabot[bot] 8661101706 ci(deps): bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-21 09:01:59 +00:00
Tomas Dvorak cbf646e25b Fix CI/CD pipeline and code quality issues
## Major Changes
- Fixed all TypeScript errors in web client for successful compilation
- Resolved 82+ Python lint errors across backend services
- Updated Flutter SDK compatibility for mobile app
- Fixed security workflow configuration

## Web Client Fixes
- Fixed import path in DragonflyDashboard.vue (dragonflyApi import)
- All TypeScript compilation now passes without errors

## Backend Lint Fixes
- Updated type annotations to modern Python syntax (dict instead of Dict, X | None instead of Optional[X])
- Replaced try-except-pass with contextlib.suppress(Exception)
- Removed unused imports (Dict, Optional, Any, Iterator, etc.)
- Fixed bare except clauses to use Exception
- Sorted and formatted imports with ruff
- Applied ruff format to 27 files

## Workflow Fixes
- Updated Flutter SDK constraint from ^3.10.4 to ^3.5.0 (compatible with Flutter 3.24.0)
- Changed pip-audit format from github to json in security.yml
- Added comprehensive CI workflows (readiness-gate.yml, security.yml)

## Infrastructure
- Added DragonflyDB caching system integration
- Enhanced Docker configuration with multi-stage builds
- Added pytest configuration and test infrastructure
- Improved production readiness with proper error handling

## Verification
- backend-lint job:  Succeeded
- web job:  Succeeded
- Ready for GitHub deployment

All CI/CD issues resolved. Codebase now passes all quality checks.
2026-03-21 10:01:14 +01:00
Tomas Dvorak 109384c7a1 Update workflow to build mobile app instead of Android
- Updated default components from 'desktop,android,backend' to 'desktop,mobile,backend'
- Replaced Android build job with Flutter mobile build job
- Updated release notes to reference Flutter mobile app instead of Android
- Updated artifact download and installation instructions for mobile app
2026-03-18 19:27:08 +01:00
Tomas Dvorak 109af189a4 fix: Ensure all build jobs run on push events
- Fix build job conditions to run on push events
- Previously jobs were skipped because they only checked inputs
- Now all components build automatically on push to master

Build jobs now run on:
 Push events (automatic) - all components
 Manual trigger (optional) - selected components

This ensures Linux, Windows, macOS, Android, and Backend all build!
2026-03-18 14:29:51 +01:00
Tomas Dvorak e7e5e42dbc fix: Handle first release when no Git tags exist
- Fix git log commands when no previous tags exist
- Handle v0.0.0 as starting point for first release
- Add proper error handling for missing tags
- Improve logging for debugging

Now unified-release.yml should work for the first release:
 No tags? Start from v0.0.0 and analyze all commits
 Has tags? Analyze commits since last tag
 Proper semantic versioning from the beginning
2026-03-18 14:28:29 +01:00
Tomas Dvorak 22127418f1 fix: Resolve workflow trigger issues
- Add 'master' branch to trigger (was only 'main')
- Fix get-version job condition to run on push events
- Ensure workflow triggers properly on git push

Now unified-release.yml should trigger on push to master branch!
2026-03-18 14:27:12 +01:00
Tomas Dvorak 168c92e21c push 2026-03-18 14:26:05 +01:00
Tomas Dvorak 813b94c2d5 chore: Remove unnecessary component-tests.yml workflow
- Remove component-tests.yml (no longer needed)
- unified-release.yml handles all builds and releases
- Keep only essential workflows for clean setup

Active workflows:
 unified-release.yml (main push trigger)
🔇 desktop-ci.yml (manual only)
2026-03-18 14:25:45 +01:00
Tomas Dvorak 494b1a8a07 chore: Clean up workflows and trigger unified release
- Remove conflicting unified-build.yml workflow
- Disable desktop-ci.yml and component-tests.yml
- Keep only unified-release.yml active for all builds
- Test trigger commit to verify workflow execution

Now only unified-release.yml will run on push to main:
 Semantic versioning
 Cross-platform builds (Linux, Windows, macOS, Android, Backend)
 Unified GitHub release
 No workflow conflicts
2026-03-18 14:25:15 +01:00
Tomas Dvorak 403bf01189 fix: Resolve macOS cross-compilation issues in unified release
- Disable old unified-build.yml workflow (was causing conflicts)
- Create new unified-release.yml with proper platform separation
- macOS builds now run on macOS runners (fixes cross-compilation)
- Linux and Windows builds use Ubuntu with cross-compilation
- Separate build jobs for each platform to prevent cancellation
- Rename workflow to indicate cross-platform support

Platform matrix:
 Linux x64: Ubuntu runner (native)
 Windows x64: Ubuntu runner (cross-compile)
 macOS x64/ARM64: macOS runners (native)
 Android: Ubuntu runner (native)
 Backend: Ubuntu runner (native)

Fixes macOS build failures and prevents other builds from being canceled!
2026-03-18 14:22:34 +01:00
Tomas Dvorak a22e462079 feat: Add unified release system for all components
- Create unified release workflow for entire mono repo
- Analyze commits across all submodules for semantic versioning
- Build and release desktop (4 platforms), android, and backend together
- Single version number for all components based on combined changes
- Comprehensive release notes from all component changes
- Support for selective component releases
- Professional installation instructions for all platforms

Components included:
 Desktop: Linux x64, Windows x64, macOS x64/ARM64
 Android: APK release builds
 Backend: Python wheel and source packages

Now every push to main creates a unified release with proper semantic versioning!
2026-03-18 14:15:13 +01:00
Tomas Dvorak c202f6b219 ci/cd 2026-03-18 13:25:38 +01:00
Tomas Dvorak 6ff864cb9e update 2026-03-18 12:22:46 +01:00
Tomas Dvorak f3cc6ff1f3 update 2026-03-18 12:22:30 +01:00
Tomas Dvorak cefc56c41d update ci/cd 2026-03-18 09:46:16 +01:00
Tomas Dvorak aad2f2d421 Add Spotify downloader and enhanced API features
- Add spotify_downloader service for track/album/playlist downloads
- Update Spotify API endpoints with enhanced functionality
- Fix pydub utils import issues
- Update GitHub workflows for improved CI/CD
2026-03-17 22:12:41 +01:00
Tomas Dvorak 272caf6bfe 🔧 Update GitHub Actions to latest versions
- Update actions/setup-node@v3 to @v4
- Update actions/setup-python@v2 to @v5
- Update actions/checkout@v3 to @v4
- Replace deprecated create-release/upload-release-asset with action-gh-release
- Eliminate deprecation warnings and improve reliability
2026-03-17 18:18:59 +01:00
wanji f5fe25323f disable macos 13 builds 2026-01-18 15:48:29 +03:00
orhtej2 84af418d15 merge #426 - downgrade binary build environment for Linux. fixes #422
Update build.yml
2025-12-10 11:36:42 +03:00
wanji 506c45c4fa fix client: download fallback to github release client
+ add fallback release version data to version.txt
+ move classproperty class to utils
+ update Dockerfile to install from source using pip install
+ move version info to Metadata class in settings.py
2025-12-07 23:19:34 +03:00
wanji d2b2ba6e02 fix: docker builds versionining 2025-12-03 19:16:34 +03:00
cwilvx 5d200fff30 add publishing to pip 2025-08-31 15:36:54 +03:00
cwilvx d169227b2d update appImage filename 2025-08-30 17:55:27 +03:00
cwilvx 83f3592676 update gh token 2025-08-30 17:32:11 +03:00
cwilvx 7341c14f9c change release action 2025-08-30 17:12:03 +03:00
cwilvx 7450324514 update github ci token 2025-08-28 20:06:30 +03:00
cwilvx 8a767c04a3 Add sparse checkout for changelog in build workflow 2025-08-28 19:39:42 +03:00
cwilvx e57d4c6596 try: fix compression on windows 2025-08-28 19:26:54 +03:00
cwilvx ebc740a5a5 refactor Paths and update build workflow
+ rename app_dir -> config_dir and config_dir to config_parent
+ bundle web client as zip
+ bundle and extract client zip when running pyinstaller builds
+ installer pyinstaller as main dependency
+ remove fallback client flag
+ handle already used port
+ add assethandler class
+ remove some startup logs
+ ignore wheels and client.zip files
2025-08-28 16:38:49 +03:00
michily e770606567 merge refactors pr #364 from @michilyy
* Save to DB only unique trackhashes

* Add check if track already exists in playlist

* replace all paths with `pathlib.Path`

* `architecture.md`:
* add config folder layout

`config.py`:
* fix bug where `pathlib.Path` cannot be serialized

`files.py`:
* remove unused imports
* update path concatenation to `pathlib.Path`
* add config-folder creation

`imgserver.py`:
* fix serialisation bug

`playlistlib.py`:
* update path concatenation to `pathlib.Path`

* update all `settings.Paths` usages to new singleton `Paths` class.

* update all usages of `settings.Paths`

* `files.py`:
* rework assets copy function.
* remove unused loop and unused `shutil.copy2` function

`settings.py`
* fix recursion exception in `Paths`

* `settings.py`:
* remove Singleton and `@property` todos from `Paths`

* `__init__.py`:
* remove now unused function `create_config_dir()`

`setup.files`:
* remove because merged into `settings.Paths()`
  for more central and clear flow how the base path gets decided

`settings.py`:
* add `copy_assets` function

`start_swingmusic.py`:
* add configurable settings.Paths class

`__main__.py`:
* update click to used correct default path

* remove wrong commited egg files

* remove change in the wrong branch

* add forgotten `property` decorator
update `get_files_and_dirs` to use pathlib where possible

`config.py`:
* update type annotation

`folders.py`:
* convert `pathlib` to posix path where needed for sub-functions

`folderlib.py`:
* rework `get_files_and_dirs` to use `pathlib` where possible

`settings.py`:
* add forgotten `@property`

`start_swingmusic.py`:
* remove second `log_startup_info()`

* `artistlib.py`:
* fix calling property
`tagger.py`:
* fix comparing elements in `pathlib.Path`

* add support for repeating lyrics.

* rework lyrics api and lib

* update most path functions.
add type-hint pathlib where needed

* for serialization paths are converted to posix path

* use `open` instead of `os.open`
update `metaclass` with constant

* fix initial config exception if empty file existed

* update `userConfig` with `InitVar` to be excluded from `asdict`

* remove `is_windows_slash()`
rework path function to use pathlib

* convert `pathlib.Path` to `str` for serialization

* fixing bug with str + pathlib

* `__main__.py`:
* update click to use package version
* remove now unused function `print_version`

`filesystem.py`:
* rework `CWD` to use importlib

`pyproject.toml`:
* disable namespace for `importlib.resources` to work correctly

* update `lyrics.py`:
* remove unused functions
* simplify functions

* fix bug where assets get created on root

* remove unused code

* update lyrics for clearer structure.

* add support for unsynced lyrics

* fix wrong return type in unsynced lyrics

* update `/check` to use `send_lyrics`

* prefer tags to duplicates

* `lyrics.py`:
* add docs to a function group

* `logger.py`:
* add logging config dict.
* combine Logging into one file
* add socket logger
* add debug mode to logger
* add JSONL formater

* `logger.py`:
* update config to directly use the formater.
resolves circular import exception

`__main__.py`:
* add logger setup to main

`start_swingmusic.py`:
* add debug option to cli

* `lyrics.py`:
* add offset support

* add `setuptools-scm` to get version from git

* add support for docker build with scm

* add support for docker build with scm
need someone who can test the changes workflow

* update all usage of `version.txt` to `metadata.version()`

* 2x update all usage of `version.txt` to `metadata.version()`

* update to no local_scheme version

* provide fix for #331.
convert `sql.Row` and `TrackTable` to dict before converting to dataclass.

* fix `__main__.py`:
* wrong import and uncommited changes
* add debug and base_path parameter

* fix logger pathlib

* add client build workflow

* set name

* split client from build

* try fixing builds

* try another fix

* try also another fix

* try again something new

* try again something new

* change runner

* fix failed run because of malformed runner

* add wheel builds

* remove systems from pure python build

* add isolated pyinstaller build

* artifacts with names

* wrong wheel path

* try fetch-depth for tag fetch

* disable fail-fast.
add wheel installation

* add install system packages

* add debug

* fix wheel install
fix pyinstaller spec file

* try fix for pyinstaller

* try another fix

* build on release

* add concrete release types

* only run on released or pre-released

* try release upload

* reformat upload

* fix needs tag

* identifiable pyinstaller builds

* compress client folder before uploading

* update to src build

* remove no more needed aarch64 build script
rename pyinstaller assets to lowercase

* remove unneeded code

* fix: save to DB only unique track hashes

* replace click with argparse

* set concrete types in argparse

* replace manuall path usages with pathlib

* remove unused `configs.py` file

* reformat `start_swingmusic.py`

* fix empty set startup exception

* optimizing static files serve function

* fixing bug in optimisation of static files serve function

* fix folder view bug

* colorlib.py:
* fix wrong type exception
* remove singe use Index_everything class
* update logging of populate.py

* cleanup files

* fix settings.py Paths copy function.
Created folder on file.

* add exist check to folder

* remove unused `INFO` class

* fix multiprocessing bug on windows

* potential icon fix for pyinstaller
fix multiple logging bug

* fix argparse config path bug
add jobs file

* cleanup code fragments
fix logging issue
add notes to function

* note that concurrent creates own sys.modules

* refactor some lyrics plugin condition
remove unused import from hashing

* refactor taglib.py

* update import statements to be static

* playlistlib.py:
* refactoring and more doc strings
populate.py:
* add poc bugfix
settings.py:
* add typehint

* possible bugfix for multitreading globals

* folder.py:
* add check if provided path is absolute
populate.py:
* add bug note
settings.py:
* add possible error from Singleton implementation
start_swingmusic.py:
* correct spelling
* pass resolved path to Paths
tagger.py:
* add logging

* trying out fixes for multithreading

* only upload results not metadata

* fix build action again

* folder.py:
* strictly use pathlib where possible

folderlib.py:
* add missing docstring to function, who really need it.

track.py:
* refactor some code

folder.py:
* refactor some more code

* Merge DBPath class and Paths class.
Update all usages of DBPath

folderslib.py:
* fix bug with logging

taglib.py:
* add missing docstring

settings.py:
* merge classes
* refactor

* network.py:
* add more docstring

config.py:
* update pathlib usage

tools.py:
* refactor
* add docstrings

* colorlib.py:
* add docstring

Refactor App builder into grouped config settings.

* update assets access for migration

* Update FUNDING.yml

* Update FUNDING.yml

* upgrade tinytag in requirements.txt

* update readme

* update license

* update readme

* Update README.md

* Update README.md

* cleanup requirements.txt
remove unused import in audio_segment.py
add entrypoint.sh for appimage support
update pyproject.toml for optional dependencies
add appimage to github workflow

* fix invalid workflow file

* AppImage build needs more research.
Commenting for now

* testing a new build workflow

* add libev installation

* update workflow to new optional dependencies

* trying again another fix

* finally fix all optional deps installation correctly

* remove AppImage poc

* albumslib.py:
* add docstring

folder.py:
* add unix path fix

update logger name to `__name__`

* update build with docker
update Dockerfile with git
fix typo in lyrics.py
add dynamic deps back

* add log for static folder

* add missing import

* add some more todos

* add support for AppImages even when it's not perfect.

* quick bugfix for wrong appimage config path

* fix uploading not finding AppImages builds aka wrong pattern

* optimise docker build by using artifacts.
Add client path option.
change docstring to sphinx format

* add todos

* Now support AppImages for real:
manually build AppImage as we are building a complex project.

* fix missing dep in AppImage build

* add full AppImage metadata

* add missing image file.

* only update swingmusic appimage not tool

* add todo and fix AppImage build again.

* Try fixing some path mixup in AppImage build

* add debug tag to action

* correct path to appimage folder

* do not download tool before checkout

* Another fix for path in appimage build

* extend config files with more information

* default client dir is now inside the config dir.
TODOs updated.

* default client dir is now inside the config dir.
TODOs updated.
Add priority todos.

* Auto download client when client not found.
Respects user provided dir.

* rename `requests` submodule to `request`

* poc for arm AppImage builds

* try out another fix

* fix typo in build.yml

* add missing arch tag

* fix uploading double names

* unique naming

* enable fallback version for project.

* do not download client into readonly dir.

* fix relative client download path. Client was resolved into parent of config.

* remove client backup path as client is now downloadable

* `Paths` checks if config folder exists and creates it if necessary.
logger no more creates the config folder.
`app_builder.py`: static route no more with '/client'

* path are only created in MainProcess.
fix gz file not found.

* move assets into src and update usages accordingly

* remove solved todos

* Only upload artefacts if not draft/master aka only on tag

* wrong type in assets copy

* update log with correct priority

* add debug statements and logging to Paths

* remove debugging statement

* remove double version tag from docker build

* fork save release protection

* fix typo

* add fallback client dir for static builds.

* update argparse to new param

* add missing import pathlib

* add sparse checkout as we do not need everything downloaded

* add assets copy check

* init logger bevor Paths

* remove unused import

* check if logdir exists and create if not

* only add exec info to file

* remove exception log from cli

* move logging into main.
Allows tools support again.

* UserConfig now correctly uses _finished key.
Bug where _finished was never written

* double save serverId.
update root_dir to trow no exception on init.
remove debug param

* clean up TODOs

---------

Co-authored-by: skilletfun <skilletfun.laptew.sergey@yandex.ru>
Co-authored-by: Mungai Njoroge <geoffreymungai45@gmail.com>
2025-08-28 12:28:11 +03:00
cwilvx 58133de040 move release workflow to windows-2022 2025-06-17 23:37:07 +03:00
cwilvx 86fabcd5e3 modularize src
+ merge main.py and manage.py
+ move start logic to swingmusic/__main__.py
+ add a run.py on the project root
2025-05-25 20:35:54 +03:00
cwilvx 29a916464c remove docker build needs 2025-05-10 18:29:19 +03:00
cwilvx cc5f94103d attach docker build to build action 2025-05-10 17:04:27 +03:00
cwilvx 3065a6b639 re-enable release action 2025-05-10 17:02:42 +03:00
cwilvx e8118cc747 remove ubuntu and win arm64 2025-05-10 16:51:52 +03:00
cwilvx a005172e8a remove win-arm64 because of gevent wheels 2025-05-09 13:12:59 +03:00
cwilvx 5733623c88 fix: if statement syntax error 2025-05-09 13:00:23 +03:00
cwilvx 1cc0118daa update python version for win arm 2025-05-09 12:42:19 +03:00
cwilvx 86b6122e3a setup brew for macos 2025-05-09 12:36:53 +03:00
cwilvx b7c88b8cce workflow: upgrade node version for win arm 2025-05-08 21:13:04 +03:00
cwilvx f1aa723cb9 disable docker and release workflow 2025-05-08 21:07:34 +03:00
cwilvx 2c6ec2952b try: support macos intel, macos arm, linux arm and win arm.
+ improve artifact handling
+ remove import debug from build
2025-05-08 21:06:07 +03:00
cwilvx 45b0eb771c try: append server module in requirments 2025-05-08 20:07:12 +03:00
cwilvx b552f05491 remove arm64 file upload 2025-04-30 12:24:44 +03:00
cwilvx 882761c307 disable arm64 build 2025-04-30 12:11:49 +03:00
cwilvx fcb2265460 update workflow to use ubuntu 22 2025-04-30 11:35:45 +03:00
cwilvx 37a4458755 update entrypoints 2025-04-03 14:45:56 +03:00
cwilvx 8b0f40ee4c try: sudo install libev 2025-04-03 14:39:01 +03:00
cwilvx 056c0456f9 install libev on build scripts
+ fix: scanning system dirs on mac
2025-04-03 14:25:44 +03:00