Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Add OPUS file extension to LocalProvider.js to allow for local OPUS f… #65

Merged
merged 2 commits into from
Feb 13, 2022

Conversation

DaleJV
Copy link
Contributor

@DaleJV DaleJV commented Feb 4, 2022

…ile playback

The 'OPUS' extension was not added, therefore all local songs with the .opus extension never were added to the queue.

📝 Checklist

Make sure that your PR fulfills these requirements:

  • Tests have been added for this feature.
  • All tests pass on your local machine.
  • Code has been linted with the proper rules.

📄 Description

The .opus file extension was not in the array of accepted formats in the LocalProvider.js file.

📌 Does this PR address any issue?

If so, add the # of the issue this is addressing.

…ile playback

The 'OPUS' extension was not added, therefore all local songs with the .opus extension never were added to the queue.
@moonstar-x
Copy link
Owner

Hey there thanks for this!

I'm not too familiar with .opus files, I don't know whether they use IDv3 tagging.

Have you tried using an opus file with this change and does it show the correct title and artist on the bot's status and console?

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 4, 2022

No worries!

I downloaded all the songs I wanted the bot to play, from Youtube, in the .opus format. The website I used included the artist name as a tag in all the files.

It seems the bot was able to pick up the artist name perfectly fine. See the attached image of the bot currently running on my server.

The music plays perfectly fine as well.

imageee

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 4, 2022

4 hours later and it does not skip anymore like it used to with the EPIPE error.

Turning the pause when everyone leaves setting off also fixed the playback not working as it works 24/7 now. This is great, thank you so much!

@moonstar-x
Copy link
Owner

moonstar-x commented Feb 6, 2022

I almost forgot about this sorry.

Can you please add the following:

  1. In the README there are 3 occurrences where there's the word mp3. It is to describe that mp3 and m4a files are supported, could you please add the .opus extension on those 3 occurences?
  2. Can you also bump the version to 4.2.1 in package.json and package-lock.json?

I still haven't found a way to automate the release process because I do it manually since I never expected to receive contributions from anyone.

Thank you very much!

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 13, 2022

For sure, I will make those changes today!

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 13, 2022

Changes have been made.

In terms of automating release, for a project of this size, I would say to not worry about it much as you most likely wont receive many outside contributions. That is completely up to you though!

In roughly a months time, I will be renting a 24/7 VPS and I will be hosting the bot there. As a result of this, I should be able to tell if the UNHANDLED error is due to my server computer loosing connection for a few seconds or if it is the bot.

Regardless of the outcome, do you have a deadline for the potential fix that you mentioned?

@moonstar-x
Copy link
Owner

Hey there, sorry, I actually do not have one.

I'm still working on the documentation site for discord-tts-bot. I want to finish that before getting into updating this project. Since the discord.js update was a major one, almost the whole bot will need to be rewritten.

As for the crashing issue on disconnections, I've actually had this happen to me sometimes and most of them have been due to Discord going down or my connection to Discord being affected. I haven't really realized this until recently because I've been hosting this with Docker which does auto-restarting whenever something happens.

I know it is not a fix to say "host it with Docker", but if you're planning on having that VPS to host server related processes I actually would recommend you check Docker for that.

@moonstar-x moonstar-x merged commit bb018c3 into moonstar-x:master Feb 13, 2022
@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 13, 2022

I just checked your bot out, that is awesome stuff. Very impressed with all the bots you have made.

In terms of your fix using Docker, that is actually perfect and would fix it! I came to the same conclusion as you, that it is just Discord voice dropping out for a few seconds which ends up crashing the bot.

Last year I created a loan management system with Docker to host a the NGINX server etc, but it has been a while. Do you mind releasing a guide on how to move this project onto Docker with auto-restart on crash?

Lastly, as the bot requires a rewrite to work with the latest Discord.js version, I would say that you just release the Docker guide and get people to host the bot like that for now. Then, when you have time, you can work on a rewrite.

Thank you for your help, that solves the only issue I am having now.

@moonstar-x
Copy link
Owner

In any case, thank you very much for this and sorry for any inconvenience.

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 13, 2022

Not a problem!

Do not apologies, you fixed every issue I had and made the processes of hosting my own 24/7 bot a lot easier.

@moonstar-x
Copy link
Owner

I'm planning on having a documentation site for this bot too with the guide you're mentioning.

For now, I do have a guide related to setting up Docker and hosting this bot on my server setup page. These are the relevant links:

Setting up Docker
Music 24/7 Bot

@DaleJV
Copy link
Contributor Author

DaleJV commented Feb 13, 2022

Wonderful, that is perfect.

Thank you so much for your help!

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

Successfully merging this pull request may close these issues.

2 participants