File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,11 @@ def localdrive(self, request):
143143
144144
145145def _networkimport (channel_id , update_progress = None ):
146- call_command ("importchannel" , "network" , channel_id )
146+ call_command (
147+ "importchannel" ,
148+ "network" ,
149+ channel_id ,
150+ update_progress = update_progress )
147151 call_command (
148152 "importcontent" ,
149153 "network" ,
@@ -154,8 +158,14 @@ def _networkimport(channel_id, update_progress=None):
154158def _localimport (drive_id , update_progress = None ):
155159 drives = get_mounted_drives_with_channel_info ()
156160 drive = drives [drive_id ]
161+ # copy channel's db file then copy all the content files from sorage dir
157162 for channel in drive .metadata ["channels" ]:
158- call_command ("importchannel" , "local" , channel ["id" ], drive .datafolder )
163+ call_command (
164+ "importchannel" ,
165+ "local" ,
166+ channel ["id" ],
167+ drive .datafolder ,
168+ update_progress = update_progress )
159169 call_command (
160170 "importcontent" ,
161171 "local" ,
@@ -168,7 +178,11 @@ def _localexport(drive_id, update_progress=None):
168178 drives = get_mounted_drives_with_channel_info ()
169179 drive = drives [drive_id ]
170180 for channel in ChannelMetadataCache .objects .all ():
171- call_command ("exportchannel" , channel .id , drive .datafolder )
181+ call_command (
182+ "exportchannel" ,
183+ channel .id ,
184+ drive .datafolder ,
185+ update_progress = update_progress )
172186 call_command (
173187 "exportcontent" ,
174188 channel .id ,
You can’t perform that action at this time.
0 commit comments