Album Rating messing up my smartlists. - iLounge Forums
Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.

Topic: Album Rating messing up my smartlists.

Reply Thread Tools Topic Search
 
Old 05-12-2017, 08:31 PM
#1
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381
Album Rating messing up my smartlists.

Once in a while, for some reason I can't figure out, an album or three in my library will end up with an "Album Rating." This causes me great pain and distress, because any songs on that album that don't have an individual song rating, will be treated as if they were rated whatever the Album thinks it's rated. So if, for example, the album gets rated 1 or 2 stars, then all of the unrated songs on that album get kicked off my smartlists. Or if the album thinks its a 4 or 5, everything on it (that isn't rated) gets put on my "oh my god favorites I want to listen to these all the time" lists. I THINK it has something to do with rating songs on the iPod (touch, 5th generation I think? With the stupid strap button) because it never seems to happen "by itself," there's always at least one song that's actually rated, and somehow the whole album also picks up that rating.

Also, the whole idea of the Album Rating, and how it is implemented, perturbs me. I don't use the Album Rating, I don't want to use the Album Rating...whenever I catch a track with an album rating, I go hunt down the album and remove it. Which leads me to my next problem. There's no easy way to put them all in one place and do it all at once. Oh yeah, I can make a smartlist that filters them by album rating, but the thing is, smartlists don't differentiate between an actual rating that I set, or one that it has derived from the other one. So if I look for "album rating is not zero stars" then I get every single song that either has a rating, or is on an album that has another song that has a rating. Because if the song, or any other song on the same album, has an actual rating (blue stars) then iTunes will "assign" an album rating (grey stars) in the same way that it assigns grey stars to un-rated songs on rated albums.

So my issues are these:

1: is there something I'm doing wrong that's putting these album ratings on in the first place? I don't think it happens every time I rate a song on the iPod, just sometimes. I just tap the cover art and then the stars come up, and I set the rating and tap outside the range to exit out.

2: once they do show up, if there's not a way to prevent it, is there an easy way to group them all together so I can fix them en masse? A couple months ago I did try to do it with the smartlist but like I said it wasn't perfect. It showed me everything that had a rating, and I had to scroll through it (10,000 songs, ish) and look for grey stars mixed in with the blue. I am not confident I caught them all, and I know some new ones have appeared since then.



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote
Old 05-13-2017, 11:12 AM
#2
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,879

First off you should be able to find your unrated songs fairly easily with a smart playlist. Rating is less than 1 star.

And if you want to want to see what has Album Ratings and no Ratings. Album Rating is between 1 and 5 stars, Rating is less than 1 star.

I could write a JavaScript program to erase Album Ratings, when I have more time. Maybe next week.



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote
Old 05-13-2017, 11:52 AM
#3
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,879
Here is the script - quick and dirty

I thought about it while washing dishes and it seemed easy. Tested it and it worked.

Here is a script to unset the Album Ratings.

1. Open iTunes and select the tracks that you want to have reset. Can be all tracks.
2. Open a command prompt in the directory where the script is saved.
3. Type the command:
cscript /nologo resetAlbumRating.js

Here is resetAlbumRating.js
Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;
var numTracks = tracks.Count;
var i;

for (i = 1; i <= numTracks; i++)
{
var currTrack = tracks.Item(i);
currTrack.AlbumRating = 10;
}
WScript.Echo("Done");
That will eliminate the Album Ratings.
No, I don't know what is putting them on.

If you use a live updating smart playlist to find the Album ratings, you may get an error in the script about the playlist being deleted. Just select the tracks again and run again. Same with currTrack is a null object errors and this object does not support this property or method errors. Just run again. I think this is an iTunes updating a smart playlist at the same time a script is updating the contents issue.



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote
Old 05-18-2017, 04:43 PM
#4
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381

