mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix obfuscated unique ID handling
This commit is contained in:
parent
3a9941f69f
commit
8d4da63855
@ -150,7 +150,13 @@ pub async fn identify(path: String) -> Option<MediaInfo> {
|
|||||||
|
|
||||||
let sha = general["UniqueID"]
|
let sha = general["UniqueID"]
|
||||||
.as_str()
|
.as_str()
|
||||||
.map(|x| x.to_string())
|
.and_then(|x| {
|
||||||
|
// Remove dummy values that some tools use.
|
||||||
|
if x.len() < 5 {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
Some(x.to_string())
|
||||||
|
})
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
let mut hasher = DefaultHasher::new();
|
let mut hasher = DefaultHasher::new();
|
||||||
path.hash(&mut hasher);
|
path.hash(&mut hasher);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user