Change font size
It is currently 2020-09-19, 10:07 pm


Post a new topicPost a reply Page 1 of 1   [ 7 posts ]
Author Message
 Post subject: [REQ] Batch cue updater?
PostPosted: 2011-05-17, 9:08 pm 
Site Admin
User avatar

Joined: 2010-09-27
Posts: 133
we need a script that would find all cues in a given directory, look them up on cuenation (filename AND set title should match), and then update local cues if needed to match the latest version on cuenation.

a lot of my cues for ASOT/TATW/FSOE/etc are 0day releases and have been updated on cuenation with official tracklists since then. kind of a drag to look up and re-download every single cue i got saved on my hdd.


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-18, 6:37 am 
User avatar

Joined: 2010-09-27
Posts: 96
Location: Finlandia
This has been on my work plan for a long time, but I've postponed it until we had the data in DB, but that's there now, right?

I would do a small application (probably in Java, as I know that best) which would query CueNation over HTTP for names of mp3s found in a specified directory (and its subdirectories) and show the users the results and then let him select the cues to download.

A nice to have feature would be to download the cues to a temporary directory and show the users the changes if he already has the cue, so that he could see if he has edited it himself.

Another nice to have feature for admins would be the possibility to update a cue from this application.


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-18, 7:41 am 
Site Admin
User avatar

Joined: 2010-09-27
Posts: 133
right now the database has the following fields that could be of use:
- folder = category_folder
- file = cuesheet_filename.cue
- tmp_id = category_folder/cuesheet_filename.cue
- data = cuesheet content (stored as long-text)

i'd say there is a possibility that some cues could have same filename but are in different categories and that's why i think we should use something like {where data like 'TITLE "%...%"} in the lookup query.

but first things first, we need a http://cuenation.com/api.php, that would accept POST with something like
Code:
$_POST = array(
   'query' => 'get_cuesheet',
   'requests' => array(
      1 => array(
         'filename' => 'full_filename.mp3'
      ),
      2 => array(
         'performer' => 'A&B'
         'title' => 'TATW #999 [DI.fm Streamrip]',
         'filename' => 'full_filename.mp3'
      ),
      3 => ....
);

and return something along the lines of
Code:
$JSON = array(
   'error' => false,
   'results' => array(
      1 => array(
         'performer' => 'sdf',
         'title' => 'sdf',
         'file' => 'sdf.sdf',
         'data' => 'asdfasdfasdfasdf'
      ),
      2 => false
   )
);


ps: i wonder how much it'll take to do a search on a long-text column in a database with 11k+ records :?


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-18, 9:22 am 
User avatar

Joined: 2010-09-27
Posts: 96
Location: Finlandia
Yeah, don't use the data for metadata purposes. If two files have the same name (why oh why?) then the user would have to choose the correct one. User could also choose a particular category to search in.


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-18, 9:18 pm 
Site Admin
User avatar

Joined: 2010-09-27
Posts: 133
since i did the database and the related i guess i'll do the api script.

btw, if its java then is it possible to embed & run the app from a browser? this way people won't have to download the software and if there is a new version it'll be available to everyone right away...


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-19, 8:55 am 
User avatar

Joined: 2010-09-27
Posts: 96
Location: Finlandia
frifox Wrote:
btw, if its java then is it possible to embed & run the app from a browser? this way people won't have to download the software and if there is a new version it'll be available to everyone right away...

No, not directly. A Java applet cannot read files from the HDD, but you can use Java Web Start to automatically download and run a desktop application. I don't think any web framework can access your HDD as it would be quite the security hole.


Top
 Profile  
 
 Post subject: Re: [REQ] Batch cue updater?
PostPosted: 2011-05-25, 7:53 pm 

Joined: 2011-04-22
Posts: 10
An API, good idea. This way Mugasha doesn't even have to visit CueNation, their server will just send a post request :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 7 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron