code and doc cleanup

This commit is contained in:
Pierre
2026-01-31 19:46:58 +01:00
parent e1fc075b7b
commit 8a9c357c8a
3 changed files with 2 additions and 41 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ When using as a dependency:
```json
{
"dependencies": {
"@metazla/filename-tool": "workspace:*"
"@metazla/filename-tools": "workspace:*"
}
}
```
@@ -35,7 +35,7 @@ When using as a dependency:
## Usage
```typescript
import { FilenameParser } from '@metazla/filename-tool';
import { FilenameParser } from '@metazla/filename-tools';
// Parse a filename
const result = FilenameParser.parse('[SubsPlease] Naruto - 01 (1080p) [12345678].mkv');
-23
View File
@@ -84,27 +84,4 @@ export class FileNameMetaExtractor {
return result;
}
/**
* @deprecated Use extractMetadata instead - returns plain object
*/
async processFile(filePath: string, metadata: any): Promise<void> {
const result = await this.extractMetadata(filePath);
// Write to metadata object for backwards compatibility
if (result.fileName) metadata.at("fileName").set(result.fileName);
if (result.extension) metadata.at("extension").set(result.extension);
if (result.tags) {
for (const tag of result.tags) {
metadata.at("tags").add(tag);
}
}
if (result.originalTitle) metadata.at("originalTitle").set(result.originalTitle);
if (result.movieYear) metadata.at("movieYear").set(result.movieYear);
if (result.season) metadata.at("season").set(result.season);
if (result.episode) metadata.at("episode").set(result.episode);
if (result.increment) metadata.at("increment").set(result.increment);
if (result.extra) metadata.at("extra").set(result.extra);
if (result.videoType) metadata.at("videoType").set(result.videoType);
}
}
-16
View File
@@ -323,20 +323,4 @@ export class FileNameVideoMetaExtractor {
return result;
}
/**
* @deprecated Use extractVideoFileMetadata instead - returns plain object
*/
public processVideoFile(filePath: string, metadata: any): void {
const result = this.extractVideoFileMetadata(filePath);
// Write to metadata object for backwards compatibility
if (result.originalTitle) metadata.at("originalTitle").set(result.originalTitle);
if (result.movieYear) metadata.at("movieYear").set(result.movieYear);
if (result.season) metadata.at("season").set(result.season);
if (result.episode) metadata.at("episode").set(result.episode);
if (result.increment) metadata.at("increment").set(result.increment);
if (result.extra) metadata.at("extra").set(result.extra);
if (result.videoType) metadata.at("videoType").set(result.videoType);
}
}