Quote:
Originally Posted by cjmnews View Post
And if you want to want to see what has Album Ratings and no Ratings. Album Rating is between 1 and 5 stars, Rating is less than 1 star.
Nope, that doesn't work. If a song has a "real" rating (blue stars) and the album doesn't, then iTunes "assigns" a rating (grey stars) to the album, based on the average of all its rated songs. So that list doesn't just show me unrated songs on rated albums. It shows me unrated songs on albums that are themselves rated, or have rated songs on them too.

So, for example.

"The Album" by The Band (no rating)

Track 1 - The Band - The Album (3 stars)
Track 2 - The Band - The Album (no rating)
Track 3 - The Band - The Album (5 stars)

There is nothing wrong with this album. The album itself does not "have" a rating. it doesn't "have" have one, but it does "sort of" have one. It has a "grey stars" rating of 4. So if I do your list, or any other variation I have tried, "Track 2" is going to show up on that list. And hundreds more songs just like it. Songs that don't have ratings, but are on albums, albums that also don't have ratings, but have other songs on them that do. But I don't want these songs there. I don't want to see "songs that are on [albums that have other songs that have song ratings]." I just want to see "songs that are on [albums that have album ratings]." Sorry, I'm talking myself in circles here. I hope you understand what I mean. Any list I can come up with so far shows both kinds. So then I have to sift through hundreds of the former, looking for a few of the latter.

Fortunately, it looks like there might be an easy way to clear them, after all. It looks like if I'm in "Album View" in iTunes when I select and right-click something, then the "Rating" option actually changes the album rating and not the individual song ratings. So I'm going to backup my .itl file first just in case I'm wrong and then try it on the whole library. Wish me luck!



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote
Old 05-18-2017, 04:55 PM
#5
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381

Quote:
Originally Posted by bwh79 View Post
Fortunately, it looks like there might be an easy way to clear them, after all. It looks like if I'm in "Album View" in iTunes when I select and right-click something, then the "Rating" option actually changes the album rating and not the individual song ratings. So I'm going to backup my .itl file first just in case I'm wrong and then try it on the whole library. Wish me luck!
Nope, that doesn't work either. If I do one album at a time, it does indeed change the "album rating" when I right-click and select "Rating", but if I have multiple items selected, it doesn't actually change anything...maybe I'll give your script a shot.



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote
Old 05-18-2017, 05:06 PM
#6
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381

Quote:
Originally Posted by bwh79 View Post
...maybe I'll give your script a shot.
I tried it and it spit an error message. In quoting your post, I saw the final "); was cut off in the actual "code" box that got posted. I tried it again with the intact script file and it worked, for the one album I had selected. So I just set it to go on all 10,000 tracks in (my half of our shared) music library. This is going to take a while, innit?



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote
Old 05-20-2017, 03:36 AM
#7
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,879

Quote:
Originally Posted by bwh79 View Post

So, for example.

"The Album" by The Band (no rating)

Track 1 - The Band - The Album (3 stars)
Track 2 - The Band - The Album (no rating)
Track 3 - The Band - The Album (5 stars)

There is nothing wrong with this album. The album itself does not "have" a rating. it doesn't "have" have one, but it does "sort of" have one. It has a "grey stars" rating of 4. So if I do your list, or any other variation I have tried, "Track 2" is going to show up on that list. And hundreds more songs just like it. Songs that don't have ratings, but are on albums, albums that also don't have ratings, but have other songs on them that do.
That is ugly. I tried altering my second playlist suggestion to be:
Album Rating is less than 5 stars (now that I erased all my album ratings)
Rating is less than 1 star

I get dozens of 1/2 gray star songs because some of the other tracks had ratings.
Removing the ratings from those tracks makes all the tracks have 1/2 grey stars

Not sure this helps at all.



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote
Old 06-01-2017, 07:49 PM
#8
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381

Quote:
Originally Posted by cjmnews View Post
I thought about it while washing dishes and it seemed easy. Tested it and it worked.

Here is a script to unset the Album Ratings.

1. Open iTunes and select the tracks that you want to have reset. Can be all tracks.
2. Open a command prompt in the directory where the script is saved.
3. Type the command:
cscript /nologo resetAlbumRating.js

