No description
Find a file
Hirad 3d4fa4530b Refactor: Rename worker classes and update AppController references
- 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>
2025-12-10 10:54:57 +03:30
.idea Refactor: Rename worker classes and update AppController references 2025-12-10 10:54:57 +03:30
src/metasync Refactor: Rename worker classes and update AppController references 2025-12-10 10:54:57 +03:30
.gitignore Remove .directory file from tracking and add to .gitignore 2025-11-04 14:45:34 +03:30
.pylintrc Add PySide6 and PyYAML dependencies, refactor ArtistDetailsView UI, add refresh action and improve search dialog 2025-11-14 13:26:29 +03:30
.python-version Add GUI components and refactor core modules for MetaSync application 2025-11-01 09:44:49 +03:30
LICENSE Initial commit 2025-10-21 09:28:12 +03:30
pyproject.toml Add PySide6 and PyYAML dependencies, refactor ArtistDetailsView UI, add refresh action and improve search dialog 2025-11-14 13:26:29 +03:30
README.md Update README.md with comprehensive project description 2025-11-17 12:59:25 +03:30
uv.lock Refactor: Restructure project modules and rename API components 2025-12-09 12:25:48 +03:30

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

  1. Clone the repository:

    git clone <repository-url>
    cd MetaSync
    
  2. Create a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. 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

  1. Launch the application:

    metasync
    
  2. Configure your accounts in the settings dialog

  3. Add artists to sync through the search functionality

  4. 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 framework
  • pydantic: Data validation
  • pylast: Last.fm API
  • requests: HTTP client
  • pysocks: SOCKS proxy support
  • colorlog: Colored logging
  • pyyaml: 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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. 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.