Bug 131910 - iTunes Mobile fix request - related to Bug 131487
Summary: iTunes Mobile fix request - related to Bug 131487
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/iPod iPhone (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-05 06:21 UTC by Alphamerik
Modified: 2011-12-20 11:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alphamerik 2006-08-05 06:21:25 UTC
Version:           1.4-svn (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages
OS:                Linux

The changes to the iPod MediaDevice are almost working perfectly with my iTunes mobile phone.  The small snafu is starting at the switch ~ line 999 in ipodmediadevice.cpp.   For whatever reason my Motorola SLVR iTunes phone is not being recognized by case ITDB_IPOD_MODEL_MOBILE_1 (line 1006).  I had to set the m_isMobile = true flag in the ITDB_IPOD_MODEL_UNKNOWN case for everything to work.  I would suggest doing a test in the ITDB_IPOD_MODEL_UNKNOWN case for the presence of the iTunes:iTunes_Control directory and assigning the m_isMobile flag as appropriate.

Thank you so much for adding this feature!
Comment 1 Martin Aumueller 2006-08-05 15:21:12 UTC
I don't think that this should be necessary: could you please report your problem to the gtkpod-devel mailing list? The people there will probably be able to help you with what kind of information you have to provide so they can make the detection code work with your phone.
Comment 2 Alphamerik 2006-08-05 22:14:49 UTC
Aparently no mobile can be recognized as an iPod mobile without user intervention.

Bug reported to libgpod here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1535128&group_id=67873&atid=519276

A temporary solution is to create a file on the mobile device like as follows:
$ cat iTunes/iTunes_Control/Device/SysInfo
ModelNumStr: Mmobile1

GtkPod will ask the user what the device is if it is not recognized.  I would recommend this method for Amarok as it seems to be the most robust.

Thank you for your help.
Comment 3 Alphamerik 2006-08-06 01:18:11 UTC
The response from the libgpod developers:

"The way libgpod works at this time, you will have to
create a SysInfo file with the respective model name.
gtkpod (CVS version) will do that for you when you set the
type of the iPod in the Repository Preferences Dialog."

This reinforces my case that extra logic/interaction needs to occure in the case of an unknown iPod type.

Thanks again...
Comment 4 Martin Aumueller 2006-08-08 05:50:55 UTC
SVN commit 570919 by aumuell:

detect itunes phones based on directory structure
BUG: 131910


 M  +4 -2      ChangeLog  
 M  +5 -0      src/mediadevice/ipod/ipodmediadevice.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #570918:570919
@@ -40,8 +40,8 @@
     * Lift size limit on pathnames and comments in collection databases not
       managed by MySQL. (BR 130585)
     * Generic mediadevice plugin is improved. Users can configure supported
-      filetypes and get more control over the location of songs and podcasts on disk
-      (Patch by eute).
+      filetypes and get more control over the location of songs and podcasts
+      on disk (Patch by eute).
     * Move composer tag to its own database table.
     * Re-enable adding videos to iPods with recent libgpod-cvs. (BR 130117)
     * Include Skip, Love and Ban in playlist right-click menu for last.fm
@@ -77,6 +77,8 @@
       since the last time it was enabled.
 
   BUGFIXES:
+    * Check directory structure on iPods of unknown type in order to detect
+      iTunes phones. (BR 131910)
     * Make 'Clear' individually translatable for playlists. (BR 131521)
     * Retain column visibility for flat collection view. (BR 126685)
     * Honour proxy exceptions for MusicBrainz lookups. Patch by N. Cat
--- trunk/extragear/multimedia/amarok/src/mediadevice/ipod/ipodmediadevice.cpp #570918:570919
@@ -1010,6 +1010,11 @@
             case ITDB_IPOD_MODEL_INVALID:
             case ITDB_IPOD_MODEL_UNKNOWN:
                 modelString = 0;
+                if( pathExists( "iTunes:iTunes_Control" ) )
+                {
+                    debug() << "iTunes/iTunes_Control found - assuming itunes phone" << endl;
+                    m_isMobile = true;
+                }
                 break;
             default:
                 break;