Download pool/shard006/Python/0053798_installTasks.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard006/Python/0053798_installTasks.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard006/Python/0053798_installTasks.py
-
curl -L -o 0053798_installTasks.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard006/Python/0053798_installTasks.py
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 | |