Here is resetAlbumRating.js
Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;
var numTracks = tracks.Count;
var i;

for (i = 1; i <= numTracks; i++)
{
var currTrack = tracks.Item(i);
currTrack.AlbumRating = 10;
}
WScript.Echo("Done");
That will eliminate the Album Ratings.
No, I don't know what is putting them on.
Err...so I tried this a couple weeks ago, and it seemed to work. But then today I noticed that I had no tracks in any of my "unrated songs" smartlists. None. Nada. Zilch. Tinkering around, I found that "Rating is less than [1 star]" worked fine, but "Rating is [zero stars]" didn't catch anything. Even more puzzling, all of "her" lists (other half of my shared library) seemed to be working just fine with "is zero" and they didn't need the "less than 1" cheat.

So trying to figure out why hers worked and mine didn't, I went looking through the "shared" part looking for anything that might yet be unrated. And then I found something weird. Like, really weird. I came across a song that didn't have a rating, no blue stars, but it did have the grey stars. Great, so it's the album rating thing again. Except, here's the weird part...it had half of a grey star. I switched to album view and sure enough, that album's rated half a star. And the one next to it was also rated half a star. And then there were a few that weren't, but then I saw more that were. And more, and more, and I realized, that it's all of my music, and our shared stuff, all the tracks I ran the script on, they all have half a star "album rating" now. I don't think they did immediately after I ran the script, and I hadn't bothered to go and look a second time after it seemed to work so I don't know when exactly this occurred, but it's clearly all, and only, happened to the tracks I ran the script on two weeks ago.

Thoughts?



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote
Old 06-01-2017, 08:44 PM
#9
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,879

My first thought is that maybe setting the album rating to 10 is 1/2 star. I know that 0 is an error, maybe 1 is no stars.

At work at the moment, so I can't test the theory.

As for the difference between the playlists, my guess is that the song rating is getting computed to 1/2 star from the 1/2 star album rating.



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote
Old 06-02-2017, 12:48 PM
#10
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,879

Confirmed. My error. Change the value from 10 to 1.

Updated code:
Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;
var numTracks = tracks.Count;
var i;

for (i = 1; i <= numTracks; i++)
{
var currTrack = tracks.Item(i);
currTrack.AlbumRating = 1;
}
WScript.Echo("Done");



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is offline  
Reply With Quote
Old 06-15-2017, 01:41 PM
#11
 
Power Lounger
 
Join Date: Nov 2006
Location: Directly Above the Center of the Earth
Posts: 1,381

Quote:
Originally Posted by cjmnews View Post
Confirmed. My error. Change the value from 10 to 1.

Updated code:
Code:
var iTunesApp = WScript.CreateObject("iTunes.Application");
var mainLibrary = iTunesApp.LibraryPlaylist;
var tracks = iTunesApp.SelectedTracks;
var numTracks = tracks.Count;
var i;

for (i = 1; i <= numTracks; i++)
{
var currTrack = tracks.Item(i);
currTrack.AlbumRating = 1;
}
WScript.Echo("Done");
Thanks, I'll give that a shot. I was doing it manually, one album at a time, but I wasn't getting very far doing a few here and a few there...



iPod Touch 32GB (4th gen., Black) | iTunes 11.0.1.12 (8942 songs, 27.5 days, 37.13 GB)
SmartLists by Code Monkey
bwh79 is offline  
Reply With Quote

Topic: Album Rating messing up my smartlists.

Reply Thread Tools Topic Search

Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



RSS Feed Widget

iLounge Weekly
News, reviews, articles, giveaways, deals, and more delivered to your inbox.
Sign up for the iLounge Weekly Newsletter

iLounge is an independent resource for all things iPod, iPhone, iPad, and beyond.
iPod, iPhone, iPad, iTunes, Apple TV, Mac, and the Apple logo are trademarks of Apple Inc.
iLounge is © 2001 - 2016 iLounge, Inc. All Rights Reserved. Terms of Use | Privacy Policy