Custom User Title
Posts: 11,065
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
The conditional seems to be working now. Here's some debug info if you want to see it anyways.
Here's the chain:
Spoiler:
Code:
{
"active": true,
"chain_settings": {
"chain_links": [
{
"action_name": "Single Field Edit",
"action_settings": {
"col_name": "#percentread",
"value_type": "prompt"
},
"comment": "Set #percentread column",
"condition_settings": {
"cmp_type": "=",
"datatype": "number",
"template": "program: globals(selection_count)",
"value": 1.0
}
},
{
"action_name": "Calibre Actions",
"action_settings": {
"disable_busy_cursor": true,
"selection": [
{
"display": "Store/Restore current bookmark",
"path": [
"KoboUtilities",
"Store/Restore current bookmark"
],
"paths_text": "Store/Restore current bookmark"
}
]
},
"comment": "Restore bookmarks"
},
{
"action_name": "Calibre Actions",
"action_settings": {
"disable_busy_cursor": true,
"selection": [
{
"display": "Upload covers for Selected Books",
"path": [
"KoboUtilities",
"Upload covers for Selected Books"
],
"paths_text": "Upload covers for Selected Books"
}
]
},
"comment": "Re-upload cover"
},
{
"action_name": "Single Field Edit",
"action_settings": {
"col_name": "#onkobo",
"value": true,
"value_type": "predefined"
},
"comment": "Update #onkobo column"
}
],
"refresh_gui": true
},
"condition_settings": {
"cmp_type": "=",
"datatype": "text",
"template": "program: connected_device_name('main')",
"value": "Kobo Aura HD"
},
"image": "sync.png",
"menuText": "Restore Device Bookmarks",
"subMenu": ""
},
{
"active": true,
"chain_settings": {},
"image": "",
"menuText": "",
"subMenu": ""
},
Debug log (I canceled the restore and re-upload):
Spoiler:
Code:
debug1: run_check: global_vars: {'_chain_name': 'Quick Open Tags Manager', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1'}
template: program: globals(selection_count)
value: 1.0
operator: <built-in function eq>
template_output: 1
debug2: template_output: 1.0
output_type: <class 'float'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'number', 'template': 'program: globals(selection_count)', 'value': 1.0}
current_selection_count: 1
is_true: True
debug1: run_check: global_vars: {'_chain_name': 'Restore Device Bookmarks', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1'}
template: program: connected_device_name('main')
value: Kobo Aura HD
operator: <built-in function eq>
template_output: Kobo Aura HD
debug2: template_output: Kobo Aura HD
output_type: <class 'str'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'text', 'template': "program: connected_device_name('main')", 'value': 'Kobo Aura HD'}
current_selection_count: 1
is_true: True
Action Chains: Starting chain: Restore Device Bookmarks
debug1: run_check: global_vars: {'_chain_name': 'Restore Device Bookmarks', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1', '_action_name': 'Single Field Edit', '_action_comment': 'Set #percentread column', '_action_index': '0'}
template: program: globals(selection_count)
value: 1.0
operator: <built-in function eq>
template_output: 1
debug2: template_output: 1.0
output_type: <class 'float'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'number', 'template': 'program: globals(selection_count)', 'value': 1.0}
current_selection_count: 1
is_true: True
Action Chains: Restore Device Bookmarks: starting action No. 1: Single Field Edit
debug1: run_check: global_vars: {'_chain_name': 'Restore Device Bookmarks', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1', '_action_name': 'Calibre Actions', '_action_comment': 'Restore bookmarks', '_action_index': '1'}
template: program: connected_device_name('main')
value: Kobo Aura HD
operator: <built-in function eq>
template_output: Kobo Aura HD
debug2: template_output: Kobo Aura HD
output_type: <class 'str'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'text', 'template': "program: connected_device_name('main')", 'value': 'Kobo Aura HD'}
current_selection_count: 1
is_true: True
Action Chains: Restore Device Bookmarks: starting action No. 2: Calibre Actions
Actions Chains: Calibre Actions: paths > ['KoboUtilities', 'Store/Restore current bookmark']
Actions Chains: Calibre Actions: Found action: &Store/Restore current bookmark
DEBUG: 200.6 Have a Kobo device connected connected
DEBUG: 200.6 BEGIN Get Device Path
DEBUG: 200.6 Root path of device: K:\
DEBUG: 200.6 END Get Device Path
DEBUG: 200.6 KoboUtilities:get_device - self.device_path="K:\"
DEBUG: 200.6 KoboUtilities:get_device - drive_info: {'main': {'device_store_uuid': '97dc9975-085a-4dc5-a7f4-a614689983f3', 'device_name': 'Kobo Aura HD', 'prefix': 'K:/', 'date_last_connected': '2020-12-26T22:44:05.310516+00:00', 'location_code': 'main', 'last_library_uuid': 'b96decbc-fcca-470f-b7af-8e1338a26310', 'calibre_version': '5.8.1'}}
DEBUG: 200.6 migrate_library_config_if_required - start
DEBUG: 200.6 get_library_config - library_config: {'SchemaVersion': 0.1, 'profiles': {'Kobo Aura HD': {'customColumnOptions': {'currentReadingLocationColumn': '#kobobookmark', 'lastReadColumn': '#lastread', 'percentReadColumn': '#percentread', 'ratingColumn': 'rating'}, 'forDevice': '97dc9975-085a-4dc5-a7f4-a614689983f3', 'profileName': 'Kobo Aura HD', 'storeOptionsStore': {'storeOnConnect': False, 'promptToStore': False, 'storeIfMoreRecent': True, 'doNotStoreIfReopened': False}, 'updateOptionsStore': {'doEarlyFirmwareUpdate': False, 'doFirmwareUpdateCheck': False, 'firmwareUpdateCheckLastTime': 0}}}, 'readingPositionChangesStore': {'selectBooksInLibrary': True, 'updeateGoodreadsProgress': False}}
DEBUG: 200.6 get_prefs - start - store_name='storeOptionsStore'
DEBUG: 200.6 get_plugin_pref - start - store_name='commonOptionsStore', option='individualDeviceOptions'
DEBUG: 200.6 get_prefs - start - store_name='backupOptionsStore'
DEBUG: 200.6 get_prefs - start - store_name='updateOptionsStore'
DEBUG: 200.6 BEGIN Get Device Path
DEBUG: 200.6 Root path of device: K:\
DEBUG: 200.6 END Get Device Path
DEBUG: 200.6 _get_selected_ids - self.gui.current_view().model() <calibre.gui2.library.models.BooksModel object at 0x000002926C4258B0>
DEBUG: 200.6 migrate_library_config_if_required - start
DEBUG: 200.6 get_library_config - library_config: {'SchemaVersion': 0.1, 'profiles': {'Kobo Aura HD': {'customColumnOptions': {'currentReadingLocationColumn': '#kobobookmark', 'lastReadColumn': '#lastread', 'percentReadColumn': '#percentread', 'ratingColumn': 'rating'}, 'forDevice': '97dc9975-085a-4dc5-a7f4-a614689983f3', 'profileName': 'Kobo Aura HD', 'storeOptionsStore': {'storeOnConnect': False, 'promptToStore': False, 'storeIfMoreRecent': True, 'doNotStoreIfReopened': False}, 'updateOptionsStore': {'doEarlyFirmwareUpdate': False, 'doFirmwareUpdateCheck': False, 'firmwareUpdateCheckLastTime': 0}}}, 'readingPositionChangesStore': {'selectBooksInLibrary': True, 'updeateGoodreadsProgress': False}}
DEBUG: 200.6 get_column_names - columns_config: {'currentReadingLocationColumn': '#kobobookmark', 'lastReadColumn': '#lastread', 'percentReadColumn': '#percentread', 'ratingColumn': 'rating'}
Actions Chains: Calibre Actions: Finishing run action
debug1: run_check: global_vars: {'_chain_name': 'Restore Device Bookmarks', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1', '_action_name': 'Calibre Actions', '_action_comment': 'Re-upload cover', '_action_index': '2'}
template: program: connected_device_name('main')
value: Kobo Aura HD
operator: <built-in function eq>
template_output: Kobo Aura HD
debug2: template_output: Kobo Aura HD
output_type: <class 'str'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'text', 'template': "program: connected_device_name('main')", 'value': 'Kobo Aura HD'}
current_selection_count: 1
is_true: True
Action Chains: Restore Device Bookmarks: starting action No. 3: Calibre Actions
Actions Chains: Calibre Actions: paths > ['KoboUtilities', 'Upload covers for Selected Books']
Actions Chains: Calibre Actions: Found action: &Upload covers for Selected Books
DEBUG: 201.6 Have a Kobo device connected connected
DEBUG: 201.6 BEGIN Get Device Path
DEBUG: 201.6 Root path of device: K:\
DEBUG: 201.6 END Get Device Path
DEBUG: 201.6 KoboUtilities:get_device - self.device_path="K:\"
DEBUG: 201.6 KoboUtilities:get_device - drive_info: {'main': {'device_store_uuid': '97dc9975-085a-4dc5-a7f4-a614689983f3', 'device_name': 'Kobo Aura HD', 'prefix': 'K:/', 'date_last_connected': '2020-12-26T22:44:05.310516+00:00', 'location_code': 'main', 'last_library_uuid': 'b96decbc-fcca-470f-b7af-8e1338a26310', 'calibre_version': '5.8.1'}}
DEBUG: 201.6 migrate_library_config_if_required - start
DEBUG: 201.6 get_library_config - library_config: {'SchemaVersion': 0.1, 'profiles': {'Kobo Aura HD': {'customColumnOptions': {'currentReadingLocationColumn': '#kobobookmark', 'lastReadColumn': '#lastread', 'percentReadColumn': '#percentread', 'ratingColumn': 'rating'}, 'forDevice': '97dc9975-085a-4dc5-a7f4-a614689983f3', 'profileName': 'Kobo Aura HD', 'storeOptionsStore': {'storeOnConnect': False, 'promptToStore': False, 'storeIfMoreRecent': True, 'doNotStoreIfReopened': False}, 'updateOptionsStore': {'doEarlyFirmwareUpdate': False, 'doFirmwareUpdateCheck': False, 'firmwareUpdateCheckLastTime': 0}}}, 'readingPositionChangesStore': {'selectBooksInLibrary': True, 'updeateGoodreadsProgress': False}}
DEBUG: 201.6 get_prefs - start - store_name='storeOptionsStore'
DEBUG: 201.6 get_plugin_pref - start - store_name='commonOptionsStore', option='individualDeviceOptions'
DEBUG: 201.6 get_prefs - start - store_name='backupOptionsStore'
DEBUG: 201.6 get_prefs - start - store_name='updateOptionsStore'
DEBUG: 201.6 BEGIN Get Device Path
DEBUG: 201.6 Root path of device: K:\
DEBUG: 201.6 END Get Device Path
DEBUG: 201.6 _get_selected_ids - self.gui.current_view().model() <calibre.gui2.library.models.BooksModel object at 0x000002926C4258B0>
DEBUG: 201.6 upload_covers - selectedIDs: [3096]
Actions Chains: Calibre Actions: Finishing run action
debug1: run_check: global_vars: {'_chain_name': 'Restore Device Bookmarks', '_chain_iteration': '1', 'location': 'library', 'selection_count': '1', '_action_name': 'Single Field Edit', '_action_comment': 'Update #onkobo column', '_action_index': '3'}
template: program: connected_device_name('main')
value: Kobo Aura HD
operator: <built-in function eq>
template_output: Kobo Aura HD
debug2: template_output: Kobo Aura HD
output_type: <class 'str'>
debug3: condition_settings: {'cmp_type': '=', 'datatype': 'text', 'template': "program: connected_device_name('main')", 'value': 'Kobo Aura HD'}
current_selection_count: 1
is_true: True
Action Chains: Restore Device Bookmarks: starting action No. 4: Single Field Edit
Job Spy: self.gui.tags_view.recount() is enhanced for showing icons of user category child values...
Action Chains: chain (Restore Device Bookmarks) finished in: 7.309176445007324
Last edited by chaley; 12-26-2020 at 05:49 PM.
Reason: Added spoilers
|