ank-cha / new-jiosaavn-downloader-chrome-extension Goto Github PK
View Code? Open in Web Editor NEWThis Extension lets you download songs right from your browser, Download 320kbps High Quality songs without Saavn pro!
License: MIT License
This Extension lets you download songs right from your browser, Download 320kbps High Quality songs without Saavn pro!
License: MIT License
Hey buddy, thanks for this extension can you make one for Firefox as well ?
The image in the metadata is low quality when downloaded.
Any fix for this? Thanks bro
On Chromium Version 80.0.3987.87 (Official Build) Built on Ubuntu, running on LinuxMint 18.2 (32-bit)
I've loaded the extension and opened jiosaavn.com. However the download buttons beside the songs or even the song bitrate dropdown list on the top bar doesn't load.
Quite interestingly, if I keep refreshing or, remove the extension and reload it again and refresh the page, it works fine.
Is it a network speed issue?
Sometimes, the download buttons will show on some pages (of jiosaavn.com) and for others they don't.
maybe this gives out something-- the error spit out from the extension manager page.
..and tysm for the great work you've done!
I selected the download quality of 320 kbps from the dropdown besides my username. However, the quality of the songs is not really 320 kbps. Just their sizes are increasing. I do have jio saavn pro subscription and the songs in the app are fairly more clearer and of the best quality.
Is there any problem here? I suppose the switching to 320 kbps just adds random noise in the song to increase its size. I'm assuming this because songs downloaded in 120 kbps are more clearer than those with 320 kbps using your extension.
Please let me know if you work on it and manage to provide the true 320 kbps quality.
Downloaded songs have very small (150x150) album art. Please make to downloadable with larger (500x500) album art.
JIOSAAVN Extension is Out of The Park Performer
Can We Expect Same For Gaana???
It's showing below error.
Uncaught (in promise) TypeError: Failed to fetch
I tried downloading an album but got only one file out of 4 files ๐ญ๐ญ๐ญ๐ญ
Context
https://www.jiosaavn.com/
Stack Trace
src/inject/inject.js:211 (anonymous function)
/**
* Add Player Download Button to Download Current Song
* NOTE : Doesn't Work when used in Extension
*/
var playerDownloadButton = function () {
$('.download-btn').remove();
var btn = $('<a class="download-btn btn x-small" target="_blank" download>Download</a>');
btn.css({
float: 'right',
background: '#7902FF',
marginRight: '-30px',
marginTop: '-3px',
});
$('.meta-wrap').append(btn);
btn.on('click', function (e) {
btn.text('Downloading...');
var song = Player.getCurrentSong();
getDownloadURL(song, false, function (result, status) {
if(status === 'success') {
var el = $('<a download></a>');
el.attr('href', result.auth_url).attr('target', '_blank').attr('download', slugify(song.title));
el[0].click();
btn.text('Download');
}
if(status === 'error') {
btn.text('Error in Download');
console.log('Download error', result);
}
});
});
};
/**
* Add Download Button To Single Songs on the Screen
*/
var addDownloadButtonToAllSongs = function () {
$('.single-download-button').remove();
$('.song-json').each(function() {
var $this = $(this);
var btn = $('<a class="single-download-button btn x-small"></a>');
var song = JSON.parse($this.text());
btn.text('Download').css({
marginLeft: '7px',
fontSize: '8px',
padding: '1px 11px',
background: '#7902FF'
});
btn.on('click', function (e) {
e.preventDefault();
var $btn = $(this);
$btn.text('Downloading....');
getDownloadURL(song, false, function (result, status) {
if(status === 'success') {
downloadWithData(song, result.auth_url, function () {
$btn.text('Download');
});
}
if(status === 'error') {
$btn.text('Error in Download');
}
});
});
$this.parent().find('.main .title').first().append(btn);
});
};
/**
* Add Album Download Button on Albums
*/
var addAlbumDownloadButton = function () {
$('.album-download').remove();
var albumBtn = $('<li><a class="album-download btn white outline">Download</a></li>');
albumBtn.on('click', function () {
var songs = [];
$('.song-json').each(function () {
songs.push(JSON.parse($(this).text()))
});
downloadSetOfSongsAsZip(songs, songs[0].album + bitrateString);
});
$('.album-view section .page-header .actions').prepend(albumBtn);
};
/**
* Add Download Button on Playlist
*/
var addPlaylistDownloadButton = function () {
$('.playlist-download').remove();
var playlistBtn = $('<li><a class="playlist-download btn">Download</a></li>');
playlistBtn.on('click', function () {
var songs = [];
$('.song-json').each(function () {
songs.push(JSON.parse($(this).text()))
});
downloadSetOfSongsAsZip(songs, $('.page-title').text() + bitrateString);
});
$('.playlist .page-header .actions').prepend(playlistBtn);
};
/**
* Add Download Quality selector on the Menu..
*/
var createDownloadQuality = function () {
var self = this;
var menuItem = $('<div id="language"><span class="curr-down-rate"></span><strong>Download Quality</strong></div>').addClass('menu text right');
var dropDown = $('<div class="drop"></div>');
var dropDownList = $('<ol></ol>');
var bitrates = ['320', '192', '128', '64','32','16'];
menuItem.find('.curr-down-rate').first().text(localStorage.download_bitrate + " kbps");
bitrates = bitrates.map(function (rate) {
var el = $('<li><a>' + rate + ' kbps</a></li>');
if(rate === localStorage.download_bitrate) {
el.addClass('current');
el.find('a').first().append('<em class="current">current</em>');
}
el.on('click', function () {
localStorage.download_bitrate = rate;
$(this).parent().find('.current').each(function () {
$(this).removeClass('current');
$(this).find('a em').remove();
});
$(this).addClass('current');
$(this).find('a').first().append('<em class="current">current</em>');
menuItem.removeClass('active');
menuItem.find('.curr-down-rate').first().text(localStorage.download_bitrate + ' kbps');
});
return el;
});
menuItem.hover(function () {
menuItem.addClass('active');
},
function () {
menuItem.removeClass('active');
});
dropDownList.append(bitrates);
dropDown.append(dropDownList);
menuItem.append(dropDown);
$("#header").find('.wrap').first().append(menuItem);
};
/**
* Run on Plugin Initialization
*/
var initPlugin = function () {
addDownloadButtonToAllSongs();
addAlbumDownloadButton();
addPlaylistDownloadButton();
downloadStatus.create();
};
$(document).ready(function () {
initPlugin();
createDownloadQuality();
// check if classes of the .page-wrap changes then add the buttons again
var OldLen = 0;
var inter = setInterval(function () {
var len = $('.page-wrap')[0].classList.length;
if(len !== OldLen) {
initPlugin();
}
OldLen = len;
}, 500);
});
Error
211 varlen = $('.page-wrap')[0].classList.length;
Saavn Downloader is Incridible But we also request you to Make One for Gaana.com
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.