Skip to content
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

Episode Number and Name detection #74

Open
onnesoom opened this issue Jul 15, 2024 · 4 comments
Open

Episode Number and Name detection #74

onnesoom opened this issue Jul 15, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@onnesoom
Copy link

onnesoom commented Jul 15, 2024

Current Functionality of the App

The app currently displays the names of all files within a folder in alphabetical order and presents the full file names. However, which can be inconvenient in several situations:

Long File Names

If the files have long names, they will be displayed in full. This can consume excessive screen space and make it difficult to recognize the episode numbers.

Non-Alphabetical or Non-Chronological Order

If the files are not downloaded from the same source (e.g., SubsPlease, Ember, ACG.rip), they will appear unorganized and unsorted. This lack of order is not ideal.

Presence of episodes.json

In modern media servers and library apps (e.g., Jellyfin, Plex, Emby, Aniyomi), media folders often contain an episodes.json file. The current model does not detect or display the corresponding episode names from this file.

The format of episodes.json is as follows:

[
    {
        "episode_number": 1,
        "name": "Episode 1 : Ike, Commander of the Undying Brigade (不死旅団長アイク• Fushi Ryodanchou Ike)",
        "date_upload": "2024-06-26T00:00:00",
        "scanlator": "Opening"
    },
    {
        "episode_number": 2,
        "name": "Episode 2 : White Rose Knights Commander Alistair (白薔薇騎士団長アリステア• Shiro Bara Kishidanchou Alistair)",
        "date_upload": "2024-07-03T00:00:00",
        "scanlator": "Canon"
    },
    {
        "episode_number": 3,
        "name": "Episode 3 : Traitor (裏切者• Uragirimono)",
        "date_upload": "2024-07-10T00:00:00",
        "scanlator": "Ending"
    }
]

In this format:

  • episode_number corresponds to the detected episode number. This key must be present in the JSON file, while the rest are optional for additional information editing.
  • name corresponds to the title to be shown.
  • date_upload indicates the date and time of the episode's release.
  • scanlator provides additional information such as the episode description or whether the episode is a filler.

Sources:

Improvements with Episode Number Recognition

Adding episode number recognition to the app will provide several benefits:

  • Improved Organization: Episodes will be automatically sorted by their number, regardless of the download source. This ensures a consistent viewing order.
  • Enhanced Display: Long file names can be truncated or reformatted to highlight the episode number, saving screen space and improving readability.
  • Better Integration with episodes.json: The app will be able to read and display episode information from the episodes.json file, showing titles, upload dates, and additional information like scanlator notes.
  • User Experience: Users will find it easier to navigate through their media library, quickly identifying and accessing the desired episodes without confusion.
Video 1 Video 2 Video 3
@SkyD666
Copy link
Owner

SkyD666 commented Jul 15, 2024

A question: Is the content of episodes.json unified for all software?

@onnesoom
Copy link
Author

A question: Is the content of episodes.json unified for all software?

There are two primary approaches to saving metadata:

1. Plex, Emby (Metadata from the Internet)

These services typically automatically fetch metadata from the internet. Users can edit this data if desired, but the process is lengthy. The .nfo files used by these services generally look like this:

Screenshot Screenshot

Drawbacks of this method:

  • Manual Process: Manually editing metadata is time-consuming.
  • Lack of Tools: There are no specific tools to create metadata tailored to these services.
  • Database Dependency: The process relies heavily on the databases these media servers use (mostly TMDB and aniDB). Sometimes, .nfo files have different formats for different servers.
  • Limited Flexibility: While users can add an episodes.json file (and some services like Jellyfin will recognize it), only the "episode_number" key is consistently recognized. Other keys, such as "name," may vary (e.g., Jellyfin can detect the "name" key even if it's named "title").

Overall, the lack of third-party tools for creating metadata and the dependency on specific databases are significant limitations.

2. Tachiyomi Fork Group and Offline Library Management

These services save metadata in a single JSON file with a consistent structure, as described in the original issue. There are multiple third-party software tools available to produce this type of JSON data. For instance, you can even use ChatGPT to generate the necessary JSON:

ChatGPT
Record

Advantages of this method:

  • Consistent Structure: The metadata format is unified, making it easier to manage.
  • Full Control: Users have complete control over the appearance of their library.
  • Tool Availability: Several third-party tools can create the required JSON data, simplifying the process.

Downside:

  • User Effort: The user needs to manually create and manage the JSON file, which requires some effort.

@onnesoom
Copy link
Author

For chatgpt , u need to add custom instructions from settings , thats it .

@SkyD666 SkyD666 added the enhancement New feature or request label Jul 16, 2024
@onnesoom
Copy link
Author

Additional information I forgot to add : the format for the T00:00:00 Part is THH:MM:SS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants