Kodak Black Mug Shot
Rapper Kodak Black has been sentenced to 364 days in prison. Broward Sherrif's Office

Kodak Black’s ongoing legal battle for violating his house arrest has finally come to an end. Facing a maximum of eight years in prison, the “Tunnel Vision” rapper was spared by a judge and sentenced to 364 days in jail, with a chance to get out sooner.

Judge Michael Lynch once again gave Kodak, real name Dieuson Octave, a chance to do good, allowing the rapper’s sentence to be shortened to 180 days if he completes a life skills course. According to the Sun Sentinel, if the performer finishes the course, he will also receive credit for the total amount of time he’s already spent in jail. Since his previous time served adds up to nearly 180 additional days, Kodak would be released much sooner than anticipated.

Following his release, the “Everything 1K” artist will still be on the same year-long house arrest with five years of probation. If Kodak, 19, doesn’t complete the course, he would be required to serve 364 days in jail, starting the day he was sentenced.

Before his sentence was handed out, Kodak faced the judge and told him, “Depending on the outcome of this, it could be the beginning of my career, or the end of my career.” Fortunately for the rapper, who has a top 40 song on the Billboard charts, his career will continue on.

Read: 8 Rappers Facing Jail Time In 2017

Kodak’s attorney, Bradford Cohen, detailed what the rapper could expect in the life skills course, saying, “Life skills is essentially a course in jail that teaches you certain things like checkbook writing, how to keep a checkbook. It teaches you things that they don’t teach in school anymore.”

While the rapper may have been let off easy, the judge did make some changes to his house arrest terms. According to Lynch, if Kodak wants to perform in his home state of Florida, he would only need approval from his probation officer. However, if he hopes to perform outside of Florida, he would have to ask the judge himself.

As for what’s next in Kodak’s career, the rapper will not be appearing at this weekend’s Rolling Loud festival in Miami but there were talks of him getting back on Future’s Nobody Safe tour.

“He will be getting back into the game in terms of making records and making music,” Cohen said. “I don’t know how soon he would go back on tour.”

Kodak’s record label, Atlantic Records, is also standing by its artist. A statement from Michael Kushner, executive vice-president of business and legal affairs, read, “We strongly believe that Mr. Octave is at a crossroads.” The exec also said Atlantic would be committed to getting a full-time mentor to give the rapper guidance and structure.

With this legal issue out of the way, Kodak still has a criminal sexual conduct charge looming over his head which carries a maximum of 30 years in prison. While Cohen doesn’t represent Kodak in that case, he has been in contact with the attorney who does.

While the lawyer would not go into details about the charge, he did say there were a “lot of problems with that case.” Cohen added, “There’s a lot more to this than meets the eye, and I think that case will be resolved in a positive manner.”