# Path: src/controllers/utils.py
# def registerContext(func):
#     def wrapper(*args, **kwargs):
# def registerObj(name, obj):
# def duration_to_string(value, default="00:00", i=1000):
# def openLocalUrl(url):


import os
import sys
from PyQt5.QtCore import (QObject, pyqtSignal, pyqtSlot, pyqtProperty, QUrl)
from .utils import registerContext, contexts
    registerQmlObj = pyqtSignal('QString', 'QVariant')

    #init load
    downloadSuggestPlaylist = pyqtSignal()

    #play song by local url
    playMusicByLocalUrl = pyqtSignal('QString')

    #play song by songId like 86245
    playMusicBySongIdSignal = pyqtSignal(int)

    #play songs by ids like '1503754_189217_280991'
    playMusicByIdsSignal = pyqtSignal('QString')

    #play songs by album Id like 1285572
    playMusicByAlbumIdSignal = pyqtSignal(int)

    # add online song to favorite playlist by songId
    addToFavoriteByIdSignal = pyqtSignal(int)

    # remove online song from playlist by songId
    removeFromFavoriteByIdSignal = pyqtSignal(int)

    #添加我的收藏
    addtoFavorite = pyqtSignal('QString')

    #移出我的收藏
    removeFromFavorite = pyqtSignal('QString')

    # 在线音乐添加到下载列表

# Path: src/controllers/utils.py
# def registerContext(func):
#     def wrapper(*args, **kwargs):
# def registerObj(name, obj):
# def duration_to_string(value, default="00:00", i=1000):
# def openLocalUrl(url):


# Path: src/controllers/signalmanager.py
import os
import sys
from PyQt5.QtCore import (QObject, pyqtSignal, pyqtSlot, pyqtProperty, QUrl)
from .utils import registerContext, contexts

    registerQmlObj = pyqtSignal('QString', 'QVariant')

    #init load
    downloadSuggestPlaylist = pyqtSignal()

    #play song by local url
    playMusicByLocalUrl = pyqtSignal('QString')

    #play song by songId like 86245
    playMusicBySongIdSignal = pyqtSignal(int)

    #play songs by ids like '1503754_189217_280991'
    playMusicByIdsSignal = pyqtSignal('QString')

    #play songs by album Id like 1285572
    playMusicByAlbumIdSignal = pyqtSignal(int)

    # add online song to favorite playlist by songId
    addToFavoriteByIdSignal = pyqtSignal(int)

    # remove online song from playlist by songId
    removeFromFavoriteByIdSignal = pyqtSignal(int)

    #添加我的收藏
    addtoFavorite = pyqtSignal('QString')

    #移出我的收藏
    removeFromFavorite = pyqtSignal('QString')

    # 在线音乐添加到下载列表

    addtoDownloadlist = pyqtSignal(int)