import simplejson
url = "http://bloodcat.com/osu/?mod=json"
json = simplejson.load(url)
id = json[0]['id']
artist = json[0]['artist']
source = json[0]['source']
title = json[0]['title']
date = json[0]['date']
Or something like that.
This wouldn't be too difficult to add.Piotrekol wrote:
-Ask if user want to download only ranked beatmap sets or all (or only unranked?)
I don't think checking the last 60 updated songs every time will do much. Maybe at just the start.Piotrekol wrote:
-ability to download upto ~60(or more)last ranked maps(I think I could provide public api for this- not promising tough)
Thread is about 5months old, would not surprise me if the program was broken by an update to the bloodcat website or something similarmarcostudios wrote:
22:45:04 - Downloading: 60309 nano - Omoide Kakera
Creator: 1065180 Smoothie
(<class 'KeyError'>, KeyError('source',), <traceback object at 0x00000000065E1E0
8>)
And it will continue beeping :c
I'm sorry for not replying earlier.marcostudios wrote:
22:45:04 - Downloading: 60309 nano - Omoide Kakera
Creator: 1065180 Smoothie
(<class 'KeyError'>, KeyError('source',), <traceback object at 0x00000000065E1E0
8>)
And it will continue beeping :c
I did not add anything like that to this program. I haven't touched this program for quite some time now, so it's kinda dated.Aistify wrote:
How do we make it so that it downloads to a specific folder without asking us to later on?
I'll take some time to look into this tonight. I'm a bit busy setting up my computer and a few other things while watching over someone's house for a few days.321jurgen wrote:
It throws me a permission error while it downloaded the map succesfully.
http://puu.sh/9KW6g.png
import tkinter, tkinter.filedialog, tkinter.messagebox, os
root = tkinter.Tk()
root.withdraw()
folder = tkinter.filedialog.askdirectory(parent=root, initialdir='/', title='Select folder to test read/write permissions.')
if os.access(folder, os.W_OK):
if os.access(folder, os.R_OK):
tkinter.messagebox.showinfo('Directory permission','You are allowed to read/write here.')
else:
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to write here.')
else:
if os.access(folder, os.R_OK):
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to read here.')
else:
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to read/write here.')
I don't know how but it seems to have fixed itself. Thanks alot though for looking into it.RavenMac wrote:
I've looked around and the only things i can find are:
1) The file is being used by something already, but the file is saved once the program has the entire file and once the file is opened by the default program (osu!) it's moved to the songs directory and unpackaged as all the files for the map. (what i guess happens. i could be wrong, but not too far off)
2) You or the user you are logged in as doesn't have permission to write to that directory. However, it looks like you were able to write one file there in the first place... I assume you're the owner of the computer and also have admin privileges. If not, try with the admin/owner of the computer.
I made a small script to check if you've got permission to write to a directory. You can paste it into a text file, make sure it has the .py extension, and the save type as "all files" to prevent it from making it a .txt file. If it passes, try the downloader again in the same folder.
And for anyone else who wants to try this, this is for python 3.x.import tkinter, tkinter.filedialog, tkinter.messagebox, os
root = tkinter.Tk()
root.withdraw()
folder = tkinter.filedialog.askdirectory(parent=root, initialdir='/', title='Select folder to test read/write permissions.')
if os.access(folder, os.W_OK):
if os.access(folder, os.R_OK):
tkinter.messagebox.showinfo('Directory permission','You are allowed to read/write here.')
else:
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to write here.')
else:
if os.access(folder, os.R_OK):
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to read here.')
else:
tkinter.messagebox.showinfo('Directory permission','You are NOT allowed to read/write here.')
Python would be a good place to start but java would make it a lot more easier for other people to use it.321jurgen wrote:
So this is maybe a bit far fetched but it would be awesome if you could make a program that runs in the background that downloads and updates all the maps. Maybe I should start programming something myself sometime :/ I only do web related stuff and it would be good to explore some different areas. If so in what language should I write it?
Keeping every map would be quite space consuming, and would also make the game run inefficiently and become a nightmare for reprocessing.321jurgen wrote:
So this is maybe a bit far fetched but it would be awesome if you could make a program that runs in the background that downloads and updates all the maps. Maybe I should start programming something myself sometime :/ I only do web related stuff and it would be good to explore some different areas. If so in what language should I write it?
That's what I would've thought at first but it will only take like 100gb (I'm guessing) which isn't that much to me and reprocessing (25k beatmaps) only takes like 2 minutes for me and doesn't happen that often.Zallius wrote:
Keeping every map would be quite space consuming, and would also make the game run inefficiently and become a nightmare for reprocessing.321jurgen wrote:
So this is maybe a bit far fetched but it would be awesome if you could make a program that runs in the background that downloads and updates all the maps. Maybe I should start programming something myself sometime :/ I only do web related stuff and it would be good to explore some different areas. If so in what language should I write it?
I'm workin on it. And (much more likely than with Python) maybe a GUI.Sir_Sandalot wrote:
RavenMac, you should make it in java. 1+ is a good idea
Also if it sorted all the ranked from the unranked in 2 folders and kept that up to date would be an awesome addition.
Language is all personal preference and what you know. As for doing this, each song added to osu is given an ID. You could see about gettin all of the numbers in a list/array and maybe checking the date created on your computer and comparing it with the last update on osu or bloodcat. I know osu you'll need to get permission to get the API for it, or somethin like that.321jurgen wrote:
So this is maybe a bit far fetched but it would be awesome if you could make a program that runs in the background that downloads and updates all the maps. Maybe I should start programming something myself sometime :/ I only do web related stuff and it would be good to explore some different areas. If so in what language should I write it?
This is the reason why i'd like to make this in Java. That way nobody would have to download anything for it...That is unless they don't have java...Sir_Sandalot wrote:
Python would be a good place to start but java would make it a lot more easier for other people to use it.
I had the same idea as you.
Space consuming? Yes. Game running inefficiently / Reprocessing nightmare? Eh... it depends. Having a ton of songs, i haven't seen much problem playing the game. Preprocessing though, that takes a few minutes though.Zallius wrote:
Keeping every map would be quite space consuming, and would also make the game run inefficiently and become a nightmare for reprocessing.
I've got a folder of just the .osz files and then the songs folder. My songs folder is over 116GB with 16K song folders and almost 50K maps. Reprocessing takes about 2-3 minutes. It does add up, but i'm a very patient person. And i have 6TB of storage and am looking at upgrading fairly soon. So it's nothing.321jurgen wrote:
That's what I would've thought at first but it will only take like 100gb (I'm guessing) which isn't that much to me and reprocessing (25k beatmaps) only takes like 2 minutes for me and doesn't happen that often.
Sorry for the late reply. I was attending a convention.Syrasu wrote:
Im getting an error: http://puu.sh/bbsFo/8765d8d3ee.png
it immediatly closes the windows after opening the file.
I know exactly what the problem is. I've noticed this on a few songs before. When it grabs the title and artist, sometimes there are unicode characters in them. I've updated the code.Aistify wrote:
I'm getting this error for some reason.
http://puu.sh/cb1DE.png
EDIT
Saving the beatmap without unicode characters fixed the problem for me.
With this code, no.Aistify wrote:
Is it even possible for it to check all the songs you have and download the ones you don't?
I've just downloaded and tested downloading 4 songs with each for 2.7 and 3.4thisischrys wrote:
Hangs on the first song, with or without unicode
I may have time tonight to look at the problem.Aistify wrote:
Used unicode again and got that again. I did change the code to look through 20 and only that. Works with no unicode though. Also is it possible to add a progress bar (or just the %) with the download speed somewhere? (Sorry if it looks like I'm asking too much but I'm just suggesting additional features that might be useful in the future )
;o Good luck with your school workRavenMac wrote:
I've been looking at the GUI builder in NetBeans. I'm currently working on a semester long group project for my class and learned how to use it properly. I already have a program running just like this one in Java, but I've been busy with so many things.
I will take a look at this though. It looks quite interesting. Thanks
I know getting it to work in a GUI isn't hard, but i want to make it so that nobody will need to download anything before using it.felicitousname wrote:
If you've already got working code in python, I suggest that you take a look at pyqt or pyside.
You ARE missing something. http://www.py2exe.org/RavenMac wrote:
Python is great, but people need to get the right stuff for it to run. Unless there's something i'm missing...