Giter VIP home page Giter VIP logo

youtubemusic's Introduction

YouTube Music

Simple Android application to download and listen media to files of YouTube videos.

I also use this application to integrate new things I am learning in Android Development. :)

 

Features:

  • Find videos by search or user's playlists
  • Media player
  • Equalizer
  • App's playlists
  • Automatict downloading media files from user's YouTube playlists
  • Changing media items positions
  • Sharing URLs and downloaded media files

The application consists of two main parts:

Saved Music

This fragment is responsible for browsing downloaded media items and playing them. The fragment works along with MediaBrowserService so the app can also work with smartwatches and cars.

You can create app's playlists and add media items to them.

 

You are also able to change media item possition in a visible playlist. (When new media item is downloaded, it is added at the latest position)

 

The app also contains simple Equalizer.

 

YouTube Music

The fragment is responsible for downloading music from YouTube. The app just fetches audio track from the video.

 

Downloading musics from YouTube is not stable, because Youtube often changes web structure of its pages.

Project Compilation

The application uses Firebase that requires google-services.json. The project has a custom task that decrypts that file which is located in the project root and is named google-services.json.encrypt. Before bulding the project, you must setup environment variable ANDROID_ENCRYPTION_KEY pointing the key used during encryption. The decryption task is added to the build graph dependencies and is called before preBuild.

Modularization

image

Note:

WARNING: Youtube API does not support a video download. In fact, it is prohibited - Terms of Service - II. Prohibitions.
WARNING: Downloading videos may violate copyrights!

This application is only for educational purposes. I urge not to use this project to violate any laws.

youtubemusic's People

Contributors

alieksieievyurii avatar

Stargazers

johnsonWang avatar  avatar  avatar  avatar Oleg Gorbatiuk avatar Jacek Byczkiewicz avatar

Watchers

James Cloos avatar  avatar

youtubemusic's Issues

Resynchronization

The issue:
Let's say, we have started downloading the video(music). The music file has been created and content are writing to this file. But something wrong has happend(user destroy the application or the device has gone off) and the music file hasn't been finished(Not all content are loaded).

Solution:
Add a mechanism that checks the downloaded files whether they were fully downloaded.
If not, remove the old(broken) file and download again

Progress

Progress bar has been already added to each item while they are downloading.
But need to add progress of size in bytes(for example 6452/23542 bytes)

Fix the bug in YouTubeDownloader

The bug that caused in the library YouTubeDownloader has been already fixed.
Just update to the nearest version of the library.
Besides remove the custom parser that actually is the same as the default parser.
Explanation: Custom parser was created because I fixed a little but significant bug there.
As mentioned above just update to the newest version.

Queue Changing

Add the possibility to change the queue and media items position

Log out

Add the ability to log out

Release 3.0

  • Use update on MutableStateFlow in order to avoid concurrency issues
  • Use Room DB for holding metadata
  • Implement automatic synchronization of media items from YouTube playlists using WorkManager
  • Use DI framework (Hilt) [Done]

Notes:
Learn Hilt Lazy and Provider
Can use @Inject on functions
CheckNotNull

Release 2.0

New release v2.0 including:

  • Completely refactored code using the newest techniques and tools I know [DONE]
  • Add positioning items [DONE]
  • Implement Dart/Ligh Themes [DONE]
  • Add an option to shuffle the queue [DONE]
  • Add an option to cyclic current playing media item [DONE]
  • Make the app more stable -> must survive stress-test [DONE]
  • Add more error handlers [DONE]
  • Write unit tests for critical parts [DONE]
  • Add architecture overview to the repo
  • Update the README file [DONE]

Retry button

Add a button, actually a new state of the current button, if the download of music has been failed, catch this exception and provide the button's state if a user clicks this state, the dialog has to open. In the dialog should be the exception's message and buttons: retry, cancel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.