Pendigard's picture
Upload folder using huggingface_hub (part 75)
ce4b573 verified
Raw History Blame Contribute Delete
653 Bytes
# StationPlaylist add-on installation tasks
# Copyright 2015-2021 Joseph Lee, released under GPL.
# Provides needed routines during add-on installation and removal.
# Partly based on other add-ons, particularly Place Markers by Noelia Martinez (thanks add-on authors).
import addonHandler
addonHandler.initTranslation()
def onInstall():
import os
import shutil
profiles = os.path.join(os.path.dirname(__file__), "..", "stationPlaylist", "profiles")
# Import old profiles.
if os.path.exists(profiles):
newProfiles = os.path.join(os.path.dirname(__file__), "profiles")
try:
shutil.copytree(profiles, newProfiles)
except IOError:
pass