Help with iTunes related automation

Joined
Aug 13, 2011
Messages
19
Reaction score
0
I think I've confused you with all the different ratings and stuff.
Ok, the iTunes star rating is not used at all.
The 'myRating' value is from the individual account of each person's IMDb account, but I think that would be quite hard to get and much more coding for you, so I'm thinking maybe one of the fields on the movie in iTunes, maybe 'bitrate' or something should be used for the person's individual vote so you can get that data straight from there. unless you do want to make it so it logs into individual accounts to access that information. Depends how hard it'll be to do I suppose.
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
Logging in into a web service would require a security layer and that's heavy lifting for anything other than a full App.

If you want to use another Field for your Rating, just swap the word rating with the correct field name. Stars works for me;-) You'll want to use a Field thats available for a Movie, check the Get Info panel in iTunes for a shorter list.

And it will need to be text or Integer and not r/o (read only).

album (text) : the album name of the track
album artist (text) : the album artist of the track
album rating (integer) : the rating of the album for this track (0 to 100)
album rating kind (user/*computed, r/o) : the rating kind of the album rating for this track
artist (text) : the artist/source of the track
bit rate (integer, r/o) : the bit rate of the track (in kbps)
bookmark (real) : the bookmark time of the track in seconds
bookmarkable (boolean) : is the playback position for this track remembered?
bpm (integer) : the tempo of this track in beats per minute
category (text) : the category of the track
comment (text) : freeform notes about the track
compilation (boolean) : is this track from a compilation album?
composer (text) : the composer of the track
database ID (integer, r/o) : the common, unique ID for this track. If two tracks in different playlists have the same database ID, they are sharing the same data.
date added (date, r/o) : the date the track was added to the playlist
description (text) : the description of the track
disc count (integer) : the total number of discs in the source album
disc number (integer) : the index of the disc containing this track on the source album
duration (real, r/o) : the length of the track in seconds
enabled (boolean) : is this track checked for playback?
episode ID (text) : the episode ID of the track
episode number (integer) : the episode number of the track
EQ (text) : the name of the EQ preset of the track
finish (real) : the stop time of the track in seconds
gapless (boolean) : is this track from a gapless album?
genre (text) : the music/audio genre (category) of the track
grouping (text) : the grouping (piece) of the track. Generally used to denote movements within a classical work.
kind (text, r/o) : a text description of the track
long description (text)
lyrics (text) : the lyrics of the track
modification date (date, r/o) : the modification date of the content of this track
played count (integer) : number of times this track has been played
played date (date) : the date and time this track was last played
podcast (boolean, r/o) : is this track a podcast episode?
rating (integer) : the rating of this track (0 to 100)
rating kind (user/*computed, r/o) : the rating kind of this track
release date (date, r/o) : the release date of this track
sample rate (integer, r/o) : the sample rate of the track (in Hz)
season number (integer) : the season number of the track
shufflable (boolean) : is this track included when shuffling?
skipped count (integer) : number of times this track has been skipped
skipped date (date) : the date and time this track was last skipped
show (text) : the show name of the track
sort album (text) : override string to use for the track when sorting by album
sort artist (text) : override string to use for the track when sorting by artist
sort album artist (text) : override string to use for the track when sorting by album artist
sort name (text) : override string to use for the track when sorting by name
sort composer (text) : override string to use for the track when sorting by composer
sort show (text) : override string to use for the track when sorting by show name
size (integer, r/o) : the size of the track (in bytes)
start (real) : the start time of the track in seconds
time (text, r/o) : the length of the track in MM:SS format
track count (integer) : the total number of tracks on the source album
track number (integer) : the index of the track on the source album
unplayed (boolean) : is this track unplayed?
video kind (none/*movie/*music video/*TV show) : kind of video track
volume adjustment (integer) : relative volume adjustment of the track (-100% to 100%)
year (integer) : the year the track was recorded/released
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
Ok, Im not sure how but the results aren't coming out how they should be. I've removed the x1,000,000 bit, so I should be expecting a result that looks like '8.52352342' but I'm getting '34' or '9' depending on whether I use the 'rating' integer or the 'bpm' one with my rating put in there.
Not sure what bit isn't working though.
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
ok, I'm still not getting the right result though. I've got microsoft excel open with the exact same equation and the IMDb details for 'Avatar' inputted.
using this equation:
(10 - (Votes / (Votes + 3000) * (((Rating * 2.46) + (MyRating)) / 3.46) + (3000 / (Votes + 3000)) * 6.9))
the result should be 1.365844258 but that's not what I'm getting.
'my rating' is set to 10 and that's in the 'bpm' field in iTunes.
Sorry if I'm just being stupid.
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
I didn't really look at your calculation but I think its overflowing AppleScript.

I'd tend towards a simple Average
(MyRating + ( IMDdRating * 10 )) / 2

or if you wanted to give more weight to IMDbRating if it has more Voters
(Votes / 100000) roundedUp

=((IMDdRating* RoundedUpVotes) + MyRating) / ( RoundedVotes + 1)

This should result in a rating of between 0 - 100 this works in Numbers
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
Oh, I see what's wrong now. that imdbapi isn't accurate, It looks like it may have been linked to imdb about a year or so ago but all the information is outdated. it says Avatar has only 292,214 votes whereas it's actually closer to 350,000 votes by now.
So yeah, doesn't look like that tool is actually going to be any good
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
Yes, I think the information comes from the Public Files IMDb make available via FTP, I just checked the Rating File and there is no Link to the ID, just the name.

there are 102 movies and TV shows with Avatar in the title, so that routes no looking good.

Can I use IMDb data in my software?
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
Hmm, well I guess if it's for personal use that's not a problem, and if you 'share' your personal code with people who 'donate' to your efforts of scriptwriting, then in my view, that's just fine. But it does seem to look like you're back to square one with the script unfortunately.
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
Ok, don't know if your still going with this or if you're about fed up with it now, but...

I have been tinkering around with iTunes sorting system trying to find the perfect way of displaying movies. Annoyingly, iTunes seems to recognize numbers by digits instead of value, so it would display 1, 12, 127, 24, 256 instead of listing them correctly.

And also to make the sorted movies show up higher in the list than those that aren't they need to have 'A' at the start to push them to the top.

I've attached a numbers document for you. That is essentially the perfect formula, you just need to find a way of getting IMDb data that is not outdated to fill it.
Good luck with that.
 

Attachments

  • iTunes Movie Formula.zip
    72.6 KB · Views: 268
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
no not fed up. just unsure on how to get the Ratings numbers you're needed. Scraping the webpage isn't really practical, It is bound to break, sooner rather than later, thats why we use APIs. Amazon have as much as said they don't intend to make an API available, and that may be why the api site has stopped updating. I don't know.

While Amazon makes the ratings values available via FTP each Friday, downloading, parsing a 10MB file every week seems onerous. And that requires storing a matched name field, not the "tt" key.

Not sure what to try next... I'll look at your sheet, as soon as I get a break in the traffic...
 
Joined
Aug 13, 2011
Messages
19
Reaction score
0
Ok thanks, it's not looking good then, but I appreciate your efforts. Hopefully there is an easier way to do it, but doesn't sound like it at the moment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top