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

NFO file and thumbnail generation #5

Open
jctennis opened this issue Feb 18, 2023 · 2 comments
Open

NFO file and thumbnail generation #5

jctennis opened this issue Feb 18, 2023 · 2 comments

Comments

@jctennis
Copy link

Would it be possible to generate a nfo file and thumbnail image for the downloaded videos to make it easier for Jellyfin or something like that to pick uo?

@jctennis
Copy link
Author

Even if the .json files could be generated I could probably use this project to convert them to .nfo https://github.com/owdevel/ytdl-nfo

@ZGorlock
Copy link
Owner

ZGorlock commented Feb 18, 2023

Yes this is possible, there is work for similar functionality planned for after I finish a couple other tasks. I will include this when doing that work.

For now, if you would like the thumbnails at least, you can put something similar to this in your ChannelProcesses.java:

    BaseProcess.forEach(channel, videoMap, (id, video) -> {
        final File thumbnail = new File(Project.TMP_DIR, (id + ".png"));
        if (!thumbnail.exists()) {
            Internet.downloadFile(video.getInfo().getThumbnails().getBest().getUrl(), thumbnail);
        }
    });

Note that, currently, saving them in the video output directory will cause them to be deleted if keepClean is set to true for the Channel.

You may even be able to create the nfo file you need; all other information should be available in that VideoInfo object.

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

No branches or pull requests

2 participants