Commit
•
fd988db
1
Parent(s):
25a7fec
Fix issues with multiple Shared Drives
Browse files
app.py
CHANGED
@@ -117,8 +117,14 @@ def search_index(search_text, sd, ks, sort_by, max_results, user_num, search_tit
|
|
117 |
extra_info = '<div id="mapBorder"><strong>If real-world maps are needed please check they are from the folder: Illustrations Now > Maps - Using the New Guidance (2024)</strong></div><br>'
|
118 |
|
119 |
output_df['url'] = output_df['url'].str.replace("/u/0/", f"/u/{int(user_num)}/", regex = False)
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
if len(ks) > 0:
|
123 |
keystage_filter = '|'.join(ks).lower()
|
124 |
if search_title:
|
|
|
117 |
extra_info = '<div id="mapBorder"><strong>If real-world maps are needed please check they are from the folder: Illustrations Now > Maps - Using the New Guidance (2024)</strong></div><br>'
|
118 |
|
119 |
output_df['url'] = output_df['url'].str.replace("/u/0/", f"/u/{int(user_num)}/", regex = False)
|
120 |
+
output_df_temp = pd.DataFrame()
|
121 |
+
if len(sd) > 0:
|
122 |
+
for shared in sd:
|
123 |
+
temp_df = output_df[(output_df['filepath'].str.contains(str(shared), regex = False))]
|
124 |
+
output_df_temp = pd.concat([output_df_temp, temp_df])
|
125 |
+
output_df = output_df_temp.sort_index()
|
126 |
+
# if len(sd) == 1:
|
127 |
+
# output_df = output_df[(output_df['filepath'].str.contains(str(sd[0]), regex = False))]
|
128 |
if len(ks) > 0:
|
129 |
keystage_filter = '|'.join(ks).lower()
|
130 |
if search_title:
|