mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Added versioning to files without meta.json
This commit is contained in:
parent
4c6b60d69d
commit
826148dc84
@ -1086,9 +1086,20 @@ namespace Emby.Server.Implementations
|
||||
}
|
||||
else
|
||||
{
|
||||
// No metafile, so lets see if the folder is versioned.
|
||||
metafile = dir.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries)[^1];
|
||||
// Add it under the path name and version 0.0.0.1.
|
||||
versions.Add((new Version(0, 0, 0, 1), metafile, dir));
|
||||
|
||||
int p = dir.LastIndexOf('_');
|
||||
if (p != -1 && Version.TryParse(dir.Substring(p + 1), out Version ver))
|
||||
{
|
||||
// Versioned folder.
|
||||
versions.Add((ver, metafile, dir));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Un-versioned folder - Add it under the path name and version 0.0.0.1.
|
||||
versions.Add((new Version(0, 0, 0, 1), metafile, dir));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
Loading…
Reference in New Issue
Block a user