mirror of
https://github.com/OMGeeky/twba.splitter.git
synced 2025-12-26 17:02:35 +01:00
fix bug in ffmpeg playlist parsing & logs
This commit is contained in:
@@ -37,11 +37,13 @@ impl SplitterClient {
|
||||
|
||||
match result {
|
||||
Ok(count) => {
|
||||
info!("Split video with id: {} into {} parts", id, count);
|
||||
video.status = ActiveValue::Set(Status::Split);
|
||||
video.part_count = ActiveValue::Set(count as i32);
|
||||
video.clone().update(&self.db).await?;
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Could not split video with id: {} because of err: {:?}", id, err);
|
||||
video.status = ActiveValue::Set(Status::SplitFailed);
|
||||
video.clone().update(&self.db).await?;
|
||||
return Err(err);
|
||||
|
||||
@@ -150,7 +150,7 @@ pub(crate) async fn get_playlist_info(playlist_path: &PathBuf) -> Result<Playlis
|
||||
total_duration = total_duration + duration;
|
||||
} else if line.starts_with("#EXT-X-ENDLIST") {
|
||||
break;
|
||||
} else if lines.starts_with("#EXT") {
|
||||
} else if line.starts_with("#EXT") {
|
||||
trace!("unknown line in playlist: {}", line);
|
||||
continue;
|
||||
} else if let Some(duration) = last_duration {
|
||||
|
||||
@@ -11,7 +11,7 @@ async fn main() -> Result<()> {
|
||||
tracing_subscriber::fmt()
|
||||
.with_max_level(tracing::Level::INFO)
|
||||
.with_env_filter(
|
||||
"sea_orm=warn,sea_orm_migration=warn,sqlx=warn,splitter=trace,twba_local_db=warn,other=warn",
|
||||
"sea_orm=warn,sea_orm_migration=warn,sqlx=warn,twba_splitter=trace,twba_local_db=warn,other=warn",
|
||||
)
|
||||
.init();
|
||||
info!("Hello, world!");
|
||||
|
||||
Reference in New Issue
Block a user