- Rename artist_fetch_worker.py to fetch_worker.py - Rename search_item_worker.py to search_worker.py - Rename artist_update_worker.py to update_worker.py - Update all references in app_controller.py and UI components - Simplify AppController class with better method names and documentation - Rename artist_details_view to details_view and update references Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> |
||
|---|---|---|
| .idea | ||
| src/metasync | ||
| .gitignore | ||
| .pylintrc | ||
| .python-version | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
MetaSync
MetaSync is a Python desktop application that synchronizes music metadata between different music platforms, primarily focusing on Last.fm and a custom platform called LoneStar. The application provides a graphical user interface for managing artist information, tags, and images across these platforms.
Features
- Cross-platform music metadata synchronization: Sync artist information, tags, and images between Last.fm and LoneStar
- Artist search and management: Search for artists and manage their metadata
- Intelligent search results: Find artists with alternative suggestions and exact match detection
- Tag synchronization: Transfer tags from one platform to another
- Image management: Handle artist images from both platforms
- User-friendly GUI: Built with PySide6 for an intuitive desktop experience
- Authentication support: Secure authentication with music platforms
- Recent tracks tracking: Access to user's recently played tracks
- Configurable settings: Proxy support and account management
Technology Stack
- Language: Python 3.13+
- GUI Framework: PySide6 (Qt bindings for Python)
- API Interaction: Custom API client for Last.fm and LoneStar
- Data Modeling: Pydantic for data validation and serialization
- Logging: Structured logging with colorlog
- Configuration: YAML-based configuration management
- HTTP Requests: requests library with SOCKS proxy support
Installation
Prerequisites
- Python 3.13 or higher
Setup
-
Clone the repository:
git clone <repository-url> cd MetaSync -
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install the package:
pip install . # Or for development: pip install -e .
Configuration
MetaSync requires configuration for both Last.fm and LoneStar accounts. You can set these up through the application's settings dialog, which includes:
- API key and secret for Last.fm
- Account credentials for both platforms
- Proxy settings if needed
- Network source and target preferences
Usage
-
Launch the application:
metasync -
Configure your accounts in the settings dialog
-
Add artists to sync through the search functionality
-
Manage metadata and trigger synchronization
Architecture
MetaSync follows a Model-View-Controller (MVC) pattern with dedicated worker threads:
- Models: Pydantic models for data validation and structure
- Views: PySide6-based GUI components
- Controller: AppController manages application state and data flow
- Services: Business logic for artist management and API interactions
- Workers: Threading support for background operations (search, fetch, update)
API Integration
The application integrates with music APIs through a custom client that handles:
- Authentication (auth.getMobileSession)
- Artist information retrieval (artist.getinfo)
- Artist updates (artist.update)
- Tag management (artist.addTags, artist.getTopTags)
- Artist search functionality (artist.search)
- Recent tracks access
Development
Dependencies
Key dependencies include:
pyside6: GUI frameworkpydantic: Data validationpylast: Last.fm APIrequests: HTTP clientpysocks: SOCKS proxy supportcolorlog: Colored loggingpyyaml: Configuration file handling
Project Structure
src/
├── metasync/
│ ├── api/ # API client implementations
│ ├── config/ # Configuration management
│ ├── gui/ # GUI components and controllers
│ ├── models/ # Data models using Pydantic
│ ├── services/ # Business logic
│ ├── utils/ # Utility functions
│ ├── __main__.py # Application entry point
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the GNU General Public License v3.0 or later (GPLv3+).
Support
For support, please contact the author or submit an issue on the repository.