|
|
|
@ -18,6 +18,8 @@ def get_all_media_from_db_by_type(db, media_type):
|
|
|
|
|
for workout_item in session['workoutItems']: |
|
|
|
|
media.append(workout_item[item_key]) |
|
|
|
|
media = list(set(media)) |
|
|
|
|
if None in media: |
|
|
|
|
media.remove(None) |
|
|
|
|
return media |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -46,7 +48,7 @@ def refactor_media_paths_in_db(db):
|
|
|
|
|
db_name = db['name'] |
|
|
|
|
for session in db['workoutSessions']: |
|
|
|
|
for workout_item in session['workoutItems']: |
|
|
|
|
item_has_video = workout_item['videoPath'] != '' |
|
|
|
|
item_has_video = workout_item['videoPath'] not in ('', None) |
|
|
|
|
if item_has_video: |
|
|
|
|
new_formatted_path = get_remote_formatted_media_path( |
|
|
|
|
media_type='video', |
|
|
|
|