Comments (3)
I just submitted a pull request which fixes this renameSync problem. I believe this might also be the root cause of many of the problems reported when running alltomp3 on Windows.
from alltomp3.
nvm i use socket io server .. btw everything is ok only this function throws error
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EPERM: operation not permitted, rename './mp3/temp/9e8b58518f.mp3.cover.resized.jpg' -> './mp3/temp/9e8b58518f.mp3.cover.jpg'
i really don't know how to use that "downloadAndTagSingleURL" properly ..
alltomp3.tempFolder = './mp3/temp/';
const dl = alltomp3.downloadAndTagSingleURL(url, './mp3/', undefined, undefined, false, 1);
dl.on('download', function(infos) {
process.stdout.write(infos.progress + '%\n');
});
dl.on('download-end', function() {
console.log('', 'Download end');
});
dl.on('convert', function(infos) {
process.stdout.write('Converting: ' + infos.progress + '%\n');
});
dl.on('convert-end', function() {
console.log('', 'Convert end');
});
dl.on('infos', function(infos) {
console.log('New infos received: ', infos);
});
on my temp folder theres mp3 and 2 image 9e8b58518f.mp3.cover.resized.jpg and ./mp3/temp/9e8b58518f.mp3.cover.jpg
and the script wants to rename './mp3/temp/9e8b58518f.mp3.cover.resized.jpg' -> './mp3/temp/9e8b58518f.mp3.cover.jpg'
but this is already exist ./mp3/temp/9e8b58518f.mp3.cover.jpg
i tried delete but delete not working on windows bash xD i mean unlinksync
so i rename it fs.renameSync(coverPath,coverPath + '.old'); this works but if i remove this
it throws error
(node:769) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EPERM: operation not permitted, rename './mp3/temp/9e8b58518f.mp3.cover.resized.jpg' -> './mp3/temp/9e8b58518f.mp3.cover.jpg'
(node:769) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
but i really sure that renameSync will override the file if exist xD for some reason it throws error
from alltomp3.
You can just use alltomp3.downloadAndTagSingleURL(url, './mp3/')
.
For the EPERM
error, you are right, renameSync
should work and erase an existing file. The problem comes from Windows and may have two possible causes:
- If you have an antivirus, it may interfere, try to deactivate it;
- Close any program or explorer Windows using files in the
temp/
folder.
Try also to remove all files in the temp/
folder and try again.
Good luck!
from alltomp3.
Related Issues (20)
- Unable to locate package alltomp3 HOT 1
- dowload dont starts HOT 3
- Version `ZLIB_1.2.9' not found on opening
- Broken dependency on Sharp#prebuild HOT 1
- Hardcoded API Keys! HOT 1
- how to know request status. HOT 1
- cannot install HOT 9
- E: Unable to locate package alltomp3
- Fix lyrics formatting
- Inconsistent findLyrics calls
- Does not work, does not download Spotify playlists HOT 2
- UI crashing still downloading
- Unable to locate package allmp3 for Ubuntu 19.04 Disco Dingo HOT 3
- Failed at the [email protected] install script. HOT 1
- soundcloud playlist - failing on resolve URL with a 403
- White screen in app HOT 3
- Does not run on runkit
- Is the tool still work?
- TypeError: Cannot set property 'progress' of undefined
- alltomp3 won't compile/install with vs 2022 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alltomp3.