New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add library/<id>/scan
to force a scan and metadata update capability for current scanner.
#401
Conversation
@vgarleanu there seems to be some CI error for downloading ffmpeg stuff |
Yeah known issue, working on it... |
library/<id>/scan
to force a scan and metadata update capability for current scanner.
@@ -270,6 +288,19 @@ pub async fn get_self( | |||
Ok(reply::json(&Library::get_one(&mut tx, id).await?)) | |||
} | |||
|
|||
/// # POST `/api/v1/library/<id>/scan` | |||
/// This method will scan the provided library, updating the metadata for pre-existing media entries. | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mssing docs
media_id, | ||
library_id, | ||
target_file, | ||
raw_name: media_file.raw_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't we updating the raw name to the media's name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking it might be cleaner to just update the media file with the correct name and year so that the flow below won't error out if it doesn't find a correct result in tmdb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a file is matched already, we might want to set its raw_name
and raw_year
to its parent media's name
and year
. This way later down this flow, we dont have to lookup the parent of a mediafile always. We might also want to set the raw_episode and raw_season for a mediafile to the episode and season of its parent if its parent is an episode.
library_id, | ||
target_file, | ||
raw_name: media_file.raw_name, | ||
raw_year: raw_year.or(media_file.raw_year), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
Closing as this PR is superseded by #447 |
No description provided.