Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by DJanGo View Post
    looks like its possible but something that ends in 30 or more lines.
    that was quite near - 25 lines...

    Code:
    #!/bin/bash
    
    SAVEIFS=$IFS
    IFS=$(echo -en "\n\b")
    
    if [ -f /tmp/album.txt ]
       then
       rm /tmp/album.txt
    fi
    
    for file in $(find ./ -iname *.mp3)
        do
        album_folder=$(dirname "$file"|rev|cut -d '/' -f 1|rev)
        album_tag=$(eyeD3 "$file"|grep 'album'|grep -v 'album '|cut -d ' ' -f2-)
        if [ ! "$album_folder" = "$album_tag" ]
           then
           echo $file is in $album_folder but tag is $album_tag>>/tmp/album.txt
        fi
        done
    IFS=$SAVEIFS
    
    if [ -f /tmp/album.txt ]
       then
       cat /tmp/album.txt
    fi

  2. #12
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by itm View Post
    I really don't want to perform large scale modifications to my files or folders .
    mee too

    Quote Originally Posted by itm View Post
    I don't know how reliable EyeD is with large collections, but I'd be nervous about letting it make alot of changes.
    .
    • doesnt matter - each file is handled separate
    • we dont change anything - we only make a list of files that didnt match their foldernames.
    • YOU need to look and change it yourself - i dont have these huge balls to build something that changes anything on a foreign library...

  3. #13
    Senior Member
    Join Date
    May 2008
    Posts
    247
    Quote Originally Posted by DJanGo View Post
    that was quite near - 25 lines...

    Code:
    #!/bin/bash
    
    SAVEIFS=$IFS
    IFS=$(echo -en "\n\b")
    
    if [ -f /tmp/album.txt ]
       then
       rm /tmp/album.txt
    fi
    
    for file in $(find ./ -iname *.mp3)
        do
        album_folder=$(dirname "$file"|rev|cut -d '/' -f 1|rev)
        album_tag=$(eyeD3 "$file"|grep 'album'|grep -v 'album '|cut -d ' ' -f2-)
        if [ ! "$album_folder" = "$album_tag" ]
           then
           echo $file is in $album_folder but tag is $album_tag>>/tmp/album.txt
        fi
        done
    IFS=$SAVEIFS
    
    if [ -f /tmp/album.txt ]
       then
       cat /tmp/album.txt
    fi
    Many thanks for that. So I got eyeD3 installed and managed to run the script. I'm seeing alot of these errors:
    Code:
    'ascii' codec can't decode byte 0xc2 in position 1127: ordinal not in range(128)
    Genre string cannot be parsed with '^([A-Z 0-9+/\-\|!&'\.]+)([,;|][A-Z 0-9+/\-\|!&'\.]+)*$': (None)
    Any ideas?

  4. #14
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by itm View Post
    Many thanks for that. So I got eyeD3 installed and managed to run the script. I'm seeing alot of these errors:
    Code:
    'ascii' codec can't decode byte 0xc2 in position 1127: ordinal not in range(128)
    Genre string cannot be parsed with '^([A-Z 0-9+/\-\|!&'\.]+)([,;|][A-Z 0-9+/\-\|!&'\.]+)*$': (None)
    Any ideas?
    Puh...

    'ascii' codec can't decode
    Means - you have some special (non ascii) chars -thats just a warning.
    but...
    Genre string cannot be parsed
    tolds me - not only your album tags needs some love even your genres..

  5. #15
    Senior Member
    Join Date
    May 2008
    Posts
    247
    Quote Originally Posted by DJanGo View Post
    that was quite near - 25 lines...

    Code:
    #!/bin/bash
    
    SAVEIFS=$IFS
    IFS=$(echo -en "\n\b")
    
    if [ -f /tmp/album.txt ]
       then
       rm /tmp/album.txt
    fi
    
    for file in $(find ./ -iname *.mp3)
        do
        album_folder=$(dirname "$file"|rev|cut -d '/' -f 1|rev)
        album_tag=$(eyeD3 "$file"|grep 'album'|grep -v 'album '|cut -d ' ' -f2-)
        if [ ! "$album_folder" = "$album_tag" ]
           then
           echo $file is in $album_folder but tag is $album_tag>>/tmp/album.txt
        fi
        done
    IFS=$SAVEIFS
    
    if [ -f /tmp/album.txt ]
       then
       cat /tmp/album.txt
    fi
    So the job completed but for some reason it dumped pretty much every track to album.txt (all, 90,000+ of them). Here's an example of one line of the output:
    Code:
    ./Chris Cornell/Euphoria Morning/01.Can't Change Me.mp3 is in Euphoria Morning but tag is Euphoria Morning		year: 1999
    Could it be a problem with trailing spaces in the tag name?

  6. #16
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by itm View Post
    So the job completed but for some reason it dumped pretty much every track to album.txt (all, 90,000+ of them). Here's an example of one line of the output:
    Code:
    ./Chris Cornell/Euphoria Morning/01.Can't Change Me.mp3 is in Euphoria Morning but tag is Euphoria Morning		year: 1999
    Could it be a problem with trailing spaces in the tag name?
    lokks like..
    please change
    from
    Code:
    echo $file is in $album_folder but tag is $album_tag>>/tmp/album.txt
    to
    Code:
    echo $file is in [$album_folder] but tag is [$album_tag]>>/tmp/album.txt
    and run that in the Chris Cornell folder.

  7. #17
    Senior Member
    Join Date
    May 2008
    Posts
    247
    Quote Originally Posted by DJanGo View Post
    lokks like..
    please change
    from
    Code:
    echo $file is in $album_folder but tag is $album_tag>>/tmp/album.txt
    to
    Code:
    echo $file is in [$album_folder] but tag is [$album_tag]>>/tmp/album.txt
    and run that in the Chris Cornell folder.
    Similar problem (all tracks being written to album.txt) but now with square brackets around the album/folder names:
    Code:
    ./Euphoria Morning/01.Can't Change Me.mp3 is in [Euphoria Morning] but tag is [Euphoria Morning		[1myear[0m: 1999]
    ???

  8. #18
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by itm View Post
    Similar problem (all tracks being written to album.txt) but now with square brackets around the album/folder names:
    Code:
    ./Euphoria Morning/01.Can't Change Me.mp3 is in [Euphoria Morning] but tag is [Euphoria Morning		[1myear[0m: 1999]
    ???
    Please check some of theses files with mp3tag..

    mark the complete line in the albumtag from these files.

    Seems your Foldername is "Euphoria Morning" but there are trailing slashes and other stuff behind the albumname"?

  9. #19
    Senior Member
    Join Date
    May 2008
    Posts
    247
    Quote Originally Posted by DJanGo View Post
    Please check some of theses files with mp3tag..

    mark the complete line in the albumtag from these files.

    Seems your Foldername is "Euphoria Morning" but there are trailing slashes and other stuff behind the albumname"?
    The tags look pretty clean in mp3tag:
    Name:  20171114 CornellTags.jpg
Views: 24
Size:  114.8 KB

  10. #20
    Senior Member DJanGo's Avatar
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    2,371
    Quote Originally Posted by itm View Post
    The tags look pretty clean in mp3tag:
    Name:  20171114 CornellTags.jpg
Views: 24
Size:  114.8 KB
    Since i am not using id3v1 tags for a looong time - i cant reproduce the issue.

    Please
    Code:
     apt-get install id3v2
    and go to one of the folders and test one of the files:

    Code:
    id3v2 -l filename.mp3
    please compare these both fields:
    • Album
    • TALB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •