Exemplo n.º 1
0
def main():

    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)

    db_path = "./yue.db"
    sqlstore = SQLStore(db_path)
    Library.init(sqlstore)
    PlaylistManager.init(sqlstore)

    #playlist = Library.instance().search("(.abm 0 limited execution)")
    #uids = [s[Song.uid] for s in playlist]

    uids = list(PlaylistManager.instance().openPlaylist("Nexus5x").iter())
    dp = None  # [("limited","limited"),]

    pdialog = SyncProfileDialog()
    if pdialog.exec_():
        s = pdialog.export_settings()
        #s['no_exec'] = True
        sdialog = SyncDialog(uids, s, dp)
        sdialog.start()
        sdialog.show()

    sys.exit(app.exec_())
Exemplo n.º 2
0
def main():

    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)

    db_path = "./yue.db"
    sqlstore = SQLStore(db_path)
    Library.init(sqlstore)
    PlaylistManager.init(sqlstore)

    window = OpenPlaylistDialog()
    window.show()

    sys.exit(app.exec_())
Exemplo n.º 3
0
def main():

    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)


    db_path = "./libimport.db"
    sqlstore = SQLStore(db_path)
    Library.init( sqlstore )

    window = DialogVolEqLearn()
    window.show()


    sys.exit(app.exec_())
Exemplo n.º 4
0
def main():
    app = QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(True)

    db_path = "./yue.db"
    sqlstore = SQLStore(db_path)
    Library.init(sqlstore)
    PlaylistManager.init(sqlstore)

    table = LibraryTree()

    table.refreshData()

    table.container.resize(640, 320)
    table.container.show()
    #table.checkable= True
    #table.setStyleSheet('font-size: 12pt;')

    sys.exit(app.exec_())
Exemplo n.º 5
0
def main():

    db_path = "./libimport.db"
    sqlstore = SQLStore(db_path)
    Library.init(sqlstore)
    PlaylistManager.init(sqlstore)

    pl = PlaylistManager.instance().openPlaylist("current")
    device = BassSoundDevice(pl, "./lib/win32/x86_64", True)

    songs = Library.instance().search(None, orderby=Song.random, limit=5)
    lst = [s['uid'] for s in songs]
    pl.set(lst)

    print("supports float", BassPlayer.supportsFloat())

    device.setVolume(.25)
    device.play_index(0)

    YueRepl(device=device).repl()
Exemplo n.º 6
0
def main():

    ffmpeg = r"C:\ffmpeg\bin\ffmpeg.exe"
    db_path = "yue.db"

    #target = "ftp://*****:*****@192.168.0.9:2121/Music"
    target = "test"
    transcode = SyncManager.T_NON_MP3
    equalize = True
    bitrate = 320
    run = True
    no_exec = False
    format = SyncManager.P_M3U
    target_prefix = os.getcwd()

    sqlstore = SQLStore(db_path)
    Library.init(sqlstore)
    PlaylistManager.init(sqlstore)

    library = Library.instance()
    playlist = library.search("(.abm 0 limited execution)")
    uids = [s[Song.uid] for s in playlist]

    print(os.path.realpath(db_path))
    print("lib", len(library))

    dp = [
        ("limited", "limited"),
    ]

    sm = SyncManager(library,
                     uids,
                     target,
                     ffmpeg,
                     transcode=transcode,
                     equalize=equalize,
                     dynamic_playlists=dp,
                     target_prefix=target_prefix,
                     playlist_format=format,
                     no_exec=no_exec)
    sm.run()
Exemplo n.º 7
0
def _connect():

    # db_path = "/Users/nsetzer/Music/Library/yue.db"
    db_path = "D:\\Dropbox\\ConsolePlayer\\yue.db"
    sqlstore = SQLStore(db_path)
    History.init(sqlstore)
    Library.init(sqlstore)

    username = "******"
    apikey = "f45596be-5355-4cef-bd00-fb63f872b140"

    songs = Library.instance().search("beast")
    song = songs[0]

    api = ApiClient("http://localhost:4200")
    user = api.login("admin", "admin")
    print(user)
    api.setApiUser(username)
    api.setApiKey(user['apikey'])
    apiw = ApiClientWrapper(api)

    songs = apiw.connect()

    return songs, api, apiw