X1_sync.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:X1-Sync 作者: Kriegbaum 项目源码 文件源码
def setup():                                                                    #Asks new user for information
    print('Enter the directory for your iTunes library')
    spacer_small()
    print('This is typically stored in your \'user/Music/iTunes\' folder')
    print('You can also make a copy wherever you want in iTunes')
    print('Just go File>Library>Export Library...')
    tunes_library_path = input()                                                #Where is my itunes library?
    spacer()
    print('Now you gotta give me the root directory for your media player')
    print('This is typically /Volumes/YOUR DEVICE NAME')
    fiio_dir = input()                                                          #Device directory
    if fiio_dir[len(fiio_dir) - 1] == '/':
        fiio_dir = fiio_dir[0: len(fiio_dir) - 1]                               #User may add an extra slash, get rid of it
    spacer()
    print('Ima save those settings')
    settings_body = 'iTunes Library Path:\n' + tunes_library_path + '\n' + 'Device Root Directory\n' + fiio_dir
    newsettings = open(fiio_dir + '/X1_sync_settings.txt', 'w')                 #Write a settings file into the root directory of device
    newsettings.write(settings_body)
    newsettings.close()
    return [tunes_library_path, fiio_dir]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号