Skip to content

Commit 38434a5

Browse files
committed
re-added config option for upload dir, frontend: added upload section to actions-info
1 parent 81e2bd2 commit 38434a5

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

backend/beets_flask/config/schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class InboxSectionSchema:
9090
# Useful to exclude temporary files from being shown in the inbox.
9191
# To show all files (independent of which files beets will copy) set to []
9292
debounce_before_autotag: int = 30
93+
temp_dir: str = field(default="/tmp/beets-flask/upload")
9394
folders: dict[str, InboxFolderSchema] = field(
9495
default_factory=lambda: {
9596
"placeholder": InboxFolderSchema(

backend/beets_flask/server/routes/file_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def upload():
4343
filename, filedir = _get_filename_and_dir()
4444
log.info(f"Uploading file '{filename}' to '{filedir}' ...")
4545

46-
temp_path: Path = get_config()["gui"]["inbox"]["temp_dir"].as_path() # type: ignore
46+
temp_path: Path = Path(get_config().data.gui.inbox.temp_dir)
4747
temp_path.mkdir(parents=True, exist_ok=True)
4848

4949
# upload to temp location with 1 hour timeout

frontend/src/routes/inbox/index.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ function InfoDescription() {
261261
<ActionInfo action="copy_path" />
262262
<ActionInfo action="delete" />
263263
<ActionInfo action="undo" />
264+
<ActionInfo action="upload" />
264265
</Box>
265266
{/* Tree view */}
266267
<Typography sx={{ fontWeight: 'bold', marginBottom: 0.5 }}>
@@ -313,6 +314,29 @@ function InfoDescription() {
313314
Music album (identified as such by beets)
314315
</Typography>
315316
</Box>
317+
<Box
318+
sx={{
319+
display: 'flex',
320+
gap: 1,
321+
alignItems: 'center',
322+
}}
323+
>
324+
<FolderTypeIcon
325+
isAlbum={true}
326+
isOpen={false}
327+
isArchive={true}
328+
size={theme.iconSize.lg}
329+
/>
330+
<FolderTypeIcon
331+
isAlbum={true}
332+
isOpen={true}
333+
isArchive={true}
334+
size={theme.iconSize.lg}
335+
/>
336+
<Typography>
337+
Archive file (identified as such by beets)
338+
</Typography>
339+
</Box>
316340
<Box
317341
sx={{
318342
display: 'flex',

0 commit comments

Comments
 (0)